events

package
v0.2202.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeValue

func DecodeValue(value string, ev TypedAttribute) error

DecodeValue decodes the attribute event value.

func EncodeValue

func EncodeValue(ev TypedAttribute) []byte

EncodeValue encodes the attribute event value.

func IsAttributeKind

func IsAttributeKind(key []byte, kind TypedAttribute) bool

IsAttributeKind checks whether the given attribute key corresponds to the passed typed attribute.

Types

type CustomTypedAttribute

type CustomTypedAttribute interface {
	TypedAttribute

	// EventValue returns a string representation of this events value.
	EventValue() string

	// DecodeValue decodes the value encoded vy the EventValue.
	DecodeValue(value string) error
}

CustomTypedAttribute is an interface implemented by types which can be transparently used as event attributes with custom value encoding.

type TypedAttribute

type TypedAttribute interface {
	// EventKind returns a string representation of this event's kind.
	EventKind() string
}

TypedAttribute is an interface implemented by types which can be transparently used as event attributes with CBOR-marshalled value.

Jump to

Keyboard shortcuts

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