repos

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

func User

func User(a app.App) *UserRepository

func (*UserRepository) Create added in v0.1.22

func (r *UserRepository) Create(ctx context.Context, user *models.User) error

func (*UserRepository) ExistsByEmail added in v0.1.22

func (r *UserRepository) ExistsByEmail(ctx context.Context, email string) (bool, error)

func (*UserRepository) FindByEmail added in v0.1.22

func (r *UserRepository) FindByEmail(ctx context.Context, email string) (*models.User, error)

func (*UserRepository) FindByID added in v0.1.65

func (r *UserRepository) FindByID(ctx context.Context, id string) (*models.User, error)

FindByID resolves the identifier a credential carries back to a row.

auth works in string ids — a JWT subject is a string, and UserProvider.GetID returns one — and this is the single place that knows the column behind it is a uint64.

An id that does not parse is a user that does not exist, not a failure. A credential issued before the identifier format changed, or a fabricated one, lands here; reporting it as an error would make auth answer 503, so on the day of an upgrade a wave of stale tokens would read as an outage instead of asking one person to sign in again.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址