Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Robot ¶
func (*Robot) SendPost ¶
func (c *Robot) SendPost(ctx context.Context, content *RobotContent) error
SendPost 发送富文本消息 https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN#f62e72d5
type RobotContent ¶
type RobotContent struct {
Post RobotPostContent `json:"post"`
}
type RobotPostContent ¶
type RobotPostContent struct {
ZhCn RobotPostContentGroup `json:"zh_cn"`
}
type RobotPostContentGroup ¶
type RobotPostContentGroup struct { Title string `json:"title"` Content [][]RobotPostContentGroupContent `json:"content"` }
type RobotPostContentGroupContent ¶
type RobotPostContentGroupContent struct { Tag string `json:"tag"` Text string `json:"text,omitempty"` Unescape bool `json:"un_escape,omitempty"` Href string `json:"href,omitempty"` UserId string `json:"user_id,omitempty"` UserName string `json:"user_name,omitempty"` ImageKey string `json:"image_key,omitempty"` FileKey string `json:"file_key,omitempty"` EmojiType string `json:"emoji_type,omitempty"` }
RobotPostContentGroupContent 富文本标签,文档见:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json#45e0953e
type RobotRequest ¶
type RobotRequest struct { Timestamp string `json:"timestamp"` // "1599360473" Sign string `json:"sign"` MsgType string `json:"msg_type"` // "post" Content *RobotContent `json:"content"` }
type RobotResponse ¶
type RobotResponse struct { RobotResponseSuccess RobotResponseError }
type RobotResponseError ¶
type RobotResponseError struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
func (*RobotResponseError) Error ¶
func (r *RobotResponseError) Error() string
type RobotResponseSuccess ¶
Click to show internal directories.
Click to hide internal directories.