Documentation
¶
Index ¶
- Constants
- type Data
- type ErrMessageResponse
- type ImageMessage
- type ImageMessageContent
- type InteractiveMessage
- type InteractiveMessageCard
- type InteractiveMessageCardElements
- type InteractiveMessageCardElementsActions
- type InteractiveMessageCardElementsActionsText
- type InteractiveMessageCardElementsText
- type InteractiveMessageCardHeader
- type InteractiveMessageCardHeaderTitle
- type MessageResponse
- type PostMessage
- type PostMessageContent
- type PostMessageContentPost
- type PostMessageContentPostZhCn
- type PostMessageContentPostZhCnContent
- type ShareChatMessage
- type ShareChatMessageContent
- type TextMessage
- type TextMessageContent
Constants ¶
View Source
const ( TEXT string = "text" POST string = "post" IMAGE string = "image" SHARE_CHAT string = "share_chat" INTERACTIVE string = "interactive" )
View Source
const ( PostMessageContentPostZhCnContentTagText = "text" PostMessageContentPostZhCnContentTagA = "a" PostMessageContentPostZhCnContentTagAt = "at" PostMessageContentPostZhCnContentTagImg = "img" PostMessageContentPostZhCnContentTagMedia = "media" PostMessageContentPostZhCnContentTagEmotion = "emotion" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrMessageResponse ¶
type ImageMessage ¶
type ImageMessage struct {
MsgType string `json:"msg_type"`
Content ImageMessageContent `json:"content"`
}
ImageMessage 图片
func NewImageMessage ¶
func NewImageMessage(imageKey string) *ImageMessage
type ImageMessageContent ¶
type ImageMessageContent struct {
ImageKey string `json:"image_key"`
}
type InteractiveMessage ¶
type InteractiveMessage struct {
MsgType string `json:"msg_type"`
Card InteractiveMessageCard `json:"card"`
}
InteractiveMessage 消息卡片
func NewInteractiveMessage ¶
func NewInteractiveMessage(elements InteractiveMessageCardElements, header InteractiveMessageCardHeader) *InteractiveMessage
type InteractiveMessageCard ¶
type InteractiveMessageCard struct {
Elements InteractiveMessageCardElements `json:"elements"`
Header InteractiveMessageCardHeader `json:"header"`
}
type InteractiveMessageCardElements ¶
type InteractiveMessageCardElements []struct {
Tag string `json:"tag"`
Text InteractiveMessageCardElementsText `json:"text,omitempty"`
Actions InteractiveMessageCardElementsActions `json:"actions,omitempty"`
}
type InteractiveMessageCardElementsActions ¶
type InteractiveMessageCardElementsActions []struct {
Tag string `json:"tag"`
Text InteractiveMessageCardElementsActionsText `json:"text"`
Url string `json:"url"`
Type string `json:"type"`
Value struct {
} `json:"value"`
}
type InteractiveMessageCardHeader ¶
type InteractiveMessageCardHeader struct {
Title InteractiveMessageCardHeaderTitle `json:"title"`
}
type MessageResponse ¶
type PostMessage ¶
type PostMessage struct {
MsgType string `json:"msg_type"`
Content PostMessageContent `json:"content"`
}
PostMessage 富文本消息
func NewPostMessage ¶
func NewPostMessage(title string, content [][]PostMessageContentPostZhCnContent) *PostMessage
type PostMessageContent ¶
type PostMessageContent struct {
Post PostMessageContentPost `json:"post"`
}
type PostMessageContentPost ¶
type PostMessageContentPost struct {
ZhCn PostMessageContentPostZhCn `json:"zh_cn"`
}
type PostMessageContentPostZhCn ¶
type PostMessageContentPostZhCn struct {
Title string `json:"title"`
Content [][]PostMessageContentPostZhCnContent `json:"content"`
}
type PostMessageContentPostZhCnContent ¶
type PostMessageContentPostZhCnContent struct {
Tag string `json:"tag"`
Text string `json:"text,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"`
}
type ShareChatMessage ¶
type ShareChatMessage struct {
}
ShareChatMessage 群名片
func NewShareChatMessage ¶
func NewShareChatMessage(shareChatId string) *ShareChatMessage
type ShareChatMessageContent ¶
type ShareChatMessageContent struct {
}
type TextMessage ¶
type TextMessage struct {
MsgType string `json:"msg_type"`
Content TextMessageContent `json:"content"`
}
TextMessage 文本消息
func NewTextMessage ¶
func NewTextMessage(text string) *TextMessage
type TextMessageContent ¶
type TextMessageContent struct {
Text string `json:"text"`
}
Click to show internal directories.
Click to hide internal directories.