memory

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func New

func New() *Store
func (s *Store) ConsumeMagicLink(_ context.Context, hash []byte) (*theauth.MagicLink, error)

func (*Store) ConsumePasswordResetToken added in v0.2.0

func (s *Store) ConsumePasswordResetToken(_ context.Context, hash []byte) (*theauth.PasswordResetToken, error)
func (s *Store) CreateMagicLink(_ context.Context, ml theauth.MagicLink) error

func (*Store) CreatePasswordResetToken added in v0.2.0

func (s *Store) CreatePasswordResetToken(_ context.Context, t theauth.PasswordResetToken) error

func (*Store) CreateSession

func (s *Store) CreateSession(_ context.Context, sess theauth.Session) (theauth.Session, error)

func (*Store) CreateUser

func (s *Store) CreateUser(_ context.Context, u theauth.User) (theauth.User, error)

func (*Store) MarkEmailVerified

func (s *Store) MarkEmailVerified(_ context.Context, userID theauth.ULID) error

func (*Store) OAuthAccountByProviderUserID added in v0.3.0

func (s *Store) OAuthAccountByProviderUserID(_ context.Context, provider, providerUserID string) (*theauth.OAuthAccount, error)

func (*Store) RevokeSession

func (s *Store) RevokeSession(_ context.Context, id theauth.ULID) error

func (*Store) RevokeUserSessions

func (s *Store) RevokeUserSessions(_ context.Context, userID theauth.ULID) error

func (*Store) SessionByTokenHash

func (s *Store) SessionByTokenHash(_ context.Context, hash []byte) (*theauth.Session, error)

func (*Store) SetUserPassword added in v0.2.0

func (s *Store) SetUserPassword(_ context.Context, userID theauth.ULID, passwordHash string) error

func (*Store) UpsertOAuthAccount added in v0.3.0

func (s *Store) UpsertOAuthAccount(_ context.Context, a theauth.OAuthAccount) (theauth.OAuthAccount, error)

UpsertOAuthAccount mirrors the Postgres ON CONFLICT (provider, provider_user_id) DO UPDATE behavior: if a row with the same (provider, provider_user_id) already exists, its mutable fields are refreshed in place (keeping the original ID + CreatedAt). Otherwise the supplied row is inserted as-is.

func (*Store) UserByEmail

func (s *Store) UserByEmail(_ context.Context, email string) (*theauth.User, error)

func (*Store) UserByEmailWithPassword added in v0.2.0

func (s *Store) UserByEmailWithPassword(_ context.Context, email string) (*theauth.User, string, error)

func (*Store) UserByID

func (s *Store) UserByID(_ context.Context, id theauth.ULID) (*theauth.User, error)

Jump to

Keyboard shortcuts

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