webhook-tools/scripts/notify/consts.go
2024-08-16 17:48:07 +08:00

38 lines
835 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"`
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"`
}
type FeishuTextMessage struct {
MsgType string `json:"msg_type"`
Content TextContent `json:"content"`
}
type TextContent struct {
Text string `json:"text"`
}