user

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(db *database.GormDB, logger logging.Logger) user.Repository

NewStore creates a new user store

Types

type Store

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

Store implements user.Repository interface

func (*Store) Count

func (s *Store) Count(ctx context.Context) (int, error)

Count returns the total number of users

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 string) 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 string) (*user.User, error)

GetByID retrieves a user by ID

func (*Store) GetByIDString

func (s *Store) GetByIDString(ctx context.Context, id string) (*user.User, error)

GetByIDString retrieves a user by ID string

func (*Store) List

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

List returns all users

func (*Store) ListPaginated

func (s *Store) ListPaginated(ctx context.Context, params common.PaginationParams) common.PaginationResult

ListPaginated returns a paginated list of users

func (*Store) Update

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

Update updates a user

Jump to

Keyboard shortcuts

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