Versions in this module Expand all Collapse all v0 v0.6.0 Nov 18, 2020 Changes in this version + const ET_CLICK + const ET_LOCATION + const ET_MASSSENDJOBFINISH + const ET_PIC_PHOTO_OR_ALBUM + const ET_PIC_SYSPHOTO + const ET_PIC_WEIXIN + const ET_SCAN + const ET_SCANCODE_PUSH + const ET_SCANCODE_WAITMSG + const ET_SUBSCRIBE + const ET_TEMPLATESENDJOBFINISH + const ET_UNSUBSCRIBE + const ET_VIEW + const ET_WHERE + const MT_EVENT + const MT_IMAGE + const MT_LINK + const MT_LOCATION + const MT_SHORTVIDEO + const MT_TEXT + const MT_VIDEO + const MT_VOICE + const NONCE + const RTN_ENCRYPTED_REPLY + const RTN_IMAGE + const RTN_MUSIC + const RTN_NEWS + const RTN_TEXT + const RTN_TOTAL + const RTN_VIDEO + const RTN_VOICE + const SIGNATURE + const TIMESTAMP + var MustSignatureArgs = []string + var SUCCESS_TEXT = []byte("success") + func GetRandomBytes(n int) []byte + func HashStrings(sl []string) string + func ParseMessageBody(u *url.URL, body []byte) ([]byte, string, string, error) + type BaseMsg struct + CreateTime int + FromUserName string + MsgType string + ToUserName string + type ClickEvent struct + EventKey string + type EventMsg struct + Event string + type FnMessageHandler func(receivedMsg ReceivedMsg) ReplyMsg + type ImageMsg struct + MediaId string + PicUrl string + type LinkMsg struct + Description string + Title string + Url string + type LocationEvent struct + Latitude string + Longitude string + Precision string + type LocationMsg struct + Label string + Location_X string + Location_Y string + Scale int + type MassSentEvent struct + ErrorCount int + FilterCount int + MsgID string + ResultCount int + ResultList []ResultListItem + SentCount int + Status string + TotalCount int + type Msg struct + MsgId string + type NewsArticle struct + Desc string + PicUrl string + Title string + Url string + func NewNewsArticle(title, desc, picUrl, url string) *NewsArticle + type PhotoEvent struct + Count int + EventKey string + PicList []string + type ReceivedMsg interface + type ReplyImageMsg struct + MediaId string + func NewReplyImageMsg(toUserName, fromUserName, mediaId string) *ReplyImageMsg + func (msg *ReplyImageMsg) ToXML() []byte + type ReplyMsg interface + ToXML func() []byte + type ReplyMsgBase struct + CreateTime int64 + FromUserName string + ToUserName string + type ReplyMusicMsg struct + Desc string + HQMusicUrl string + MusicUrl string + ThumbMediaId string + Title string + func NewReplyMusicMsg(...) *ReplyMusicMsg + func (msg *ReplyMusicMsg) ToXML() []byte + type ReplyNewsMsg struct + Articles []*NewsArticle + func NewReplyNewsMsg(toUserName, fromUserName string, articles []*NewsArticle) *ReplyNewsMsg + func (msg *ReplyNewsMsg) ToXML() []byte + type ReplyTextMsg struct + Content string + func NewReplyTextMsg(toUserName, fromUserName, content string) *ReplyTextMsg + func (msg *ReplyTextMsg) ToXML() []byte + type ReplyVideoMsg struct + Desc string + MediaId string + Title string + func NewReplyVideoMsg(toUserName, fromUserName, mediaId, title, desc string) *ReplyVideoMsg + func (msg *ReplyVideoMsg) ToXML() []byte + type ReplyVoiceMsg struct + MediaId string + func NewReplyVoiceMsg(toUserName, fromUserName, mediaId string) *ReplyVoiceMsg + func (msg *ReplyVoiceMsg) ToXML() []byte + type ResultListItem struct + ArticleIdx string + AuditState string + CanReprint string + NeedReplaceContent string + NeedShowReprintSource string + OriginalArticleType string + OriginalArticleUrl string + UserDeclareState string + type ScancodeEvent struct + EventKey string + ScanResult string + ScanType string + type SubscribeEvent struct + EventKey string + Ticket string + type SuccessTextMsg struct + func NewSuccessMsg() *SuccessTextMsg + func (msg *SuccessTextMsg) ToXML() []byte + type TemplateSentEvent struct + MsgId string + Status string + type TextMsg struct + Content string + type VideoMsg struct + MediaId string + ThumbMediaId string + type ViewEvent struct + EventKey string + MenuId string + type VoiceMsg struct + Format string + MediaId string + Recognition string + type WhereEvent struct + Label string + Location_X string + Location_Y string + MsgId string + Scale int + type WxAppIdMsgParser struct + func StartWxMsgParsers(params *wxconf.WxParamsT, workNum int) *WxAppIdMsgParser + func (p *WxAppIdMsgParser) EncryptReply(replyMsg []byte, timestamp string, nonce string) []byte + func (p *WxAppIdMsgParser) GetMessageBody(r *http.Request) ([]byte, string, string, error) + func (p *WxAppIdMsgParser) GetReply(msgBody []byte) ([]byte, error) + func (p *WxAppIdMsgParser) RegisterWxMsgHandler(msgHandler WxMsgHandler) + type WxMsgHandler interface + HandleClickEvent func(clickEvent *ClickEvent) ReplyMsg + HandleImageMsg func(imgMsg *ImageMsg) ReplyMsg + HandleLinkMsg func(linkMsg *LinkMsg) ReplyMsg + HandleLocationEvent func(locEvent *LocationEvent) ReplyMsg + HandleLocationMsg func(locMsg *LocationMsg) ReplyMsg + HandleMassSentEvent func(massSentEvent *MassSentEvent) ReplyMsg + HandlePhotoEvent func(phoneEvent *PhotoEvent) ReplyMsg + HandleScanEvent func(subscribeEvent *SubscribeEvent) ReplyMsg + HandleScancodePushEvent func(scanEvent *ScancodeEvent) ReplyMsg + HandleScancodeWaitEvent func(scanEvent *ScancodeEvent) ReplyMsg + HandleSubscribeEvent func(subscribeEvent *SubscribeEvent) ReplyMsg + HandleTemplateSentEvent func(tempSentEvent *TemplateSentEvent) ReplyMsg + HandleTextMsg func(textMsg *TextMsg) ReplyMsg + HandleUnsubscribeEvent func(subscribeEvent *SubscribeEvent) ReplyMsg + HandleVideoMsg func(videoMsg *VideoMsg) ReplyMsg + HandleViewEvent func(viewEvent *ViewEvent) ReplyMsg + HandleVoiceMsg func(voiceMsg *VoiceMsg) ReplyMsg + HandleWhereEvent func(whereEvent *WhereEvent) ReplyMsg + var MsgHandler WxMsgHandler = &WxMsgHandlerAdapter{} + type WxMsgHandlerAdapter struct + func (h *WxMsgHandlerAdapter) HandleClickEvent(clickEvent *ClickEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleImageMsg(imgMsg *ImageMsg) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleLinkMsg(linkMsg *LinkMsg) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleLocationEvent(locEvent *LocationEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleLocationMsg(locMsg *LocationMsg) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleMassSentEvent(massSentEvent *MassSentEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandlePhotoEvent(phoneEvent *PhotoEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleScanEvent(subscribeEvent *SubscribeEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleScancodePushEvent(scanEvent *ScancodeEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleScancodeWaitEvent(scanEvent *ScancodeEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleSubscribeEvent(subscribeEvent *SubscribeEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleTemplateSentEvent(tempSentEvent *TemplateSentEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleTextMsg(textMsg *TextMsg) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleUnsubscribeEvent(subscribeEvent *SubscribeEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleVideoMsg(videoMsg *VideoMsg) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleViewEvent(viewEvent *ViewEvent) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleVoiceMsg(voiceMsg *VoiceMsg) ReplyMsg + func (h *WxMsgHandlerAdapter) HandleWhereEvent(whereEvent *WhereEvent) ReplyMsg