Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubUser ¶ added in v0.2.8
GitHubUser is a retrieved and authentiacted user from GitHub.
func (*GitHubUser) PrepareUserData ¶ added in v0.2.8
func (u *GitHubUser) PrepareUserData()
PrepareUserData implement PersonalData interface
type GoogleUser ¶ added in v0.2.1
type GoogleUser struct { User Sub string `json:"sub"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Profile string `json:"profile"` Picture string `json:"picture"` EmailVerified bool `json:"email_verified"` Gender string `json:"gender"` HostDomain string `json:"hd"` }
TODO: see if these should be pointers to the *User object as per https://golang.org/doc/effective_go.html#embedding
func (*GoogleUser) PrepareUserData ¶ added in v0.2.6
func (u *GoogleUser) PrepareUserData()
PrepareUserData implement PersonalData interface
type IndieAuthUser ¶ added in v0.2.7
func (*IndieAuthUser) PrepareUserData ¶ added in v0.2.7
func (u *IndieAuthUser) PrepareUserData()
type Site ¶
type Site struct { Domain string `json:"domain"` CreatedOn int64 `json:"createdon"` LastUpdate int64 `json:"lastupdate"` ID int `json:"id",mapstructure:"id"` }
Site is the basic unit of auth
type Team ¶
type Team struct { Name string `json:"name",mapstructure:"name"` Members []string `json:"members",mapstructure:"members"` // just the emails Sites []string `json:"sites",mapstructure:"sites"` // just the domains CreatedOn int64 `json:"createdon",mapstructure:"createdon"` LastUpdate int64 `json:"lastupdate",mapstructure:"lastupdate"` ID int `json:"id",mapstructure:"id"` }
Team has members and provides acess to sites
type User ¶
type User struct { // TODO: set Provider here so that we can pass it to db // populated by db (via mapstructure) or from provider (via json) // Provider string `json:"provider",mapstructure:"provider"` Username string `json:"username",mapstructure:"username"` Name string `json:"name",mapstructure:"name"` Email string `json:"email",mapstructure:"email"` CreatedOn int64 `json:"createdon"` LastUpdate int64 `json:"lastupdate"` ID int `json:"id",mapstructure:"id"` }
User is inherited.
func (*User) PrepareUserData ¶ added in v0.2.6
func (u *User) PrepareUserData()
PrepareUserData implement PersonalData interface
Click to show internal directories.
Click to hide internal directories.