Documentation
¶
Index ¶
- type AddUserParams
- type CheckLoginResult
- type ClientStore
- func (c *ClientStore) GetDomain() string
- func (c *ClientStore) GetID() string
- func (c *ClientStore) GetName() string
- func (c *ClientStore) GetSecret() string
- func (c *ClientStore) GetUserID() string
- func (c *ClientStore) IsActive() bool
- func (c *ClientStore) IsPublic() bool
- func (c *ClientStore) IsSSO() bool
- type DBTX
- type GetAppListParams
- type GetAppListRow
- type GetOtpRow
- type GetUserListRow
- type InsertClientAppParams
- type ModifyUserParams
- type Otp
- type Queries
- func (q *Queries) AddUser(ctx context.Context, arg AddUserParams) (string, error)
- func (q *Queries) ChangePassword(ctx context.Context, subject, newPw string) error
- func (q *Queries) CheckLogin(ctx context.Context, un, pw string) (CheckLoginResult, error)
- func (q *Queries) DeleteOtp(ctx context.Context, subject string) error
- func (q *Queries) GetAppList(ctx context.Context, arg GetAppListParams) ([]GetAppListRow, error)
- func (q *Queries) GetClientInfo(ctx context.Context, subject string) (ClientStore, error)
- func (q *Queries) GetOtp(ctx context.Context, subject string) (GetOtpRow, error)
- func (q *Queries) GetUser(ctx context.Context, subject string) (User, error)
- func (q *Queries) GetUserDisplayName(ctx context.Context, subject string) (string, error)
- func (q *Queries) GetUserEmail(ctx context.Context, subject string) (string, error)
- func (q *Queries) GetUserList(ctx context.Context, offset int64) ([]GetUserListRow, error)
- func (q *Queries) GetUserRole(ctx context.Context, subject string) (types.UserRole, error)
- func (q *Queries) HasOtp(ctx context.Context, subject string) (bool, error)
- func (q *Queries) HasUser(ctx context.Context) (bool, error)
- func (q *Queries) InsertClientApp(ctx context.Context, arg InsertClientAppParams) error
- func (q *Queries) ModifyUser(ctx context.Context, arg ModifyUserParams) error
- func (q *Queries) ResetClientAppSecret(ctx context.Context, arg ResetClientAppSecretParams) error
- func (q *Queries) SetOtp(ctx context.Context, arg SetOtpParams) error
- func (q *Queries) UpdateClientApp(ctx context.Context, arg UpdateClientAppParams) error
- func (q *Queries) UpdateUserRole(ctx context.Context, arg UpdateUserRoleParams) error
- func (q *Queries) UserEmailExists(ctx context.Context, email string) (bool, error)
- func (q *Queries) VerifyUserEmail(ctx context.Context, subject string) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type ResetClientAppSecretParams
- type SetOtpParams
- type UpdateClientAppParams
- type UpdateUserRoleParams
- type User
- type UserPatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddUserParams ¶
type CheckLoginResult ¶
type ClientStore ¶
type ClientStore struct {
Subject string `json:"subject"`
Name string `json:"name"`
Secret string `json:"secret"`
Domain string `json:"domain"`
Owner string `json:"owner"`
Public bool `json:"public"`
Sso bool `json:"sso"`
Active bool `json:"active"`
}
func (*ClientStore) GetDomain ¶
func (c *ClientStore) GetDomain() string
func (*ClientStore) GetID ¶
func (c *ClientStore) GetID() string
func (*ClientStore) GetName ¶
func (c *ClientStore) GetName() string
GetName is an extra field for the oauth handler to display the application name
func (*ClientStore) GetSecret ¶
func (c *ClientStore) GetSecret() string
func (*ClientStore) GetUserID ¶
func (c *ClientStore) GetUserID() string
func (*ClientStore) IsActive ¶
func (c *ClientStore) IsActive() bool
IsActive is an extra field for the app manager to get the active state
func (*ClientStore) IsPublic ¶
func (c *ClientStore) IsPublic() bool
func (*ClientStore) IsSSO ¶
func (c *ClientStore) 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 GetAppListParams ¶
type GetAppListRow ¶
type GetUserListRow ¶
type GetUserListRow struct {
Subject string `json:"subject"`
Name string `json:"name"`
Username string `json:"username"`
Picture string `json:"picture"`
Website string `json:"website"`
Email string `json:"email"`
EmailVerified bool `json:"email_verified"`
Role types.UserRole `json:"role"`
UpdatedAt time.Time `json:"updated_at"`
Active bool `json:"active"`
}
type InsertClientAppParams ¶
type ModifyUserParams ¶
type ModifyUserParams struct {
Name string `json:"name"`
Picture string `json:"picture"`
Website string `json:"website"`
Pronouns types.UserPronoun `json:"pronouns"`
Birthdate date.NullDate `json:"birthdate"`
Zoneinfo types.UserZone `json:"zoneinfo"`
Locale types.UserLocale `json:"locale"`
UpdatedAt time.Time `json:"updated_at"`
Subject string `json:"subject"`
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) ChangePassword ¶
func (*Queries) CheckLogin ¶
func (*Queries) GetAppList ¶
func (q *Queries) GetAppList(ctx context.Context, arg GetAppListParams) ([]GetAppListRow, error)
func (*Queries) GetClientInfo ¶
func (*Queries) GetUserDisplayName ¶
func (*Queries) GetUserEmail ¶
func (*Queries) GetUserList ¶
func (*Queries) GetUserRole ¶
func (*Queries) InsertClientApp ¶
func (q *Queries) InsertClientApp(ctx context.Context, arg InsertClientAppParams) error
func (*Queries) ModifyUser ¶
func (q *Queries) ModifyUser(ctx context.Context, arg ModifyUserParams) error
func (*Queries) ResetClientAppSecret ¶
func (q *Queries) ResetClientAppSecret(ctx context.Context, arg ResetClientAppSecretParams) error
func (*Queries) UpdateClientApp ¶
func (q *Queries) UpdateClientApp(ctx context.Context, arg UpdateClientAppParams) error
func (*Queries) UpdateUserRole ¶
func (q *Queries) UpdateUserRole(ctx context.Context, arg UpdateUserRoleParams) error
func (*Queries) UserEmailExists ¶
func (*Queries) VerifyUserEmail ¶
type SetOtpParams ¶
type UpdateClientAppParams ¶
type UpdateUserRoleParams ¶
type User ¶
type User struct {
Subject string `json:"subject"`
Name string `json:"name"`
Username string `json:"username"`
Password password.HashString `json:"password"`
Picture string `json:"picture"`
Website string `json:"website"`
Email string `json:"email"`
EmailVerified bool `json:"email_verified"`
Pronouns types.UserPronoun `json:"pronouns"`
Birthdate date.NullDate `json:"birthdate"`
Zoneinfo types.UserZone `json:"zoneinfo"`
Locale types.UserLocale `json:"locale"`
Role types.UserRole `json:"role"`
UpdatedAt time.Time `json:"updated_at"`
Registered time.Time `json:"registered"`
Active bool `json:"active"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.