Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeOperation = "operation" //拓扑关系管理 TypeStatus = "status" //代理子设备上下线 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Devices ¶ added in v0.5.1
type Devices []*Device
func (Devices) GetProductIDs ¶ added in v0.5.1
获取产品id列表(不重复的)
type GatewayPayload ¶
type Msg ¶
type Msg struct { *deviceMsg.CommonMsg Payload *GatewayPayload `json:"payload,omitempty"` }
Msg 请求和回复结构体
type Register ¶ added in v0.5.1
type Register struct { /* 子设备绑定签名串。 签名算法: 1. 签名原串,将产品 ID 设备名称,随机数,时间戳拼接:text=${product_id};${device_name};${random};${expiration_time} 2. 使用设备 Psk 密钥,或者证书的 Sha1 摘要,进行签名:hmac_sha1(device_secret, text) */ Signature string `json:"signature,omitempty"` Random int64 `json:"random,omitempty"` //随机数。 Timestamp int64 `json:"timestamp,omitempty"` //时间戳,单位:秒。 SignMethod string `json:"signMethod,omitempty"` //签名算法。支持 hmacsha1、hmacsha256 }
Click to show internal directories.
Click to hide internal directories.