marshaller

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConceptRepo

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

func NewConceptRepo

func NewConceptRepo(ctx context.Context, config configuration.Config, iot *devicerepo.Iot) (result *ConceptRepo, err error)

func (*ConceptRepo) GetCharacteristic

func (this *ConceptRepo) GetCharacteristic(id string) (characteristic model.Characteristic, err error)

func (*ConceptRepo) GetCharacteristicsOfFunction

func (this *ConceptRepo) GetCharacteristicsOfFunction(functionId string) (characteristicIds []string, err error)

func (*ConceptRepo) GetConcept

func (this *ConceptRepo) GetConcept(id string) (concept model.Concept, err error)

func (*ConceptRepo) GetConceptIdOfFunction

func (this *ConceptRepo) GetConceptIdOfFunction(id string) string

func (*ConceptRepo) GetConceptsOfCharacteristic

func (this *ConceptRepo) GetConceptsOfCharacteristic(characteristicId string) (conceptIds []string, err error)

func (*ConceptRepo) GetRootCharacteristics

func (this *ConceptRepo) GetRootCharacteristics(ids []string) (result []string)

func (*ConceptRepo) Load

func (this *ConceptRepo) Load() error

type ConceptRepoDefault

type ConceptRepoDefault struct {
	Concept         model.Concept
	Characteristics []model.Characteristic
}

type Factory

type Factory struct {
	Config     configuration.Config
	DeviceRepo *devicerepo.Iot
}

func (Factory) New

func (this Factory) New(ctx context.Context, _ string) marshaller.Interface

type FunctionInfo

type FunctionInfo struct {
	Id        string `json:"id"`
	ConceptId string `json:"concept_id"`
}

type Marshaller

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

func NewMarshaller

func NewMarshaller(ctx context.Context, conf configuration.Config, iot *devicerepo.Iot) (*Marshaller, error)

func (*Marshaller) MarshalFromServiceAndProtocol

func (this *Marshaller) MarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, characteristicData interface{}, configurables []marshaller.Configurable) (result map[string]string, err error)

func (*Marshaller) MarshalV2

func (this *Marshaller) MarshalV2(service model.Service, protocol model.Protocol, data []marshaller.MarshallingV2RequestData) (result map[string]string, err error)

func (*Marshaller) UnmarshalFromServiceAndProtocol

func (this *Marshaller) UnmarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, message map[string]string, hints []string) (characteristicData interface{}, err error)

func (*Marshaller) UnmarshalV2

func (this *Marshaller) UnmarshalV2(request marshaller.UnmarshallingV2Request) (result interface{}, err error)

type MarshallerIot

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

func NewMarshallerIot

func NewMarshallerIot(ctx context.Context, conf configuration.Config, iot *devicerepo.Iot) (result *MarshallerIot, err error)

func (*MarshallerIot) GetAspectNode

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

func (MarshallerIot) GetDeviceType

func (this MarshallerIot) GetDeviceType(id string) (result model.DeviceType, err error, code int)

this method should only be needed for old marshal/unmarshal requests

Jump to

Keyboard shortcuts

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