msteam

package
v0.0.0-...-c6334f4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MSTeams

type MSTeams struct {
	// TeamsWebhookURL is the webhook url of the Teams connector
	TeamsWebhookURL string
}

Default handler implements Handler interface, print each event with JSON format

func (*MSTeams) Handle

func (ms *MSTeams) Handle(e event.Event)

Handle handles notification.

func (*MSTeams) HandleUpdate

func (ms *MSTeams) HandleUpdate(old event.Event, new interface{})

func (*MSTeams) Init

func (ms *MSTeams) Init(c *config.Config) error

Init initializes handler configuration

type TeamsMessageCard

type TeamsMessageCard struct {
	Type       string                    `json:"@type"`
	Context    string                    `json:"@context"`
	ThemeColor string                    `json:"themeColor"`
	Summary    string                    `json:"summary"`
	Title      string                    `json:"title"`
	Text       string                    `json:"text,omitempty"`
	Sections   []TeamsMessageCardSection `json:"sections"`
}

TeamsMessageCard is for the Card Fields to send in Teams The Documentation is in https://docs.microsoft.com/en-us/outlook/actionable-messages/card-reference#card-fields

type TeamsMessageCardSection

type TeamsMessageCardSection struct {
	ActivityTitle string                         `json:"activityTitle"`
	Facts         []TeamsMessageCardSectionFacts `json:"facts"`
	Markdown      bool                           `json:"markdown"`
}

TeamsMessageCardSection is placed under TeamsMessageCard.Sections Each element of AlertWebHook.Alerts will the number of elements of TeamsMessageCard.Sections to create

type TeamsMessageCardSectionFacts

type TeamsMessageCardSectionFacts struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

TeamsMessageCardSectionFacts is placed under TeamsMessageCardSection.Facts

Jump to

Keyboard shortcuts

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