Documentation
¶
Index ¶
- type MSTeams
- func (m *MSTeams) AddReceivers(webHooks ...string)
- func (m *MSTeams) DisableWebhookValidation()
- func (m MSTeams) Send(ctx context.Context, subject, message string) error
- func (m *MSTeams) SetHTTPClient(httpClient *http.Client)
- func (m *MSTeams) SetUseragent(userAgent string)
- func (m *MSTeams) WithWrapText(wrapText bool)
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 ¶
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 ¶
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
func (*MSTeams) SetHTTPClient ¶
SetHTTPClient allows the user to set a custom http client.
func (*MSTeams) SetUseragent ¶
SetUseragent allows the user to set a custom user agent.
func (*MSTeams) WithWrapText ¶
WithWrapText sets the wrapText field to the provided value. This is disabled by default.