msteams

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: MIT Imports: 4 Imported by: 0

README

= Microsoft Teams plugin
:toc: macro

The msteams plugin provides alerts that send messages to Microsoft Teams channels.

== Alerts

=== msteams.message

[source,goplum]
----
alert msteams.message "example" {
  url = "https://outlook.office.com/webhook/...../IncomingWebhook/....."
  title = "Service alert"
  theme = "#ff0000"
}
----

Sends a Teams message via an Incoming Webhook connector. See
https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook#add-an-incoming-webhook-to-a-teams-channel[the Microsoft documentation]
for how to add an Incoming Webhook connector.

The `title` and `theme` parameters are optional. Title defaults to
"Goplum alert". The theme parameter controls the colour scheme of
the message, and defaults to "#6c2b8f".

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageAlert

type MessageAlert struct {
	Url   string
	Title string
	Theme string
}

func (MessageAlert) Send

func (m MessageAlert) Send(details goplum.AlertDetails) error

func (MessageAlert) Validate

func (m MessageAlert) Validate() error

type Plugin

type Plugin struct{}

func (Plugin) Alert

func (p Plugin) Alert(kind string) goplum.Alert

func (Plugin) Check

func (p Plugin) Check(_ string) goplum.Check

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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