This commit is contained in:
“xHuPo” 2024-08-05 14:31:56 +08:00
parent e1fd7b890a
commit ac6f3243ab
26 changed files with 1938 additions and 1 deletions

View file

@ -0,0 +1,51 @@
package main
type FeishuPostMessage struct {
MsgType string `json:"msg_type"`
Content PostContent `json:"content"`
}
type PostContent struct {
Post *Post `json:"post"`
}
type Post struct {
ZhCn *Message `json:"zh_cn"`
}
type Message struct {
Title string `json:"title"`
Content [][]ContentItem `json:"content"`
}
type ContentItem struct {
Tag string `json:"tag"`
*TextContent
*AContent
*AtContent
*ImageContent
}
type TextContent struct {
Text string `json:"text"`
Unescape *bool `json:"un_escape"`
}
type AContent struct {
Text string `json:"text"`
Href string `json:"href"`
}
type AtContent struct {
UserID string `json:"user_id"`
Username *string `json:"username"`
}
type ImageContent struct {
ImageKey string `json:"image_key"`
}
type FeishuTextMessage struct {
MsgType string `json:"msg_type"`
Content TextContent `json:"content"`
}