Documentation ¶
Overview ¶
定义根据用户列表群发消息的消息数据结构
Index ¶
Constants ¶
View Source
const ( MSG_TYPE_TEXT = "text" MSG_TYPE_IMAGE = "image" MSG_TYPE_VOICE = "voice" MSG_TYPE_VIDEO = "video" MSG_TYPE_NEWS = "mpnews" )
View Source
const ToUserCountLimit = 10000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonHead ¶
type CommonHead struct { ToUser []string `json:"touser,omitempty"` // 长度不能超过 ToUserCountLimit MsgType string `json:"msgtype"` }
func (*CommonHead) CheckValid ¶
func (head *CommonHead) CheckValid() (err error)
检查 CommonHead 是否有效,有效返回 nil,否则返回错误信息
type Image ¶
type Image struct { CommonHead Image struct { MediaId string `json:"media_id"` // mediaId 通过上传多媒体文件得到 } `json:"image"` }
图片消息
type News ¶
type News struct { CommonHead News struct { MediaId string `json:"media_id"` // NOTE: MediaId 应该通过 Client.MediaCreateNews 得到 } `json:"mpnews"` }
图文消息
type Text ¶
type Text struct { CommonHead Text struct { Content string `json:"content"` } `json:"text"` }
文本消息
Click to show internal directories.
Click to hide internal directories.