teams

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "teams"

Variables

This section is empty.

Functions

This section is empty.

Types

type Fact

type Fact struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type MessageCard

type MessageCard struct {
	CardType   string    `json:"@type"`
	Context    string    `json:"@context"`
	Markdown   bool      `json:"markdown,omitempty"`
	Text       string    `json:"text,omitempty"`
	Title      string    `json:"title,omitempty"`
	Summary    string    `json:"summary,omitempty"`
	Sections   []Section `json:"sections,omitempty"`
	ThemeColor string    `json:"themeColor,omitempty"`
}

type Options

type Options struct {
	ID         string `mapstructure:"id,omitempty"`
	WebhookURL string `mapstructure:"webhookUrl,omitempty"`
	Title      string `mapstructure:"title,omitempty"`
	ThemeColor string `mapstructure:"themeColor,omitempty"`
	Template   string `mapstructure:"template,omitempty"`
}

type Provider

type Provider struct {
	Teams []*Options `mapstructure:"teams,omitempty"`
	// contains filtered or unexported fields
}

func New

func New(client *http.Client, options []*Options) (*Provider, error)

func (*Provider) Send

func (pr *Provider) Send(ctx context.Context, message string, extras map[string]string) error

type Section

type Section struct {
	Text         string `json:"text,omitempty"`
	ActivityText string `json:"activityText,omitempty"`
	StartGroup   bool   `json:"startGroup"`
	Facts        []Fact `json:"facts,omitempty"`
}

Jump to

Keyboard shortcuts

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