Versions in this module Expand all Collapse all v3 v3.1.4 Dec 5, 2024 v3.1.3 Dec 2, 2024 v3.1.2 Dec 2, 2024 Changes in this version + func FromProtocolModelsToDTOs(protocolModels map[string]models.ProtocolProperties) map[string]ProtocolProperties + func ToAddressModel(a Address) models.Address + func ToAddressModels(dtos []Address) []models.Address + func ToAutoEventModel(a AutoEvent) models.AutoEvent + func ToAutoEventModels(autoEventDTOs []AutoEvent) []models.AutoEvent + func ToDeviceCommandModel(dto DeviceCommand) models.DeviceCommand + func ToDeviceCommandModels(deviceCommandDTOs []DeviceCommand) []models.DeviceCommand + func ToDeviceModel(dto Device) models.Device + func ToDeviceProfileModel(deviceProfileDTO DeviceProfile) models.DeviceProfile + func ToDeviceResourceModel(d DeviceResource) models.DeviceResource + func ToDeviceResourceModels(deviceResourceDTOs []DeviceResource) []models.DeviceResource + func ToDeviceServiceModel(dto DeviceService) models.DeviceService + func ToDiscoveredDeviceModel(dto DiscoveredDevice) models.DiscoveredDevice + func ToIntervalActionModel(dto IntervalAction) models.IntervalAction + func ToIntervalModel(dto Interval) models.Interval + func ToNotificationModel(n Notification) models.Notification + func ToNotificationModels(notifications []Notification) []models.Notification + func ToProtocolModels(protocolDTOs map[string]ProtocolProperties) map[string]models.ProtocolProperties + func ToProtocolPropertiesModel(p ProtocolProperties) models.ProtocolProperties + func ToProvisionWatcherModel(dto ProvisionWatcher) models.ProvisionWatcher + func ToReadingModel(r BaseReading) models.Reading + func ToResourceOperationModel(ro ResourceOperation) models.ResourceOperation + func ToResourceOperationModels(dtos []ResourceOperation) []models.ResourceOperation + func ToResourcePropertiesModel(p ResourceProperties) models.ResourceProperties + func ToSubscriptionModel(s Subscription) models.Subscription + func ToSubscriptionModels(subs []Subscription) []models.Subscription + func ToTransmissionModel(trans Transmission) models.Transmission + func ToTransmissionModels(ts []Transmission) []models.Transmission + func ToTransmissionRecordModel(tr TransmissionRecord) models.TransmissionRecord + func ToTransmissionRecordModels(trs []TransmissionRecord) []models.TransmissionRecord + func ValidateDeviceProfileDTO(profile DeviceProfile) error + func ValidateMetricName(name string, nameType string) error + func ValidateValue(valueType string, value string) error + type Address struct + Host string + Port int + Type string + func FromAddressModelToDTO(address models.Address) Address + func FromAddressModelsToDTOs(models []models.Address) []Address + func NewEmailAddress(recipients []string) Address + func NewMQTTAddress(host string, port int, publisher string, topic string) Address + func NewRESTAddress(host string, port int, httpMethod string) Address + func (a *Address) Validate() error + type AutoEvent struct + Interval string + OnChange bool + SourceName string + Step float64 + func FromAutoEventModelToDTO(a models.AutoEvent) AutoEvent + func FromAutoEventModelsToDTOs(autoEvents []models.AutoEvent) []AutoEvent + type BaseReading struct + DeviceName string + Id string + Origin int64 + ProfileName string + ResourceName string + Tags Tags + Units string + ValueType string + func FromReadingModelToDTO(reading models.Reading) BaseReading + func NewBinaryReading(profileName string, deviceName string, resourceName string, binaryValue []byte, ...) BaseReading + func NewObjectReading(profileName string, deviceName string, resourceName string, ...) BaseReading + func NewSimpleReading(profileName string, deviceName string, resourceName string, valueType string, ...) (BaseReading, error) + func (b BaseReading) UnmarshalObjectValue(target any) error + func (b BaseReading) Validate() error + type BinaryReading struct + BinaryValue []byte + MediaType string + type CoreCommand struct + Get bool + Name string + Parameters []CoreCommandParameter + Path string + Set bool + Url string + type CoreCommandParameter struct + ResourceName string + ValueType string + type DBTimestamp struct + Created int64 + Modified int64 + type Device struct + AdminState string + AutoEvents []AutoEvent + Description string + Id string + Labels []string + Location interface{} + Name string + OperatingState string + ProfileName string + Properties map[string]any + Protocols map[string]ProtocolProperties + ServiceName string + Tags map[string]any + func FromDeviceModelToDTO(d models.Device) Device + type DeviceCommand struct + IsHidden bool + Name string + ReadWrite string + ResourceOperations []ResourceOperation + Tags map[string]any + func FromDeviceCommandModelToDTO(d models.DeviceCommand) DeviceCommand + func FromDeviceCommandModelsToDTOs(deviceCommandModels []models.DeviceCommand) []DeviceCommand + type DeviceCoreCommand struct + CoreCommands []CoreCommand + DeviceName string + ProfileName string + type DeviceProfile struct + DeviceCommands []DeviceCommand + DeviceResources []DeviceResource + func FromDeviceProfileModelToDTO(deviceProfile models.DeviceProfile) DeviceProfile + func (dp *DeviceProfile) UnmarshalYAML(unmarshal func(interface{}) error) error + func (dp *DeviceProfile) Validate() error + type DeviceProfileBasicInfo struct + Description string + Id string + Labels []string + Manufacturer string + Model string + Name string + type DeviceResource struct + Attributes map[string]interface{} + Description string + IsHidden bool + Name string + Properties ResourceProperties + Tags map[string]any + func FromDeviceResourceModelToDTO(d models.DeviceResource) DeviceResource + func FromDeviceResourceModelsToDTOs(deviceResourceModels []models.DeviceResource) []DeviceResource + type DeviceService struct + AdminState string + BaseAddress string + Description string + Id string + Labels []string + Name string + func FromDeviceServiceModelToDTO(ds models.DeviceService) DeviceService + type DiscoveredDevice struct + AdminState string + AutoEvents []AutoEvent + ProfileName string + Properties map[string]any + func FromDiscoveredDeviceModelToDTO(d models.DiscoveredDevice) DiscoveredDevice + type EmailAddress struct + Recipients []string + type Event struct + DeviceName string + Id string + Origin int64 + ProfileName string + Readings []BaseReading + SourceName string + Tags Tags + func FromEventModelToDTO(event models.Event) Event + func NewEvent(profileName, deviceName, sourceName string) Event + func (e *Event) AddBinaryReading(resourceName string, binaryValue []byte, mediaType string) + func (e *Event) AddObjectReading(resourceName string, objectValue interface{}) + func (e *Event) AddSimpleReading(resourceName string, valueType string, value interface{}) error + func (e *Event) ToXML() (string, error) + type Interval struct + End string + Id string + Interval string + Name string + Start string + func FromIntervalModelToDTO(model models.Interval) Interval + func NewInterval(name, interval string) Interval + type IntervalAction struct + Address Address + AdminState string + AuthMethod string + Content string + ContentType string + Id string + IntervalName string + Name string + func FromIntervalActionModelToDTO(model models.IntervalAction) IntervalAction + func NewIntervalAction(name string, intervalName string, address Address) IntervalAction + type MQTTPubAddress struct + AutoReconnect bool + ConnectTimeout int + KeepAlive int + Publisher string + QoS int + Retained bool + Topic string + type Metric struct + Fields []MetricField + Name string + Tags []MetricTag + Timestamp int64 + func NewMetric(name string, fields []MetricField, tags []MetricTag) (Metric, error) + func (m *Metric) ToLineProtocol() string + type MetricField struct + Name string + Value interface{} + type MetricTag struct + Name string + Value string + type Notification struct + Category string + Content string + ContentType string + Description string + Id string + Labels []string + Sender string + Severity string + Status string + func FromNotificationModelToDTO(n models.Notification) Notification + func FromNotificationModelsToDTOs(notifications []models.Notification) []Notification + func NewNotification(labels []string, category, content, sender, severity string) Notification + type ObjectReading struct + ObjectValue interface{} + type ProtocolProperties map[string]any + func FromProtocolPropertiesModelToDTO(p models.ProtocolProperties) ProtocolProperties + type ProvisionWatcher struct + AdminState string + BlockingIdentifiers map[string][]string + DiscoveredDevice DiscoveredDevice + Id string + Identifiers map[string]string + Labels []string + Name string + ServiceName string + func FromProvisionWatcherModelToDTO(pw models.ProvisionWatcher) ProvisionWatcher + type RESTAddress struct + HTTPMethod string + Path string + type ResourceOperation struct + DefaultValue string + DeviceResource string + Mappings map[string]string + func FromResourceOperationModelToDTO(ro models.ResourceOperation) ResourceOperation + type ResourceProperties struct + Assertion string + Base *float64 + DefaultValue string + Mask *uint64 + Maximum *float64 + MediaType string + Minimum *float64 + Offset *float64 + Optional map[string]any + ReadWrite string + Scale *float64 + Shift *int64 + Units string + ValueType string + func FromResourcePropertiesModelToDTO(p models.ResourceProperties) ResourceProperties + type SimpleReading struct + Value string + type Subscription struct + AdminState string + Categories []string + Channels []Address + Description string + Id string + Labels []string + Name string + Receiver string + ResendInterval string + ResendLimit int + func FromSubscriptionModelToDTO(s models.Subscription) Subscription + func FromSubscriptionModelsToDTOs(subscruptions []models.Subscription) []Subscription + type SystemEvent struct + Action string + Details any + Owner string + Source string + Tags map[string]string + Timestamp int64 + Type string + func NewSystemEvent(eventType, action, source, owner string, tags map[string]string, details any) SystemEvent + func (s *SystemEvent) DecodeDetails(details any) error + type Tags map[string]any + func (t Tags) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type Transmission struct + Channel Address + Created int64 + Id string + NotificationId string + Records []TransmissionRecord + ResendCount int + Status string + SubscriptionName string + func FromTransmissionModelToDTO(trans models.Transmission) Transmission + func FromTransmissionModelsToDTOs(ts []models.Transmission) []Transmission + type TransmissionRecord struct + Response string + Sent int64 + Status string + func FromTransmissionRecordModelToDTO(tr models.TransmissionRecord) TransmissionRecord + func FromTransmissionRecordModelsToDTOs(trs []models.TransmissionRecord) []TransmissionRecord + func (tr TransmissionRecord) String() string + type UpdateDevice struct + AdminState *string + AutoEvents []AutoEvent + Description *string + Id *string + Labels []string + Location interface{} + Name *string + OperatingState *string + ProfileName *string + Properties map[string]any + Protocols map[string]ProtocolProperties + ServiceName *string + Tags map[string]any + func FromDeviceModelToUpdateDTO(d models.Device) UpdateDevice + type UpdateDeviceCommand struct + IsHidden *bool + Name *string + type UpdateDeviceProfileBasicInfo struct + Description *string + Id *string + Labels []string + Manufacturer *string + Model *string + Name *string + type UpdateDeviceResource struct + Description *string + IsHidden *bool + Name *string + type UpdateDeviceService struct + AdminState *string + BaseAddress *string + Description *string + Id *string + Labels []string + Name *string + func FromDeviceServiceModelToUpdateDTO(ds models.DeviceService) UpdateDeviceService + type UpdateDiscoveredDevice struct + AdminState *string + AutoEvents []AutoEvent + ProfileName *string + Properties map[string]any + func FromDiscoveredDeviceModelToUpdateDTO(d models.DiscoveredDevice) UpdateDiscoveredDevice + type UpdateInterval struct + End *string + Id *string + Interval *string + Name *string + Start *string + func NewUpdateInterval(name string) UpdateInterval + type UpdateIntervalAction struct + Address *Address + AdminState *string + AuthMethod *string + Content *string + ContentType *string + Id *string + IntervalName *string + Name *string + func NewUpdateIntervalAction(name string) UpdateIntervalAction + type UpdateProvisionWatcher struct + AdminState *string + BlockingIdentifiers map[string][]string + DiscoveredDevice UpdateDiscoveredDevice + Id *string + Identifiers map[string]string + Labels []string + Name *string + ServiceName *string + func FromProvisionWatcherModelToUpdateDTO(pw models.ProvisionWatcher) UpdateProvisionWatcher + type UpdateSubscription struct + AdminState *string + Categories []string + Channels []Address + Description *string + Id *string + Labels []string + Name *string + Receiver *string + ResendInterval *string + ResendLimit *int