Documentation ¶
Index ¶
Constants ¶
View Source
const ( URLUserInfo = "https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s" URLAccessToken = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code" )
Variables ¶
View Source
var (
ErrStatusFailed = errors.New("微信接口访问失败")
)
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) GetATK ¶
func (a *Auth) GetATK() *WxAccessToken
func (*Auth) GetUserInfo ¶
func (a *Auth) GetUserInfo() *WxUserInfo
func (*Auth) RequestUserInfo ¶
type ResponseHandler ¶
type WxAccessToken ¶
type WxUserInfo ¶
type WxUserInfo struct { Openid string `json:"openid"` Nickname string `json:"nickname"` Sex int `json:"sex"` Province string `json:"province"` City string `json:"city"` Country string `json:"country"` HeadImgURL string `json:"headimgurl"` Privilege []string `json:"privilege,omitempty"` UnionID string `json:"unionid"` LocalImg string `json:"local_img,omitempty"` }
func (*WxUserInfo) SaveImg ¶
func (w *WxUserInfo) SaveImg() error
Click to show internal directories.
Click to hide internal directories.