Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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"` }
Alert holds one alert for notification templates.
type Alerts ¶
type Alerts []Alert
Alerts is a list of Alert objects.
type Data ¶
type Data 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 KV ¶
KV is a set of key/value string pairs.
func (KV) SortedPairs ¶
SortedPairs returns a sorted list of key/value pairs.
type Template ¶
Template bundles a text and a html template instance.
func FromGlobs ¶
FromGlobs calls ParseGlob on all path globs provided and returns the resulting Template.
func (*Template) ExecuteHTMLString ¶
ExecuteHTMLString needs a meaningful doc comment (TODO(fabxc)).
Click to show internal directories.
Click to hide internal directories.