Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserNotFound = errors.New("user could not be found")
)
Errors that can be returned from the repo.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository is used to store and fetch users from a database.
func NewRepository ¶
func NewRepository(dbURL string, logger *logrus.Logger) (*Repository, error)
NewRepository creates a new, database-backed repository.
func (Repository) Close ¶
func (r Repository) Close() error
Close releases the resources of the Repository.
func (Repository) CreateUser ¶
CreateUser creates a new user in the repository.
Click to show internal directories.
Click to hide internal directories.