card

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package card provides the logic for converting an alert manager webhook message to an Office365ConnectorCard.

Package card provides the logic for converting an alert manager webhook message to an Office365ConnectorCard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTemplateFile

func ParseTemplateFile(f string) (*template.Template, error)
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 Converter

type Converter interface {
	Convert(context.Context, webhook.Message) (adaptivecards.WorkflowConnectorCard, error)
}

Converter converts an alert manager webhook message to WorkflowConnectorCard

func NewCreatorLoggingMiddleware

func NewCreatorLoggingMiddleware(l *utility.Logger, n Converter) Converter

NewCreatorLoggingMiddleware creates a loggingMiddleware.

func NewTemplatedCardCreator

func NewTemplatedCardCreator(template *template.Template, escapeUnderscores bool, logger *utility.Logger) Converter

NewTemplatedCardCreator creates a templatedCard.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL