Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func CreateUser(repo UserRepository) http.Handler
func GetUsers ¶
func GetUsers(repo UserRepository) http.Handler
func SetUserRoutes ¶
Types ¶
type InMemoryUserRepository ¶
type InMemoryUserRepository struct {
DataStore []User
}
func NewInMemoryUserRepo ¶
func NewInMemoryUserRepo() *InMemoryUserRepository
func (*InMemoryUserRepository) Create ¶
func (repo *InMemoryUserRepository) Create(user User) error
func (*InMemoryUserRepository) GetAll ¶
func (repo *InMemoryUserRepository) GetAll() []User
func (*InMemoryUserRepository) Validate ¶
func (repo *InMemoryUserRepository) Validate(user User) error
Click to show internal directories.
Click to hide internal directories.