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 DefaultTextContent = &TextContent{}
Functions ¶
Types ¶
type AlertData ¶
type AlertData struct { Title string Content ContentType Data param.Store }
func NewData ¶
func NewData(title string, ct ContentType) *AlertData
type AlertTopicExt ¶
type AlertTopicExt struct { *dbschema.NgingAlertTopic Recipient *dbschema.NgingAlertRecipient `db:"-,relation=id:recipient_id"` }
type ContentType ¶
type ContentType interface { EmailContent(params param.Store) []byte MarkdownContent(params param.Store) []byte }
ContentType 消息内容类型
type TextContent ¶
type TextContent struct { }
func (*TextContent) EmailContent ¶
func (c *TextContent) EmailContent(params param.Store) []byte
func (*TextContent) MarkdownContent ¶
func (c *TextContent) MarkdownContent(params param.Store) []byte
type WebhookCustom ¶
func NewWebhookCustom ¶
func NewWebhookCustom() *WebhookCustom
func (*WebhookCustom) Descriptions ¶
func (w *WebhookCustom) Descriptions() []string
func (*WebhookCustom) ToWebhook ¶
func (w *WebhookCustom) ToWebhook() *webhook.Webhook
Click to show internal directories.
Click to hide internal directories.