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(messages []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) 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"`
SingleTitle string `json:"singleTitle"`
SingleURL string `json:"singleUrl"`
BtnOrientation string `json:"btnOrientation"`
HideAvatar string `json:"hideAvatar"` // robot message avatar
Buttons []struct {
Title string `json:"title"`
ActionURL string `json:"actionUrl"`
} `json:"btns"`
}
ActionCard `action card message struct`
type LinkMsg ¶
type LinkMsg struct {
Title string `json:"title"`
MessageURL string `json:"messageUrl"`
PicURL string `json:"picUrl"`
}
LinkMsg `link message struct`
type PayLoad ¶
type PayLoad struct {
MsgType string `json:"msgtype"`
Text struct {
Content string `json:"content"`
} `json:"text"`
Link struct {
Title string `json:"title"`
Text string `json:"text"`
PicURL string `json:"picURL"`
MessageURL string `json:"messageUrl"`
} `json:"link"`
Markdown struct {
Title string `json:"title"`
Text string `json:"text"`
} `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 payload
type WebHook ¶
type WebHook struct {
Secret string
// contains filtered or unexported fields
}
WebHook `web hook base config`
func (*WebHook) SendActionCardMsg ¶
func (w *WebHook) SendActionCardMsg(title, content string, linkTitles, linkUrls []string, hideAvatar, btnOrientation bool) error
SendActionCardMsg `send single action card message`
func (*WebHook) SendLinkCardMsg ¶
SendLinkCardMsg `send link card message`
func (*WebHook) SendLinkMsg ¶
SendLinkMsg `send a link message`
func (*WebHook) SendMarkdownMsg ¶
SendMarkdownMsg `send a markdown msg`
Click to show internal directories.
Click to hide internal directories.