Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GiteeAccessToken ¶
type GiteeAccessToken struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
Scope string `json:"scope"`
CreatedAt int `json:"created_at"`
}
gitee accesstoken 数据
func GetGiteeAccessToken ¶
func GetGiteeAccessToken(code string) (token GiteeAccessToken, err error)
获取accessToken
type GiteeUser ¶
type GiteeUser struct {
Id int `json:"id"` //用户id
MemberId int `json:"member_id"` //绑定的用户id
UpdatedAt time.Time `json:"updated_at"` //用户资料更新时间
AvatarURL string `json:"avatar_url" orm:"column(avatar_url)"` //用户头像链接
Email string `json:"email" orm:"size(50)"` //电子邮箱
Login string `json:"login" orm:"size(50)"` //用户名
Name string `json:"name" orm:"size(50)"` //昵称
HtmlURL string `json:"html_url" orm:"column(html_url)"` //gitee主页
}
gitee 用户数据 用户使用gitee登录的时候,直接根据gitee的id获取数据
func GetGiteeUserInfo ¶
获取用户信息
type GithubAccessToken ¶
type GithubAccessToken struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
Scope string `json:"scope"`
}
GitHub accesstoken 数据
func GetGithubAccessToken ¶
func GetGithubAccessToken(code string) (token GithubAccessToken, err error)
获取accessToken
type GithubUser ¶
type GithubUser struct {
Id int `json:"id"` //用户id
MemberId int `json:"member_id"` //绑定的用户id
UpdatedAt time.Time `json:"updated_at"` //用户资料更新时间
AvatarURL string `json:"avatar_url" orm:"column(avatar_url)"` //用户头像链接
Email string `json:"email" orm:"size(50)"` //电子邮箱
Login string `json:"login" orm:"size(50)"` //用户名
Name string `json:"name" orm:"size(50)"` //昵称
HtmlURL string `json:"html_url" orm:"column(html_url)"` //github主页
}
GitHub 用户数据 用户使用GitHub登录的时候,直接根据GitHub的id获取数据
func GetGithubUserInfo ¶
func GetGithubUserInfo(accessToken string) (info GithubUser, err error)
获取用户信息
type QQAccessToken ¶
type QQAccessToken struct {
AccessToken string `json:"access_token"`
}
qq accesstoken 数据
func GetQQAccessToken ¶
func GetQQAccessToken(code string) (token QQAccessToken, err error)
获取accessToken
Click to show internal directories.
Click to hide internal directories.