Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseTemplateFile ¶
ParseTemplateFile creates an alertmanager template from the given file.
The functions include all functions (except 'env' and 'expandenv' ) from sprig (http://masterminds.github.io/sprig/) and the following functions from HELM templating:
- toToml
- toYaml
- fromYaml
- toJson
- fromJson
Types ¶
type Action ¶ added in v1.3.4
type Action map[string]interface{}
Action represents https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#actions It is currently impossible to support each type in one struct. This is Go's limitation.
type Converter ¶
type Converter interface {
Convert(context.Context, webhook.Message) (Office365ConnectorCard, error)
}
Converter converts an alert manager webhook message to Office365ConnectorCard.
func NewCreatorLoggingMiddleware ¶
NewCreatorLoggingMiddleware creates a loggingMiddleware.
type FactSection ¶ added in v1.3.4
type Image ¶ added in v1.3.4
Image represents https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#image-object
type Office365ConnectorCard ¶ added in v1.3.4
type Office365ConnectorCard struct { Context string `json:"@context"` Type string `json:"@type"` Title string `json:"title"` ExpectedActors []string `json:"expectedActors,omitempty"` Text string `json:"text"` Summary string `json:"summary"` ThemeColor string `json:"themeColor"` Sections []Section `json:"sections,omitempty"` PotentialAction []Action `json:"potentialAction,omitempty"` }
Office365ConnectorCard represents https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#example-office-365-connector-card
type Section ¶ added in v1.3.4
type Section struct { Title string `json:"title,omitempty"` ActivityTitle string `json:"activityTitle,omitempty"` ActivityText string `json:"activityText,omitempty"` ActivitySubtitle string `json:"activitySubtitle,omitempty"` ActivityImage string `json:"activityImage,omitempty"` Text string `json:"text,omitempty"` Markdown bool `json:"markdown"` Facts []FactSection `json:"facts,omitempty"` Images []Image `json:"images,omitempty"` PotentialAction []Action `json:"potentialAction,omitempty"` }
Section represents https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#section-fields