utils

package
v2.4.5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DeviceIDKey = "deviceId"
View Source
const Devices = "devices"
View Source
const PlgdOwnersOwnerDevices = isEvents.PlgdOwnersOwner + "." + Devices
View Source
const PlgdOwnersOwnerDevicesDevice = PlgdOwnersOwnerDevices + ".{" + DeviceIDKey + "}"
View Source
const PlgdOwnersOwnerDevicesDeviceMetadata = PlgdOwnersOwnerDevicesDevice + ".metadata"
View Source
const PlgdOwnersOwnerDevicesDeviceMetadataEvent = PlgdOwnersOwnerDevicesDeviceMetadata + ".{" + isEvents.EventTypeKey + "}"
View Source
const PlgdOwnersOwnerDevicesDeviceResourceLinks = PlgdOwnersOwnerDevicesDevice + ".resource-links"
View Source
const PlgdOwnersOwnerDevicesDeviceResourceLinksEvent = PlgdOwnersOwnerDevicesDeviceResourceLinks + ".{" + isEvents.EventTypeKey + "}"
View Source
const PlgdOwnersOwnerDevicesDeviceResources = PlgdOwnersOwnerDevicesDevice + ".resources"
View Source
const PlgdOwnersOwnerDevicesDeviceResourcesResource = PlgdOwnersOwnerDevicesDeviceResources + ".{" + ResourceIDKey + "}"
View Source
const PlgdOwnersOwnerDevicesDeviceResourcesResourceEvent = PlgdOwnersOwnerDevicesDeviceResourcesResource + ".{" + isEvents.EventTypeKey + "}"
View Source
const ResourceIDKey = "resourceId"

Variables

This section is empty.

Functions

func GetDeviceMetadataEventSubject

func GetDeviceMetadataEventSubject(owner, deviceID, eventType string) []string

func GetDeviceSubject

func GetDeviceSubject(owner, deviceID string) []string

func GetPublishSubject

func GetPublishSubject(owner string, event eventbus.Event) []string

func GetResourceEventSubject

func GetResourceEventSubject(owner string, resourceID *commands.ResourceId, eventType string) []string

func Marshal

func Marshal(v interface{}) ([]byte, error)

func TimeNowMs

func TimeNowMs() uint64

func Unmarshal

func Unmarshal(b []byte, v interface{}) error

func WithDeviceID

func WithDeviceID(deviceID string) func(values map[string]string)

func WithResourceId

func WithResourceId(resourceID string) func(values map[string]string)

Types

type ProtobufMarshaler

type ProtobufMarshaler interface {
	Marshal() ([]byte, error)
}

type ProtobufUnmarshaler

type ProtobufUnmarshaler interface {
	Unmarshal([]byte) error
}

Jump to

Keyboard shortcuts

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