repository

package
v0.0.0-...-5e1236a Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 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 UserRepo

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

func NewUserRepo

func NewUserRepo(pg *postgres.Postgres, logger *logger.Logger) *UserRepo

func (*UserRepo) ChangeUserRole

func (repo *UserRepo) ChangeUserRole(ctx context.Context, userID uuid.UUID, role model.UserRoles) error

func (*UserRepo) CreateUser

func (repo *UserRepo) CreateUser(ctx context.Context, user *model.User) error

func (*UserRepo) DeleteUser

func (repo *UserRepo) DeleteUser(ctx context.Context, userID uuid.UUID) error

func (*UserRepo) GetUser

func (repo *UserRepo) GetUser(ctx context.Context, userID uuid.UUID) (*model.User, error)

func (*UserRepo) GetUserByEmail

func (repo *UserRepo) GetUserByEmail(ctx context.Context, email string) (*model.User, error)

func (*UserRepo) GetUsers

func (repo *UserRepo) GetUsers(ctx context.Context) ([]*model.User, error)

func (*UserRepo) UpdateUser

func (repo *UserRepo) UpdateUser(ctx context.Context, user *model.User) error

Jump to

Keyboard shortcuts

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