Documentation ¶
Index ¶
- Constants
- func MsgMarkdown(h *Hook, color string) string
- func MsgNews(h *Hook) string
- func SendCard(c *fiber.Ctx) error
- func SendImageMsg(c *fiber.Ctx) error
- func SendImg(botKey, title string, lines ...string) error
- func SendMsg(botKey, title, warn, msg, comment string) error
- type EvalMatche
- type Hook
- type Metric
Constants ¶
View Source
const ( URL = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=" OKMsg = "告警恢复" AlertingMsg = "触发告警" OK = "OK" Alerting = "Alerting" ColorGreen = "info" ColorGray = "comment" ColorRed = "warning" )
Variables ¶
This section is empty.
Functions ¶
func SendImageMsg ¶
func SendImageMsg(c *fiber.Ctx) error
Types ¶
type EvalMatche ¶
type Hook ¶
type Hook struct { DashboardId float64 `json:"dashboardId"` EvalMatches []map[string]interface{} `json:"evalMatches"` ImageUrl string `json:"imageUrl"` Message string `json:"message"` OrgId float64 `json:"orgId"` PanelId float64 `json:"panelId"` RuleId float64 `json:"ruleId"` RuleName string `json:"ruleName"` RuleUrl string `json:"ruleUrl"` State string `json:"state"` Tags map[string]interface{} `json:"tags"` Title string `json:"title"` }
Click to show internal directories.
Click to hide internal directories.