user

package
v0.0.0-...-d4bccd0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrNotFound

type ErrNotFound struct{}

func (*ErrNotFound) Error

func (m *ErrNotFound) Error() string

type UserRepository

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

func (*UserRepository) AddUser

func (ur *UserRepository) AddUser(user _entities.User) (_entities.User, error)

func (*UserRepository) Delete

func (ur *UserRepository) Delete(id int) error

func (*UserRepository) GetAll

func (ur *UserRepository) GetAll() ([]_entities.User, error)

func (*UserRepository) GetByEmail

func (ur *UserRepository) GetByEmail(email string) (_entities.User, error)

func (*UserRepository) GetByID

func (ur *UserRepository) GetByID(id int) (_entities.User, error)

func (*UserRepository) Update

func (ur *UserRepository) Update(user _entities.User) (_entities.User, error)

type UserRepositoryInterface

type UserRepositoryInterface interface {
	GetAll() ([]_entities.User, error)
	GetByID(id int) (_entities.User, error)
	AddUser(user _entities.User) (_entities.User, error)
	GetByEmail(email string) (_entities.User, error)
	Update(user _entities.User) (_entities.User, error)
	Delete(id int) error
}

func NewUserRepository

func NewUserRepository(db *gorm.DB) UserRepositoryInterface

Jump to

Keyboard shortcuts

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