Documentation ¶
Index ¶
- type ClientInfoDbOutput
- func (c *ClientInfoDbOutput) GetDomain() string
- func (c *ClientInfoDbOutput) GetID() string
- func (c *ClientInfoDbOutput) GetName() string
- func (c *ClientInfoDbOutput) GetSecret() string
- func (c *ClientInfoDbOutput) GetUserID() string
- func (c *ClientInfoDbOutput) IsActive() bool
- func (c *ClientInfoDbOutput) IsPublic() bool
- func (c *ClientInfoDbOutput) IsSSO() bool
- type DB
- type LocaleScanner
- type LocationScanner
- type NullDateScanner
- type NullStringScanner
- type PronounScanner
- type Tx
- func (t *Tx) ChangeUserPassword(sub, pwOld, pwNew string) error
- func (t *Tx) CheckLogin(un, pw string) (*User, bool, bool, error)
- func (t *Tx) Commit() error
- func (t *Tx) GetAppList(owner string, admin bool, offset int) ([]ClientInfoDbOutput, error)
- func (t *Tx) GetClientInfo(sub string) (oauth2.ClientInfo, error)
- func (t *Tx) GetTwoFactor(sub string) (string, int, error)
- func (t *Tx) GetUser(sub string) (*User, error)
- func (t *Tx) GetUserDisplayName(sub string) (*User, error)
- func (t *Tx) GetUserEmail(sub string) (string, error)
- func (t *Tx) GetUserList(offset int) ([]User, error)
- func (t *Tx) GetUserRole(sub string) (UserRole, error)
- func (t *Tx) HasTwoFactor(sub string) (bool, error)
- func (t *Tx) HasUser() error
- func (t *Tx) InsertClientApp(name, domain string, public, sso, active bool, owner string) error
- func (t *Tx) InsertUser(name, un, pw, email string, verifyEmail bool, role UserRole, active bool) (uuid.UUID, error)
- func (t *Tx) ModifyUser(sub string, v *UserPatch) error
- func (t *Tx) ResetClientAppSecret(subject, owner string) (string, error)
- func (t *Tx) Rollback()
- func (t *Tx) SetTwoFactor(sub string, secret string, digits int) error
- func (t *Tx) UpdateClientApp(subject, owner string, name, domain string, public, sso, active bool) error
- func (t *Tx) UpdateUser(subject string, role UserRole, active bool) error
- func (t *Tx) UserEmailExists(email string) (exists bool, err error)
- func (t *Tx) UserResetPassword(sub string, pw string) error
- func (t *Tx) VerifyUserEmail(sub string) error
- type User
- type UserPatch
- type UserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientInfoDbOutput ¶
func (*ClientInfoDbOutput) GetDomain ¶
func (c *ClientInfoDbOutput) GetDomain() string
func (*ClientInfoDbOutput) GetID ¶
func (c *ClientInfoDbOutput) GetID() string
func (*ClientInfoDbOutput) GetName ¶
func (c *ClientInfoDbOutput) GetName() string
GetName is an extra field for the oauth handler to display the application name
func (*ClientInfoDbOutput) GetSecret ¶
func (c *ClientInfoDbOutput) GetSecret() string
func (*ClientInfoDbOutput) GetUserID ¶
func (c *ClientInfoDbOutput) GetUserID() string
func (*ClientInfoDbOutput) IsActive ¶
func (c *ClientInfoDbOutput) IsActive() bool
IsActive is an extra field for the app manager to get the active state
func (*ClientInfoDbOutput) IsPublic ¶
func (c *ClientInfoDbOutput) IsPublic() bool
func (*ClientInfoDbOutput) IsSSO ¶
func (c *ClientInfoDbOutput) IsSSO() bool
IsSSO is an extra field for the oauth handler to skip the user input stage this is for trusted applications to get permissions without asking the user
type LocaleScanner ¶
func (LocaleScanner) MarshalJSON ¶
func (l LocaleScanner) MarshalJSON() ([]byte, error)
func (*LocaleScanner) Scan ¶
func (l *LocaleScanner) Scan(src any) error
func (*LocaleScanner) UnmarshalJSON ¶
func (l *LocaleScanner) UnmarshalJSON(bytes []byte) error
type LocationScanner ¶
func (LocationScanner) MarshalJSON ¶
func (l LocationScanner) MarshalJSON() ([]byte, error)
func (*LocationScanner) Scan ¶
func (l *LocationScanner) Scan(src any) error
func (*LocationScanner) UnmarshalJSON ¶
func (l *LocationScanner) UnmarshalJSON(bytes []byte) error
type NullDateScanner ¶
func (NullDateScanner) MarshalJSON ¶
func (t NullDateScanner) MarshalJSON() ([]byte, error)
func (*NullDateScanner) Null ¶
func (t *NullDateScanner) Null() bool
func (*NullDateScanner) Scan ¶
func (t *NullDateScanner) Scan(src any) error
func (NullDateScanner) String ¶
func (t NullDateScanner) String() string
func (*NullDateScanner) UnmarshalJSON ¶
func (t *NullDateScanner) UnmarshalJSON(bytes []byte) error
type NullStringScanner ¶
type NullStringScanner struct{ sql.NullString }
func (NullStringScanner) MarshalJSON ¶
func (s NullStringScanner) MarshalJSON() ([]byte, error)
func (*NullStringScanner) Null ¶
func (s *NullStringScanner) Null() bool
func (*NullStringScanner) Scan ¶
func (s *NullStringScanner) Scan(src any) error
func (NullStringScanner) String ¶
func (s NullStringScanner) String() string
func (*NullStringScanner) UnmarshalJSON ¶
func (s *NullStringScanner) UnmarshalJSON(bytes []byte) error
type PronounScanner ¶
func (PronounScanner) MarshalJSON ¶
func (p PronounScanner) MarshalJSON() ([]byte, error)
func (*PronounScanner) Scan ¶
func (p *PronounScanner) Scan(src any) error
func (*PronounScanner) UnmarshalJSON ¶
func (p *PronounScanner) UnmarshalJSON(bytes []byte) error
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (*Tx) ChangeUserPassword ¶
func (*Tx) GetAppList ¶
func (*Tx) GetClientInfo ¶
func (*Tx) InsertClientApp ¶
func (*Tx) InsertUser ¶
func (*Tx) ResetClientAppSecret ¶
func (*Tx) UpdateClientApp ¶
func (*Tx) VerifyUserEmail ¶
type User ¶
type User struct { Sub string `json:"sub"` Name string `json:"name,omitempty"` Username string `json:"username"` Picture NullStringScanner `json:"picture,omitempty"` Website NullStringScanner `json:"website,omitempty"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` Pronouns PronounScanner `json:"pronouns,omitempty"` Birthdate NullDateScanner `json:"birthdate,omitempty"` ZoneInfo LocationScanner `json:"zoneinfo,omitempty"` Locale LocaleScanner `json:"locale,omitempty"` Role UserRole `json:"role"` UpdatedAt time.Time `json:"updated_at"` Active bool `json:"active"` }
Click to show internal directories.
Click to hide internal directories.