Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { Status string `json:"status"` Labels KV `json:"labels"` Annotations KV `json:"annotations"` StartsAt time.Time `json:"startsAt"` EndsAt time.Time `json:"endsAt"` GeneratorURL string `json:"generatorURL"` Fingerprint string `json:"fingerprint"` }
Alert holds one alert for notification templates.
type AlertMessage ¶
type AlertMessage struct { Receiver string `json:"receiver"` Status string `json:"status"` Alerts Alerts `json:"alerts"` GroupLabels KV `json:"groupLabels"` CommonLabels KV `json:"commonLabels"` CommonAnnotations KV `json:"commonAnnotations"` ExternalURL string `json:"externalURL"` }
Data is the data passed to notification templates and webhook pushes.
End-users should not be exposed to Go's type system, as this will confuse them and prevent simple things like simple equality checks to fail. Map everything to float64/string.
type Alerts ¶
type Alerts []Alert
Alerts is a list of Alert objects.
func (Alerts) ForwardNotify ¶
func (Alerts) GetInstance ¶
func (Alerts) Panel ¶
func (as Alerts) Panel() GrafanaPanel
func (Alerts) SendNotify ¶
type GrafanaPanel ¶
type KV ¶
KV is a set of key/value string pairs.
func (KV) SortedPairs ¶
SortedPairs returns a sorted list of key/value pairs.
type WebhookMessage ¶
Click to show internal directories.
Click to hide internal directories.