Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserNotFound means the user name was not found in the repo ErrUserNotFound = errors.New("user not found") // ErrUserExists is returned if a create is called on an existing user ErrUserExists = errors.New("user with that name exists") )
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { GetAllUsers() ([]*model.User, error) GetUser(name string) (*model.User, error) SaveUser(u *model.User) error DeleteUser(name string) error DeleteAllUsers() error }
Repository provides an interface for how to store and retrieve User objects from a persistence engine.
Click to show internal directories.
Click to hide internal directories.