user

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUserNotFound is returned when a user cannot be found
	ErrUserNotFound = errors.New("user not found")
)

Functions

func NewStore

func NewStore(db *database.Database, logger logging.Logger) user.Store

NewStore creates a new user store

Types

type Store

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

Store implements user.Store interface

func (*Store) Create

func (s *Store) Create(ctx context.Context, u *user.User) error

Create stores a new user

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id uint) error

Delete removes a user by ID

func (*Store) GetByEmail

func (s *Store) GetByEmail(ctx context.Context, email string) (*user.User, error)

GetByEmail retrieves a user by email

func (*Store) GetByID

func (s *Store) GetByID(ctx context.Context, id uint) (*user.User, error)

GetByID retrieves a user by ID

func (*Store) List

func (s *Store) List(ctx context.Context) ([]user.User, error)

List returns all users

func (*Store) Update

func (s *Store) Update(ctx context.Context, u *user.User) error

Update updates an existing user

Jump to

Keyboard shortcuts

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