Documentation
¶
Index ¶
- type CreateMagicLinkParams
- type CreatePasswordResetTokenParams
- type CreateSessionParams
- type CreateUserParams
- type DBTX
- type MagicLink
- type OAuthAccountByProviderUserIDParams
- type OauthAccount
- type PasswordResetToken
- type Queries
- 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) 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) CreateUser(ctx context.Context, arg CreateUserParams) (User, 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) 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) UpsertOAuthAccount(ctx context.Context, arg UpsertOAuthAccountParams) (OauthAccount, 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) WithTx(tx pgx.Tx) *Queries
- type Session
- type SetUserPasswordParams
- type UpsertOAuthAccountParams
- type User
- type UserByEmailWithPasswordRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 CreateUserParams ¶
type CreateUserParams struct {
ID pgtype.UUID
Email string
Name string
AvatarUrl string
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
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) ConsumeMagicLink ¶
func (*Queries) ConsumePasswordResetToken ¶ added in v0.2.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) CreateUser ¶
func (*Queries) MarkEmailVerified ¶
func (*Queries) OAuthAccountByProviderUserID ¶ added in v0.3.0
func (q *Queries) OAuthAccountByProviderUserID(ctx context.Context, arg OAuthAccountByProviderUserIDParams) (OauthAccount, error)
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) UpsertOAuthAccount ¶ added in v0.3.0
func (q *Queries) UpsertOAuthAccount(ctx context.Context, arg UpsertOAuthAccountParams) (OauthAccount, error)
func (*Queries) UserByEmail ¶
func (*Queries) UserByEmailWithPassword ¶ added in v0.2.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
}
type SetUserPasswordParams ¶ added in v0.2.0
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 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.