models

package
v1.0.1-0...-3a959c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

func (m *Command) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this command based on the context it is used

func (*Command) MarshalBinary

func (m *Command) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Command) UnmarshalBinary

func (m *Command) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Command) Validate

func (m *Command) Validate(formats strfmt.Registry) error

Validate validates this command

type CommandGet

type CommandGet struct {

	// responses
	Responses []*CommandGetResponse `json:"responses,omitempty"`
}

CommandGet get

swagger:model CommandGet

func (*CommandGet) ContextValidate

func (m *CommandGet) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*CommandGet) Validate

func (m *CommandGet) Validate(formats strfmt.Registry) error

Validate validates this command get

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

func (m *CommandGetResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*CommandGetResponse) Validate

func (m *CommandGetResponse) Validate(formats strfmt.Registry) error

Validate validates this command get response

type CommandPayload

type CommandPayload map[string]interface{}

CommandPayload commandPayload

key/value properties for the command

swagger:model CommandPayload

func (CommandPayload) ContextValidate

func (m CommandPayload) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this command payload based on context it is used

func (CommandPayload) Validate

func (m CommandPayload) Validate(formats strfmt.Registry) error

Validate validates this command payload

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

func (m *CommandPut) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*CommandPut) Validate

func (m *CommandPut) Validate(formats strfmt.Registry) error

Validate validates this command put

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

func (m *CommandPutResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*CommandPutResponse) Validate

func (m *CommandPutResponse) Validate(formats strfmt.Registry) error

Validate validates this command put response

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

func (m *Device) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this device based on the context it is used

func (*Device) MarshalBinary

func (m *Device) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Device) UnmarshalBinary

func (m *Device) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Device) Validate

func (m *Device) Validate(formats strfmt.Registry) error

Validate validates this device

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

func (m *DeviceProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*DeviceProfile) Validate

func (m *DeviceProfile) Validate(formats strfmt.Registry) error

Validate validates this device profile

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

func (m *Policy) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this policy based on context it is used

func (*Policy) MarshalBinary

func (m *Policy) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Policy) UnmarshalBinary

func (m *Policy) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Policy) Validate

func (m *Policy) Validate(formats strfmt.Registry) error

Validate validates this policy

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

func (m *Reading) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this reading based on context it is used

func (*Reading) MarshalBinary

func (m *Reading) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Reading) UnmarshalBinary

func (m *Reading) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Reading) Validate

func (m *Reading) Validate(formats strfmt.Registry) error

Validate validates this reading

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

func (m *Resource) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this resource based on the context it is used

func (*Resource) MarshalBinary

func (m *Resource) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Resource) UnmarshalBinary

func (m *Resource) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Resource) Validate

func (m *Resource) Validate(formats strfmt.Registry) error

Validate validates this resource

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

func (m *ResourceProperties) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*ResourceProperties) Validate

func (m *ResourceProperties) Validate(formats strfmt.Registry) error

Validate validates this resource properties

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

func (*ResourcePropertiesUnit) Validate

func (m *ResourcePropertiesUnit) Validate(formats strfmt.Registry) error

Validate validates this resource properties unit

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

func (*ResourcePropertiesValue) Validate

func (m *ResourcePropertiesValue) Validate(formats strfmt.Registry) error

Validate validates this resource properties value

type Role

type Role string

Role role

role of the Gateway

swagger:model Role

func (Role) ContextValidate

func (m Role) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this role based on context it is used

func (Role) Validate

func (m Role) Validate(formats strfmt.Registry) error

Validate validates this role

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

func (m *User) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this user based on context it is used

func (*User) MarshalBinary

func (m *User) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*User) UnmarshalBinary

func (m *User) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*User) Validate

func (m *User) Validate(formats strfmt.Registry) error

Validate validates this user

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

func (m *UserCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*UserCreate) Validate

func (m *UserCreate) Validate(formats strfmt.Registry) error

Validate validates this user create

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

func (m *UserUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*UserUpdate) Validate

func (m *UserUpdate) Validate(formats strfmt.Registry) error

Validate validates this user update

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

func (m *ValueDescriptor) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*ValueDescriptor) Validate

func (m *ValueDescriptor) Validate(formats strfmt.Registry) error

Validate validates this value descriptor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL