Documentation ¶
Index ¶
- func NewUserHttpHandler(r *mux.Router, us user.Usecase)
- type HTTPUserHandler
- func (u *HTTPUserHandler) Delete(w http.ResponseWriter, r *http.Request)
- func (u *HTTPUserHandler) GetAllUsersLength(w http.ResponseWriter, r *http.Request)
- func (u *HTTPUserHandler) GetByCookieID(w http.ResponseWriter, r *http.Request)
- func (u *HTTPUserHandler) GetByID(w http.ResponseWriter, r *http.Request)
- func (u *HTTPUserHandler) Store(w http.ResponseWriter, r *http.Request)
- func (u *HTTPUserHandler) Update(w http.ResponseWriter, r *http.Request)
- type ResponseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPUserHandler ¶
HTTPUserHandler represent the httphandler for user
func (*HTTPUserHandler) Delete ¶
func (u *HTTPUserHandler) Delete(w http.ResponseWriter, r *http.Request)
Delete user where user id = cookie user id
func (*HTTPUserHandler) GetAllUsersLength ¶
func (u *HTTPUserHandler) GetAllUsersLength(w http.ResponseWriter, r *http.Request)
HELPER FUNCTIONS
func (*HTTPUserHandler) GetByCookieID ¶
func (u *HTTPUserHandler) GetByCookieID(w http.ResponseWriter, r *http.Request)
GetByCookieID only for logged in users
func (*HTTPUserHandler) GetByID ¶
func (u *HTTPUserHandler) GetByID(w http.ResponseWriter, r *http.Request)
GetByID without password and email
func (*HTTPUserHandler) Store ¶
func (u *HTTPUserHandler) Store(w http.ResponseWriter, r *http.Request)
Store to register new user
func (*HTTPUserHandler) Update ¶
func (u *HTTPUserHandler) Update(w http.ResponseWriter, r *http.Request)
Update user where user id = cookie user id
type ResponseError ¶
type ResponseError struct {
Message string `json:"message"`
}
ResponseError represent the reseponse error struct
Click to show internal directories.
Click to hide internal directories.