Documentation ¶
Index ¶
- Variables
- type FieldType
- type Formater
- type MapMessage
- func (m MapMessage) Get(name string) (any, error)
- func (m MapMessage) Item(key string, def any) any
- func (m MapMessage) ItemCast(key string, fieldType FieldType, length int, format string) any
- func (m MapMessage) JSON() string
- func (m MapMessage) Map() map[string]any
- func (m MapMessage) Str(key, def string) string
- type Message
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUndefinedDataType = errors.New("undefined message data types") ErrInvalidMessageFieldType = errors.New("invalid message field type") ErrFieldNotFound = errors.New("field not found") )
Errors set
Functions ¶
This section is empty.
Types ¶
type FieldType ¶
type FieldType int
FieldType of data represents scalar types supported by eventstream message processing
const ( FieldTypeString FieldType = iota FieldTypeFixed FieldTypeUUID FieldTypeInt FieldTypeInt8 FieldTypeInt32 FieldTypeInt64 FieldTypeUint FieldTypeUint8 FieldTypeUint32 FieldTypeUint64 FieldTypeFloat FieldTypeBoolean FieldTypeIP FieldTypeDate FieldTypeUnixnano FieldTypeArrayInt32 FieldTypeArrayInt64 )
Field scalar types enum
type MapMessage ¶ added in v0.5.2
Map object
func MapMessageDecode ¶ added in v0.5.2
func MapMessageDecode(data []byte, converter unmarshalel) (msg MapMessage, err error)
MessageDecode from bytes
func (MapMessage) Get ¶ added in v0.5.2
func (m MapMessage) Get(name string) (any, error)
Get returns the value by key name
func (MapMessage) Item ¶ added in v0.5.2
func (m MapMessage) Item(key string, def any) any
Item returns the value by key name or default
func (MapMessage) Map ¶ added in v0.5.2
func (m MapMessage) Map() map[string]any
Map returns the message as map[string]any
func (MapMessage) Str ¶ added in v0.5.2
func (m MapMessage) Str(key, def string) string
Str returns the string value by key name or default
Click to show internal directories.
Click to hide internal directories.