Documentation ¶
Index ¶
Constants ¶
View Source
const ( USER_ALERT_LEVEL_INFO = "info" USER_ALERT_LEVEL_WARN = "warning" USER_ALERT_URI = "/cm-alert-api/v1/alert/user" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertClient ¶
type AlertClient struct {
// contains filtered or unexported fields
}
func (AlertClient) SendUserAlert ¶
func (client AlertClient) SendUserAlert() error
func (AlertClient) SendUserAlertSync ¶
func (client AlertClient) SendUserAlertSync() error
type UserAlertModel ¶
type UserAlertModel struct { // (1)必填字段 // 告警级别,支持:USER_ALERT_LEVEL_INFO、USER_ALERT_LEVEL_WARN // 仅部分告警触达方式下有效 Level string `json:"level"` // 告警标题 Subject string `json:"subject"` // 告警内容 Content string `json:"content"` // (2)选填字段 // 告警邮件接收者邮箱,设置该字段后,将发送邮件 Receivers []string `json:"receivers"` // 告警webhooks,当前仅支持企业微信群,设置该字段,将发送到指定企业微信群 Webhooks []string `json:"webhooks"` // 附件名(邮件) AttachName string `json:"attach_name"` // 附件base64编码内容(邮件),大小限制在配置文件attach_file_size指定 AttachFile string `json:"attach_file"` }
Click to show internal directories.
Click to hide internal directories.