Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMessage ¶
BaseMessage the base struct of event message
type ConnectedInfo ¶
type ConnectedInfo struct { EventType string `json:"event_type"` TimeStamp int64 `json:"timestamp"` }
ConnectedInfo connected info
type Device ¶
type Device struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` State string `json:"state,omitempty"` LastOnlineTime string `json:"lastOnlineTime,omitempty"` Attributes map[string]*MsgAttr `json:"attributes,omitempty"` Twin map[string]*MsgTwin `json:"twin,omitempty"` }
Device the struct of device
type DeviceStateUpdate ¶ added in v1.18.0
type DeviceStateUpdate struct { BaseMessage Device Device }
DeviceStateUpdate the struct of device state update
type DeviceTwinDocument ¶
type DeviceTwinDocument struct { BaseMessage Twin map[string]*TwinDoc `json:"twin"` }
DeviceTwinDocument the struct of twin document
type DeviceTwinUpdate ¶
type DeviceTwinUpdate struct { BaseMessage Twin map[string]*MsgTwin `json:"twin"` }
DeviceTwinUpdate the struct of device twin update
type MembershipDetail ¶
type MembershipDetail struct { BaseMessage Devices []Device `json:"devices"` }
MembershipDetail the struct of membership detail
type MembershipUpdate ¶
type MembershipUpdate struct { BaseMessage AddDevices []Device `json:"added_devices"` RemoveDevices []Device `json:"removed_devices"` }
MembershipUpdate the struct of membership update
type MsgAttr ¶
type MsgAttr struct { Value string `json:"value"` Optional *bool `json:"optional,omitempty"` Metadata *TypeMetadata `json:"metadata,omitempty"` }
MsgAttr the struct of device attr
type MsgTwin ¶
type MsgTwin struct { Expected *TwinValue `json:"expected,omitempty"` Actual *TwinValue `json:"actual,omitempty"` Optional *bool `json:"optional,omitempty"` Metadata *TypeMetadata `json:"metadata,omitempty"` ExpectedVersion *TwinVersion `json:"expected_version,omitempty"` ActualVersion *TwinVersion `json:"actual_version,omitempty"` }
MsgTwin the struct of device twin
type Result ¶
type Result struct { BaseMessage Code int `json:"code,omitempty"` Reason string `json:"reason,omitempty"` }
Result the struct of Result for sending
type TwinValue ¶
type TwinValue struct { Value *string `json:"value,omitempty"` Metadata *ValueMetadata `json:"metadata,omitempty"` }
TwinValue the struct of twin value
type TwinVersion ¶
TwinVersion twin version
type TypeMetadata ¶
type TypeMetadata struct {
Type string `json:"type,omitempty"`
}
TypeMetadata the meta of value type
type ValueMetadata ¶
type ValueMetadata struct {
Timestamp int64 `json:"timestamp,omitempty"`
}
ValueMetadata the meta of value
Click to show internal directories.
Click to hide internal directories.