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