12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- package wechat
- import "encoding/xml"
- // FormSignature signature
- type FormSignature struct {
- TimeStamp string `form:"timestamp" json:"timestamp"`
- Nonce string `form:"nonce" json:"nonce"`
- Signature string `form:"signature" json:"signature"`
- Echostr string `form:"echostr" json:"echostr"`
- }
- // ResponseMsg response
- type ResponseMsg struct {
- ErrCode int `json:"errcode"`
- ErrMsg string `json:"errmsg"`
- }
- // Response response
- type Response struct {
- ErrCode int `json:"errcode"`
- ErrMsg string `json:"errmsg"`
- // token
- AccessToken string `json:"access_token"`
- ExpiresIn int `json:"expires_in"`
- // openid
- RefreshToken string `json:"refresh_token"`
- OpenID string `json:"openid"`
- Scope string `json:"scope"`
- // user info
- NickName string `json:"nickname"`
- Sex string `json:"sex"`
- Province string `json:"province"`
- City string `json:"city"`
- Country string `json:"country"`
- HeadImgURL string `json:"headimgurl"`
- Privilege string `json:"privilege"`
- UnionID string `json:"unionid"`
- // template message
- MsgID int64 `json:"msgid"`
- // jsapi_ticket
- Ticket string `json:"ticket"`
- }
- // Message message
- type Message struct {
- XMLName xml.Name `xml:"xml"`
- ToUserName string `xml:"ToUserName" json:"ToUserName"`
- FromUserName string `xml:"FromUserName" json:"FromUserName"`
- CreateTime int32 `xml:"CreateTime" json:"CreateTime"`
- MsgType string `xml:"MsgType" json:"MsgType"`
- MsgID int64 `xml:"MsgId" json:"MsgId"`
- }
- // EventTemplateReply event reply
- type EventTemplateReply struct {
- XMLName xml.Name `xml:"xml"`
- ToUserName string `xml:"ToUserName"`
- FromUserName string `xml:"FromUserName"`
- CreateTime string `xml:"CreateTime"`
- MsgType string `xml:"MsgType"`
- Event string `xml:"Event"`
- MsgID string `xml:"MsgID"`
- Status string `xml:"Status"`
- }
|