topic

package
v0.0.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMultipleMatchingDevicesFound = errors.New("multiple matching devices found")
View Source
var ErrNoDeviceIdCandidateFound = errors.New("no device id candidate found")
View Source
var ErrNoDeviceMatchFound = errors.New("no device match found")
View Source
var ErrNoServiceMatchFound = errors.New("no service match found")

Functions

This section is empty.

Types

type Topic

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

func New

func New(iotCache *iot.PreparedCache, defaultActuatorPattern string) *Topic

func (*Topic) Create

func (this *Topic) Create(deviceId string, localServiceId string) (topic string, err error)

func (*Topic) Parse

func (this *Topic) Parse(token security.JwtToken, topic string) (device model.Device, service model.Service, err error)

if no service is fount, ErrNoServiceMatchFound will be returned as error. but the device will be set if one was found

func (*Topic) ParseForCandidates

func (this *Topic) ParseForCandidates(token security.JwtToken, topic string) (candidates []candidate, err error)

Jump to

Keyboard shortcuts

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