wechat.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package models
  2. type WxLoginReq struct {
  3. Code string `description:"微信code"`
  4. }
  5. type WxToken struct {
  6. AccessToken string
  7. ExpiresIn int64
  8. Id int64
  9. }
  10. type WxTicket struct {
  11. Errcode int `json:"errcode"`
  12. Errmsg string `json:"errmsg"`
  13. Ticket string `json:"ticket"`
  14. }
  15. type WechatSign struct {
  16. AppId string
  17. NonceStr string
  18. Timestamp int64
  19. Url string
  20. Signature string
  21. RawString string
  22. }
  23. type WxAccessToken struct {
  24. AccessToken string `json:"access_token"`
  25. ExpiresIn int `json:"expires_in"`
  26. RefreshToken string `json:"refresh_token"`
  27. Openid string `json:"openid"`
  28. Unionid string `json:"unionid"`
  29. Scope string `json:"scope"`
  30. Errcode int `json:"errcode"`
  31. Errmsg string `json:"errmsg"`
  32. }
  33. type WxUsers struct {
  34. Total int
  35. Count int
  36. Data struct {
  37. Openid []string
  38. }
  39. NextOpenid string
  40. }
  41. type WxCheckContentJson struct {
  42. AccessToken string `json:"access_token"`
  43. ExpiresIn int `json:"expires_in"`
  44. RefreshToken string `json:"refresh_token"`
  45. Openid string `json:"openid"`
  46. Unionid string `json:"unionid"`
  47. Scope string `json:"scope"`
  48. Errcode int `json:"errcode"`
  49. Errmsg string `json:"errmsg"`
  50. }
  51. type Notify struct {
  52. ToUserName string `xml:"ToUserName"`
  53. FromUserName string `xml:"FromUserName"`
  54. CreateTime int `xml:"CreateTime"`
  55. MsgType string `xml:"MsgType"`
  56. Event string `xml:"Event"`
  57. EventKey string `xml:"EventKey"`
  58. Content string `xml:"Content"`
  59. }