Documentation
¶
Index ¶
- func NewRouter() *chi.Mux
- func SetupRoutes(router *chi.Mux)
- type CreateUserProfileRequest
- type CreateUserProfileResponse
- type CreateUserRequest
- type CreateUserResponse
- type GetUserProfileRequest
- type GetUserRequest
- type UpdateUserProfileRequest
- type UserAPI
- func (u *UserAPI) CreateUser(w http.ResponseWriter, r *http.Request)
- func (u *UserAPI) CreateUserProfile(w http.ResponseWriter, r *http.Request)
- func (u *UserAPI) GetUser(w http.ResponseWriter, r *http.Request)
- func (u *UserAPI) GetUserProfile(w http.ResponseWriter, r *http.Request)
- func (u *UserAPI) UpdateUserProfile(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupRoutes ¶
Types ¶
type CreateUserProfileResponse ¶
type CreateUserProfileResponse struct {
ID int `json:"id"`
}
type CreateUserRequest ¶
type CreateUserResponse ¶
type CreateUserResponse struct {
ID int `json:"id"`
}
type GetUserProfileRequest ¶
type GetUserProfileRequest struct {
UserID int `json:"user_id"`
}
type GetUserRequest ¶
type GetUserRequest struct {
Email string `json:"email"`
}
type UserAPI ¶
type UserAPI struct {
// contains filtered or unexported fields
}
func NewUserAPI ¶
func NewUserAPI(service *service.UserService) *UserAPI
NewUserAPI returns a new user API given an instance of a user service.
func (*UserAPI) CreateUser ¶
func (u *UserAPI) CreateUser(w http.ResponseWriter, r *http.Request)
func (*UserAPI) CreateUserProfile ¶
func (u *UserAPI) CreateUserProfile(w http.ResponseWriter, r *http.Request)
func (*UserAPI) GetUserProfile ¶
func (u *UserAPI) GetUserProfile(w http.ResponseWriter, r *http.Request)
func (*UserAPI) UpdateUserProfile ¶
func (u *UserAPI) UpdateUserProfile(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.