Documentation ¶
Index ¶
- type ActionCard
- type LinkMsg
- type Payload
- type Response
- type Webhook
- func (w *Webhook) SendActionCardMsg(title, content string, linkTitles, linkURLs []string, ...) error
- func (w *Webhook) SendLinkCardMsg(msgs []LinkMsg) error
- func (w *Webhook) SendLinkMsg(title, content, picURL, msgURL string) error
- func (w *Webhook) SendMarkdownMsg(title, content string, isAtAll bool, mobiles ...string) error
- func (w *Webhook) SendPayload(payload *Payload) error
- func (w *Webhook) SendSingleActionCardMsg(title, content, linkTitle, linkURL string, hideAvatar, btnOrientation bool) error
- func (w *Webhook) SendTextMsg(content string, isAtAll bool, mobiles ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionCard ¶
type ActionCard struct { Text string `json:"text"` Title string `json:"title"` HideAvatar string `json:"hideAvatar"` BtnOrientation string `json:"btnOrientation"` SingleTitle string `json:"singleTitle"` SingleURL string `json:"singleURL"` Buttons []struct { Title string `json:"title"` ActionURL string `json:"actionURL"` } `json:"btns"` }
type Payload ¶
type Payload struct { MsgType string `json:"msgtype"` Text struct { Content string `json:"content"` } `json:"text"` Link struct { Text string `json:"text"` Title string `json:"title"` PicURL string `json:"picUrl"` MessageURL string `json:"messageUrl"` } `json:"link"` Markdown struct { Text string `json:"text"` Title string `json:"title"` } `json:"markdown"` ActionCard ActionCard `json:"actionCard"` FeedCard struct { Links []LinkMsg `json:"links"` } `json:"feedCard"` At struct { AtMobiles []string `json:"atMobiles"` IsAtAll bool `json:"isAtAll"` } `json:"at"` }
Payload struct
type Webhook ¶
type Webhook struct {
// contains filtered or unexported fields
}
func NewWebhook ¶
func (*Webhook) SendActionCardMsg ¶
func (w *Webhook) SendActionCardMsg(title, content string, linkTitles, linkURLs []string, hideAvatar, btnOrientation bool) error
SendActionCardMsg 独立跳转ActionCard类型
func (*Webhook) SendLinkCardMsg ¶
SendLinkCardMsg 发送链接消息
func (*Webhook) SendLinkMsg ¶
SendLinkMsg 发送链接消息
func (*Webhook) SendMarkdownMsg ¶
SendMarkdownMsg 发送markdown消息,仅支持以下格式
标题 # 一级标题 ## 二级标题 ### 三级标题 #### 四级标题 ##### 五级标题 ###### 六级标题
引用 > A man who stands for nothing will fall for anything.
文字加粗、斜体 **bold** *italic*
链接 [this is a link](http://name.com)
图片 ![](http://name.com/pic.jpg)
无序列表 - item1 - item2
有序列表 1. item1 2. item2
func (*Webhook) SendPayload ¶
SendPayload 发送消息
Click to show internal directories.
Click to hide internal directories.