Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound Item not found ErrNotFound = errors.New("not found") // ErrInvalid Invalid request ErrInvalid = errors.New("invalid") // ErrExists Item already exists ErrExists = errors.New("exists") // ErrNoAccess Access to item not allowed ErrNoAccess = errors.New("no access") // ErrInternal Internal fatal error ErrInternal = errors.New("internal error") )
Functions ¶
Types ¶
type Error ¶
Error holds the error code and additional messages.
type UserDBService ¶
type UserDBService interface { GetByEmail(email string) (schema.User, error) GetAll() ([]schema.User, error) Insert(email, fullname string) (schema.User, error) Update(email, fullname string) (schema.User, error) }
The UserDBService provides a way for tracking and storing users. It provides no persistence guarantees, though specific implementations might provide persistence.
type UsersService ¶
type UsersService interface { CreateUser(email, fullname string) (schema.User, error) GetAll() ([]schema.User, error) GetUserByEmail(email string) (schema.User, error) UpdateUserByEmail(email, fullname string) (schema.User, error) }
Objects implements the UsersService provide an technology independent way of managing the applications users.
Click to show internal directories.
Click to hide internal directories.