devicemetadata

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 17 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(permissions client.Client, 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) (dts []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"`
	OwnerId  string   `json:"owner_id"`
}

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