Documentation
¶
Index ¶
- type ConfirmTOTPSecretParams
- type ConsumeRecoveryCodeByIDParams
- type CreateMagicLinkParams
- type CreatePasswordResetTokenParams
- type CreateSessionParams
- type CreateSessionWithAuthLevelParams
- type CreateUserParams
- type DBTX
- type DeleteWebAuthnCredentialParams
- type InsertRecoveryCodeParams
- type InsertWebAuthnCredentialParams
- type MagicLink
- type OAuthAccountByProviderUserIDParams
- type OauthAccount
- type PasswordResetToken
- type Queries
- func (q *Queries) ConfirmTOTPSecret(ctx context.Context, arg ConfirmTOTPSecretParams) (int64, error)
- func (q *Queries) ConsumeMagicLink(ctx context.Context, tokenHash []byte) (MagicLink, error)
- func (q *Queries) ConsumePasswordResetToken(ctx context.Context, tokenHash []byte) (PasswordResetToken, error)
- func (q *Queries) ConsumeRecoveryCodeByID(ctx context.Context, arg ConsumeRecoveryCodeByIDParams) (int64, error)
- func (q *Queries) CreateMagicLink(ctx context.Context, arg CreateMagicLinkParams) error
- func (q *Queries) CreatePasswordResetToken(ctx context.Context, arg CreatePasswordResetTokenParams) error
- func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
- func (q *Queries) CreateSessionWithAuthLevel(ctx context.Context, arg CreateSessionWithAuthLevelParams) (Session, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeleteRecoveryCodesByUserID(ctx context.Context, userID pgtype.UUID) error
- func (q *Queries) DeleteTOTPSecret(ctx context.Context, userID pgtype.UUID) error
- func (q *Queries) DeleteWebAuthnCredential(ctx context.Context, arg DeleteWebAuthnCredentialParams) (int64, error)
- func (q *Queries) InsertRecoveryCode(ctx context.Context, arg InsertRecoveryCodeParams) error
- func (q *Queries) InsertWebAuthnCredential(ctx context.Context, arg InsertWebAuthnCredentialParams) (WebauthnCredential, error)
- func (q *Queries) MarkEmailVerified(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) OAuthAccountByProviderUserID(ctx context.Context, arg OAuthAccountByProviderUserIDParams) (OauthAccount, error)
- func (q *Queries) RecoveryCodesByUserID(ctx context.Context, userID pgtype.UUID) ([]TotpRecoveryCode, error)
- func (q *Queries) RevokeSession(ctx context.Context, id pgtype.UUID) error
- func (q *Queries) RevokeUserSessions(ctx context.Context, userID pgtype.UUID) error
- func (q *Queries) SessionByTokenHash(ctx context.Context, tokenHash []byte) (Session, error)
- func (q *Queries) SetUserPassword(ctx context.Context, arg SetUserPasswordParams) error
- func (q *Queries) TOTPSecretByUserID(ctx context.Context, userID pgtype.UUID) (TotpSecret, error)
- func (q *Queries) UpdateSessionAuthLevel(ctx context.Context, arg UpdateSessionAuthLevelParams) error
- func (q *Queries) UpdateWebAuthnSignCount(ctx context.Context, arg UpdateWebAuthnSignCountParams) (int64, error)
- func (q *Queries) UpsertOAuthAccount(ctx context.Context, arg UpsertOAuthAccountParams) (OauthAccount, error)
- func (q *Queries) UpsertPendingTOTPSecret(ctx context.Context, arg UpsertPendingTOTPSecretParams) error
- func (q *Queries) UserByEmail(ctx context.Context, email string) (User, error)
- func (q *Queries) UserByEmailWithPassword(ctx context.Context, email string) (UserByEmailWithPasswordRow, error)
- func (q *Queries) UserByID(ctx context.Context, id pgtype.UUID) (User, error)
- func (q *Queries) WebAuthnCredentialByCredentialID(ctx context.Context, credentialID []byte) (WebauthnCredential, error)
- func (q *Queries) WebAuthnCredentialsByUserID(ctx context.Context, userID pgtype.UUID) ([]WebauthnCredential, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Session
- type SetUserPasswordParams
- type TotpRecoveryCode
- type TotpSecret
- type UpdateSessionAuthLevelParams
- type UpdateWebAuthnSignCountParams
- type UpsertOAuthAccountParams
- type UpsertPendingTOTPSecretParams
- type User
- type UserByEmailWithPasswordRow
- type WebauthnCredential
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfirmTOTPSecretParams ¶ added in v0.5.0
type ConfirmTOTPSecretParams struct {
UserID pgtype.UUID
ConfirmedAt pgtype.Timestamptz
}
type ConsumeRecoveryCodeByIDParams ¶ added in v0.5.0
type ConsumeRecoveryCodeByIDParams struct {
ID pgtype.UUID
UsedAt pgtype.Timestamptz
}
type CreateMagicLinkParams ¶
type CreateMagicLinkParams struct {
ID pgtype.UUID
Email string
TokenHash []byte
ExpiresAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type CreatePasswordResetTokenParams ¶ added in v0.2.0
type CreatePasswordResetTokenParams struct {
ID pgtype.UUID
UserID pgtype.UUID
TokenHash []byte
ExpiresAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type CreateSessionParams ¶
type CreateSessionWithAuthLevelParams ¶ added in v0.5.0
type CreateUserParams ¶
type CreateUserParams struct {
ID pgtype.UUID
Email string
Name string
AvatarUrl string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type DeleteWebAuthnCredentialParams ¶ added in v0.5.0
type InsertRecoveryCodeParams ¶ added in v0.5.0
type InsertWebAuthnCredentialParams ¶ added in v0.5.0
type MagicLink ¶
type MagicLink struct {
ID pgtype.UUID
Email string
TokenHash []byte
ExpiresAt pgtype.Timestamptz
UsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type OAuthAccountByProviderUserIDParams ¶ added in v0.3.0
type OauthAccount ¶ added in v0.3.0
type OauthAccount struct {
ID pgtype.UUID
UserID pgtype.UUID
Provider string
ProviderUserID string
AccessTokenEnc []byte
RefreshTokenEnc []byte
ExpiresAt pgtype.Timestamptz
Scope string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type PasswordResetToken ¶ added in v0.2.0
type PasswordResetToken struct {
ID pgtype.UUID
UserID pgtype.UUID
TokenHash []byte
ExpiresAt pgtype.Timestamptz
UsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) ConfirmTOTPSecret ¶ added in v0.5.0
func (*Queries) ConsumeMagicLink ¶
func (*Queries) ConsumePasswordResetToken ¶ added in v0.2.0
func (*Queries) ConsumeRecoveryCodeByID ¶ added in v0.5.0
func (*Queries) CreateMagicLink ¶
func (q *Queries) CreateMagicLink(ctx context.Context, arg CreateMagicLinkParams) error
func (*Queries) CreatePasswordResetToken ¶ added in v0.2.0
func (q *Queries) CreatePasswordResetToken(ctx context.Context, arg CreatePasswordResetTokenParams) error
func (*Queries) CreateSession ¶
func (*Queries) CreateSessionWithAuthLevel ¶ added in v0.5.0
func (*Queries) CreateUser ¶
func (*Queries) DeleteRecoveryCodesByUserID ¶ added in v0.5.0
func (*Queries) DeleteTOTPSecret ¶ added in v0.5.0
func (*Queries) DeleteWebAuthnCredential ¶ added in v0.5.0
func (*Queries) InsertRecoveryCode ¶ added in v0.5.0
func (q *Queries) InsertRecoveryCode(ctx context.Context, arg InsertRecoveryCodeParams) error
func (*Queries) InsertWebAuthnCredential ¶ added in v0.5.0
func (q *Queries) InsertWebAuthnCredential(ctx context.Context, arg InsertWebAuthnCredentialParams) (WebauthnCredential, error)
func (*Queries) MarkEmailVerified ¶
func (*Queries) OAuthAccountByProviderUserID ¶ added in v0.3.0
func (q *Queries) OAuthAccountByProviderUserID(ctx context.Context, arg OAuthAccountByProviderUserIDParams) (OauthAccount, error)
func (*Queries) RecoveryCodesByUserID ¶ added in v0.5.0
func (*Queries) RevokeSession ¶
func (*Queries) RevokeUserSessions ¶
func (*Queries) SessionByTokenHash ¶
func (*Queries) SetUserPassword ¶ added in v0.2.0
func (q *Queries) SetUserPassword(ctx context.Context, arg SetUserPasswordParams) error
func (*Queries) TOTPSecretByUserID ¶ added in v0.5.0
func (*Queries) UpdateSessionAuthLevel ¶ added in v0.5.0
func (q *Queries) UpdateSessionAuthLevel(ctx context.Context, arg UpdateSessionAuthLevelParams) error
func (*Queries) UpdateWebAuthnSignCount ¶ added in v0.5.0
func (*Queries) UpsertOAuthAccount ¶ added in v0.3.0
func (q *Queries) UpsertOAuthAccount(ctx context.Context, arg UpsertOAuthAccountParams) (OauthAccount, error)
func (*Queries) UpsertPendingTOTPSecret ¶ added in v0.5.0
func (q *Queries) UpsertPendingTOTPSecret(ctx context.Context, arg UpsertPendingTOTPSecretParams) error
func (*Queries) UserByEmail ¶
func (*Queries) UserByEmailWithPassword ¶ added in v0.2.0
func (*Queries) WebAuthnCredentialByCredentialID ¶ added in v0.5.0
func (*Queries) WebAuthnCredentialsByUserID ¶ added in v0.5.0
type Session ¶
type Session struct {
ID pgtype.UUID
UserID pgtype.UUID
TokenHash []byte
UserAgent string
Ip *netip.Addr
CreatedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
RevokedAt pgtype.Timestamptz
AuthLevel string
}
type SetUserPasswordParams ¶ added in v0.2.0
type TotpRecoveryCode ¶ added in v0.5.0
type TotpRecoveryCode struct {
ID pgtype.UUID
UserID pgtype.UUID
CodeHash []byte
UsedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type TotpSecret ¶ added in v0.5.0
type TotpSecret struct {
UserID pgtype.UUID
SecretEnc []byte
ConfirmedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type UpdateSessionAuthLevelParams ¶ added in v0.5.0
type UpdateWebAuthnSignCountParams ¶ added in v0.5.0
type UpdateWebAuthnSignCountParams struct {
CredentialID []byte
SignCount int64
LastUsedAt pgtype.Timestamptz
}
type UpsertOAuthAccountParams ¶ added in v0.3.0
type UpsertOAuthAccountParams struct {
ID pgtype.UUID
UserID pgtype.UUID
Provider string
ProviderUserID string
AccessTokenEnc []byte
RefreshTokenEnc []byte
ExpiresAt pgtype.Timestamptz
Scope string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type UpsertPendingTOTPSecretParams ¶ added in v0.5.0
type UpsertPendingTOTPSecretParams struct {
UserID pgtype.UUID
SecretEnc []byte
CreatedAt pgtype.Timestamptz
}
type User ¶
type User struct {
ID pgtype.UUID
Email string
EmailVerifiedAt pgtype.Timestamptz
Name string
AvatarUrl string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
PasswordHash *string
}
type UserByEmailWithPasswordRow ¶ added in v0.2.0
type UserByEmailWithPasswordRow struct {
ID pgtype.UUID
Email string
EmailVerifiedAt pgtype.Timestamptz
Name string
AvatarUrl string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
PasswordHash string
}
Click to show internal directories.
Click to hide internal directories.