alert

package
v3.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RecipientTypes 收信类型
	RecipientTypes = echo.NewKVData()

	// RecipientPlatforms 收信平台
	RecipientPlatforms             = echo.NewKVData()
	RecipientPlatformWebhookCustom = `custom`

	// Topics 告警专题
	Topics = echo.NewKVData()
)
View Source
var SendTopic = func(_ echo.Context, topic string, _ *AlertData) error {
	return nil
}

Functions

This section is empty.

Types

type AlertData added in v3.6.0

type AlertData struct {
	Title   string
	Content ContentType
	Data    param.Store
}

func NewData added in v3.6.0

func NewData(title string, ct ContentType) *AlertData

type ContentType added in v3.6.0

type ContentType interface {
	EmailContent(params param.Store) []byte
	MarkdownContent(params param.Store) []byte
}

ContentType 消息内容类型

type WebhookCustom added in v3.6.2

type WebhookCustom struct {
	Name    string
	Method  string
	Url     string
	Content string
	Headers []string
}

func NewWebhookCustom added in v3.6.2

func NewWebhookCustom() *WebhookCustom

func (*WebhookCustom) Descriptions added in v3.6.2

func (w *WebhookCustom) Descriptions() []string

func (*WebhookCustom) ToWebhook added in v3.6.2

func (w *WebhookCustom) ToWebhook() *webhook.Webhook

Jump to

Keyboard shortcuts

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