utils

package
v2.17.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

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 HrefToID added in v2.8.0

func HrefToID(href string) uuid.UUID

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 WithHrefId added in v2.8.0

func WithHrefId(hrefId 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