Documentation ¶
Overview ¶
Package pairing for Device Pairing.
Index ¶
- type DeviceRequest
- type DeviceResponse
- type QueryPairingDeviceListRequest
- type QueryPairingDeviceListResponse
- type RequestExtension
- type ResponseExtension
- type ZigbeeGatewayPairedListRequest
- type ZigbeeGatewayPairedListResponse
- type ZigbeeGatewayPairingListRequest
- type ZigbeeGatewayPairingListResponse
- type ZigbeeGatewayPairingRequest
- type ZigbeeGatewayPairingResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceRequest ¶
type DeviceRequest struct { ParingType string `url:"-" validate:"required" json:"paring_type"` // paring type,support BLE, AP, EZ UID string `url:"-" validate:"required" json:"uid"` // Tuya user id TimeZoneID string `url:"-" validate:"required" json:"time_zone_id"` // User's time zone id, device needs for daylight saving time HomeID string `url:"-" json:"home_id"` // Home id . If empty ,default user home Extension RequestExtension `url:"-" json:"extension"` // extension, the paring type is BLE and the device UUID is passed in }
type DeviceResponse ¶
type DeviceResponse struct { ExpireTime int64 `json:"expire_time"` // Token expiration time Region string `json:"region"` // Current region, support:AY EU US Token string `json:"token"` // paring token Secret string `json:"secret"` // secret Extension ResponseExtension `json:"extension"` // extension }
type QueryPairingDeviceListRequest ¶
type QueryPairingDeviceListRequest struct {
Token string `url:"-" validate:"required" json:"-"` // device paring token
}
func (*QueryPairingDeviceListRequest) Method ¶
func (s *QueryPairingDeviceListRequest) Method() string
Method for Request.Method()
func (*QueryPairingDeviceListRequest) URL ¶
func (s *QueryPairingDeviceListRequest) URL() string
URL for Request.URL()
type QueryPairingDeviceListResponse ¶
type QueryPairingDeviceListResponse struct { Failed []struct { DeviceID string `json:"device_id"` // Device id Code string `json:"code"` // errorCode Msg string `json:"msg"` // errorMsg Name string `json:"name"` // Device name } `json:"failed"` Success []struct { Category string `json:"category"` // Device category DeviceID string `json:"device_id"` // Device id Name string `json:"name"` // Device name ProductID string `json:"product_id"` // Product id } `json:"success"` }
type RequestExtension ¶
type RequestExtension struct {
UUID string `url:"-" json:"uuid"`
}
type ResponseExtension ¶
type ZigbeeGatewayPairedListRequest ¶
type ZigbeeGatewayPairedListRequest struct {
DeviceID string `url:"-" validate:"required" json:"-"` // Device id
}
func (*ZigbeeGatewayPairedListRequest) Method ¶
func (s *ZigbeeGatewayPairedListRequest) Method() string
Method for Request.Method()
func (*ZigbeeGatewayPairedListRequest) URL ¶
func (s *ZigbeeGatewayPairedListRequest) URL() string
URL for Request.URL()
type ZigbeeGatewayPairedListResponse ¶
type ZigbeeGatewayPairedListResponse struct { ID string `json:"id"` // Device id ProductID string `json:"product_id"` // Product id OwnerID string `json:"owner_id"` // Home id Online bool `json:"online"` // Device online state Name string `json:"name"` // Device name UpdateTime int64 `json:"update_time"` // Update time ActiveTime int64 `json:"active_time"` // Last active time Category string `json:"category"` // Category }
type ZigbeeGatewayPairingListRequest ¶
type ZigbeeGatewayPairingListRequest struct { DeviceID string `url:"-" validate:"required" json:"-"` // gateway ID DiscoveryTime int64 `url:"discovery_time" validate:"required" json:"-"` // Gateway enabled time }
func (*ZigbeeGatewayPairingListRequest) Method ¶
func (s *ZigbeeGatewayPairingListRequest) Method() string
Method for Request.Method()
func (*ZigbeeGatewayPairingListRequest) URL ¶
func (s *ZigbeeGatewayPairingListRequest) URL() string
URL for Request.URL()
type ZigbeeGatewayPairingListResponse ¶
type ZigbeeGatewayPairingListResponse struct { ID string `json:"id"` // Device id Category string `json:"category"` // Category ProductID string `json:"product_id"` // Product id UUID string `json:"uuid"` // Device chip id OwnerID string `json:"owner_id"` // Home id Online bool `json:"online"` // Device online state ActiveTime int64 `json:"active_time"` // Active time UpdateTime int64 `json:"update_time"` // Device update time }
type ZigbeeGatewayPairingRequest ¶
type ZigbeeGatewayPairingRequest struct { DeviceID string `url:"-" validate:"required" json:"-"` // device ID Duration int `url:"duration" json:"-"` // Gateway discovery time, default 100 seconds, maximum 3600 seconds , 0: stop discovery }
func (*ZigbeeGatewayPairingRequest) Method ¶
func (s *ZigbeeGatewayPairingRequest) Method() string
Method for Request.Method()
func (*ZigbeeGatewayPairingRequest) URL ¶
func (s *ZigbeeGatewayPairingRequest) URL() string
URL for Request.URL()
type ZigbeeGatewayPairingResponse ¶
type ZigbeeGatewayPairingResponse bool
Click to show internal directories.
Click to hide internal directories.