Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateRequest ¶
type CreateRequest struct {
Code string `json:"code"`
}
CreateRequest encapsulates the data sent by the client to create a user.
type ListResponse ¶
type ListResponse struct {
Users Users `json:"users"`
}
ListResponse convenience struct for encapsulating list responses.
type Router ¶
Router encapsulates the state required for handling user requests.
func (*Router) HandleRoutes ¶
func (ur *Router) HandleRoutes()
HandleRoutes configures the provided router to handle user requests
type User ¶
type User struct {
ID int64 `json:"user_id" sql:"user_id"`
Email string `json:"email" sql:"email"`
Name string `json:"name" sql:"name"`
AccessToken string `json:"-" sql:"github_access_token"`
Scope string `json:"-" sql:"github_scope"`
GitHubID int64 `json:"github_id" sql:"github_id"`
GitHubLogin string `json:"github_login" sql:"github_login"`
GitHubAvatarURL string `json:"github_avatar_url" sql:"github_avatar_url"`
GitHubHTMLURL string `json:"github_html_url" sql:"github_html_url"`
}
User represents all pertinent user data to this service.
func LoadByGitHubID ¶
LoadByGitHubID loads a user by the GitHub ID