Documentation
¶
Index ¶
Constants ¶
View Source
const (
// NotificationEventCategory category for notification events.
NotificationEventCategory = "notifications"
)
Variables ¶
This section is empty.
Functions ¶
func AddCustomAttributes ¶
AddCustomAttributes add customAttributes to the Event
Types ¶
type Event ¶
type Event struct { Summary string `json:"summary"` Category string `json:"category,omitempty"` // Attributes are optional, they represent additional information that // can be attached to an event. Attributes map[string]interface{} `json:"attributes,omitempty"` }
Event is the data type to represent arbitrary, one-off messages for key activities on a system. Ex:
Event{ Category: "gear", Summary: "gear has been changed", Attributes: map[string]interface{}{ "oldGear": 3, "newGear": 4, "transmission": "manual", }, }
func NewNotification ¶
NewNotification creates a new notification event.
func NewWithAttributes ¶
NewWithAttributes creates a new event with the given attributes
Click to show internal directories.
Click to hide internal directories.