Documentation ¶
Index ¶
- Variables
- func GetDeviceID(m senml.Pack) string
- func GetObjectID(m senml.Pack) string
- func GetObjectURN(m senml.Pack) string
- func Matches(m Message, objectURN string) bool
- type EventDecoratorFunc
- type Message
- type MessageAccepted
- func (m *MessageAccepted) Append(r senml.Record)
- func (m MessageAccepted) Body() []byte
- func (m MessageAccepted) ContentType() string
- func (m MessageAccepted) DeviceID() string
- func (m MessageAccepted) Error() error
- func (m MessageAccepted) ObjectID() string
- func (m MessageAccepted) Pack() senml.Pack
- func (m *MessageAccepted) Replace(r senml.Record, find func(senml.Record) bool)
- func (m MessageAccepted) Tenant() string
- func (m MessageAccepted) TopicName() string
- type MessageReceived
- func (m *MessageReceived) Append(r senml.Record)
- func (m MessageReceived) Body() []byte
- func (m MessageReceived) ContentType() string
- func (m MessageReceived) DeviceID() string
- func (m MessageReceived) Error() error
- func (m MessageReceived) ObjectID() string
- func (m MessageReceived) Pack() senml.Pack
- func (m *MessageReceived) Replace(r senml.Record, find func(senml.Record) bool)
- func (m MessageReceived) Tenant() string
- func (m MessageReceived) TopicName() string
- type MessageTransformed
- func (m *MessageTransformed) Append(r senml.Record)
- func (m MessageTransformed) Body() []byte
- func (m MessageTransformed) ContentType() string
- func (m MessageTransformed) DeviceID() string
- func (m MessageTransformed) Error() error
- func (m MessageTransformed) ObjectID() string
- func (m MessageTransformed) Pack() senml.Pack
- func (m *MessageTransformed) Replace(r senml.Record, find func(senml.Record) bool)
- func (m MessageTransformed) Tenant() string
- func (m MessageTransformed) TopicName() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadTimestamp = fmt.Errorf("bad timestamp")
View Source
var ErrNoMatch = fmt.Errorf("event mismatch")
Functions ¶
func GetDeviceID ¶
func GetObjectID ¶
func GetObjectURN ¶
Types ¶
type EventDecoratorFunc ¶
type EventDecoratorFunc func(m Message)
func Environment ¶
func Environment(e string) EventDecoratorFunc
func Lat ¶
func Lat(t float64) EventDecoratorFunc
func Lon ¶
func Lon(t float64) EventDecoratorFunc
func Source ¶
func Source(s string) EventDecoratorFunc
func Tenant ¶
func Tenant(t string) EventDecoratorFunc
type MessageAccepted ¶
type MessageAccepted struct { Pack_ senml.Pack `json:"pack"` Timestamp time.Time `json:"timestamp"` }
func NewMessageAccepted ¶
func NewMessageAccepted(pack senml.Pack, decorators ...EventDecoratorFunc) *MessageAccepted
func (*MessageAccepted) Append ¶
func (m *MessageAccepted) Append(r senml.Record)
func (MessageAccepted) Body ¶
func (m MessageAccepted) Body() []byte
func (MessageAccepted) ContentType ¶
func (m MessageAccepted) ContentType() string
func (MessageAccepted) DeviceID ¶
func (m MessageAccepted) DeviceID() string
func (MessageAccepted) Error ¶
func (m MessageAccepted) Error() error
func (MessageAccepted) ObjectID ¶
func (m MessageAccepted) ObjectID() string
func (MessageAccepted) Pack ¶
func (m MessageAccepted) Pack() senml.Pack
func (MessageAccepted) Tenant ¶
func (m MessageAccepted) Tenant() string
func (MessageAccepted) TopicName ¶
func (m MessageAccepted) TopicName() string
type MessageReceived ¶
type MessageReceived struct { Pack_ senml.Pack `json:"pack"` Timestamp time.Time `json:"timestamp"` }
func NewMessageReceived ¶
func NewMessageReceived(pack senml.Pack, decorators ...EventDecoratorFunc) *MessageReceived
func (*MessageReceived) Append ¶
func (m *MessageReceived) Append(r senml.Record)
func (MessageReceived) Body ¶
func (m MessageReceived) Body() []byte
func (MessageReceived) ContentType ¶
func (m MessageReceived) ContentType() string
func (MessageReceived) DeviceID ¶
func (m MessageReceived) DeviceID() string
func (MessageReceived) Error ¶
func (m MessageReceived) Error() error
func (MessageReceived) ObjectID ¶
func (m MessageReceived) ObjectID() string
func (MessageReceived) Pack ¶
func (m MessageReceived) Pack() senml.Pack
func (MessageReceived) Tenant ¶
func (m MessageReceived) Tenant() string
func (MessageReceived) TopicName ¶
func (m MessageReceived) TopicName() string
type MessageTransformed ¶
type MessageTransformed struct { Pack_ senml.Pack `json:"pack"` Timestamp time.Time `json:"timestamp"` }
func NewMessageTransformed ¶
func NewMessageTransformed(pack senml.Pack, decorators ...EventDecoratorFunc) *MessageTransformed
func (*MessageTransformed) Append ¶
func (m *MessageTransformed) Append(r senml.Record)
func (MessageTransformed) Body ¶
func (m MessageTransformed) Body() []byte
func (MessageTransformed) ContentType ¶
func (m MessageTransformed) ContentType() string
func (MessageTransformed) DeviceID ¶
func (m MessageTransformed) DeviceID() string
func (MessageTransformed) Error ¶
func (m MessageTransformed) Error() error
func (MessageTransformed) ObjectID ¶
func (m MessageTransformed) ObjectID() string
func (MessageTransformed) Pack ¶
func (m MessageTransformed) Pack() senml.Pack
func (MessageTransformed) Tenant ¶
func (m MessageTransformed) Tenant() string
func (MessageTransformed) TopicName ¶
func (m MessageTransformed) TopicName() string
Click to show internal directories.
Click to hide internal directories.