fog

package
v1.0.11 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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingField = errors.New("missing field")
View Source
var ErrUnexpectedField = errors.New("unexpected field")
View Source
var ErrUnexpectedType = errors.New("unexpected type")

Functions

func CleanMsg

func CleanMsg(msg map[string]interface{}, service model.Service) (result map[string]interface{}, err error)

func DefaultMissingFields

func DefaultMissingFields(msg map[string]interface{}, service models.Service) (result map[string]interface{}, err error)

func ParseTopic

func ParseTopic(topic string) (prefix string, deviceUri string, serviceUri string, err error)

func RemoveUnknownFields

func RemoveUnknownFields(msg map[string]interface{}, service models.Service) (_ map[string]interface{}, err error)

Types

type Impl

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

func New

func New(ctx context.Context, wg *sync.WaitGroup, config configuration.Config) (result *Impl, err error)

func (*Impl) GetImportEventDescriptions

func (this *Impl) GetImportEventDescriptions(importId string) ([]model.EventDesc, error)

func (*Impl) GetServiceEventDescriptions

func (this *Impl) GetServiceEventDescriptions(deviceId string, serviceId string) (result []model.EventDesc, err error)

func (*Impl) IsImportMessage

func (this *Impl) IsImportMessage(message model.ConsumerMessage) bool

func (*Impl) IsServiceMessage

func (this *Impl) IsServiceMessage(message model.ConsumerMessage) bool

func (*Impl) ParseImportMessage

func (this *Impl) ParseImportMessage(message model.ConsumerMessage) (importId string, payload Payload, err error)

func (*Impl) ParseServiceMessage

func (this *Impl) ParseServiceMessage(message model.ConsumerMessage) (deviceId string, serviceId string, payload Payload, err error)

func (*Impl) SerializeMessage

func (this *Impl) SerializeMessage(payload Payload, service models.Service) (result model.SerializedMessage, err error)

type Payload

type Payload = string

Jump to

Keyboard shortcuts

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