Documentation
¶
Index ¶
- Constants
- Variables
- type Action
- type ActionFormsElem
- type ActionFormsElemOp
- type ActionInput
- type ActionInputProperty
- type ActionInputPropertyEnumElem
- type AdapterAddedNotificationJson
- type AdapterAddedNotificationJsonData
- type AdapterCancelPairingCommandJson
- type AdapterCancelPairingCommandJsonData
- type AdapterCancelRemoveDeviceCommandJson
- type AdapterCancelRemoveDeviceCommandJsonData
- type AdapterPairingPromptNotificationJson
- type AdapterPairingPromptNotificationJsonData
- type AdapterRemoveDeviceRequestJson
- type AdapterRemoveDeviceRequestJsonData
- type AdapterRemoveDeviceResponseJson
- type AdapterRemoveDeviceResponseJsonData
- type AdapterStartPairingCommandJson
- type AdapterStartPairingCommandJsonData
- type AdapterUnloadRequestJson
- type AdapterUnloadRequestJsonData
- type AdapterUnloadResponseJson
- type AdapterUnloadResponseJsonData
- type AdapterUnpairingPromptNotificationJson
- type AdapterUnpairingPromptNotificationJsonData
- type Any
- type AnyUri
- type ApiHandlerAddedNotificationJson
- type ApiHandlerAddedNotificationJsonData
- type ApiHandlerApiRequestJson
- type ApiHandlerApiRequestJsonData
- type ApiHandlerApiRequestJsonDataRequest
- type ApiHandlerApiRequestJsonDataRequestBody
- type ApiHandlerApiRequestJsonDataRequestQuery
- type ApiHandlerApiResponseJson
- type ApiHandlerApiResponseJsonData
- type ApiHandlerApiResponseJsonDataResponse
- type ApiHandlerUnloadRequestJson
- type ApiHandlerUnloadRequestJsonData
- type ApiHandlerUnloadResponseJson
- type ApiHandlerUnloadResponseJsonData
- type ArrayString
- type Device
- type DeviceActionStatusNotificationJson
- type DeviceActionStatusNotificationJsonData
- type DeviceActionStatusNotificationJsonDataAction
- type DeviceActionStatusNotificationJsonDataActionInput
- type DeviceActions
- type DeviceAddedNotificationJson
- type DeviceAddedNotificationJsonData
- type DeviceConnectedStateNotificationJson
- type DeviceConnectedStateNotificationJsonData
- type DeviceEventNotificationJson
- type DeviceEventNotificationJsonData
- type DeviceEventNotificationJsonDataEvent
- type DeviceEventNotificationJsonDataEventData
- type DeviceEvents
- type DeviceProperties
- type DevicePropertyChangedNotificationJson
- type DevicePropertyChangedNotificationJsonData
- type DeviceRemoveActionRequestJson
- type DeviceRemoveActionRequestJsonData
- type DeviceRemoveActionResponseJson
- type DeviceRemoveActionResponseJsonData
- type DeviceRequestActionRequestJson
- type DeviceRequestActionRequestJsonData
- type DeviceRequestActionRequestJsonDataInput
- type DeviceRequestActionResponseJson
- type DeviceRequestActionResponseJsonData
- type DeviceSavedNotificationJson
- type DeviceSavedNotificationJsonData
- type DeviceSetCredentialsRequestJson
- type DeviceSetCredentialsRequestJsonData
- type DeviceSetCredentialsResponseJson
- type DeviceSetCredentialsResponseJsonData
- type DeviceSetPinRequestJson
- type DeviceSetPinRequestJsonData
- type DeviceSetPinResponseJson
- type DeviceSetPinResponseJsonData
- type DeviceSetPropertyCommandJson
- type DeviceSetPropertyCommandJsonData
- type DeviceSetPropertyCommandJsonDataPropertyValue
- type DeviceWithoutId
- type DeviceWithoutIdActions
- type DeviceWithoutIdEvents
- type DeviceWithoutIdProperties
- type Event
- type EventEnumElem
- type EventFormsElem
- type EventFormsElemOp
- type FormElement
- type FormElementProperty
- type FormElementResponse
- type Link
- type MessageType
- type MockAdapterAddDeviceRequestJson
- type MockAdapterAddDeviceRequestJsonData
- type MockAdapterAddDeviceRequestJsonDataDeviceDescr
- type MockAdapterAddDeviceResponseJson
- type MockAdapterAddDeviceResponseJsonData
- type MockAdapterClearStateRequestJson
- type MockAdapterClearStateRequestJsonData
- type MockAdapterClearStateResponseJson
- type MockAdapterClearStateResponseJsonData
- type MockAdapterPairDeviceCommandJson
- type MockAdapterPairDeviceCommandJsonData
- type MockAdapterPairDeviceCommandJsonDataDeviceDescr
- type MockAdapterRemoveDeviceRequestJson
- type MockAdapterRemoveDeviceRequestJsonData
- type MockAdapterRemoveDeviceResponseJson
- type MockAdapterRemoveDeviceResponseJsonData
- type MockAdapterUnpairDeviceCommandJson
- type MockAdapterUnpairDeviceCommandJsonData
- type NotificationLevel
- type NotifierAddedNotificationJson
- type NotifierAddedNotificationJsonData
- type NotifierUnloadRequestJson
- type NotifierUnloadRequestJsonData
- type NotifierUnloadResponseJson
- type NotifierUnloadResponseJsonData
- type OutletAddedNotificationJson
- type OutletAddedNotificationJsonData
- type OutletAddedNotificationJsonDataOutlet
- type OutletNotifyRequestJson
- type OutletNotifyRequestJsonData
- type OutletNotifyResponseJson
- type OutletNotifyResponseJsonData
- type OutletRemovedNotificationJson
- type OutletRemovedNotificationJsonData
- type Pin
- type PluginErrorNotificationJson
- type PluginErrorNotificationJsonData
- type PluginRegisterRequestJson
- type PluginRegisterRequestJsonData
- type PluginRegisterResponseJson
- type PluginRegisterResponseJsonData
- type PluginRegisterResponseJsonDataPreferences
- type PluginRegisterResponseJsonDataPreferencesUnits
- type PluginRegisterResponseJsonDataUserProfile
- type PluginUnloadRequestJson
- type PluginUnloadRequestJsonData
- type PluginUnloadResponseJson
- type PluginUnloadResponseJsonData
- type Property
- type PropertyValue
- type SchemaJson
- type SchemaJsonMessage
- type Scopes
- type Type
Constants ¶
const ( EventFormsElemOpSubscribeEvent = "subscribeEvent" EventFormsElemOpUnsubscribeEvent = "unsubscribeEvent" )
const ( TypeNull = "null" TypeBoolean = "boolean" TypeObject = "object" TypeArray = "array" TypeNumber = "number" TypeInteger = "integer" TypeString = "string" )
const ActionFromOpInvokeAction = "invokeaction"
Variables ¶
var ( MessageType_name = map[int32]string{ 0: "PluginRegisterRequest", 1: "PluginRegisterResponse", 2: "PluginUnloadRequest", 3: "PluginUnloadResponse", 4: "PluginErrorNotification", 4096: "AdapterAddedNotification", 4100: "AdapterCancelPairingCommand", 4101: "AdapterPairingPromptNotification", 4102: "AdapterUnpairingPromptNotification", 4103: "AdapterRemoveDeviceRequest", 4104: "AdapterRemoveDeviceResponse", 4105: "AdapterCancelRemoveDeviceCommand", 4097: "AdapterUnloadRequest", 4098: "AdapterUnloadResponse", 4099: "AdapterStartPairingCommand", 20480: "ApiHandlerAddedNotification", 20483: "ApiHandlerApiRequest", 20484: "ApiHandlerApiResponse", 20481: "ApiHandlerUnloadRequest", 20482: "ApiHandlerUnloadResponse", 8201: "DeviceActionStatusNotification", 8192: "DeviceAddedNotification", 8197: "DeviceConnectedStateNotification", 8206: "DeviceDebugCommand", 8200: "DeviceEventNotification", 8199: "DevicePropertyChangedNotification", 8202: "DeviceRemoveActionRequest", 8203: "DeviceRemoveActionResponse", 8204: "DeviceRequestActionRequest", 8205: "DeviceRequestActionResponse", 8207: "DeviceSavedNotification", 8195: "DeviceSetCredentialsRequest", 8196: "DeviceSetCredentialsResponse", 8193: "DeviceSetPinRequest", 8194: "DeviceSetPinResponse", 8198: "DeviceSetPropertyCommand", 61440: "MockAdapterAddDeviceRequest", 61441: "MockAdapterAddDeviceResponse", 61446: "MockAdapterClearStateRequest", 61447: "MockAdapterClearStateResponse", 61444: "MockAdapterPairDeviceCommand", 61442: "MockAdapterRemoveDeviceRequest", 61443: "MockAdapterRemoveDeviceResponse", 61445: "MockAdapterUnpairDeviceCommand", 12288: "NotifierAddedNotification", 12289: "NotifierUnloadRequest", 12290: "NotifierUnloadResponse", 16384: "OutletAddedNotification", 16386: "OutletNotifyRequest", 16387: "OutletNotifyResponse", 16385: "OutletRemovedNotification", 81000: "ServiceAddedNotification", 81100: "ServiceSetPropertyValueRequest", 81101: "ServicePropertyChangedNotification", 81109: "ServiceActionsStatusNotification", 81001: "ServiceGetThingsRequest", 81002: "ServiceGetThingsResponse", 81003: "ServiceGetThingRequest", 81004: "ServiceGetThingResponse", } MessageType_value = map[string]int32{ "PluginRegisterRequest": 0, "PluginRegisterResponse": 1, "PluginUnloadRequest": 2, "PluginUnloadResponse": 3, "PluginErrorNotification": 4, "AdapterAddedNotification": 4096, "AdapterCancelPairingCommand": 4100, "AdapterPairingPromptNotification": 4101, "AdapterUnpairingPromptNotification": 4102, "AdapterRemoveDeviceRequest": 4103, "AdapterRemoveDeviceResponse": 4104, "AdapterCancelRemoveDeviceCommand": 4105, "AdapterUnloadRequest": 4097, "AdapterUnloadResponse": 4098, "AdapterStartPairingCommand": 4099, "ApiHandlerAddedNotification": 20480, "ApiHandlerApiRequest": 20483, "ApiHandlerApiResponse": 20484, "ApiHandlerUnloadRequest": 20481, "ApiHandlerUnloadResponse": 20482, "DeviceActionStatusNotification": 8201, "DeviceAddedNotification": 8192, "DeviceConnectedStateNotification": 8197, "DeviceDebugCommand": 8206, "DeviceEventNotification": 8200, "DevicePropertyChangedNotification": 8199, "DeviceRemoveActionRequest": 8202, "DeviceRemoveActionResponse": 8203, "DeviceRequestActionRequest": 8204, "DeviceRequestActionResponse": 8205, "DeviceSavedNotification": 8207, "DeviceSetCredentialsRequest": 8195, "DeviceSetCredentialsResponse": 8196, "DeviceSetPinRequest": 8193, "DeviceSetPinResponse": 8194, "DeviceSetPropertyCommand": 8198, "MockAdapterAddDeviceRequest": 61440, "MockAdapterAddDeviceResponse": 61441, "MockAdapterClearStateRequest": 61446, "MockAdapterClearStateResponse": 61447, "MockAdapterPairDeviceCommand": 61444, "MockAdapterRemoveDeviceRequest": 61442, "MockAdapterRemoveDeviceResponse": 61443, "MockAdapterUnpairDeviceCommand": 61445, "NotifierAddedNotification": 12288, "NotifierUnloadRequest": 12289, "NotifierUnloadResponse": 12290, "OutletAddedNotification": 16384, "OutletNotifyRequest": 16386, "OutletNotifyResponse": 16387, "OutletRemovedNotification": 16385, "ServiceAddedNotification": 81000, "ServiceSetPropertyValueRequest": 81100, "ServicePropertyChangedNotification": 81101, "ServiceActionsStatusNotification": 81109, "ServiceGetThingsRequest": 81001, "ServiceGetThingsResponse": 81002, "ServiceGetThingRequest": 81003, "ServiceGetThingResponse": 81004, } )
Enum value maps for MessageType.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // The type of the actions Type *string `json:"@type,omitempty" yaml:"@type,omitempty"` // Description of the Action Description *string `json:"description,omitempty" yaml:"description,omitempty"` // Forms corresponds to the JSON schema field "forms". Forms []ActionFormsElem `json:"forms,omitempty" yaml:"forms,omitempty"` // Input corresponds to the JSON schema field "input". Input ActionInput `json:"input,omitempty" yaml:"input,omitempty"` // The title of the Action Title *string `json:"title,omitempty" yaml:"title,omitempty"` }
Action Description of the Action
type ActionFormsElem ¶
type ActionFormsElem struct { FormElement Op ActionFormsElemOp `json:"op"` }
type ActionFormsElemOp ¶
type ActionFormsElemOp struct { *ArrayString // contains filtered or unexported fields }
func (*ActionFormsElemOp) UnmarshalJSON ¶
func (a *ActionFormsElemOp) UnmarshalJSON(data []byte) error
type ActionInput ¶
type ActionInput any
type ActionInputProperty ¶
type ActionInputProperty struct { // The type of the input property Type *string `json:"@type,omitempty" yaml:"@type,omitempty"` // Enum corresponds to the JSON schema field "enum". Enum []ActionInputPropertyEnumElem `json:"enum,omitempty" yaml:"enum,omitempty"` // The maximum value of the input property Maximum *float64 `json:"maximum,omitempty" yaml:"maximum,omitempty"` // The minimum value of the input property Minimum *float64 `json:"minimum,omitempty" yaml:"minimum,omitempty"` // The precision of the value MultipleOf *float64 `json:"multipleOf,omitempty" yaml:"multipleOf,omitempty"` // The unit of the input property Unit *string `json:"unit,omitempty" yaml:"unit,omitempty"` }
ActionInputProperty An actions input property
type ActionInputPropertyEnumElem ¶
type ActionInputPropertyEnumElem any
ActionInputPropertyEnumElem The possible values of the input property
type AdapterAddedNotificationJson ¶
type AdapterAddedNotificationJson struct { // Message-specific data Data AdapterAddedNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a plugin has added an adapter
func (*AdapterAddedNotificationJson) UnmarshalJSON ¶
func (j *AdapterAddedNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterAddedNotificationJsonData ¶
type AdapterAddedNotificationJsonData struct { // ID of the new adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // Name of the new adapter Name string `json:"name" yaml:"name"` // Name of the add-on package PackageName string `json:"packageName" yaml:"packageName"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*AdapterAddedNotificationJsonData) UnmarshalJSON ¶
func (j *AdapterAddedNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterCancelPairingCommandJson ¶
type AdapterCancelPairingCommandJson struct { // Message-specific data Data AdapterCancelPairingCommandJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Tell an adapter to cancel the pairing process
func (*AdapterCancelPairingCommandJson) UnmarshalJSON ¶
func (j *AdapterCancelPairingCommandJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterCancelPairingCommandJsonData ¶
type AdapterCancelPairingCommandJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*AdapterCancelPairingCommandJsonData) UnmarshalJSON ¶
func (j *AdapterCancelPairingCommandJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterCancelRemoveDeviceCommandJson ¶
type AdapterCancelRemoveDeviceCommandJson struct { // Message-specific data Data AdapterCancelRemoveDeviceCommandJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Tell an adapter to cancel the removal of a device
func (*AdapterCancelRemoveDeviceCommandJson) UnmarshalJSON ¶
func (j *AdapterCancelRemoveDeviceCommandJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterCancelRemoveDeviceCommandJsonData ¶
type AdapterCancelRemoveDeviceCommandJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device which is being removed DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*AdapterCancelRemoveDeviceCommandJsonData) UnmarshalJSON ¶
func (j *AdapterCancelRemoveDeviceCommandJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterPairingPromptNotificationJson ¶
type AdapterPairingPromptNotificationJson struct { // Message-specific data Data AdapterPairingPromptNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a prompt should be presented to the user while pairing
func (*AdapterPairingPromptNotificationJson) UnmarshalJSON ¶
func (j *AdapterPairingPromptNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterPairingPromptNotificationJsonData ¶
type AdapterPairingPromptNotificationJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of specific device the prompt pertains to DeviceId *string `json:"deviceId,omitempty" yaml:"deviceId,omitempty"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // The message to present to the user Prompt string `json:"prompt" yaml:"prompt"` // URL of a web page containing more information Url *string `json:"url,omitempty" yaml:"url,omitempty"` }
Message-specific data
func (*AdapterPairingPromptNotificationJsonData) UnmarshalJSON ¶
func (j *AdapterPairingPromptNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterRemoveDeviceRequestJson ¶
type AdapterRemoveDeviceRequestJson struct { // Message-specific data Data AdapterRemoveDeviceRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Ask an adapter to remove a device
func (*AdapterRemoveDeviceRequestJson) UnmarshalJSON ¶
func (j *AdapterRemoveDeviceRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterRemoveDeviceRequestJsonData ¶
type AdapterRemoveDeviceRequestJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device to remove DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*AdapterRemoveDeviceRequestJsonData) UnmarshalJSON ¶
func (j *AdapterRemoveDeviceRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterRemoveDeviceResponseJson ¶
type AdapterRemoveDeviceResponseJson struct { // Message-specific data Data AdapterRemoveDeviceResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that an adapter has removed a device
func (*AdapterRemoveDeviceResponseJson) UnmarshalJSON ¶
func (j *AdapterRemoveDeviceResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterRemoveDeviceResponseJsonData ¶
type AdapterRemoveDeviceResponseJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device which has been removed DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*AdapterRemoveDeviceResponseJsonData) UnmarshalJSON ¶
func (j *AdapterRemoveDeviceResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterStartPairingCommandJson ¶
type AdapterStartPairingCommandJson struct { // Message-specific data Data AdapterStartPairingCommandJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Tell an adapter to start the pairing process
func (*AdapterStartPairingCommandJson) UnmarshalJSON ¶
func (j *AdapterStartPairingCommandJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterStartPairingCommandJsonData ¶
type AdapterStartPairingCommandJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Number of seconds to run the pairing process before timing out Timeout int `json:"timeout" yaml:"timeout"` }
Message-specific data
func (*AdapterStartPairingCommandJsonData) UnmarshalJSON ¶
func (j *AdapterStartPairingCommandJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterUnloadRequestJson ¶
type AdapterUnloadRequestJson struct { // Message-specific data Data AdapterUnloadRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Request that an adapter is unloaded
func (*AdapterUnloadRequestJson) UnmarshalJSON ¶
func (j *AdapterUnloadRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterUnloadRequestJsonData ¶
type AdapterUnloadRequestJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*AdapterUnloadRequestJsonData) UnmarshalJSON ¶
func (j *AdapterUnloadRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterUnloadResponseJson ¶
type AdapterUnloadResponseJson struct { // Message-specific data Data AdapterUnloadResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that an adapter is unloaded
func (*AdapterUnloadResponseJson) UnmarshalJSON ¶
func (j *AdapterUnloadResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterUnloadResponseJsonData ¶
type AdapterUnloadResponseJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*AdapterUnloadResponseJsonData) UnmarshalJSON ¶
func (j *AdapterUnloadResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterUnpairingPromptNotificationJson ¶
type AdapterUnpairingPromptNotificationJson struct { // Message-specific data Data AdapterUnpairingPromptNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a prompt should be presented to the user while unpairing
func (*AdapterUnpairingPromptNotificationJson) UnmarshalJSON ¶
func (j *AdapterUnpairingPromptNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AdapterUnpairingPromptNotificationJsonData ¶
type AdapterUnpairingPromptNotificationJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of specific device the prompt pertains to DeviceId *string `json:"deviceId,omitempty" yaml:"deviceId,omitempty"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // The message to present to the user Prompt string `json:"prompt" yaml:"prompt"` // URL of a web page containing more information Url *string `json:"url,omitempty" yaml:"url,omitempty"` }
Message-specific data
func (*AdapterUnpairingPromptNotificationJsonData) UnmarshalJSON ¶
func (j *AdapterUnpairingPromptNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerAddedNotificationJson ¶
type ApiHandlerAddedNotificationJson struct { // Message-specific data Data ApiHandlerAddedNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a plugin has added an API handler
func (*ApiHandlerAddedNotificationJson) UnmarshalJSON ¶
func (j *ApiHandlerAddedNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerAddedNotificationJsonData ¶
type ApiHandlerAddedNotificationJsonData struct { // Instance of the add-on package PackageName string `json:"packageName" yaml:"packageName"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*ApiHandlerAddedNotificationJsonData) UnmarshalJSON ¶
func (j *ApiHandlerAddedNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerApiRequestJson ¶
type ApiHandlerApiRequestJson struct { // Message-specific data Data ApiHandlerApiRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
handler an incoming API request
func (*ApiHandlerApiRequestJson) UnmarshalJSON ¶
func (j *ApiHandlerApiRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerApiRequestJsonData ¶
type ApiHandlerApiRequestJsonData struct { // Unique ID of this message MessageId int `json:"messageId" yaml:"messageId"` // Instance of the add-on package PackageName string `json:"packageName" yaml:"packageName"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Incoming request Request ApiHandlerApiRequestJsonDataRequest `json:"request" yaml:"request"` }
Message-specific data
func (*ApiHandlerApiRequestJsonData) UnmarshalJSON ¶
func (j *ApiHandlerApiRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerApiRequestJsonDataRequest ¶
type ApiHandlerApiRequestJsonDataRequest struct { // Parsed parameters from the body Body ApiHandlerApiRequestJsonDataRequestBody `json:"body" yaml:"body"` // HTTP method of the request Method string `json:"method" yaml:"method"` // Request path, relative to this handler Path string `json:"path" yaml:"path"` // Query parameters from URL Query ApiHandlerApiRequestJsonDataRequestQuery `json:"query" yaml:"query"` }
Incoming request
func (*ApiHandlerApiRequestJsonDataRequest) UnmarshalJSON ¶
func (j *ApiHandlerApiRequestJsonDataRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerApiRequestJsonDataRequestBody ¶
Parsed parameters from the body
type ApiHandlerApiRequestJsonDataRequestQuery ¶
Query parameters from URL
type ApiHandlerApiResponseJson ¶
type ApiHandlerApiResponseJson struct { // Message-specific data Data ApiHandlerApiResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Response message from an API handler request
func (*ApiHandlerApiResponseJson) UnmarshalJSON ¶
func (j *ApiHandlerApiResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerApiResponseJsonData ¶
type ApiHandlerApiResponseJsonData struct { // ID of the request message MessageId int `json:"messageId" yaml:"messageId"` // Instance of the add-on package PackageName string `json:"packageName" yaml:"packageName"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Outgoing response Response ApiHandlerApiResponseJsonDataResponse `json:"response" yaml:"response"` }
Message-specific data
func (*ApiHandlerApiResponseJsonData) UnmarshalJSON ¶
func (j *ApiHandlerApiResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerApiResponseJsonDataResponse ¶
type ApiHandlerApiResponseJsonDataResponse struct { // Body content Content any `json:"content,omitempty" yaml:"content,omitempty"` // Content-Type of the response body ContentType any `json:"contentType,omitempty" yaml:"contentType,omitempty"` // HTTP status code Status int `json:"status" yaml:"status"` }
Outgoing response
func (*ApiHandlerApiResponseJsonDataResponse) UnmarshalJSON ¶
func (j *ApiHandlerApiResponseJsonDataResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerUnloadRequestJson ¶
type ApiHandlerUnloadRequestJson struct { // Message-specific data Data ApiHandlerUnloadRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Request that an API handler is unloaded
func (*ApiHandlerUnloadRequestJson) UnmarshalJSON ¶
func (j *ApiHandlerUnloadRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerUnloadRequestJsonData ¶
type ApiHandlerUnloadRequestJsonData struct { // Instance of the add-on package PackageName string `json:"packageName" yaml:"packageName"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*ApiHandlerUnloadRequestJsonData) UnmarshalJSON ¶
func (j *ApiHandlerUnloadRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerUnloadResponseJson ¶
type ApiHandlerUnloadResponseJson struct { // Message-specific data Data ApiHandlerUnloadResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that an API handler is unloaded
func (*ApiHandlerUnloadResponseJson) UnmarshalJSON ¶
func (j *ApiHandlerUnloadResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ApiHandlerUnloadResponseJsonData ¶
type ApiHandlerUnloadResponseJsonData struct { // Instance of the add-on package PackageName string `json:"packageName" yaml:"packageName"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*ApiHandlerUnloadResponseJsonData) UnmarshalJSON ¶
func (j *ApiHandlerUnloadResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ArrayString ¶
type ArrayString []string
type Device ¶
type Device struct { // Context of the device Context *string `json:"@context,omitempty" yaml:"@context,omitempty"` // Type corresponds to the JSON schema field "@type". Type []string `json:"@type,omitempty" yaml:"@type,omitempty"` // The base href of the device BaseHref *string `json:"baseHref,omitempty" yaml:"baseHref,omitempty"` // If credentials are required CredentialsRequired *bool `json:"credentialsRequired,omitempty" yaml:"credentialsRequired,omitempty"` // Description of the device Description *string `json:"description,omitempty" yaml:"description,omitempty"` // ID of the device Id string `json:"id" yaml:"id"` // Links corresponds to the JSON schema field "links". Links []Link `json:"links,omitempty" yaml:"links,omitempty"` // Pin corresponds to the JSON schema field "pin". Pin *Pin `json:"pin,omitempty" yaml:"pin,omitempty"` // Properties corresponds to the JSON schema field "properties". Properties DeviceProperties `json:"properties,omitempty" yaml:"properties,omitempty"` // Events corresponds to the JSON schema field "events". Events DeviceEvents `json:"events,omitempty" yaml:"events,omitempty"` // Actions corresponds to the JSON schema field "actions". Actions DeviceActions `json:"actions,omitempty" yaml:"actions,omitempty"` // Title of the Device Title *string `json:"title,omitempty" yaml:"title,omitempty"` }
Device Description of the device
func (*Device) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type DeviceActionStatusNotificationJson ¶
type DeviceActionStatusNotificationJson struct { // Message-specific data Data DeviceActionStatusNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Description of the Action Notification that an actions's status has changed on a device
func (*DeviceActionStatusNotificationJson) UnmarshalJSON ¶
func (j *DeviceActionStatusNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceActionStatusNotificationJsonData ¶
type DeviceActionStatusNotificationJsonData struct { // Description of the actions Action DeviceActionStatusNotificationJsonDataAction `json:"actions" yaml:"actions"` // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*DeviceActionStatusNotificationJsonData) UnmarshalJSON ¶
func (j *DeviceActionStatusNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceActionStatusNotificationJsonDataAction ¶
type DeviceActionStatusNotificationJsonDataAction struct { // ID of the Action Id string `json:"id" yaml:"id"` // Input corresponds to the JSON schema field "input". Input DeviceActionStatusNotificationJsonDataActionInput `json:"input,omitempty" yaml:"input,omitempty"` // Name of the Action Name string `json:"name" yaml:"name"` // Status of the Action Status string `json:"status" yaml:"status"` // Completion time of the Action TimeCompleted *string `json:"timeCompleted,omitempty" yaml:"timeCompleted,omitempty"` // Request time of the Action TimeRequested string `json:"timeRequested" yaml:"timeRequested"` }
Description of the actions
func (*DeviceActionStatusNotificationJsonDataAction) UnmarshalJSON ¶
func (j *DeviceActionStatusNotificationJsonDataAction) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceActions ¶
type DeviceAddedNotificationJson ¶
type DeviceAddedNotificationJson struct { // Message-specific data Data DeviceAddedNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a new device has been added to an adapter
func (*DeviceAddedNotificationJson) UnmarshalJSON ¶
func (j *DeviceAddedNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceAddedNotificationJsonData ¶
type DeviceAddedNotificationJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // Device corresponds to the JSON schema field "device". Device Device `json:"device" yaml:"device"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
type DeviceConnectedStateNotificationJson ¶
type DeviceConnectedStateNotificationJson struct { // Message-specific data Data DeviceConnectedStateNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that the connected state has changed for a device
func (*DeviceConnectedStateNotificationJson) UnmarshalJSON ¶
func (j *DeviceConnectedStateNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceConnectedStateNotificationJsonData ¶
type DeviceConnectedStateNotificationJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // Whether or not the device is currently connected Connected bool `json:"connected" yaml:"connected"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*DeviceConnectedStateNotificationJsonData) UnmarshalJSON ¶
func (j *DeviceConnectedStateNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceEventNotificationJson ¶
type DeviceEventNotificationJson struct { // Message-specific data Data DeviceEventNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that an events has occurred on a device
func (*DeviceEventNotificationJson) UnmarshalJSON ¶
func (j *DeviceEventNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceEventNotificationJsonData ¶
type DeviceEventNotificationJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // Description of the events Event DeviceEventNotificationJsonDataEvent `json:"events" yaml:"events"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*DeviceEventNotificationJsonData) UnmarshalJSON ¶
func (j *DeviceEventNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceEventNotificationJsonDataEvent ¶
type DeviceEventNotificationJsonDataEvent struct { // Data corresponds to the JSON schema field "data". Data DeviceEventNotificationJsonDataEventData `json:"data,omitempty" yaml:"data,omitempty"` // Name of the events Name string `json:"name" yaml:"name"` // Timestamp of the events Timestamp string `json:"timestamp" yaml:"timestamp"` }
Description of the events
func (*DeviceEventNotificationJsonDataEvent) UnmarshalJSON ¶
func (j *DeviceEventNotificationJsonDataEvent) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceEventNotificationJsonDataEventData ¶
type DeviceEventNotificationJsonDataEventData any
type DeviceEvents ¶
type DeviceProperties ¶
type DevicePropertyChangedNotificationJson ¶
type DevicePropertyChangedNotificationJson struct { // Message-specific data Data DevicePropertyChangedNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a property on a device has changed
func (*DevicePropertyChangedNotificationJson) UnmarshalJSON ¶
func (j *DevicePropertyChangedNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DevicePropertyChangedNotificationJsonData ¶
type DevicePropertyChangedNotificationJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Property corresponds to the JSON schema field "property". Property Property `json:"property" yaml:"property"` }
Message-specific data
func (*DevicePropertyChangedNotificationJsonData) UnmarshalJSON ¶
func (j *DevicePropertyChangedNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceRemoveActionRequestJson ¶
type DeviceRemoveActionRequestJson struct { // Message-specific data Data DeviceRemoveActionRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Remove/cancel an existing actions from a device
func (*DeviceRemoveActionRequestJson) UnmarshalJSON ¶
func (j *DeviceRemoveActionRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceRemoveActionRequestJsonData ¶
type DeviceRemoveActionRequestJsonData struct { // ID of the existing actions ActionId string `json:"actionId" yaml:"actionId"` // Instance of the actions ActionName string `json:"actionName" yaml:"actionName"` // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // Unique ID of this message MessageId int `json:"messageId" yaml:"messageId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*DeviceRemoveActionRequestJsonData) UnmarshalJSON ¶
func (j *DeviceRemoveActionRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceRemoveActionResponseJson ¶
type DeviceRemoveActionResponseJson struct { // Message-specific data Data DeviceRemoveActionResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that an actions has been removed/cancelled from a device
func (*DeviceRemoveActionResponseJson) UnmarshalJSON ¶
func (j *DeviceRemoveActionResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceRemoveActionResponseJsonData ¶
type DeviceRemoveActionResponseJsonData struct { // ID of the actions ActionId string `json:"actionId" yaml:"actionId"` // Instance of the actions ActionName string `json:"actionName" yaml:"actionName"` // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the request message MessageId int `json:"messageId" yaml:"messageId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Whether or not the operation was successful Success bool `json:"success" yaml:"success"` }
Message-specific data
func (*DeviceRemoveActionResponseJsonData) UnmarshalJSON ¶
func (j *DeviceRemoveActionResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceRequestActionRequestJson ¶
type DeviceRequestActionRequestJson struct { // Message-specific data Data DeviceRequestActionRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Request a new actions on a device
func (*DeviceRequestActionRequestJson) UnmarshalJSON ¶
func (j *DeviceRequestActionRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceRequestActionRequestJsonData ¶
type DeviceRequestActionRequestJsonData struct { // Unique ID of this existing actions ActionId string `json:"actionId" yaml:"actionId"` // Instance of the actions ActionName string `json:"actionName" yaml:"actionName"` // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // Input to the actions Input DeviceRequestActionRequestJsonDataInput `json:"input" yaml:"input"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*DeviceRequestActionRequestJsonData) UnmarshalJSON ¶
func (j *DeviceRequestActionRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceRequestActionRequestJsonDataInput ¶
type DeviceRequestActionRequestJsonDataInput any
Input to the actions
type DeviceRequestActionResponseJson ¶
type DeviceRequestActionResponseJson struct { // Message-specific data Data DeviceRequestActionResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that an actions has been requested on a device
func (*DeviceRequestActionResponseJson) UnmarshalJSON ¶
func (j *DeviceRequestActionResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceRequestActionResponseJsonData ¶
type DeviceRequestActionResponseJsonData struct { // ID of the actions ActionId string `json:"actionId" yaml:"actionId"` // Instance of the actions ActionName string `json:"actionName" yaml:"actionName"` // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Whether or not the operation was successful Success bool `json:"success" yaml:"success"` }
Message-specific data
func (*DeviceRequestActionResponseJsonData) UnmarshalJSON ¶
func (j *DeviceRequestActionResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSavedNotificationJson ¶
type DeviceSavedNotificationJson struct { // Message-specific data Data DeviceSavedNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that the user has saved a device
func (*DeviceSavedNotificationJson) UnmarshalJSON ¶
func (j *DeviceSavedNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSavedNotificationJsonData ¶
type DeviceSavedNotificationJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // Device corresponds to the JSON schema field "device". Device DeviceWithoutId `json:"device" yaml:"device"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*DeviceSavedNotificationJsonData) UnmarshalJSON ¶
func (j *DeviceSavedNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetCredentialsRequestJson ¶
type DeviceSetCredentialsRequestJson struct { // Message-specific data Data DeviceSetCredentialsRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Set the credentials on a device
func (*DeviceSetCredentialsRequestJson) UnmarshalJSON ¶
func (j *DeviceSetCredentialsRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetCredentialsRequestJsonData ¶
type DeviceSetCredentialsRequestJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // Unique ID of this message MessageId int `json:"messageId" yaml:"messageId"` // Password to set Password string `json:"password" yaml:"password"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Username to set Username string `json:"username" yaml:"username"` }
Message-specific data
func (*DeviceSetCredentialsRequestJsonData) UnmarshalJSON ¶
func (j *DeviceSetCredentialsRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetCredentialsResponseJson ¶
type DeviceSetCredentialsResponseJson struct { // Message-specific data Data DeviceSetCredentialsResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that setting the credentials on a device has finished
func (*DeviceSetCredentialsResponseJson) UnmarshalJSON ¶
func (j *DeviceSetCredentialsResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetCredentialsResponseJsonData ¶
type DeviceSetCredentialsResponseJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // Device corresponds to the JSON schema field "device". Device *Device `json:"device,omitempty" yaml:"device,omitempty"` // ID of the device DeviceId *string `json:"deviceId,omitempty" yaml:"deviceId,omitempty"` // ID of the request message MessageId int `json:"messageId" yaml:"messageId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Whether or not the operation was successful Success bool `json:"success" yaml:"success"` }
Message-specific data
func (*DeviceSetCredentialsResponseJsonData) UnmarshalJSON ¶
func (j *DeviceSetCredentialsResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetPinRequestJson ¶
type DeviceSetPinRequestJson struct { // Message-specific data Data DeviceSetPinRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Set the PIN on a device
func (*DeviceSetPinRequestJson) UnmarshalJSON ¶
func (j *DeviceSetPinRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetPinRequestJsonData ¶
type DeviceSetPinRequestJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // Unique ID of this message MessageId int `json:"messageId" yaml:"messageId"` // PIN to set Pin string `json:"pin" yaml:"pin"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*DeviceSetPinRequestJsonData) UnmarshalJSON ¶
func (j *DeviceSetPinRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetPinResponseJson ¶
type DeviceSetPinResponseJson struct { // Message-specific data Data DeviceSetPinResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that setting the PIN on a device has finished
func (*DeviceSetPinResponseJson) UnmarshalJSON ¶
func (j *DeviceSetPinResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetPinResponseJsonData ¶
type DeviceSetPinResponseJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // Device corresponds to the JSON schema field "device". Device *Device `json:"device,omitempty" yaml:"device,omitempty"` // ID of the device DeviceId *string `json:"deviceId,omitempty" yaml:"deviceId,omitempty"` // ID of the request message MessageId int `json:"messageId" yaml:"messageId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Whether or not the operation was successful Success bool `json:"success" yaml:"success"` }
Message-specific data
func (*DeviceSetPinResponseJsonData) UnmarshalJSON ¶
func (j *DeviceSetPinResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetPropertyCommandJson ¶
type DeviceSetPropertyCommandJson struct { // Message-specific data Data DeviceSetPropertyCommandJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Set a property value on a device
func (*DeviceSetPropertyCommandJson) UnmarshalJSON ¶
func (j *DeviceSetPropertyCommandJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetPropertyCommandJsonData ¶
type DeviceSetPropertyCommandJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Instance of the property to set PropertyName string `json:"propertyName" yaml:"propertyName"` // New value of the property PropertyValue DeviceSetPropertyCommandJsonDataPropertyValue `json:"propertyValue" yaml:"propertyValue"` }
Message-specific data
func (*DeviceSetPropertyCommandJsonData) UnmarshalJSON ¶
func (j *DeviceSetPropertyCommandJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceSetPropertyCommandJsonDataPropertyValue ¶
type DeviceSetPropertyCommandJsonDataPropertyValue any
New value of the property
type DeviceWithoutId ¶
type DeviceWithoutId struct { // Context of the device Context *string `json:"@context,omitempty" yaml:"@context,omitempty"` // Type corresponds to the JSON schema field "@type". Type []string `json:"@type,omitempty" yaml:"@type,omitempty"` // Actions corresponds to the JSON schema field "actions". Actions DeviceWithoutIdActions `json:"actions,omitempty" yaml:"actions,omitempty"` // The base href of the device BaseHref *string `json:"baseHref,omitempty" yaml:"baseHref,omitempty"` // If credentials are required CredentialsRequired *bool `json:"credentialsRequired,omitempty" yaml:"credentialsRequired,omitempty"` // Description of the device Description *string `json:"description,omitempty" yaml:"description,omitempty"` // Events corresponds to the JSON schema field "events". Events DeviceWithoutIdEvents `json:"events,omitempty" yaml:"events,omitempty"` // Links corresponds to the JSON schema field "links". Links []Link `json:"links,omitempty" yaml:"links,omitempty"` // Pin corresponds to the JSON schema field "pin". Pin *Pin `json:"pin,omitempty" yaml:"pin,omitempty"` // Properties corresponds to the JSON schema field "properties". Properties DeviceWithoutIdProperties `json:"properties,omitempty" yaml:"properties,omitempty"` // Title of the Device Title *string `json:"title,omitempty" yaml:"title,omitempty"` }
Description of the device
type DeviceWithoutIdActions ¶
type DeviceWithoutIdEvents ¶
type Event ¶
type Event struct { // The type of the events Type *string `json:"@type,omitempty" yaml:"@type,omitempty"` // Description of the events Description *string `json:"description,omitempty" yaml:"description,omitempty"` // Enum corresponds to the JSON schema field "enum". Enum []EventEnumElem `json:"enum,omitempty" yaml:"enum,omitempty"` // Forms corresponds to the JSON schema field "forms". Forms []EventFormsElem `json:"forms,omitempty" yaml:"forms,omitempty"` // The maximum value of the events Maximum *float64 `json:"maximum,omitempty" yaml:"maximum,omitempty"` // The minimum value of the events Minimum *float64 `json:"minimum,omitempty" yaml:"minimum,omitempty"` // The precision of the value MultipleOf *float64 `json:"multipleOf,omitempty" yaml:"multipleOf,omitempty"` // The name of the events Name *string `json:"name,omitempty" yaml:"name,omitempty"` // The title of the events Title *string `json:"title,omitempty" yaml:"title,omitempty"` // The unit of the events Unit *string `json:"unit,omitempty" yaml:"unit,omitempty"` }
Event Description of the events
type EventFormsElem ¶
type EventFormsElem struct { FormElement Op EventFormsElemOp `json:"op"` }
type EventFormsElemOp ¶
type EventFormsElemOp struct { *ArrayString // contains filtered or unexported fields }
func (*EventFormsElemOp) MarshalJSON ¶
func (a *EventFormsElemOp) MarshalJSON() ([]byte, error)
func (*EventFormsElemOp) UnmarshalJSON ¶
func (a *EventFormsElemOp) UnmarshalJSON(data []byte) error
type FormElement ¶
type FormElement struct { // ContentCoding corresponds to the JSON schema field "contentCoding". ContentCoding *string `json:"contentCoding,omitempty" yaml:"contentCoding,omitempty"` // ContentType corresponds to the JSON schema field "contentType". ContentType *string `json:"contentType,omitempty" yaml:"contentType,omitempty"` // Href corresponds to the JSON schema field "href". Href AnyUri `json:"href" yaml:"href"` // Response corresponds to the JSON schema field "response". Response *FormElementResponse `json:"response,omitempty" yaml:"response,omitempty"` // Subprotocol corresponds to the JSON schema field "subprotocol". Subprotocol *string `json:"subprotocol,omitempty" yaml:"subprotocol,omitempty"` }
func (*FormElement) UnmarshalJSON ¶
func (j *FormElement) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type FormElementProperty ¶
type FormElementProperty any
type FormElementResponse ¶
type FormElementResponse struct { // ContentType corresponds to the JSON schema field "contentType". ContentType *string `json:"contentType,omitempty" yaml:"contentType,omitempty"` }
type Link ¶
type Link struct { // The href of the link Href string `json:"href" yaml:"href"` // The media type of the link MediaType *string `json:"mediaType,omitempty" yaml:"mediaType,omitempty"` // The type of the relationship Rel *string `json:"rel,omitempty" yaml:"rel,omitempty"` }
Link A link
func (*Link) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type MessageType ¶
type MessageType uint64
const ( MessageType_PluginRegisterRequest MessageType = 0 MessageType_PluginRegisterResponse MessageType = 1 MessageType_PluginUnloadRequest MessageType = 2 MessageType_PluginUnloadResponse MessageType = 3 MessageType_PluginErrorNotification MessageType = 4 MessageType_AdapterAddedNotification MessageType = 4096 MessageType_AdapterCancelPairingCommand MessageType = 4100 MessageType_AdapterPairingPromptNotification MessageType = 4101 MessageType_AdapterUnpairingPromptNotification MessageType = 4102 MessageType_AdapterRemoveDeviceRequest MessageType = 4103 MessageType_AdapterRemoveDeviceResponse MessageType = 4104 MessageType_AdapterCancelRemoveDeviceCommand MessageType = 4105 MessageType_AdapterUnloadRequest MessageType = 4097 MessageType_AdapterUnloadResponse MessageType = 4098 MessageType_AdapterStartPairingCommand MessageType = 4099 MessageType_ApiHandlerAddedNotification MessageType = 20480 MessageType_ApiHandlerApiRequest MessageType = 20483 MessageType_ApiHandlerApiResponse MessageType = 20484 MessageType_ApiHandlerUnloadRequest MessageType = 20481 MessageType_ApiHandlerUnloadResponse MessageType = 20482 MessageType_DeviceActionStatusNotification MessageType = 8201 MessageType_DeviceAddedNotification MessageType = 8192 MessageType_DeviceConnectedStateNotification MessageType = 8197 MessageType_DeviceDebugCommand MessageType = 8206 MessageType_DeviceEventNotification MessageType = 8200 MessageType_DevicePropertyChangedNotification MessageType = 8199 MessageType_DeviceRemoveActionRequest MessageType = 8202 MessageType_DeviceRemoveActionResponse MessageType = 8203 MessageType_DeviceRequestActionRequest MessageType = 8204 MessageType_DeviceRequestActionResponse MessageType = 8205 MessageType_DeviceSavedNotification MessageType = 8207 MessageType_DeviceSetCredentialsRequest MessageType = 8195 MessageType_DeviceSetCredentialsResponse MessageType = 8196 MessageType_DeviceSetPinRequest MessageType = 8193 MessageType_DeviceSetPinResponse MessageType = 8194 MessageType_DeviceSetPropertyCommand MessageType = 8198 MessageType_MockAdapterAddDeviceRequest MessageType = 61440 MessageType_MockAdapterAddDeviceResponse MessageType = 61441 MessageType_MockAdapterClearStateRequest MessageType = 61446 MessageType_MockAdapterClearStateResponse MessageType = 61447 MessageType_MockAdapterPairDeviceCommand MessageType = 61444 MessageType_MockAdapterRemoveDeviceRequest MessageType = 61442 MessageType_MockAdapterRemoveDeviceResponse MessageType = 61443 MessageType_MockAdapterUnpairDeviceCommand MessageType = 61445 MessageType_NotifierAddedNotification MessageType = 12288 MessageType_NotifierUnloadRequest MessageType = 12289 MessageType_NotifierUnloadResponse MessageType = 12290 MessageType_OutletAddedNotification MessageType = 16384 MessageType_OutletNotifyRequest MessageType = 16386 MessageType_OutletNotifyResponse MessageType = 16387 MessageType_OutletRemovedNotification MessageType = 16385 )
type MockAdapterAddDeviceRequestJson ¶
type MockAdapterAddDeviceRequestJson struct { // Message-specific data Data MockAdapterAddDeviceRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Ask the mock adapter to add a new device
func (*MockAdapterAddDeviceRequestJson) UnmarshalJSON ¶
func (j *MockAdapterAddDeviceRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterAddDeviceRequestJsonData ¶
type MockAdapterAddDeviceRequestJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // Description of the new device DeviceDescr MockAdapterAddDeviceRequestJsonDataDeviceDescr `json:"deviceDescr" yaml:"deviceDescr"` // ID of the new device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*MockAdapterAddDeviceRequestJsonData) UnmarshalJSON ¶
func (j *MockAdapterAddDeviceRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterAddDeviceRequestJsonDataDeviceDescr ¶
Description of the new device
type MockAdapterAddDeviceResponseJson ¶
type MockAdapterAddDeviceResponseJson struct { // Message-specific data Data MockAdapterAddDeviceResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that the mock adapter has finished adding a new device
func (*MockAdapterAddDeviceResponseJson) UnmarshalJSON ¶
func (j *MockAdapterAddDeviceResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterAddDeviceResponseJsonData ¶
type MockAdapterAddDeviceResponseJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the new device DeviceId *string `json:"deviceId,omitempty" yaml:"deviceId,omitempty"` // Error message in the case of failure Error *string `json:"error,omitempty" yaml:"error,omitempty"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Whether or not the operation was successful Success bool `json:"success" yaml:"success"` }
Message-specific data
func (*MockAdapterAddDeviceResponseJsonData) UnmarshalJSON ¶
func (j *MockAdapterAddDeviceResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterClearStateRequestJson ¶
type MockAdapterClearStateRequestJson struct { // Message-specific data Data MockAdapterClearStateRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Ask the mock adapter to clear its state
func (*MockAdapterClearStateRequestJson) UnmarshalJSON ¶
func (j *MockAdapterClearStateRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterClearStateRequestJsonData ¶
type MockAdapterClearStateRequestJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*MockAdapterClearStateRequestJsonData) UnmarshalJSON ¶
func (j *MockAdapterClearStateRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterClearStateResponseJson ¶
type MockAdapterClearStateResponseJson struct { // Message-specific data Data MockAdapterClearStateResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that the mock adapter has cleared its state
func (*MockAdapterClearStateResponseJson) UnmarshalJSON ¶
func (j *MockAdapterClearStateResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterClearStateResponseJsonData ¶
type MockAdapterClearStateResponseJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*MockAdapterClearStateResponseJsonData) UnmarshalJSON ¶
func (j *MockAdapterClearStateResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterPairDeviceCommandJson ¶
type MockAdapterPairDeviceCommandJson struct { // Message-specific data Data MockAdapterPairDeviceCommandJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Tell the mock adapter to pair a device
func (*MockAdapterPairDeviceCommandJson) UnmarshalJSON ¶
func (j *MockAdapterPairDeviceCommandJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterPairDeviceCommandJsonData ¶
type MockAdapterPairDeviceCommandJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // Description of the device DeviceDescr MockAdapterPairDeviceCommandJsonDataDeviceDescr `json:"deviceDescr" yaml:"deviceDescr"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*MockAdapterPairDeviceCommandJsonData) UnmarshalJSON ¶
func (j *MockAdapterPairDeviceCommandJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterPairDeviceCommandJsonDataDeviceDescr ¶
Description of the device
type MockAdapterRemoveDeviceRequestJson ¶
type MockAdapterRemoveDeviceRequestJson struct { // Message-specific data Data MockAdapterRemoveDeviceRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Ask the mock adapter to remove a device
func (*MockAdapterRemoveDeviceRequestJson) UnmarshalJSON ¶
func (j *MockAdapterRemoveDeviceRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterRemoveDeviceRequestJsonData ¶
type MockAdapterRemoveDeviceRequestJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*MockAdapterRemoveDeviceRequestJsonData) UnmarshalJSON ¶
func (j *MockAdapterRemoveDeviceRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterRemoveDeviceResponseJson ¶
type MockAdapterRemoveDeviceResponseJson struct { // Message-specific data Data MockAdapterRemoveDeviceResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that the mock adapter has finished remove a device
func (*MockAdapterRemoveDeviceResponseJson) UnmarshalJSON ¶
func (j *MockAdapterRemoveDeviceResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterRemoveDeviceResponseJsonData ¶
type MockAdapterRemoveDeviceResponseJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId *string `json:"deviceId,omitempty" yaml:"deviceId,omitempty"` // Error message in the case of failure Error *string `json:"error,omitempty" yaml:"error,omitempty"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Whether or not the operation was successful Success bool `json:"success" yaml:"success"` }
Message-specific data
func (*MockAdapterRemoveDeviceResponseJsonData) UnmarshalJSON ¶
func (j *MockAdapterRemoveDeviceResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterUnpairDeviceCommandJson ¶
type MockAdapterUnpairDeviceCommandJson struct { // Message-specific data Data MockAdapterUnpairDeviceCommandJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Tell the mock adapter to unpair a device
func (*MockAdapterUnpairDeviceCommandJson) UnmarshalJSON ¶
func (j *MockAdapterUnpairDeviceCommandJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type MockAdapterUnpairDeviceCommandJsonData ¶
type MockAdapterUnpairDeviceCommandJsonData struct { // ID of the adapter AdapterId string `json:"adapterId" yaml:"adapterId"` // ID of the device DeviceId string `json:"deviceId" yaml:"deviceId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*MockAdapterUnpairDeviceCommandJsonData) UnmarshalJSON ¶
func (j *MockAdapterUnpairDeviceCommandJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type NotificationLevel ¶
type NotificationLevel int
type NotifierAddedNotificationJson ¶
type NotifierAddedNotificationJson struct { // Message-specific data Data NotifierAddedNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a plugin has added a notifier
func (*NotifierAddedNotificationJson) UnmarshalJSON ¶
func (j *NotifierAddedNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type NotifierAddedNotificationJsonData ¶
type NotifierAddedNotificationJsonData struct { // Name of the new notifier Name string `json:"name" yaml:"name"` // ID of the new notifier NotifierId string `json:"notifierId" yaml:"notifierId"` // Name of the add-on package PackageName string `json:"packageName" yaml:"packageName"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*NotifierAddedNotificationJsonData) UnmarshalJSON ¶
func (j *NotifierAddedNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type NotifierUnloadRequestJson ¶
type NotifierUnloadRequestJson struct { // Message-specific data Data NotifierUnloadRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Request that an notifier is unloaded
func (*NotifierUnloadRequestJson) UnmarshalJSON ¶
func (j *NotifierUnloadRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type NotifierUnloadRequestJsonData ¶
type NotifierUnloadRequestJsonData struct { // ID of the notifier NotifierId string `json:"notifierId" yaml:"notifierId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*NotifierUnloadRequestJsonData) UnmarshalJSON ¶
func (j *NotifierUnloadRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type NotifierUnloadResponseJson ¶
type NotifierUnloadResponseJson struct { // Message-specific data Data NotifierUnloadResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that an notifier is unloaded
func (*NotifierUnloadResponseJson) UnmarshalJSON ¶
func (j *NotifierUnloadResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type NotifierUnloadResponseJsonData ¶
type NotifierUnloadResponseJsonData struct { // ID of the notifier NotifierId string `json:"notifierId" yaml:"notifierId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*NotifierUnloadResponseJsonData) UnmarshalJSON ¶
func (j *NotifierUnloadResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OutletAddedNotificationJson ¶
type OutletAddedNotificationJson struct { // Message-specific data Data OutletAddedNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a new outlet has been added to a notifier
func (*OutletAddedNotificationJson) UnmarshalJSON ¶
func (j *OutletAddedNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OutletAddedNotificationJsonData ¶
type OutletAddedNotificationJsonData struct { // ID of the notifier NotifierId string `json:"notifierId" yaml:"notifierId"` // Description of the outlet Outlet OutletAddedNotificationJsonDataOutlet `json:"outlet" yaml:"outlet"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*OutletAddedNotificationJsonData) UnmarshalJSON ¶
func (j *OutletAddedNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OutletAddedNotificationJsonDataOutlet ¶
type OutletAddedNotificationJsonDataOutlet struct { // ID of the Outlet Id string `json:"id" yaml:"id"` // Name of the Outlet Name string `json:"name" yaml:"name"` }
Description of the outlet
func (*OutletAddedNotificationJsonDataOutlet) UnmarshalJSON ¶
func (j *OutletAddedNotificationJsonDataOutlet) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OutletNotifyRequestJson ¶
type OutletNotifyRequestJson struct { // Message-specific data Data OutletNotifyRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notify a user via an outlet
func (*OutletNotifyRequestJson) UnmarshalJSON ¶
func (j *OutletNotifyRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OutletNotifyRequestJsonData ¶
type OutletNotifyRequestJsonData struct { // Priority level of the notification, 0 being the lowest priority Level NotificationLevel `json:"level" yaml:"level"` // Message of the notification Message string `json:"message" yaml:"message"` // Unique ID of this message MessageId int `json:"messageId" yaml:"messageId"` // ID of the notifier NotifierId string `json:"notifierId" yaml:"notifierId"` // ID of the outlet OutletId string `json:"outletId" yaml:"outletId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Title of the notification Title string `json:"title" yaml:"title"` }
Message-specific data
func (*OutletNotifyRequestJsonData) UnmarshalJSON ¶
func (j *OutletNotifyRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OutletNotifyResponseJson ¶
type OutletNotifyResponseJson struct { // Message-specific data Data OutletNotifyResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notice that an outlet notification has finished
func (*OutletNotifyResponseJson) UnmarshalJSON ¶
func (j *OutletNotifyResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OutletNotifyResponseJsonData ¶
type OutletNotifyResponseJsonData struct { // ID of the request message MessageId int `json:"messageId" yaml:"messageId"` // ID of the notifier NotifierId string `json:"notifierId" yaml:"notifierId"` // ID of the outlet OutletId string `json:"outletId" yaml:"outletId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` // Whether or not the operation was successful Success bool `json:"success" yaml:"success"` }
Message-specific data
func (*OutletNotifyResponseJsonData) UnmarshalJSON ¶
func (j *OutletNotifyResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OutletRemovedNotificationJson ¶
type OutletRemovedNotificationJson struct { // Message-specific data Data OutletRemovedNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that an outlet has been removed from a notifier
func (*OutletRemovedNotificationJson) UnmarshalJSON ¶
func (j *OutletRemovedNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OutletRemovedNotificationJsonData ¶
type OutletRemovedNotificationJsonData struct { // ID of the notifier NotifierId string `json:"notifierId" yaml:"notifierId"` // ID of the outlet which was removed OutletId string `json:"outletId" yaml:"outletId"` // ID of the plugin PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*OutletRemovedNotificationJsonData) UnmarshalJSON ¶
func (j *OutletRemovedNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Pin ¶
type Pin struct { // The pattern of the pin Pattern *string `json:"pattern,omitempty" yaml:"pattern,omitempty"` // If the pin is required Required bool `json:"required" yaml:"required"` }
The pin of the device
func (*Pin) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type PluginErrorNotificationJson ¶
type PluginErrorNotificationJson struct { // Message-specific data Data PluginErrorNotificationJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a plugin has encountered an error while loading
func (*PluginErrorNotificationJson) UnmarshalJSON ¶
func (j *PluginErrorNotificationJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginErrorNotificationJsonData ¶
type PluginErrorNotificationJsonData struct { // Error message Message string `json:"message" yaml:"message"` // ID of the plugin which has had an error PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*PluginErrorNotificationJsonData) UnmarshalJSON ¶
func (j *PluginErrorNotificationJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginRegisterRequestJson ¶
type PluginRegisterRequestJson struct { // Message-specific data Data PluginRegisterRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
register a plugin with the gateway
func (*PluginRegisterRequestJson) UnmarshalJSON ¶
func (j *PluginRegisterRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginRegisterRequestJsonData ¶
type PluginRegisterRequestJsonData struct { // ID of the plugin being registered PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*PluginRegisterRequestJsonData) UnmarshalJSON ¶
func (j *PluginRegisterRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginRegisterResponseJson ¶
type PluginRegisterResponseJson struct { // Message-specific data Data PluginRegisterResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Acknowledgement that the gateway has registered a plugin
func (*PluginRegisterResponseJson) UnmarshalJSON ¶
func (j *PluginRegisterResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginRegisterResponseJsonData ¶
type PluginRegisterResponseJsonData struct { // Version of the running gateway GatewayVersion string `json:"gatewayVersion" yaml:"gatewayVersion"` // ID of the plugin which has been registered PluginId string `json:"pluginId" yaml:"pluginId"` // User preferences Preferences PluginRegisterResponseJsonDataPreferences `json:"preferences" yaml:"preferences"` // User profile information, e.g. file paths of various things UserProfile PluginRegisterResponseJsonDataUserProfile `json:"userProfile" yaml:"userProfile"` }
Message-specific data
func (*PluginRegisterResponseJsonData) UnmarshalJSON ¶
func (j *PluginRegisterResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginRegisterResponseJsonDataPreferences ¶
type PluginRegisterResponseJsonDataPreferences struct { // User's preferred language, e.g. "en-US" Language string `json:"language" yaml:"language"` // User's preferred units Units PluginRegisterResponseJsonDataPreferencesUnits `json:"units" yaml:"units"` }
User preferences
func (*PluginRegisterResponseJsonDataPreferences) UnmarshalJSON ¶
func (j *PluginRegisterResponseJsonDataPreferences) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginRegisterResponseJsonDataPreferencesUnits ¶
type PluginRegisterResponseJsonDataPreferencesUnits struct { // Preferred temperature unit, e.g. "degree celsius" Temperature string `json:"temperature" yaml:"temperature"` }
User's preferred units
func (*PluginRegisterResponseJsonDataPreferencesUnits) UnmarshalJSON ¶
func (j *PluginRegisterResponseJsonDataPreferencesUnits) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginRegisterResponseJsonDataUserProfile ¶
type PluginRegisterResponseJsonDataUserProfile struct { // Add-ons directory, e.g. "/home/pi/.webthings/addons" AddonsDir string `json:"addonsDir" yaml:"addonsDir"` // Base user profile directory, e.g. "/home/pi/.webthings" BaseDir string `json:"baseDir" yaml:"baseDir"` // Configuration directory, e.g. "/home/pi/.webthings/config" ConfigDir string `json:"configDir" yaml:"configDir"` // Data directory, e.g. "/home/pi/.webthings/data" DataDir string `json:"dataDir" yaml:"dataDir"` // Gateway directory, e.g. "/home/pi/webthings/gateway" GatewayDir string `json:"gatewayDir" yaml:"gatewayDir"` // Log directory, e.g. "/home/pi/.webthings/log" LogDir string `json:"logDir" yaml:"logDir"` // Media directory, e.g. "/home/pi/.webthings/media" MediaDir string `json:"mediaDir" yaml:"mediaDir"` }
User profile information, e.g. file paths of various things
func (*PluginRegisterResponseJsonDataUserProfile) UnmarshalJSON ¶
func (j *PluginRegisterResponseJsonDataUserProfile) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginUnloadRequestJson ¶
type PluginUnloadRequestJson struct { // Message-specific data Data PluginUnloadRequestJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Unload a plugin from the gateway
func (*PluginUnloadRequestJson) UnmarshalJSON ¶
func (j *PluginUnloadRequestJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginUnloadRequestJsonData ¶
type PluginUnloadRequestJsonData struct { // ID of the plugin being unloaded PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*PluginUnloadRequestJsonData) UnmarshalJSON ¶
func (j *PluginUnloadRequestJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginUnloadResponseJson ¶
type PluginUnloadResponseJson struct { // Message-specific data Data PluginUnloadResponseJsonData `json:"data" yaml:"data"` // The message type, used by the IPC client and api to differentiate messages MessageType int `json:"messageType" yaml:"messageType"` }
Notification that a plugin has been unloaded
func (*PluginUnloadResponseJson) UnmarshalJSON ¶
func (j *PluginUnloadResponseJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PluginUnloadResponseJsonData ¶
type PluginUnloadResponseJsonData struct { // ID of the plugin which has been unloaded PluginId string `json:"pluginId" yaml:"pluginId"` }
Message-specific data
func (*PluginUnloadResponseJsonData) UnmarshalJSON ¶
func (j *PluginUnloadResponseJsonData) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Property ¶
type Property struct { // The type of the property Type string `json:"type,omitempty" yaml:"type,omitempty"` // The type of the property AtType *string `json:"@type,omitempty" yaml:"@type,omitempty"` // Description of the property Description *string `json:"description,omitempty" yaml:"description,omitempty"` // Enum corresponds to the JSON schema field "enum". Enum []any `json:"enum,omitempty" yaml:"enum,omitempty"` // The maximum value of the property Maximum *float64 `json:"maximum,omitempty" yaml:"maximum,omitempty"` // The minimum value of the property Minimum *float64 `json:"minimum,omitempty" yaml:"minimum,omitempty"` // The precision of the value MultipleOf *float64 `json:"multipleOf,omitempty" yaml:"multipleOf,omitempty"` // The name of the property Name *string `json:"name,omitempty" yaml:"name,omitempty"` // If the property is read-only ReadOnly *bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` // The title of the property Title *string `json:"title,omitempty" yaml:"title,omitempty"` // The unit of the property Unit *string `json:"unit,omitempty" yaml:"unit,omitempty"` // The value of the property Value PropertyValue `json:"value,omitempty" yaml:"value,omitempty"` }
Property Description of the Property
func (*Property) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type SchemaJson ¶
type SchemaJson struct { // The top-level message which encapsulates all message types Message SchemaJsonMessage `json:"message" yaml:"message"` }
IPC messages between WebThings Gateway and add-ons
func (*SchemaJson) UnmarshalJSON ¶
func (j *SchemaJson) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type SchemaJsonMessage ¶
The top-level message which encapsulates all message types
Source Files
¶
- adapter-added-notification.go
- adapter-cancel-pairing-command.go
- adapter-cancel-remove-device-command.go
- adapter-pairing-prompt-notification.go
- adapter-remove-device-request.go
- adapter-remove-device-response.go
- adapter-start-pairing-command.go
- adapter-unload-request.go
- adapter-unload-response.go
- adapter-unpairing-prompt-notification.go
- api-handler-added-notification.go
- api-handler-api-request.go
- api-handler-api-response.go
- api-handler-unload-request.go
- api-handler-unload-response.go
- definitions.go
- definitions_action.go
- definitions_event.go
- definitions_property.go
- device-action-status-notification.go
- device-added-notification.go
- device-connected-state-notification.go
- device-event-notification.go
- device-property-changed-notification.go
- device-remove-action-request.go
- device-remove-action-response.go
- device-request-action-request.go
- device-request-action-response.go
- device-saved-notification.go
- device-set-credentials-request.go
- device-set-credentials-response.go
- device-set-pin-request.go
- device-set-pin-response.go
- device-set-property-command.go
- message.go
- messageType.go
- mock-adapter-add-device-request.go
- mock-adapter-add-device-response.go
- mock-adapter-clear-state-request.go
- mock-adapter-clear-state-response.go
- mock-adapter-pair-device-command.go
- mock-adapter-remove-device-request.go
- mock-adapter-remove-device-response.go
- mock-adapter-unpair-device-command.go
- notifier-added-notification.go
- notifier-unload-request.go
- notifier-unload-response.go
- outlet-added-notification.go
- outlet-notify-request.go
- outlet-notify-response.go
- outlet-removed-notification.go
- plugin-error-notification.go
- plugin-register-request.go
- plugin-register-response.go
- plugin-unload-request.go
- plugin-unload-response.go
- schema.go