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.
Click to show internal directories.
Click to hide internal directories.