devicerepo

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const CacheExpiration = 60 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	Config configuration.Config
	Cache  *cache.Cache
}

func (Factory) Get

type IdWrapper

type IdWrapper struct {
	Id string `json:"id"`
}

type Iot

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

func New

func New(config configuration.Config, cache *cache.Cache) *Iot

func (*Iot) GetAspectNode

func (this *Iot) GetAspectNode(id string) (result model.AspectNode, err error)

func (*Iot) GetCharacteristic

func (this *Iot) GetCharacteristic(id string) (result model.Characteristic, err error)

func (*Iot) GetConcept

func (this *Iot) GetConcept(id string) (result model.Concept, err error)

func (*Iot) GetConceptIds

func (this *Iot) GetConceptIds() (ids []string, err error)

func (*Iot) GetDevice

func (this *Iot) GetDevice(_ devicerepository.Impersonate, id string) (result model.Device, err error)

func (*Iot) GetDeviceGroup

func (this *Iot) GetDeviceGroup(_ devicerepository.Impersonate, id string) (result model.DeviceGroup, err error)

func (*Iot) GetDeviceType

func (this *Iot) GetDeviceType(_ devicerepository.Impersonate, id string) (result model.DeviceType, err error)

func (*Iot) GetJson

func (this *Iot) GetJson(token string, endpoint string, result interface{}) (err error)

func (*Iot) GetProtocol

func (this *Iot) GetProtocol(_ devicerepository.Impersonate, id string) (result model.Protocol, err error)

func (*Iot) GetService

func (this *Iot) GetService(token devicerepository.Impersonate, device model.Device, serviceId string) (result model.Service, err error)

func (*Iot) GetToken

func (this *Iot) GetToken(user string) (devicerepository.Impersonate, error)

func (*Iot) ListFunctions

func (this *Iot) ListFunctions() (functionInfos []model.Function, err error)

type OpenidToken

type OpenidToken struct {
	AccessToken      string    `json:"access_token"`
	ExpiresIn        float64   `json:"expires_in"`
	RefreshExpiresIn float64   `json:"refresh_expires_in"`
	RefreshToken     string    `json:"refresh_token"`
	TokenType        string    `json:"token_type"`
	RequestTime      time.Time `json:"-"`
}

func (*OpenidToken) EnsureAccess

func (openid *OpenidToken) EnsureAccess(config configuration.Config) (token string, err error)

type Provider

type Provider struct {
	Config configuration.Config
	Cache  *cache.Cache
	// contains filtered or unexported fields
}

func (*Provider) Get

func (*Provider) GetImpl

func (this *Provider) GetImpl() *Iot

Jump to

Keyboard shortcuts

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