Documentation
¶
Index ¶
Constants ¶
View Source
const Version = "v0.0.1"
Variables ¶
View Source
var ErrEventTypeNotFound = errors.New("event type not found")
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor struct {
Id string `json:"id"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
Name *string `json:"name,omitempty"`
Type string `json:"type"`
}
Actor An actor represents the person or entity that performed an action.
type Context ¶
type Context struct {
Location string `json:"location"`
UserAgent *string `json:"user_agent,omitempty"`
}
Context The context holds details such as the IP and user agent of the person or entity that performed an action.
type Event ¶
type Event struct {
Action string `json:"action"`
Actor Actor `json:"actor"`
Context Context `json:"context"`
SourceID string `json:"source_id"`
Targets []Target `json:"targets"`
Version int `json:"version"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
OccurredAt time.Time `json:"occurred_at"`
}
Event An event represents an action perform by an actor towards a target or targets at a given time.
Click to show internal directories.
Click to hide internal directories.