Documentation
¶
Overview ¶
Package models contains the models for client requests/responses.
Index ¶
- type Addressable
- type AutoEvent
- type CommandPayload
- type CommandResponse
- type CoreCommand
- type CoreCommandGet
- type CoreCommandGetResponse
- type CoreCommandPut
- type CoreCommandPutResponse
- type Device
- type DeviceCommand
- type DeviceCommandGet
- type DeviceCommandSet
- type DeviceProfile
- type DeviceResource
- type Propertie
- type Reading
- type Service
- type Unit
- type Value
- type ValueDescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addressable ¶
type Addressable struct {
Created int64 `json:"created"`
Modified int64 `json:"modified"`
Origin int64 `json:"origin"`
ID string `json:"id"`
Name string `json:"name"`
Protocol string `json:"protocol"`
Method string `json:"method"`
Address string `json:"address"`
Port int `json:"port"`
Path string `json:"path"`
BaseURL string `json:"baseURL"`
URL string `json:"url"`
}
Addressable entity
type AutoEvent ¶
type AutoEvent struct {
Frequency string `json:"frequency"`
Onchange bool `json:"onchange"`
Resource string `json:"resource"`
}
AutoEvent entity
type CommandPayload ¶
type CommandPayload map[string]interface{}
CommandPayload is the payload for /command requests.
type CommandResponse ¶
type CommandResponse interface{}
CommandResponse is the body of /command responses.
type CoreCommand ¶
type CoreCommand struct {
Name string `json:"name"`
Get *CoreCommandGet `json:"get"`
Put *CoreCommandPut `json:"put"`
}
CoreCommand entity
type CoreCommandGet ¶
type CoreCommandGet struct {
Path string `json:"path"`
Responses []*CoreCommandGetResponse `json:"responses"`
}
CoreCommandGet entity
type CoreCommandGetResponse ¶
type CoreCommandGetResponse struct {
Code string `json:"code"`
ExpectedValues []string `json:"expectedValues"`
Description string `json:"description"`
}
CoreCommandGetResponse entity
type CoreCommandPut ¶
type CoreCommandPut struct {
Path string `json:"path"`
Responses []*CoreCommandPutResponse `json:"responses"`
ParameterNames []string `json:"parameterNames"`
}
CoreCommandPut entity
type CoreCommandPutResponse ¶
type CoreCommandPutResponse struct {
Code string `json:"code"`
Description string `json:"description"`
}
CoreCommandPutResponse entity
type Device ¶
type Device struct {
ID string `json:"id"`
Name string `json:"name"`
Labels []string `json:"labels"`
Description string `json:"description"`
Location string `json:"location"`
Created int64 `json:"created"`
Modified int64 `json:"modified"`
Origin int64 `json:"origin"`
AdminState string `json:"adminState"`
OperatingState string `json:"operatingState"`
AutoEvents []*AutoEvent `json:"autoEvents"`
LastConnected int64 `json:"lastConnected"`
LastReported int64 `json:"lastReported"`
Service *Service `json:"service"`
Profile *DeviceProfile `json:"profile"`
Protocols map[string]interface{} `json:"protocols" faker:"-"`
}
Device entity
type DeviceCommand ¶
type DeviceCommand struct {
Name string `json:"name"`
Get []*DeviceCommandGet `json:"get"`
Set []*DeviceCommandSet `json:"set"`
}
DeviceCommand entity
type DeviceCommandGet ¶
type DeviceCommandGet struct {
Operation string `json:"operation"`
Object string `json:"object"`
DeviceResource string `json:"deviceResource"`
Mappings map[string]string `json:"mappings"`
}
DeviceCommandGet entity
type DeviceCommandSet ¶
type DeviceCommandSet struct {
Operation string `json:"operation"`
Object string `json:"object"`
DeviceResource string `json:"deviceResource"`
Parameter string `json:"parameter"`
Mappings map[string]string `json:"mappings"`
}
DeviceCommandSet entity
type DeviceProfile ¶
type DeviceProfile struct {
ID string `json:"id"`
Name string `json:"name"`
Labels []string `json:"labels"`
Description string `json:"description"`
Created int64 `json:"created"`
Modified int64 `json:"modified"`
Manufacturer string `json:"manufacturer"`
Model string `json:"model"`
DeviceResources []*DeviceResource `json:"deviceResources"`
DeviceCommands []*DeviceCommand `json:"deviceCommands"`
CoreCommands []*CoreCommand `json:"coreCommands"`
}
DeviceProfile entity
type DeviceResource ¶
type DeviceResource struct {
Name string `json:"name"`
Description string `json:"description"`
Tag string `json:"tag"`
Properties *Propertie `json:"properties"`
}
DeviceResource entity
type Reading ¶
type Reading struct {
ID string `json:"id"`
Name string `json:"name"`
Created int64 `json:"created"`
Modified int64 `json:"modified"`
Origin int64 `json:"origin"`
Value string `json:"value"`
ValueType string `json:"valueType"`
Pushed int64 `json:"pushed"`
Device string `json:"device"`
}
Reading entity
type Service ¶
type Service struct {
Created int64 `json:"created"`
Modified int64 `json:"modified"`
Origin int64 `json:"origin"`
ID string `json:"id"`
Name string `json:"name"`
OperatingState string `json:"operatingState"`
Addressable *Addressable `json:"addressable"`
AdminState string `json:"adminState"`
}
Service entity
type Unit ¶
type Unit struct {
Type string `json:"type"`
ReadWrite string `json:"readWrite"`
DefaultValue string `json:"defaultValue"`
}
Unit entity
type Value ¶
type Value struct {
Type string `json:"type"`
ReadWrite string `json:"readWrite"`
Minimum string `json:"minimum"`
Maximum string `json:"maximum"`
DefaultValue string `json:"defaultValue"`
Mask uint64 `json:"mask"`
Shift uint64 `json:"shift"`
Scale int64 `json:"scale"`
Offset int64 `json:"offset"`
Base int64 `json:"base"`
Assertion string `json:"assertion"`
FloatEncoding string `json:"floatEncoding"`
MediaType string `json:"mediaType"`
}
Value entity
type ValueDescriptor ¶
type ValueDescriptor struct {
ID string `json:"id"`
Name string `json:"name"`
Labels []string `json:"labels"`
Description string `json:"description"`
Created int64 `json:"created"`
Modified int64 `json:"modified"`
Origin int64 `json:"origin"`
Type string `json:"type"`
UomLabel string `json:"uomLabel"`
Min string `json:"min"`
Max string `json:"max"`
DefaultValue string `json:"defaultValue"`
Formatting string `json:"formatting"`
}
ValueDescriptor entity
Click to show internal directories.
Click to hide internal directories.