Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrForbidden = errors.New("forbidden access") ErrUnknownUser = errors.New("unknown user") ErrMalformedContent = errors.New("malformed content") ErrInvalidCredentials = errors.New("invalid credentials") )
View Source
var ErrUnknownUserKind = errors.New("unknown UserKind")
Functions ¶
Types ¶
type Authentication ¶
type Authorization ¶
type DiscordUser ¶
type DiscordUser struct {
Username string `json:"global_name"`
Avatar string `json:"avatar"`
ID string `json:"id"`
}
func (DiscordUser) GetID ¶
func (du DiscordUser) GetID() string
type GitHubUser ¶
func (GitHubUser) GetID ¶
func (gu GitHubUser) GetID() uint64
type GoogleUser ¶
type GoogleUser struct {
Sub string `json:"sub"`
Name string `json:"name"`
Picture string `json:"picture"`
}
func (GoogleUser) GetID ¶
func (gu GoogleUser) GetID() string
type OAuthClaim ¶
func (OAuthClaim) GetSubject ¶
func (oac OAuthClaim) GetSubject() string
type User ¶
type User struct {
ID string `json:"id"`
Name string `json:"name"`
Image string `json:"image"`
Kind UserKind `json:"kind"`
}
func (User) GetSubject ¶
type UserKind ¶
type UserKind int
func ParseUserKind ¶
func (UserKind) MarshalJSON ¶
func (*UserKind) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.