17 lines
338 B
Go
17 lines
338 B
Go
package wechat
|
|
|
|
type Response struct {
|
|
ErrCode int `json:"errcode"`
|
|
ErrMsg int `json:"errmsg"`
|
|
ErrDescribe int `json:"-"`
|
|
}
|
|
|
|
func (r *Response) Error() error {
|
|
return translateError(r.ErrCode)
|
|
}
|
|
|
|
type AccessTokenResponse struct {
|
|
AccessToken string `json:"access_token"`
|
|
ExpiresIn int `json:"expires_in"` // seconds
|
|
}
|