Documentation ¶
Index ¶
- type Default
- func (d *Default) GetAuthorizeURL(args ...string) string
- func (d *Default) GetMe(accessToken string) (interface{}, error)
- func (d *Default) GetUserInfo(accessToken, openID string) (interface{}, error)
- func (d *Default) RefreshToken(refreshToken string) (interface{}, error)
- func (d *Default) Token(code string) (interface{}, error)
- type ISocialite
- type Qq
- func (q *Qq) GetAuthorizeURL(args ...string) string
- func (q *Qq) GetMe(accessToken string) (interface{}, error)
- func (q *Qq) GetUserInfo(accessToken, openID string) (interface{}, error)
- func (q *Qq) RefreshToken(refreshToken string) (interface{}, error)
- func (q *Qq) Token(code string) (interface{}, error)
- type QqRespMe
- type QqRespToken
- type QqRespUserInfo
- type RespToken
- type WbRespToken
- type WbUserInfo
- type Wechat
- func (w *Wechat) GetAuthorizeURL(args ...string) string
- func (w *Wechat) GetMe(accessToken string) (interface{}, error)
- func (w *Wechat) GetUserInfo(accessToken, openID string) (interface{}, error)
- func (w *Wechat) RefreshToken(refreshToken string) (interface{}, error)
- func (w *Wechat) Token(code string) (interface{}, error)
- type Weibo
- func (w *Weibo) GetAuthorizeURL(args ...string) string
- func (w *Weibo) GetMe(accessToken string) (interface{}, error)
- func (w *Weibo) GetUserInfo(accessToken, openID string) (interface{}, error)
- func (w *Weibo) RefreshToken(refreshToken string) (interface{}, error)
- func (w *Weibo) Token(code string) (interface{}, error)
- type WxRespToken
- type WxUserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Default ¶
type Default struct { }
Default struct
func (*Default) GetAuthorizeURL ¶
GetAuthorizeURL get authorize url
func (*Default) GetUserInfo ¶
GetUserInfo get user info
func (*Default) RefreshToken ¶
RefreshToken refresh token
type ISocialite ¶
type ISocialite interface { // GetAuthorizeURL get authorize url GetAuthorizeURL(args ...string) string // Token get token Token(code string) (interface{}, error) // RefreshToken refresh token RefreshToken(refreshToken string) (interface{}, error) // GetMe get open_id if it needs necessarily GetMe(accessToken string) (interface{}, error) // GetUserInfo get user info GetUserInfo(accessToken, openID string) (interface{}, error) }
ISocialite interface
type Qq ¶
type Qq struct { AppID string AppSecret string RedirectURL string HTTPRequest *utils.HTTPClient }
Qq struct @doc: https://wiki.open.qq.com/wiki/website/%E4%BD%BF%E7%94%A8Authorization_Code%E8%8E%B7%E5%8F%96Access_Token
func (*Qq) GetAuthorizeURL ¶
GetAuthorizeURL get authorize url
func (*Qq) GetUserInfo ¶
GetUserInfo get user info
func (*Qq) RefreshToken ¶
RefreshToken refresh token
type QqRespMe ¶
type QqRespMe struct { ClientID string `json:"client_id"` OpenID string `json:"openid"` // contains filtered or unexported fields }
QqRespMe response of me
type QqRespToken ¶
type QqRespToken struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` RefreshToken string `json:"refresh_token"` // contains filtered or unexported fields }
QqRespToken struct
type QqRespUserInfo ¶
type QqRespUserInfo struct { Ret int `json:"ret"` Msg string `json:"msg"` IsLost int `json:"is_lost"` Nickname string `json:"nickname"` Gender string `json:"gender"` GenderType int `json:"gender_type"` Province string `json:"province"` City string `json:"city"` Year string `json:"year"` Constellation string `json:"constellation"` FigureURL string `json:"figureurl"` FigureURL1 string `json:"figureurl_1"` FigureURL2 string `json:"figureurl_2"` FigureQqURL string `json:"figureurl_qq"` FigureQqURL1 string `json:"figureurl_qq_1"` FigureQqURL2 string `json:"figureurl_qq_2"` FigureURLType string `json:"figureurl_type"` IsYellowVIP string `json:"is_yellow_vip"` VIP string `json:"vip"` YellowVIPLevel string `json:"yellow_vip_level"` Level string `json:"level"` IsYellowVIPLevel string `json:"is_yellow_year_vip"` }
QqRespUserInfo user info
type RespToken ¶
type RespToken struct { Code int `json:"code"` Msg string `json:"msg"` AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` RefreshToken string `json:"refresh_token"` OpenID string `json:"openid"` }
RespToken struct
type WbRespToken ¶
type WbRespToken struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` RemindIn string `json:"remind_in"` UID string `json:"uid"` IsRealName string `json:"isRealName"` // contains filtered or unexported fields }
WbRespToken response of me
type WbUserInfo ¶
type WbUserInfo struct { ID int `json:"id"` ScreenName string `json:"screen_name"` Name string `json:"name"` Province string `json:"province"` City string `json:"city"` Location string `json:"location"` Description string `json:"description"` URL string `json:"url"` ProfileImageURL string `json:"profile_image_url"` Domain string `json:"domain"` Gender string `json:"gender"` FriendsCount int `json:"friends_count"` FollowersCount int `json:"followers_count"` StatusesCount int `json:"statuses_count"` FavouritesCount int `json:"favourites_count"` CreatedAt string `json:"created_at"` Following bool `json:"following"` AllowAllActMsg bool `json:"allow_all_act_msg"` GeoEnabled bool `json:"geo_enabled"` Verified bool `json:"verified"` Status struct { Annotations []interface{} `json:"annotations"` CommentsCount int `json:"comments_count"` CreatedAt string `json:"created_at"` Favorited bool `json:"favorited"` Geo string `json:"geo"` ID int `json:"id"` InReplyToScreenName string `json:"in_reply_to_screen_name"` InReplyToStatusID string `json:"in_reply_to_status_id"` InReplyToUserID string `json:"in_reply_to_user_id"` Mid string `json:"mid"` RepostsCount int `json:"reposts_count"` Source string `json:"source"` Text string `json:"text"` Truncated bool `json:"truncated"` } `json:"status"` AllowAllComment bool `json:"allow_all_comment"` AvatarLarge string `json:"avatar_large"` VerifiedReason string `json:"verified_reason"` FollowMe bool `json:"follow_me"` OnlineStatus int `json:"online_status"` BiFollowersCount int `json:"bi_followers_count"` // contains filtered or unexported fields }
WbUserInfo user info
type Wechat ¶
type Wechat struct { AppID string AppSecret string RedirectURL string HTTPRequest *utils.HTTPClient }
Wechat struct @doc: https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html
func (*Wechat) GetAuthorizeURL ¶
GetAuthorizeURL get authorize url
func (*Wechat) GetUserInfo ¶
GetUserInfo get user info
func (*Wechat) RefreshToken ¶
RefreshToken refresh token
type Weibo ¶
type Weibo struct { ClientID string ClientSecret string RedirectURL string HTTPRequest *utils.HTTPClient }
Weibo struct
func (*Weibo) GetAuthorizeURL ¶
GetAuthorizeURL get authorize url @doc: https://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E @doc: https://open.weibo.com/wiki/Oauth2/authorize @explain: two document, ridiculous~
func (*Weibo) GetUserInfo ¶
GetUserInfo get user info
func (*Weibo) RefreshToken ¶
RefreshToken refresh token
type WxRespToken ¶
type WxRespToken struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` RefreshToken string `json:"refresh_token"` OpenID string `json:"openid"` Scope string `json:"scope"` UnionID string `json:"unionid"` // contains filtered or unexported fields }
WxRespToken response of me
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 interface{} `json:"privilege"` UnionID string `json:"unionid"` // contains filtered or unexported fields }
WxUserInfo user info