Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Name string `description:"module name" bson:"name" json:"name"` EventID string `description:"event identifier" bson:"eventId" json:"eventId"` CorrelationID string `description:"correlation identifier" bson:"correlationId" json:"correlationId"` ParentEventID string `description:"parent event identifier" bson:"parentEventId" json:"parentEventId"` }
Context carries the data for configuring the module
type Event ¶
type Event struct { Context *Context `json:"context"` Type string `json:"type"` PreviousStages []string `json:"previousStages"` Data KeyValuePairs `json:"data"` }
Event the basic event data format
type KeyValuePair ¶
type KeyValuePair struct { Key string `bson:"key" json:"key"` Value string `bson:"value" json:"value"` }
KeyValuePair is a key value pair
type KeyValuePairs ¶
type KeyValuePairs []KeyValuePair
KeyValuePairs is a named type for a slice of key value pairs
func (KeyValuePairs) Append ¶
func (kvps KeyValuePairs) Append(kvp KeyValuePair) KeyValuePairs
Append adds a new key value pair to the end of the slice
func (KeyValuePairs) AsMap ¶
func (kvps KeyValuePairs) AsMap() map[string]string
AsMap returns the key value pairs as a map
func (KeyValuePairs) Remove ¶
func (kvps KeyValuePairs) Remove(index int) (KeyValuePairs, error)
Remove a key value pair at an index by shifting the slice
Click to show internal directories.
Click to hide internal directories.