Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserRepository ¶
type UserRepository struct { Users []User `json:"data"` // contains filtered or unexported fields }
func NewUserRepoistory ¶
func NewUserRepoistory() *UserRepository
func (*UserRepository) DeleteOne ¶
func (u *UserRepository) DeleteOne(id int) error
func (*UserRepository) FindAll ¶
func (u *UserRepository) FindAll() ([]User, error)
func (*UserRepository) Save ¶
func (u *UserRepository) Save(user *User) error
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(repo *UserRepository) *UserService
func (*UserService) ServeHTTP ¶
func (u *UserService) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.