devicemetadata

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AttributeUsedForCanaryDevice = "senergy/canary-device"
View Source
const AttributeUsedForCanaryDeviceType = "senergy/canary-device-type"
View Source
const CmdServiceLocalId = "cmd"
View Source
const SensorServiceLocalId = "sensor"

Variables

This section is empty.

Functions

func Do

func Do[T any](req *http.Request) (result T, code int, err error)

Types

type DeviceInfo

type DeviceInfo = models.Device

type DeviceMetaData

type DeviceMetaData struct {
	// contains filtered or unexported fields
}

func NewDeviceMetaData

func NewDeviceMetaData(devicerepo devicerepo.Interface, metrics *metrics.Metrics, config configuration.Config, guaranteeChangeAfter time.Duration) *DeviceMetaData

func (*DeviceMetaData) CreateCanaryDevice

func (this *DeviceMetaData) CreateCanaryDevice(token string) (device DeviceInfo, err error)

func (*DeviceMetaData) CreateCanaryDeviceType

func (this *DeviceMetaData) CreateCanaryDeviceType(token string) (deviceType DeviceTypeInfo, err error)

func (*DeviceMetaData) EnsureDevice

func (this *DeviceMetaData) EnsureDevice(token string) (device DeviceInfo, err error)

func (*DeviceMetaData) EnsureDeviceType

func (this *DeviceMetaData) EnsureDeviceType(token string) (result DeviceTypeInfo, err error)

func (*DeviceMetaData) ListCanaryDeviceTypes

func (this *DeviceMetaData) ListCanaryDeviceTypes(token string) (result []DeviceTypeInfo, err error)

func (*DeviceMetaData) ListCanaryDevices

func (this *DeviceMetaData) ListCanaryDevices(token string) (devices []DeviceInfo, err error)

func (*DeviceMetaData) TestMetadata

func (this *DeviceMetaData) TestMetadata(token string, info DeviceInfo)

type DeviceTypeInfo

type DeviceTypeInfo struct {
	Id       string   `json:"id"`
	Services []string `json:"service"`
}

type PermDevice

type PermDevice struct {
	Id          string                 `json:"id"`
	Name        string                 `json:"name"`
	Annotations map[string]interface{} `json:"annotations"`
}

Jump to

Keyboard shortcuts

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