MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / PostToFS

Function PostToFS

controllers/feishu.go:22–35  ·  view source on GitHub ↗
(title, text, Fsurl, userEmail, logsign string)

Source from the content-addressed store, hash-verified

20}
21
22func PostToFS(title, text, Fsurl, userEmail, logsign string) string {
23 open := beego.AppConfig.String("open-feishu")
24 if open != "1" {
25 logs.Info(logsign, "[feishu]", "飞书接口未配置未开启状态,请先配置open-feishu为1")
26 return "飞书接口未配置未开启状态,请先配置open-feishu为1"
27 }
28 RTstring := ""
29 if strings.Contains(Fsurl, "/v2/") {
30 RTstring = PostToFeiShuv2(title, text, Fsurl, userEmail, logsign)
31 } else {
32 RTstring = PostToFeiShu(title, text, Fsurl, logsign)
33 }
34 return RTstring
35}
36
37func PostToFeiShu(title, text, Fsurl, logsign string) string {
38 u := FSMessage{Title: title, Text: text}

Callers 4

SendMessageZabbixFunction · 0.85
AlertTestMethod · 0.85
SendMessageRFunction · 0.85

Calls 2

PostToFeiShuv2Function · 0.85
PostToFeiShuFunction · 0.85

Tested by

no test coverage detected