Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendMarkdown ¶
SendMarkdown send markdown to ding ding bot.
Types ¶
type At ¶
type At struct {
AtMobiles []string `json:"atMobiles"`
AtUserIds []string `json:"atUserIds"`
IsAtAll bool `json:"isAtAll"`
}
At 群消息是否@其他人.
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot 钉钉群聊机器人.
func NewBot ¶
NewBot new a ding ding bot. 目前只支持发送text,markdown消息类型. 若想支持其它消息类型,需要自己添加.
其它消息类型请参考钉钉消息类型格式: https://developers.dingtalk.com/document/robots/message-types-and-data-format.
func (*Bot) SendMarkdown ¶
SendMarkdown send markdown message.
func (*Bot) SendMessage ¶
SendMessage 发送message. message 不能为空.
type BotOption ¶
type BotOption func(*Bot)
BotOption bot option.
func WithAtUserIds ¶
WithAtUserIds set at user ids. default is empty.
func WithMobiles ¶
WithMobiles set mobiles. default is empty.
type Message ¶
type Message struct {
Msgtype string `json:"msgtype"`
Text *Text `json:"text"`
Markdown *Markdown `json:"markdown"`
At *At `json:"at"`
}
Message 钉钉消息. 目前只支持发送text,markdown消息类型. 若想支持其它消息类型,需要自己添加.
其它消息类型请参考钉钉消息类型格式: https://developers.dingtalk.com/document/robots/message-types-and-data-format.
Click to show internal directories.
Click to hide internal directories.