Documentation
¶
Index ¶
- type Command
- type CommandGet
- type CommandGetResponse
- type CommandPayload
- type CommandPut
- type CommandPutResponse
- type CommandResponse
- type Device
- type DeviceProfile
- type Policy
- type Reading
- type Resource
- type ResourceProperties
- type ResourcePropertiesUnit
- func (m *ResourcePropertiesUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *ResourcePropertiesUnit) MarshalBinary() ([]byte, error)
- func (m *ResourcePropertiesUnit) UnmarshalBinary(b []byte) error
- func (m *ResourcePropertiesUnit) Validate(formats strfmt.Registry) error
- type ResourcePropertiesValue
- func (m *ResourcePropertiesValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *ResourcePropertiesValue) MarshalBinary() ([]byte, error)
- func (m *ResourcePropertiesValue) UnmarshalBinary(b []byte) error
- func (m *ResourcePropertiesValue) Validate(formats strfmt.Registry) error
- type Role
- type User
- type UserCreate
- type UserUpdate
- type ValueDescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// name
Name string `json:"name,omitempty"`
// get
Get *CommandGet `json:"get,omitempty"`
// put
Put *CommandPut `json:"put,omitempty"`
}
Command command
command of a device/sensor
swagger:model Command
func (*Command) ContextValidate ¶
ContextValidate validate this command based on the context it is used
func (*Command) MarshalBinary ¶
MarshalBinary interface implementation
func (*Command) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type CommandGet ¶
type CommandGet struct {
// responses
Responses []*CommandGetResponse `json:"responses,omitempty"`
}
CommandGet get
swagger:model CommandGet
func (*CommandGet) ContextValidate ¶
ContextValidate validate this command get based on the context it is used
func (*CommandGet) MarshalBinary ¶
func (m *CommandGet) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CommandGet) UnmarshalBinary ¶
func (m *CommandGet) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CommandGetResponse ¶
type CommandGetResponse struct {
// code
Code string `json:"code,omitempty"`
// description
Description string `json:"description,omitempty"`
// expectedValues
ExpectedValues []string `json:"expectedValues,omitempty"`
}
CommandGetResponse commandgetresponse
swagger:model CommandGetResponse
func (*CommandGetResponse) ContextValidate ¶
ContextValidate validates this command get response based on context it is used
func (*CommandGetResponse) MarshalBinary ¶
func (m *CommandGetResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CommandGetResponse) UnmarshalBinary ¶
func (m *CommandGetResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CommandPayload ¶
type CommandPayload map[string]interface{}
CommandPayload commandPayload
key/value properties for the command
swagger:model CommandPayload
func (CommandPayload) ContextValidate ¶
ContextValidate validates this command payload based on context it is used
type CommandPut ¶
type CommandPut struct {
// parameterNames
ParameterNames []string `json:"parameterNames,omitempty"`
// responses
Responses []*CommandPutResponse `json:"responses,omitempty"`
}
CommandPut put
availabill put command
swagger:model CommandPut
func (*CommandPut) ContextValidate ¶
ContextValidate validate this command put based on the context it is used
func (*CommandPut) MarshalBinary ¶
func (m *CommandPut) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CommandPut) UnmarshalBinary ¶
func (m *CommandPut) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CommandPutResponse ¶
type CommandPutResponse struct {
// code
Code string `json:"code,omitempty"`
// description
Description string `json:"description,omitempty"`
}
CommandPutResponse commandputresponse
swagger:model CommandPutResponse
func (*CommandPutResponse) ContextValidate ¶
ContextValidate validates this command put response based on context it is used
func (*CommandPutResponse) MarshalBinary ¶
func (m *CommandPutResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CommandPutResponse) UnmarshalBinary ¶
func (m *CommandPutResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CommandResponse ¶
type CommandResponse interface{}
CommandResponse response
Response from the command. Unknown schema
swagger:model CommandResponse
type Device ¶
type Device struct {
// name
Name string `json:"name,omitempty"`
// labels
Labels []string `json:"labels,omitempty"`
// description
Description string `json:"description,omitempty"`
// location
Location string `json:"location,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// operatingState
OperatingState string `json:"operatingState,omitempty"`
// lastConnected
LastConnected int64 `json:"lastConnected,omitempty"`
// lastReported
LastReported int64 `json:"lastReported,omitempty"`
// profile
Profile *DeviceProfile `json:"profile,omitempty"`
}
Device device
Device or sensor supplying data and taking actuation commands ¶
swagger:model Device
func (*Device) ContextValidate ¶
ContextValidate validate this device based on the context it is used
func (*Device) MarshalBinary ¶
MarshalBinary interface implementation
func (*Device) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type DeviceProfile ¶
type DeviceProfile struct {
// labels
Labels []string `json:"labels,omitempty"`
// description
Description string `json:"description,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// manufacturer
Manufacturer string `json:"manufacturer,omitempty"`
// model
Model string `json:"model,omitempty"`
// resources
Resources []*Resource `json:"resources,omitempty"`
// commands
Commands []*Command `json:"commands,omitempty"`
}
DeviceProfile deviceprofile
Template describing devices and sensors of the same nature in reporting the same data and offering the same commands ¶
swagger:model DeviceProfile
func (*DeviceProfile) ContextValidate ¶
ContextValidate validate this device profile based on the context it is used
func (*DeviceProfile) MarshalBinary ¶
func (m *DeviceProfile) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*DeviceProfile) UnmarshalBinary ¶
func (m *DeviceProfile) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Policy ¶
type Policy struct {
// role
//
// Role associated with the policy
// Example: guest
// Required: true
Role *string `json:"role"`
// resource
//
// Resource associated whith the policy
// Example: /v1/devices/pi-136/*
// Required: true
Resource *string `json:"resource"`
// method
//
// Method associated whith the policy
// Example: GET
// Required: true
Method *string `json:"method"`
}
Policy policy
Policy for access control ¶
swagger:model Policy
func (*Policy) ContextValidate ¶
ContextValidate validates this policy based on context it is used
func (*Policy) MarshalBinary ¶
MarshalBinary interface implementation
func (*Policy) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Reading ¶
type Reading struct {
// name
Name string `json:"name,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// value
Value string `json:"value,omitempty"`
// valueType
ValueType string `json:"valueType,omitempty"`
// pushed
Pushed int64 `json:"pushed,omitempty"`
}
Reading reading
Core device/sensor reading
swagger:model Reading
func (*Reading) ContextValidate ¶
ContextValidate validates this reading based on context it is used
func (*Reading) MarshalBinary ¶
MarshalBinary interface implementation
func (*Reading) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Resource ¶
type Resource struct {
// name
Name string `json:"name,omitempty"`
// description
Description string `json:"description,omitempty"`
// tag
Tag string `json:"tag,omitempty"`
// properties
Properties *ResourceProperties `json:"properties,omitempty"`
}
Resource resource
Resource of a device/sensor
swagger:model Resource
func (*Resource) ContextValidate ¶
ContextValidate validate this resource based on the context it is used
func (*Resource) MarshalBinary ¶
MarshalBinary interface implementation
func (*Resource) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ResourceProperties ¶
type ResourceProperties struct {
// value
Value *ResourcePropertiesValue `json:"value,omitempty"`
// unit
Unit *ResourcePropertiesUnit `json:"unit,omitempty"`
}
ResourceProperties properties
swagger:model ResourceProperties
func (*ResourceProperties) ContextValidate ¶
ContextValidate validate this resource properties based on the context it is used
func (*ResourceProperties) MarshalBinary ¶
func (m *ResourceProperties) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ResourceProperties) UnmarshalBinary ¶
func (m *ResourceProperties) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ResourcePropertiesUnit ¶
type ResourcePropertiesUnit struct {
// type
Type string `json:"type,omitempty"`
// readWrite
ReadWrite string `json:"readWrite,omitempty"`
// defaultValue
DefaultValue string `json:"defaultValue,omitempty"`
}
ResourcePropertiesUnit unit
swagger:model ResourcePropertiesUnit
func (*ResourcePropertiesUnit) ContextValidate ¶
func (m *ResourcePropertiesUnit) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this resource properties unit based on context it is used
func (*ResourcePropertiesUnit) MarshalBinary ¶
func (m *ResourcePropertiesUnit) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ResourcePropertiesUnit) UnmarshalBinary ¶
func (m *ResourcePropertiesUnit) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ResourcePropertiesValue ¶
type ResourcePropertiesValue struct {
// type
Type string `json:"type,omitempty"`
// readWrite
ReadWrite string `json:"readWrite,omitempty"`
// minimum
Minimum string `json:"minimum,omitempty"`
// maximum
Maximum string `json:"maximum,omitempty"`
// defaultValue
DefaultValue string `json:"defaultValue,omitempty"`
// mask
Mask uint64 `json:"mask,omitempty"`
// shift
Shift uint64 `json:"shift,omitempty"`
// scale
Scale int64 `json:"scale,omitempty"`
// offset
Offset int64 `json:"offset,omitempty"`
// base
Base int64 `json:"base,omitempty"`
// assertion
Assertion string `json:"assertion,omitempty"`
// floatEncoding
FloatEncoding string `json:"floatEncoding,omitempty"`
// mediatype
Mediatype string `json:"mediatype,omitempty"`
}
ResourcePropertiesValue value
swagger:model ResourcePropertiesValue
func (*ResourcePropertiesValue) ContextValidate ¶
func (m *ResourcePropertiesValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error
ContextValidate validates this resource properties value based on context it is used
func (*ResourcePropertiesValue) MarshalBinary ¶
func (m *ResourcePropertiesValue) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ResourcePropertiesValue) UnmarshalBinary ¶
func (m *ResourcePropertiesValue) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Role ¶
type Role string
Role role
role of the Gateway
swagger:model Role
func (Role) ContextValidate ¶
ContextValidate validates this role based on context it is used
type User ¶
type User struct {
// name
Name string `json:"name,omitempty"`
// name
Role string `json:"role,omitempty"`
}
User user
Describes a user of the gateway ¶
swagger:model User
func (*User) ContextValidate ¶
ContextValidate validates this user based on context it is used
func (*User) MarshalBinary ¶
MarshalBinary interface implementation
func (*User) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type UserCreate ¶
type UserCreate struct {
// name
// Required: true
Name *string `json:"name"`
// password
// Required: true
Password *string `json:"password"`
// name
// Required: true
Role *string `json:"role"`
}
UserCreate user
Payload to create a new user ¶
swagger:model UserCreate
func (*UserCreate) ContextValidate ¶
ContextValidate validates this user create based on context it is used
func (*UserCreate) MarshalBinary ¶
func (m *UserCreate) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UserCreate) UnmarshalBinary ¶
func (m *UserCreate) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type UserUpdate ¶
type UserUpdate struct {
// password
Password *string `json:"password,omitempty"`
// name
Role *string `json:"role,omitempty"`
}
UserUpdate user
Payload to updates a user ¶
swagger:model UserUpdate
func (*UserUpdate) ContextValidate ¶
ContextValidate validates this user update based on context it is used
func (*UserUpdate) MarshalBinary ¶
func (m *UserUpdate) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UserUpdate) UnmarshalBinary ¶
func (m *UserUpdate) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ValueDescriptor ¶
type ValueDescriptor struct {
// name
Name string `json:"name,omitempty"`
// labels
Labels []string `json:"labels,omitempty"`
// description
Description string `json:"description,omitempty"`
// created
Created int64 `json:"created,omitempty"`
// modified
Modified int64 `json:"modified,omitempty"`
// type
Type string `json:"type,omitempty"`
// uomLabel
//
// Unit
UomLabel string `json:"uomLabel,omitempty"`
// min
Min string `json:"min,omitempty"`
// max
Max string `json:"max,omitempty"`
// defaultValue
DefaultValue string `json:"defaultValue,omitempty"`
// formatting
Formatting string `json:"formatting,omitempty"`
}
ValueDescriptor valueDescriptor
Core and MetaData value descriptor that describes device/sensor data sent and received
swagger:model ValueDescriptor
func (*ValueDescriptor) ContextValidate ¶
ContextValidate validates this value descriptor based on context it is used
func (*ValueDescriptor) MarshalBinary ¶
func (m *ValueDescriptor) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ValueDescriptor) UnmarshalBinary ¶
func (m *ValueDescriptor) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation