utils

package
v2.24.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DeviceIDKey         = "deviceId"
	HrefIDKey           = "hrefId"
	LeadResourceTypeKey = "leadResourceType"
	LeadResourcePrefix  = "leadrt"
)
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 + "}"
	PlgdOwnersOwnerDevicesDeviceResourcesResourceEventLeadResourceType = PlgdOwnersOwnerDevicesDeviceResourcesResourceEvent + "." + LeadResourcePrefix + ".{" + LeadResourceTypeKey + "}"
)

Variables

This section is empty.

Functions

func GetDeviceMetadataEventSubject

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

func GetDeviceSubject

func GetDeviceSubject(owner, deviceID string) []string

func GetResourceEventSubjects added in v2.22.0

func GetResourceEventSubjects(owner string, resourceID *commands.ResourceId, eventType string, leadResourceTypeEnabled bool) []string

func GetSubjectHrefID added in v2.22.0

func GetSubjectHrefID(href 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)

func WithLeadResourceType added in v2.22.0

func WithLeadResourceType(leadResourceType 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