Versions in this module Expand all Collapse all v1 v1.0.1 Jan 6, 2021 v1.0.0 Dec 16, 2020 Changes in this version + const PermanentQRCode + var ErrNoTokenServer = errors.New("No specify token server") + type ArticleItem struct + Description CDataContent + PicUrl CDataContent + Title CDataContent + Url CDataContent + type Button map[string]interface + func (b Button) AddSubMenu(menu Button) Button + func LoadMenu(jsonstr []byte) ([]Button, error) + func LoadMenuFromFile(path string) ([]Button, error) + func NewButtonArticle(name, mediaid string) Button + func NewButtonClick(name, key string) Button + func NewButtonLocation(name, key string) Button + func NewButtonMedia(name, mediaid string) Button + func NewButtonMiniApp(name, appid, pagepath, uri string) Button + func NewButtonPhoto(name, key string) Button + func NewButtonPhotoOrAlbum(name, key string) Button + func NewButtonScanPush(name, key string) Button + func NewButtonScanWait(name, key string) Button + func NewButtonView(name, url string) Button + func NewButtonWXPic(name, key string) Button + func NewParentMenu(name string) Button + type CDataContent struct + Text string + func CDataWrap(content string) CDataContent + type CSMsgReply struct + func NewCSMsgReply(to string) CSMsgReply + func (reply CSMsgReply) WithImage(mediaid string) + func (reply CSMsgReply) WithText(content string) + func (reply CSMsgReply) WithVideo(mediaid, thumbMediaid, title, desc string) + func (reply CSMsgReply) WithVoice(mediaid string) + type JSSDKSignature struct + AppID string + Noncestr string + Sign string + Timestamp int64 + type MatchRule map[string]string + func (m MatchRule) MatchCity(city string) MatchRule + func (m MatchRule) MatchCountry(country string) MatchRule + func (m MatchRule) MatchLanguage(language string) MatchRule + func (m MatchRule) MatchProvince(province string) MatchRule + func (m MatchRule) MatchSex(sex WXSexType) MatchRule + func (m MatchRule) MatchTag(tagid string) MatchRule + type MediaObject struct + Data io.ReadCloser + FileName string + Size int64 + Type string + type OptionFunc func(*WXClient) + func WithTokenServer(uri string) OptionFunc + func WithValidationToken(token string) OptionFunc + type PicInfo struct + Count int + MD5SumItems []string + type StuffType string + const StuffTypeImage + const StuffTypeThumb + const StuffTypeVideo + const StuffTypeVoice + type TmplData struct + Data map[string]tmplFieldData + FontColor string + MiniApp struct{ ... } + TemplateID string + ToUser string + URL string + func NewTmplData(openid, tmplid string) *TmplData + func (t *TmplData) LinkMiniApp(appid, page string) + func (t *TmplData) Put(key, value, color string) + type TmplMessageSendReply struct + ErrCode int + ErrMsg string + MsgID int64 + type WXArticleMsgResponse struct + ArticleCount int + Articles []ArticleItem + func NewArticleMsg(from, to string, items ...ArticleItem) WXArticleMsgResponse + type WXBoolType byte + func (t WXBoolType) ToBool() bool + type WXClient struct + func NewWXClient(appid string, options ...OptionFunc) *WXClient + func (c *WXClient) APPID() string + func (c *WXClient) BatchGetUserInfo(openids ...string) ([]WXUserInfo, error) + func (c *WXClient) CheckSignature(qryArgs url.Values) (string, error) + func (c *WXClient) ClearMenu() error + func (c *WXClient) CreateMenu(items ...Button) error + func (c *WXClient) CreatePersonalMenu(rule MatchRule, items ...Button) (string, error) + func (c *WXClient) CreateQRCode(sceneValue interface{}, seconds int) (io.Reader, error) + func (c *WXClient) DeletePersonalMenu(menuid string) error + func (c *WXClient) DownloadHQVoice(mediaid string) (MediaObject, error) + func (c *WXClient) DownloadMedia(mediaid string) (MediaObject, error) + func (c *WXClient) DownloadVideo(mediaid string) (string, error) + func (c *WXClient) EnableDebug() + func (c *WXClient) GenJSAPISign(u *url.URL) (JSSDKSignature, error) + func (c *WXClient) GetUserInfo(openid string) (user WXUserInfo, err error) + func (c *WXClient) MessageHandleFunc(handler func(WXMessageRequest) WXMessageResponse) + func (c *WXClient) SendCSMsg(msg CSMsgReply) error + func (c *WXClient) SendTmplMessage(data *TmplData) (int64, error) + func (c *WXClient) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (c *WXClient) ServerGin(ctx *gin.Context) + func (c *WXClient) TestPersonalMenu(wxuserid string) ([]Button, error) + func (c *WXClient) UploadTempStuff(t StuffType, filename string, file io.Reader) (string, error) + func (c *WXClient) UploadTempStuffFile(t StuffType, filename string) (string, error) + type WXEventType string + const EventTypeClick + const EventTypeLocation + const EventTypeLocationSelect + const EventTypePhoto + const EventTypePhotoOrAlbum + const EventTypePicWeiXin + const EventTypeScan + const EventTypeScanPush + const EventTypeScanWait + const EventTypeSubscribe + const EventTypeUnsubscribe + const EventTypeView + type WXImgMsgResponse struct + MediaID CDataContent + func NewImgMsg(from, to, mediaid string) WXImgMsgResponse + type WXMessageHandler func(WXMessageRequest) WXMessageResponse + type WXMessageOKResponse struct + type WXMessageRequest struct + Content string + CreateTime int64 + Description string + Event WXEventType + EventKey string + Format string + FromUserName string + Label string + Latitude float64 + Location_X float64 + Location_Y float64 + Longitude float64 + MediaId string + MsgId int64 + MsgType WXMessageType + PicUrl string + Poiname string + Precision float64 + Recognition string + Scale int + ScanCodeInfo string + ScanResult string + ScanType string + SendPicsInfo PicInfo + ThumbMediaId string + Ticket string + Title string + ToUserName string + Url string + XMLName xml.Name + func (r WXMessageRequest) GetEventKey() string + func (r WXMessageRequest) IsEvent() bool + func (r WXMessageRequest) IsScanEvent() bool + type WXMessageResponse interface + type WXMessageType string + const WXMsgTypeEvent + const WXMsgTypeImage + const WXMsgTypeLink + const WXMsgTypeLocation + const WXMsgTypeMusic + const WXMsgTypeNews + const WXMsgTypeShortVideo + const WXMsgTypeText + const WXMsgTypeTransferCS + const WXMsgTypeVideo + const WXMsgTypeVoice + type WXMsgResponse struct + CreateTime int64 + FromUserName string + MsgType WXMessageType + ToUserName string + XMLName xml.Name + type WXMusicMsgResponse struct + Music struct{ ... } + func NewMusicMsg(from, to, mediaid, title, desc, uri, hquri string) WXMusicMsgResponse + type WXSexType byte + const WXSexTypeFemale + const WXSexTypeMale + func (t WXSexType) String() string + type WXTextMsgResponse struct + Content CDataContent + func NewTextMsg(from, to, content string) WXTextMsgResponse + type WXTransferCSResponse struct + Account CDataContent + func TransferCustomerService(from, to, account string) WXTransferCSResponse + type WXUserInfo struct + City string + Country string + ErrCode int + ErrMsg string + GroupID int + HeadImgUrl string + Language string + NickName string + OpenID string + Province string + Remark string + Sex WXSexType + Subscribe WXBoolType + SubscribeTime dtime.JSONTime + TagIDList []int + UnionID string + type WXVideoMsgResponse struct + Description CDataContent + MediaID CDataContent + Title CDataContent + func NewVideoMsg(from, to, mediaid, title, desc string) WXVideoMsgResponse + type WXVoiceMsgResponse struct + MediaID CDataContent + func NewVoiceMsg(from, to, mediaid string) WXVoiceMsgResponse