repository

package
v0.0.0-...-3beaeaf Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserEmailExists = dao.ErrUserEmailExists
	ErrUserNotFound    = dao.ErrUserNotFound
)

Functions

This section is empty.

Types

type UserDAO

type UserDAO interface {
	Insert(ctx context.Context, user dao.User) (dao.User, error)
	FindByID(ctx context.Context, id uint) (dao.User, error)
	FindByEmail(ctx context.Context, email string) (dao.User, error)
}

type UserRepository

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

func NewUserRepository

func NewUserRepository(dao UserDAO) *UserRepository

func (*UserRepository) Create

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

func (*UserRepository) FindByEmail

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

func (*UserRepository) FindByID

func (r *UserRepository) FindByID(ctx context.Context, id uint) (domain.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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