Documentation
¶
Index ¶
- Constants
- func Authentication(token string, next http.HandlerFunc) func(http.ResponseWriter, *http.Request)
- func EchoStr(next http.HandlerFunc) func(http.ResponseWriter, *http.Request)
- type Article
- type ArticleRespMessage
- type CiphertMessageTypeReq
- type Description
- type Format
- type FromUserName
- type HQMusicURL
- type Image
- type ImageReqMessage
- type ImageRespMessage
- type Label
- type Link
- type LocationReqMessage
- type MediaID
- type MessageContent
- type MessageHandlerFunc
- type MessageMux
- type MessageType
- type Music
- type MusicRespMessage
- type MusicURL
- type PicURL
- type Recognition
- type ReqMessageBase
- type RespMessageBase
- type ShortVideoReqMessage
- type TextReqMessage
- type TextRespMessage
- type ThumbMediaID
- type Title
- type ToUserName
- type URL
- type Video
- type VideoReqMessage
- type VideoRespMessage
- type Voice
- type VoiceReqMessage
- type VoiceRespMessage
Constants ¶
const ( MessageTypeText = "text" MessageTypeImage = "image" MessageTypeVoice = "voice" MessageTypeVideo = "video" MessageTypeShortVideo = "shortvideo" MessageTypeLocation = "location" MessageTypeLink = "link" )
Variables ¶
This section is empty.
Functions ¶
func Authentication ¶
func Authentication(token string, next http.HandlerFunc) func(http.ResponseWriter, *http.Request)
https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html
func EchoStr ¶
func EchoStr(next http.HandlerFunc) func(http.ResponseWriter, *http.Request)
Types ¶
type Article ¶
type Article struct {
Title Title `xml:"Title"`
Description Description `xml:"Description"`
PicURL PicURL `xml:"PicUrl"`
URL URL `xml:"Url"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type ArticleRespMessage ¶
type ArticleRespMessage struct {
RespMessageBase
ArticleCount int `xml:"ArticleCount"`
Articles []Article `xml:"Articles>item"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type CiphertMessageTypeReq ¶
type CiphertMessageTypeReq struct {
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
type Description ¶
type FromUserName ¶
type HQMusicURL ¶
type Image ¶
type Image struct {
MediaID MediaID `xml:"MediaId"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type ImageReqMessage ¶
type ImageReqMessage struct {
ReqMessageBase
PicURL PicURL `xml:"PicUrl"`
MediaID MediaID `xml:"MediaId"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
type ImageRespMessage ¶
type ImageRespMessage struct {
ReqMessageBase
Image Image `xml:"Image"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type Link ¶
type Link struct {
ReqMessageBase
URL URL `xml:"Url"`
Title Title `xml:"Title"`
Description Description `xml:"Description"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
type LocationReqMessage ¶
type LocationReqMessage struct {
ReqMessageBase
Label Label `xml:"Label"`
Scale int `xml:"Scale"`
LocationX float64 `xml:"Location_X"`
LocationY float64 `xml:"Location_Y"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
type MessageContent ¶
type MessageHandlerFunc ¶
type MessageMux ¶
type MessageMux struct {
Unimplemented MessageHandlerFunc
// contains filtered or unexported fields
}
func NewMessageMux ¶
func NewMessageMux() *MessageMux
func (*MessageMux) HandlerFunc ¶
func (mux *MessageMux) HandlerFunc(typ string, f MessageHandlerFunc)
func (*MessageMux) StdHandlerFunc ¶
func (mux *MessageMux) StdHandlerFunc() http.HandlerFunc
type MessageType ¶
type Music ¶
type Music struct {
Title Title `xml:"Title"`
Description Description `xml:"Description"`
MusicURL MusicURL `xml:"MusicUrL"`
HQMusicURL HQMusicURL `xml:"HQMusicUrL"`
ThumbMediaID ThumbMediaID `xml:"ThumbMediaId"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type MusicRespMessage ¶
type MusicRespMessage struct {
RespMessageBase
Music Music `xml:"Music"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type Recognition ¶
type ReqMessageBase ¶
type ReqMessageBase struct {
XMLName xml.Name `xml:"xml"`
ToUserName ToUserName `xml:"ToUserName"`
FromUserName FromUserName `xml:"FromUserName"`
CreateTime int64 `xml:"CreateTime"`
MessageID uint64 `xml:"MsgId"`
MessageType MessageType `xml:"MsgType"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
func GetBaseMessage ¶
func GetBaseMessage(ctx context.Context) *ReqMessageBase
type RespMessageBase ¶
type RespMessageBase struct {
XMLName xml.Name `xml:"xml"`
ToUserName ToUserName `xml:"ToUserName"`
FromUserName FromUserName `xml:"FromUserName"`
CreateTime int64 `xml:"CreateTime"`
MessageType MessageType `xml:"MsgType"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type ShortVideoReqMessage ¶
type ShortVideoReqMessage VoiceReqMessage
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
type TextReqMessage ¶
type TextReqMessage struct {
ReqMessageBase
MessageContent MessageContent `xml:"Content"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
type TextRespMessage ¶
type TextRespMessage struct {
RespMessageBase
MessageContent MessageContent `xml:"Content"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type ThumbMediaID ¶
type ToUserName ¶
type Video ¶
type Video struct {
Title Title `xml:"Title"`
MediaID MediaID `xml:"MediaId"`
Description Description `xml:"Description"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type VideoReqMessage ¶
type VideoReqMessage struct {
ReqMessageBase
Format Format `xml:"Format"`
MediaID MediaID `xml:"MediaId"`
ThumbMediaID ThumbMediaID `xml:"ThumbMediaId"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
type VideoRespMessage ¶
type VideoRespMessage struct {
ReqMessageBase
Video Video `xml:"Video"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type Voice ¶
type Voice struct {
MediaID MediaID `xml:"MediaId"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
type VoiceReqMessage ¶
type VoiceReqMessage struct {
ReqMessageBase
Format Format `xml:"Format"`
MediaID MediaID `xml:"MediaId"`
Recognition Recognition `xml:"Recognition"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
type VoiceRespMessage ¶
type VoiceRespMessage struct {
RespMessageBase
Voice Voice `xml:"Voice"`
}
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html