Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeState = "state" TypeAcknowledgement = "acknowledgement" TypeInternal = "internal" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Time time.Time `json:"-"` SourceId int64 `json:"-"` Name string `json:"name"` URL string `json:"url"` Tags map[string]string `json:"tags"` ExtraTags map[string]string `json:"extra_tags"` Type string `json:"type"` Severity Severity `json:"severity"` Username string `json:"username"` Message string `json:"message"` ID int64 `json:"-"` }
Event received of a specified Type for internal processing.
The JSON struct tags are being used to unmarshal a JSON representation received from the listener.Listener. Some fields are being omitted as they are only allowed to be populated from within icinga-notifications. Currently, there is no Event being marshalled into its JSON representation.
func (*Event) FullString ¶
type EventRow ¶
type EventRow struct { ID int64 `db:"id"` Time types.UnixMilli `db:"time"` ObjectID types.Binary `db:"object_id"` Type types.String `db:"type"` Severity Severity `db:"severity"` Username types.String `db:"username"` Message types.String `db:"message"` }
EventRow represents a single event database row and isn't an in-memory representation of an event.
type Severity ¶
type Severity int
func GetSeverityByName ¶
func (*Severity) MarshalJSON ¶
func (*Severity) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.