Documentation
¶
Index ¶
- func FeishuCustomBotGenSign(secret string, timestamp int64) (string, error)
- func FeishuSendCommMsg(url, secret string, alert *dropbox.AlertPostCommApi) (string, error)
- type FeishuCustomBotComm
- type FeishuCustomBotPostMsg
- type FeishuCustomBotPostMsgContent
- type FeishuCustomBotPostMsgTemplate
- type FeishuCustomBotPostMsgText
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FeishuCustomBotGenSign ¶
飞书自定义机器人的签名
func FeishuSendCommMsg ¶
func FeishuSendCommMsg(url, secret string, alert *dropbox.AlertPostCommApi) (string, error)
Types ¶
type FeishuCustomBotComm ¶
type FeishuCustomBotComm struct {
Timestamp string `json:"timestamp,omitempty"`
Sign string `json:"sign,omitempty"`
MsgType string `json:"msg_type"`
Content *FeishuCustomBotPostMsg `json:"content"`
}
{
"msg_type": "post",
"content": {
"post": {
"zh_cn": {
"title": "项目更新通知",
"content": [
[
{
"tag": "text",
"text": "项目有更新: "
}
]
]
}
}
}
}
func CommAlertToFeishuPostTemplate ¶
func CommAlertToFeishuPostTemplate(alertComm *dropbox.AlertPostCommApi) *FeishuCustomBotComm
func (*FeishuCustomBotComm) CommSendPostMsg ¶
func (feishu *FeishuCustomBotComm) CommSendPostMsg(url string) (string, error)
func (*FeishuCustomBotComm) FeishuCustomBotSignature ¶
func (feishu *FeishuCustomBotComm) FeishuCustomBotSignature(secret string) error
type FeishuCustomBotPostMsg ¶
type FeishuCustomBotPostMsg struct {
Post map[string]*FeishuCustomBotPostMsgContent `json:"post"`
}
type FeishuCustomBotPostMsgContent ¶
type FeishuCustomBotPostMsgContent struct {
Title string `json:"title"`
Content []*FeishuCustomBotPostMsgTemplate `json:"content"`
}
type FeishuCustomBotPostMsgTemplate ¶
type FeishuCustomBotPostMsgTemplate []*FeishuCustomBotPostMsgText
Click to show internal directories.
Click to hide internal directories.