Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { ServiceAnnouncement ID string `json:"id" redis:"id"` Protocol string `json:"protocol" redis:"protocol"` DeviceID string `json:"deviceId" redis:"deviceId"` LastState interface{} `json:"lastState" redis:"-"` // used to store the last state of the channel }
func (*Channel) GetServiceAnnouncement ¶
func (c *Channel) GetServiceAnnouncement() *ServiceAnnouncement
type ConfigurationRequest ¶
type ConfigurationRequest struct { Action string `json:"action"` Data json.RawMessage `json:"data"` }
type Device ¶
type Device struct { ServiceAnnouncement ID string `json:"id" redis:"id"` NaturalID string `json:"naturalId" redis:"naturalId"` NaturalIDType string `json:"naturalIdType" redis:"naturalIdType"` Name *string `json:"name,omitempty" redis:"name"` ThingID *string `json:"thingId,omitempty" redis:"-"` Channels *[]*Channel `json:"channels,omitempty" redis:"-"` Signatures *map[string]string `json:"signatures,omitempty" redis:"signatures,json"` }
Device TODO: The channels and thing might want to be on a struct thats only used in the devicemodel service?
func (*Device) GetChannelsByProtocol ¶
func (*Device) GetServiceAnnouncement ¶
func (d *Device) GetServiceAnnouncement() *ServiceAnnouncement
type Module ¶
type Module struct { ServiceAnnouncement ID string `json:"id" redis:"id"` Name string `json:"name" redis:"name"` Version string `json:"version" redis:"version"` Description string `json:"description" redis:"description"` Author string `json:"author" redis:"author"` License string `json:"license" redis:"license"` }
func (*Module) GetServiceAnnouncement ¶
func (m *Module) GetServiceAnnouncement() *ServiceAnnouncement
type ServiceAnnouncement ¶
type Site ¶
type Site struct { ID string `json:"id,omitempty" redis:"id"` Name *string `json:"name,omitempty" redis:"name"` Type *string `json:"type,omitempty" redis:"type"` Latitude *float64 `json:"latitude,omitempty" redis:"latitude"` Longitude *float64 `json:"longitude,omitempty" redis:"longitude"` TimeZoneID *string `json:"timeZoneId,omitempty" redis:"timeZoneId"` TimeZoneName *string `json:"timeZoneName,omitempty" redis:"timeZoneName"` TimeZoneOffset *int `json:"timeZoneOffset,omitempty" redis:"timeZoneOffset"` SitePreferences interface{} `json:"site-preferences,omitempty" redis:"site-preferences,json"` DefaultRoomID *string `json:"defaultRoomId,omitempty" redis:"defaultRoomId,json"` }
type Thing ¶
type Thing struct { ID string `json:"id" redis:"id"` Type string `json:"type" redis:"type"` Name string `json:"name" redis:"name"` Device *Device `json:"device,omitempty" redis:"-"` DeviceID *string `json:"deviceId,omitempty" redis:"-"` Location *string `json:"location,omitempty" redis:"location"` Promoted bool `json:"promoted" redis:"promoted"` }
type TimeSeriesDatapoint ¶
type TimeSeriesPayload ¶
type TimeSeriesPayload struct { Thing string `json:"thing"` ThingType string `json:"thingType"` Promoted bool `json:"promoted"` Device string `json:"device"` Channel string `json:"channel"` Schema string `json:"schema"` Event string `json:"event"` Points []TimeSeriesDatapoint `json:"points"` Time string `json:"time"` TimeZone string `json:"timeZone"` TimeOffset int `json:"timeOffset"` Site string `json:"site"` UserOverride string `json:"_"` NodeOverride string `json:"_"` }
func (*TimeSeriesPayload) GetPath ¶
func (p *TimeSeriesPayload) GetPath(path string) interface{}
Click to show internal directories.
Click to hide internal directories.