Documentation ¶
Index ¶
- type Handler
- func (h *Handler) AliveCheck(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateUser(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetUser(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Serve() error
- func (h *Handler) UpdateUser(w http.ResponseWriter, r *http.Request)
- type Response
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { Router chi.Router Service UserService Server *http.Server }
Handler - stores pointer to our user service
func NewHandler ¶
func NewHandler(service UserService) *Handler
NewHandler - returns a pointer to a Handler
func (*Handler) AliveCheck ¶
func (h *Handler) AliveCheck(w http.ResponseWriter, r *http.Request)
func (*Handler) CreateUser ¶
func (h *Handler) CreateUser(w http.ResponseWriter, r *http.Request)
func (*Handler) DeleteUser ¶
func (h *Handler) DeleteUser(w http.ResponseWriter, r *http.Request)
TODO - needs to be fixed
func (*Handler) UpdateUser ¶
func (h *Handler) UpdateUser(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.