Documentation ¶
Index ¶
- Variables
- type UserRepository
- func (u *UserRepository) Create(user *domain.User) (uint, error)
- func (u *UserRepository) Delete(ID uint) error
- func (u *UserRepository) GetAll() ([]*domain.User, error)
- func (u *UserRepository) GetByID(ID uint) (*domain.User, error)
- func (u *UserRepository) GetByUsername(username string) (*domain.User, error)
- func (u *UserRepository) Update(user *domain.User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ProviderProductionSet provides a UserRepository for Production. ProviderProductionSet = wire.NewSet(Provide, wire.Bind(new(domain.UserRepository), new(*UserRepository))) )
Functions ¶
This section is empty.
Types ¶
type UserRepository ¶
UserRepository is a repository that holds information about Users backed by a database.
func Provide ¶
func Provide(manager *database.Manager) *UserRepository
Provide provides provides a UserRepository configured with the given Manager.
func (*UserRepository) Create ¶
func (u *UserRepository) Create(user *domain.User) (uint, error)
Create creates the given user in the database.
func (*UserRepository) Delete ¶
func (u *UserRepository) Delete(ID uint) error
Delete deletes the User with the given ID.
func (*UserRepository) GetAll ¶
func (u *UserRepository) GetAll() ([]*domain.User, error)
GetAll gets all of the users in the database.
func (*UserRepository) GetByID ¶
func (u *UserRepository) GetByID(ID uint) (*domain.User, error)
GetByID retrieves a User based on the given ID.
func (*UserRepository) GetByUsername ¶
func (u *UserRepository) GetByUsername(username string) (*domain.User, error)
GetByUsername retrieves a User based on the given username.
Click to show internal directories.
Click to hide internal directories.