devices

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultBaseDeviceRepoFactory

func DefaultBaseDeviceRepoFactory(token string, deviceRepoUrl string, permissionsUrl string) interfaces.Devices

func DefaultDeviceProvider

func DefaultDeviceProvider(token string, baseUrl string, deviceId string) (result models.Device, err error, code int)

Types

type AuthFromToken

type AuthFromToken struct {
	Token string
}

func (AuthFromToken) Ensure

func (this AuthFromToken) Ensure() (token auth2.AuthToken, err error)

type BaseDeviceRepoFactory

type BaseDeviceRepoFactory = func(token string, deviceRepoUrl string, permissionsSearchUrl string) interfaces.Devices

type DeviceProvider

type DeviceProvider = func(token string, baseUrl string, deviceId string) (result models.Device, err error, code int)

type DeviceRepo

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

func New

func New(config syncconf.Config, baseRepFactory BaseDeviceRepoFactory, deviceProvider DeviceProvider) (*DeviceRepo, error)

func (*DeviceRepo) GetConcept

func (this *DeviceRepo) GetConcept(token auth.Token, conceptId string) (result model.Concept, err error, code int)

func (*DeviceRepo) GetDevice

func (this *DeviceRepo) GetDevice(token auth.Token, deviceId string) (result models.Device, err error, code int)

func (*DeviceRepo) GetDeviceInfosOfDevices

func (this *DeviceRepo) GetDeviceInfosOfDevices(token auth.Token, deviceIds []string) (devices []model.Device, deviceTypeIds []string, err error, code int)

func (*DeviceRepo) GetDeviceInfosOfGroup

func (this *DeviceRepo) GetDeviceInfosOfGroup(token auth.Token, groupId string) (devices []model.Device, deviceTypeIds []string, err error, code int)

func (*DeviceRepo) GetDeviceTypeSelectables

func (this *DeviceRepo) GetDeviceTypeSelectables(token auth.Token, criteria []model.FilterCriteria) (result []model.DeviceTypeSelectable, err error, code int)

func (*DeviceRepo) GetFunction

func (this *DeviceRepo) GetFunction(token auth.Token, functionId string) (result model.Function, err error, code int)

func (*DeviceRepo) GetService

func (this *DeviceRepo) GetService(token auth.Token, serviceId string) (result models.Service, err error, code int)

func (*DeviceRepo) WithPresetToken

func (this *DeviceRepo) WithPresetToken(token auth.Token) interfaces.Devices

Jump to

Keyboard shortcuts

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