Documentation
¶
Index ¶
- func Decode(input, output interface{}, hooks ...mapstructure.DecodeHookFunc) error
- func StringInterfaceToJsonRawMessage(sourceType, targetType reflect.Type, sourceData interface{}) (interface{}, error)
- type Action
- type Command
- type CommandType
- type DigitalCommand
- type EnabledDays
- type SimpleCommand
- type Status
- type VersionIndication
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode(input, output interface{}, hooks ...mapstructure.DecodeHookFunc) error
Types ¶
type Command ¶
type Command struct {
Type CommandType `json:"type"`
Data json.RawMessage `json:"data"`
}
Command is the root object in every message
func NewCommand ¶
func NewCommand(t CommandType, data interface{}) *Command
NewCommand creates a command given a type and his content
type CommandType ¶
type CommandType uint8
CommandType represent the type of the current message
const ( HeartbeatType CommandType = iota DigitalCommandType StatusSubscriptionCommandType StatusNotificationCommandType VersionRequestCommandType VersionReplyCommandType // private commands (sent on the loopback address) StatusUpdateCommandType IODeviceStatusChangedCommandType // special command types AnyIncomingCommandType AnyOutgoingCommandType )
Command types types used in various plugins
func (CommandType) String ¶
func (i CommandType) String() string
type DigitalCommand ¶
DigitalCommand used to instruct the appliance to execute a Command on a gpio pin
type EnabledDays ¶
type EnabledDays uint16
EnabledDays days on which a TimedCommand is enabled used as binary flag
type SimpleCommand ¶
type SimpleCommand struct {
Action Action `json:"action,int"`
}
SimpleCommand is used to send a basic request regarding the whole system
type Status ¶
type Status map[string]interface{}
Status is the response to a status request Command the key is the handler name value can be anything
type VersionIndication ¶
VersionIndication returns info about the current version and the optional update available
Click to show internal directories.
Click to hide internal directories.