alert

package
v1.0.40 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StandardStatusWebhook         = "standard"
	SubscriptionStatusWebhook     = "subscription"
	I18nSubscriptionStatusWebhook = "i18nSubscription"
	I18nNotificationStatusWebhook = "i18nNotification"
	PushNotificationStatusWebhook = "pushNotification"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type StatusAlert

type StatusAlert struct {
	WebhookList map[string]interface{}
}

func NewStatusAlert

func NewStatusAlert() *StatusAlert

NewStatusAlert makes a new instance of StatusAlert struct

func (*StatusAlert) SendSlackMessage

func (s *StatusAlert) SendSlackMessage(messageContent, webhookName string)

SendSlackMessage sends a message to a Slack channel through a webhook

func (*StatusAlert) SetWebhook

func (s *StatusAlert) SetWebhook(name, url string) error

SetWebhook associate a channel webhook name to a channel webhook url

Jump to

Keyboard shortcuts

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