msteamsv2

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	ContentType string  `json:"contentType"`
	ContentURL  *string `json:"contentUrl"` // Use a pointer to handle null values
	Content     Content `json:"content"`
}

type Body

type Body struct {
	Type   string `json:"type"`
	Text   string `json:"text"`
	Weight string `json:"weigth,omitempty"`
	Size   string `json:"size,omitempty"`
	Wrap   bool   `json:"wrap,omitempty"`
	Style  string `json:"style,omitempty"`
	Color  string `json:"color,omitempty"`
}

type Content

type Content struct {
	Schema  string  `json:"$schema"`
	Type    string  `json:"type"`
	Version string  `json:"version"`
	Body    []Body  `json:"body"`
	Msteams Msteams `json:"msteams,omitempty"`
}

https://learn.microsoft.com/en-us/connectors/teams/?tabs=text1#adaptivecarditemschema

type Msteams

type Msteams struct {
	Width string `json:"width"`
}

type Notifier

type Notifier struct {
	// contains filtered or unexported fields
}

func New

New returns a new notifier that uses the Microsoft Teams Power Platform connector.

func (*Notifier) Notify

func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error)

Jump to

Keyboard shortcuts

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