msteams

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MSTeams

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

MSTeams struct holds necessary data to communicate with the MSTeams API.

func New

func New() *MSTeams

New returns a new instance of a MSTeams notification service. For more information about telegram api token:

-> https://github.com/atc0005/go-teams-notify#example-basic

func (*MSTeams) AddReceivers

func (m *MSTeams) AddReceivers(webHooks ...string)

AddReceivers takes MSTeams channel web-hooks and adds them to the internal web-hook list. The Send method will send a given message to all those chats.

func (*MSTeams) DisableWebhookValidation

func (m *MSTeams) DisableWebhookValidation()

DisableWebhookValidation disables the validation of webhook URLs, including the validation of known prefixes so that custom/private webhook URL endpoints can be used (e.g., testing purposes). For more information about telegram api token:

-> https://github.com/atc0005/go-teams-notify#example-disable-webhook-url-prefix-validation

func (MSTeams) Send

func (m MSTeams) Send(ctx context.Context, subject, message string) error

Send accepts a subject and a message body and sends them to all previously specified channels. Message body supports html as markup language. For more information about telegram api token:

-> https://github.com/atc0005/go-teams-notify#example-basic

Jump to

Keyboard shortcuts

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