Documentation ¶
Index ¶
- type DevCommandConfig
- type DevModBusConfig
- type DevSmartBusConfig
- type Device
- type DeviceAction
- type DeviceActionDevice
- type DeviceActionScript
- type DeviceProperties
- type DeviceShort
- type DeviceState
- type DeviceStateDevice
- type Image
- type Map
- type MapDevice
- type MapDeviceAction
- type MapDeviceState
- type MapElement
- type MapElementGraphSettings
- type MapElementGraphSettingsPosition
- type MapFull
- type MapImage
- type MapLayer
- type MapOptions
- type MapText
- type MapZone
- type NewDevice
- type NewDeviceAction
- type NewDeviceNode
- type NewDeviceState
- type NewMap
- type NewMapLayer
- type ParentDevice
- type Prototype
- type SortMapElement
- type SortMapLayer
- type UpdateDevice
- type UpdateDeviceAction
- type UpdateDeviceState
- type UpdateMap
- type UpdateMapLayer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DevCommandConfig ¶
type DevCommandConfig struct { }
type DevModBusConfig ¶
type DevModBusConfig struct { SlaveId int `json:"slave_id" mapstructure:"slave_id"` // 1-32 Baud int `json:"baud"` // 9600, 19200, ... DataBits int `json:"data_bits" mapstructure:"data_bits"` // 5-9 StopBits int `json:"stop_bits" mapstructure:"stop_bits"` // 1, 2 Parity string `json:"parity"` // none, odd, even Timeout int `json:"timeout"` // milliseconds }
type DevSmartBusConfig ¶
type Device ¶
type Device struct { Id int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` //Node *Node `json:"node"` Properties DeviceProperties `json:"properties"` Type string `json:"type"` Status string `json:"status"` IsGroup bool `json:"is_group"` Actions []DeviceAction `json:"actions"` States []DeviceState `json:"states"` Device *ParentDevice `json:"device"` DeviceId *int64 `json:"device_id"` }
swagger:model
type DeviceAction ¶
type DeviceAction struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description"` Device *DeviceActionDevice `json:"device"` DeviceId int64 `json:"device_id"` Script *DeviceActionScript `json:"script"` }
swagger:model
type DeviceActionDevice ¶
type DeviceActionDevice struct {
Id int64 `json:"id"`
}
type DeviceActionScript ¶
type DeviceActionScript struct {
Id int64 `json:"id"`
}
type DeviceProperties ¶
type DeviceProperties struct { // swagger:allOf DevModBusConfig // swagger:allOf DevSmartBusConfig // swagger:allOf DevCommandConfig }
An AllOfModel is composed out of embedded structs but it should build an allOf property
type DeviceShort ¶
type DeviceShort struct { Id int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` Status string `json:"status"` Type string `json:"type"` }
swagger:model
type DeviceState ¶
type DeviceState struct { Id int64 `json:"id"` Description string `json:"description"` SystemName string `json:"system_name" valid:"MaxSize(254);Required"` Device *DeviceStateDevice `json:"device" valid:"Required"` DeviceId int64 `json:"device_id"` }
swagger:model
type DeviceStateDevice ¶
type DeviceStateDevice struct {
Id int64 `json:"id"`
}
type Image ¶
type Image struct { Id int64 `json:"id"` Thumb string `json:"thumb,omitempty"` Url string `json:"url"` }
swagger:model
type Map ¶
type Map struct { Id int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` Options MapOptions `json:"options"` }
swagger:model
type MapDevice ¶
type MapDevice struct { Id int64 `json:"id"` SystemName string `json:"system_name" valid:"Required"` Device *Device `json:"-"` DeviceId int64 `json:"device_id" valid:"Required"` Image *Image `json:"image"` ImageId int64 `json:"image_id"` Actions []*MapDeviceAction `json:"actions"` States []*MapDeviceState `json:"states"` }
type MapDeviceAction ¶
type MapDeviceAction struct { Id int64 `json:"id"` DeviceAction *DeviceAction `json:"device_action"` DeviceActionId int64 `json:"device_action_id" valid:"Required"` MapDeviceId int64 `json:"map_device_id" valid:"Required"` Image *Image `json:"image"` ImageId int64 `json:"image_id" valid:"Required"` Type string `json:"type"` }
func (MapDeviceAction) MarshalJSON ¶
func (n MapDeviceAction) MarshalJSON() (b []byte, err error)
type MapDeviceState ¶
type MapDeviceState struct { Id int64 `json:"id"` DeviceState *DeviceState `json:"device_state"` DeviceStateId int64 `json:"device_state_id" valid:"Required"` MapDeviceId int64 `json:"map_device_id" valid:"Required"` Image *Image `json:"image"` ImageId int64 `json:"image_id" valid:"Required"` Style string `json:"style"` }
func (MapDeviceState) MarshalJSON ¶
func (n MapDeviceState) MarshalJSON() (b []byte, err error)
type MapElement ¶
type MapElement struct { Id int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` PrototypeId int64 `json:"prototype_id"` PrototypeType string `json:"prototype_type"` Prototype Prototype `json:"prototype"` MapId int64 `json:"map_id"` LayerId int64 `json:"layer_id"` GraphSettings MapElementGraphSettings `json:"graph_settings"` Status string `json:"status"` Weight int `json:"weight"` Zone *MapZone `json:"zone,omitempty"` }
swagger:model
type MapElementGraphSettings ¶
type MapElementGraphSettings struct { Width *int64 `json:"width"` Height *int64 `json:"height"` Position MapElementGraphSettingsPosition `json:"position"` }
type MapFull ¶
type MapFull struct { Id int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` Options MapOptions `json:"options"` Layers []*MapLayer `json:"layers"` }
swagger:model
type MapLayer ¶
type MapLayer struct { Id int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` Map *Map `json:"map"` MapId int64 `json:"map_id"` Status string `json:"status"` Weight int64 `json:"weight"` Elements []*MapElement `json:"elements"` }
swagger:model
type MapOptions ¶
type NewDevice ¶
type NewDevice struct { Name string `json:"name"` Description string `json:"description"` Status string `json:"status"` Device *ParentDevice `json:"device"` Type string `json:"type"` Node *NewDeviceNode `json:"node"` Properties DeviceProperties `json:"properties"` }
swagger:model
type NewDeviceAction ¶
type NewDeviceAction struct { Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description"` Device *DeviceActionDevice `json:"device"` Script *DeviceActionScript `json:"script"` }
swagger:model
type NewDeviceNode ¶
type NewDeviceNode struct {
Id int64 `json:"id"`
}
type NewDeviceState ¶
type NewDeviceState struct { Description string `json:"description"` SystemName string `json:"system_name" valid:"MaxSize(254);Required"` Device *DeviceStateDevice `json:"device" valid:"Required"` }
swagger:model
type NewMap ¶
type NewMap struct { Name string `json:"name"` Description string `json:"description"` Options MapOptions `json:"options"` }
swagger:model
type NewMapLayer ¶
type NewMapLayer struct { Name string `json:"name"` Description string `json:"description"` Map *Map `json:"map"` Status string `json:"status"` }
swagger:model
type ParentDevice ¶
type ParentDevice struct {
Id int64 `json:"id"`
}
type SortMapElement ¶
type SortMapLayer ¶
type UpdateDevice ¶
type UpdateDevice struct { Name string `json:"name"` Description string `json:"description"` Status string `json:"status"` Device *ParentDevice `json:"device"` Type string `json:"type"` Node *NewDeviceNode `json:"node"` Properties DeviceProperties `json:"properties"` }
swagger:model
type UpdateDeviceAction ¶
type UpdateDeviceAction struct { Id int64 `json:"id"` Name string `json:"name" valid:"MaxSize(254);Required"` Description string `json:"description"` Device *DeviceActionDevice `json:"device"` Script *DeviceActionScript `json:"script"` }
swagger:model
type UpdateDeviceState ¶
type UpdateDeviceState struct { Description string `json:"description"` SystemName string `json:"system_name" valid:"MaxSize(254);Required"` Device *DeviceStateDevice `json:"device" valid:"Required"` }
swagger:model
Click to show internal directories.
Click to hide internal directories.