GitHub 用户数据 用户使用GitHub登录的时候,直接根据GitHub的id获取数据
| 21 | //GitHub 用户数据 |
| 22 | //用户使用GitHub登录的时候,直接根据GitHub的id获取数据 |
| 23 | type GithubUser struct { |
| 24 | Id int `json:"id"` //用户id |
| 25 | MemberId int `json:"member_id"` //绑定的用户id |
| 26 | UpdatedAt time.Time `json:"updated_at"` //用户资料更新时间 |
| 27 | AvatarURL string `json:"avatar_url" orm:"column(avatar_url)"` //用户头像链接 |
| 28 | Email string `json:"email" orm:"size(50)"` //电子邮箱 |
| 29 | Login string `json:"login" orm:"size(50)"` //用户名 |
| 30 | Name string `json:"name" orm:"size(50)"` //昵称 |
| 31 | HtmlURL string `json:"html_url" orm:"column(html_url)"` //github主页 |
| 32 | } |
| 33 | |
| 34 | //获取accessToken |
| 35 | func GetGithubAccessToken(code string) (token GithubAccessToken, err error) { |
nothing calls this directly
no outgoing calls
no test coverage detected