Documentation
¶
Index ¶
- type AuthorizerEvent
- type CDATAText
- type ComponentVerifyTicketEvent
- type Event
- type Header
- type Image
- type Link
- type Location
- type LocationEvent
- type MenuEvent
- type Message
- func (m *Message) EventMessage() *Event
- func (m *Message) Header() *Header
- func (m *Message) Image() *Image
- func (m *Message) Link() *Link
- func (m *Message) Location() *Location
- func (m *Message) ShortVideo() *Video
- func (m *Message) Text() *Text
- func (m *Message) Video() *Video
- func (m *Message) Voice() *Voice
- type ScanEvent
- type TemplateSendJobFinishEvent
- type Text
- type Video
- type Voice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizerEvent ¶
type AuthorizerEvent struct {
AppId string
InfoType string
AuthorizerAppid string
AuthorizationCode string
AuthorizationCodeExpiredTime int64
PreAuthCode string
}
AuthorizerEvent 开放平台公众账号授权事件
type ComponentVerifyTicketEvent ¶
type ComponentVerifyTicketEvent struct {
AppId string
InfoType string
ComponentVerifyTicket string
}
ComponentVerifyTicketEvent 开放平台 component_verify_ticket 推送事件
type Event ¶
type Event struct {
Event string // 事件类型
// 扫描带参数的二维码
EventKey string // 事件key
Ticket string // 二维码ticket
MenuId string // 菜单ID
// 模板消息发送事件
MsgID int64 // 模板消息ID
Status string // 模板消息发送状态
// 位置上报事件
Latitude string
Longitude string
Precision string
// 开放平台相关事件
AppId string
InfoType string
// 开放平台 component_verify_ticket 推送事件
AuthorizerComponentVerifyTicket string
// 开放平台授权事件
AuthorizerAppid string
AuthorizationCode string
AuthorizationCodeExpiredTime int64
PreAuthCode string
}
Event 事件消息
func (*Event) ComponentVerifyTicket ¶
func (e *Event) ComponentVerifyTicket() *ComponentVerifyTicketEvent
ComponentVerifyTicket 开放平台 component_verify_ticket 推送事件
func (*Event) TemplateSendJobFinish ¶
func (e *Event) TemplateSendJobFinish() *TemplateSendJobFinishEvent
TemplateSendJobFinish 模板消息推荐状态事件
type Header ¶
type Header struct {
ToUserName string
FromUserName string
CreateTime time.Duration
MsgType string
MsgId int64
}
Header 消息头
type Location ¶
type Location struct {
LocationX string `xml:"Location_X"`
LocationY string `xml:"Location_Y"`
Scale string
Label string
}
Location 地理位置消息
type LocationEvent ¶
LocationEvent 上报地理位置事件
type Message ¶
type Message struct {
// 消息头
XMLName xml.Name `xml:"xml"`
ToUserName string
FromUserName string
CreateTime time.Duration
MsgType string
MsgId int64
// 文本消息
Content string
// 媒体消息通用字段
MediaId string
// 图片消息
PicUrl string
// 语音消息
Format string
Recognition string
// 视频消息
ThumbMediaId string
// 地理位置消息
LocationX string `xml:"Location_X"`
LocationY string `xml:"Location_Y"`
Scale string
Label string
// 链接消息
Title string
Description string
Url string
// 事件消息
Event string // 事件类型
EventKey string // 事件key (扫描带参数的二维码、菜单点击事件)
Ticket string // 二维码ticket
MenuId string // 菜单ID
// 位置上报事件
Latitude string
Longitude string
Precision string
// 模板消息发送事件
MsgID int64 // 模板消息ID
Status string // 模板消息发送状态
// 开放平台
AppId string
InfoType string
ComponentVerifyTicket string
// 开放平台授权事件
AuthorizerAppid string
AuthorizationCode string
AuthorizationCodeExpiredTime int64
PreAuthCode string
Ret int `xml:"ret"`
Nickname string `xml:"nickname"`
Reason string `xml:"reason"`
First int64 `xml:"first"`
Second int64 `xml:"second"`
SuccTime int64
FailTime int64
DelayTime int64
ScreenShot string
}
Message 消息体
type TemplateSendJobFinishEvent ¶
TemplateSendJobFinishEvent 模板消息推荐通知事件
Click to show internal directories.
Click to hide internal directories.