Documentation ¶
Overview ¶
Package repository provides methods to interact with the database
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorBadID error = errors.New("bad id")
ErrorBadID custom error
Functions ¶
This section is empty.
Types ¶
type UsersRepository ¶
type UsersRepository interface { Save(user *models.User) error GetById(id uint) (*models.User, error) GetByEmail(email string) (*models.User, error) GetAll() ([]*models.User, error) Update(user *models.User) error Delete(id uint) error }
UsersRepository interface defines methods for interacting with the database
func NewUsersRepository ¶
func NewUsersRepository(conn db.Connection) UsersRepository
NewUsersRepository takes a db.Connection and returns a UsersRepository
Click to show internal directories.
Click to hide internal directories.