webhook-tools/scripts/tlsupdatev1/consts.go
“xHuPo” ac6f3243ab firest
2024-08-05 14:31:56 +08:00

51 lines
897 B
Go

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"`
}