Documentation
¶
Index ¶
- Constants
- type Address
- type AdminState
- type AutoEvent
- type BaseAddress
- type BaseReading
- type BinaryReading
- type ChannelType
- type DBTimestamp
- type Device
- type DeviceCommand
- type DeviceProfile
- type DeviceResource
- type DeviceService
- type EmailAddress
- type Event
- type Interval
- type IntervalAction
- type MQTTPubAddress
- type Notification
- type NotificationSeverity
- type NotificationStatus
- type OperatingState
- type ProtocolProperties
- type ProvisionWatcher
- type RESTAddress
- type Reading
- type ResourceOperation
- type ResourceProperties
- type SimpleReading
- type Subscription
Constants ¶
const ( // Locked : device is locked // Unlocked : device is unlocked Locked = "LOCKED" Unlocked = "UNLOCKED" )
const ( Rest = "REST" Email = "EMAIL" )
const ( Minor = "MINOR" Critical = "CRITICAL" Normal = "NORMAL" )
const ( New = "NEW" Processed = "PROCESSED" Escalated = "ESCALATED" )
const ( Up = "UP" Down = "DOWN" Unknown = "UNKNOWN" )
Up : UP Down : DOWN Unknown : UNKNOWN
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address interface {
GetBaseAddress() BaseAddress
}
type AdminState ¶
type AdminState string
AdminState controls the range of values which constitute valid administrative states for a device
type AutoEvent ¶
AutoEvent and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/AutoEvent Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type BaseAddress ¶
type BaseAddress struct {
// Type is used to identify the Address type, i.e., REST or MQTT
Type string
// Common properties
Host string
Port int
}
BaseAddress is a base struct contains the common fields, such as type, host, port, and so on.
type BaseReading ¶
type BaseReading struct {
Id string
Origin int64
DeviceName string
ResourceName string
ProfileName string
ValueType string
}
BaseReading and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/BaseReading Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type BinaryReading ¶
type BinaryReading struct {
BaseReading `json:",inline"`
BinaryValue []byte
MediaType string
}
BinaryReading and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/BinaryReading Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
func (BinaryReading) GetBaseReading ¶
func (b BinaryReading) GetBaseReading() BaseReading
Implement GetBaseReading() method in order for BinaryReading and SimpleReading structs to implement the abstract Reading interface and then be used as a Reading. Also, the Reading interface can access the BaseReading fields. This is Golang's way to implement inheritance.
type ChannelType ¶
type ChannelType string
ChannelType controls the range of values which constitute valid delivery types for channels
type DBTimestamp ¶
type Device ¶
type Device struct {
DBTimestamp
Id string
Name string
Description string
AdminState AdminState
OperatingState OperatingState
Protocols map[string]ProtocolProperties
LastConnected int64
LastReported int64
Labels []string
Location interface{}
ServiceName string
ProfileName string
AutoEvents []AutoEvent
Notify bool
}
Device and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/Device Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type DeviceCommand ¶
type DeviceCommand struct {
Name string
IsHidden bool
ReadWrite string
ResourceOperations []ResourceOperation
}
DeviceCommand and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/DeviceCommand Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type DeviceProfile ¶
type DeviceProfile struct {
DBTimestamp
Description string
Id string
Name string
Manufacturer string
Model string
Labels []string
DeviceResources []DeviceResource
DeviceCommands []DeviceCommand
}
DeviceProfile and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/DeviceProfile Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type DeviceResource ¶
type DeviceResource struct {
Description string
Name string
IsHidden bool
Tag string
Properties ResourceProperties
Attributes map[string]string
}
DeviceResource and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/DeviceResource Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type DeviceService ¶
type DeviceService struct {
DBTimestamp
Id string
Name string
Description string
LastConnected int64
LastReported int64
Labels []string
BaseAddress string
AdminState AdminState
}
DeviceService and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/DeviceService Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type EmailAddress ¶
type EmailAddress struct {
BaseAddress
Recipients []string
}
EmailAddress is an Email specific struct
func (EmailAddress) GetBaseAddress ¶
func (a EmailAddress) GetBaseAddress() BaseAddress
type Event ¶
type Event struct {
Id string
DeviceName string
ProfileName string
SourceName string
Origin int64
Readings []Reading
Tags map[string]string
}
Event and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/Event Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type Interval ¶
type Interval struct {
DBTimestamp
Id string
Name string
Start string
End string
Frequency string
RunOnce bool
}
Interval and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/Interval Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type IntervalAction ¶
type IntervalAction struct {
DBTimestamp
Id string
Name string
IntervalName string
Address Address
}
IntervalAction and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-scheduler/2.x#/IntervalAction Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
func (*IntervalAction) UnmarshalJSON ¶
func (intervalAction *IntervalAction) UnmarshalJSON(b []byte) error
type MQTTPubAddress ¶
type MQTTPubAddress struct {
BaseAddress
Publisher string
Topic string
QoS int
KeepAlive int
Retained bool
AutoReconnect bool
ConnectTimeout int
}
MQTTPubAddress is a MQTT specific struct
func (MQTTPubAddress) GetBaseAddress ¶
func (a MQTTPubAddress) GetBaseAddress() BaseAddress
type Notification ¶
type Notification struct {
DBTimestamp
Category string
Content string
ContentType string
Description string
Id string
Labels []string
Sender string
Severity NotificationSeverity
Status NotificationStatus
}
Notification and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-notifications/2.x#/Notification Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type NotificationSeverity ¶
type NotificationSeverity string
type NotificationStatus ¶
type NotificationStatus string
type ProtocolProperties ¶
ProtocolProperties contains the device connection information in key/value pair
type ProvisionWatcher ¶
type ProvisionWatcher struct {
DBTimestamp
Id string
Name string
Labels []string
Identifiers map[string]string
BlockingIdentifiers map[string][]string
ProfileName string
ServiceName string
AdminState AdminState
AutoEvents []AutoEvent
}
ProvisionWatcher and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/ProvisionWatcher Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type RESTAddress ¶
type RESTAddress struct {
BaseAddress
Path string
QueryParameters string
HTTPMethod string
}
RESTAddress is a REST specific struct
func (RESTAddress) GetBaseAddress ¶
func (a RESTAddress) GetBaseAddress() BaseAddress
type Reading ¶
type Reading interface {
GetBaseReading() BaseReading
}
Reading is an abstract interface to be implemented by BinaryReading/SimpleReading
type ResourceOperation ¶
type ResourceOperation struct {
DeviceResource string
DefaultValue string
Mappings map[string]string
}
ResourceOperation and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/ResourceOperation Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type ResourceProperties ¶
type ResourceProperties struct {
ValueType string
ReadWrite string
Units string
Minimum string
Maximum string
DefaultValue string
Mask string
Shift string
Scale string
Offset string
Base string
Assertion string
MediaType string
}
ResourceProperties and its properties care defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/ResourceProperties Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
type SimpleReading ¶
type SimpleReading struct {
BaseReading `json:",inline"`
Value string
}
SimpleReading and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-data/2.x#/SimpleReading Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
func (SimpleReading) GetBaseReading ¶
func (s SimpleReading) GetBaseReading() BaseReading
type Subscription ¶
type Subscription struct {
DBTimestamp
Categories []string
Labels []string
Channels []Address
Description string
Id string
Receiver string
Name string
ResendLimit int64
ResendInterval string
}
Subscription and its properties are defined in the APIv2 specification: https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/support-notifications/2.x#/Subscription Model fields are same as the DTOs documented by this swagger. Exceptions, if any, are noted below.
func (*Subscription) UnmarshalJSON ¶
func (subscription *Subscription) UnmarshalJSON(b []byte) error
Source Files
¶
- address.go
- adminstate.go
- autoevent.go
- channeltype.go
- dbtimestamp.go
- device.go
- devicecommand.go
- deviceprofile.go
- deviceresource.go
- deviceservice.go
- event.go
- interval.go
- intervalaction.go
- notification.go
- notificationseverity.go
- notificationstatus.go
- operatingstate.go
- provisionwatcher.go
- reading.go
- resourceoperation.go
- resourceproperties.go
- subscription.go