Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arg ¶
type Arg struct { Required bool `json:"required"` Type string `json:"type"` Min *float64 `json:"min"` Max *float64 `json:"max"` Options []*Option `json:"options"` }
Arg is defined in the .def file
type Device ¶
type Device struct { Id string `json:"id"` Name string `json:"name"` Type string `json:"type"` Kind string `json:"kind"` ControllerName string `json:"controller_name"` Attributes map[string]interface{} `json:"attributes"` StateProviders []string `json:"state_providers"` State map[string]*Property `json:"state"` Commands map[string]*Command `json:"commands"` }
Device is defined in the .def file
type DeviceStateChangedEvent ¶
type DeviceStateChangedEvent struct {
Device *Device `json:"device"`
}
DeviceStateChangedEvent is defined in the .def file
func (*DeviceStateChangedEvent) Publish ¶
func (m *DeviceStateChangedEvent) Publish() error
Publish publishes the event to the Firehose
func (*DeviceStateChangedEvent) Validate ¶
func (m *DeviceStateChangedEvent) Validate() error
Validate returns an error if any of the fields have bad values
type DeviceStateChangedEventHandler ¶
type DeviceStateChangedEventHandler func(*DeviceStateChangedEvent) firehose.Result
DeviceStateChangedEventHandler implements the necessary functions to be a Firehose handler
func (DeviceStateChangedEventHandler) EventName ¶
func (h DeviceStateChangedEventHandler) EventName() string
EventName returns the Firehose channel name
func (DeviceStateChangedEventHandler) HandleEvent ¶
func (h DeviceStateChangedEventHandler) HandleEvent(e *firehose.Event) firehose.Result
HandleEvent handles the Firehose event
Click to show internal directories.
Click to hide internal directories.