cloud

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComFactory

func ComFactory(ctx context.Context, config configuration.Config, responseListener func(msg messages.ProtocolMsg) error, errorListener func(msg messages.ProtocolMsg) error) (producer interfaces.Producer, err error)

func IotFactory

func IotFactory(ctx context.Context, config configuration.Config) (interfaces.Iot, error)

func MarshallerFactory

func MarshallerFactory(ctx context.Context, config configuration.Config, iot interfaces.Iot) (interfaces.Marshaller, error)

func TimescaleFactory

func TimescaleFactory(ctx context.Context, config configuration.Config) (interfaces.Timescale, error)

Types

type Cache

type Cache interface {
	Use(key string, getter func() (interface{}, error), result interface{}) (err error)
	Set(key string, value []byte)
	Get(key string) (value []byte, err error)
}

type CacheImpl

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

func (*CacheImpl) Get

func (this *CacheImpl) Get(key string) (value []byte, err error)

func (*CacheImpl) Set

func (this *CacheImpl) Set(key string, value []byte)

func (*CacheImpl) Use

func (this *CacheImpl) Use(key string, getter func() (interface{}, error), result interface{}) (err error)

type IdWrapper

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

type Iot

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

func NewIot

func NewIot(config configuration.Config, cache Cache, cacheDevices bool) *Iot

func (*Iot) GetAspectNode

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

func (*Iot) GetCharacteristic

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

func (*Iot) GetConcept

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

func (*Iot) GetConceptIds

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

func (*Iot) GetDevice

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

func (*Iot) GetDeviceGroup

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

func (*Iot) GetDeviceType

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

func (*Iot) GetFunction

func (this *Iot) GetFunction(token string, id string) (result model.Function, err error)

func (*Iot) GetJson

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

func (*Iot) GetProtocol

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

func (*Iot) GetService

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

func (*Iot) ListFunctions

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

type Producer

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

func (*Producer) SendCommand

func (this *Producer) SendCommand(msg messages.ProtocolMsg) (err error)

type QueriesRequestElement

type QueriesRequestElement struct {
	DeviceId  string
	ServiceId string
	Limit     int
	Columns   []QueriesRequestElementColumn
}

type QueriesRequestElementColumn

type QueriesRequestElementColumn struct {
	Name string
}

type Timescale

type Timescale struct {
	TimescaleWrapperUrl string
}

func NewTimescale

func NewTimescale(timescaleWrapperUrl string) *Timescale

func (*Timescale) Query

func (this *Timescale) Query(token auth.Token, request []interfaces.TimescaleRequest, timeout time.Duration) (result []interfaces.TimescaleResponse, err error)

type TimescaleQuery

type TimescaleQuery = []QueriesRequestElement

type TimescaleQueryResponse

type TimescaleQueryResponse = [][][]interface{} //[query-index][0][column-index + 1]

Jump to

Keyboard shortcuts

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