Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthCheck ¶
func HealthCheck(c echo.Context) error
func NewUserHandler ¶
func NewUserHandler(e *echo.Echo, uc domain.UserUseCase)
Types ¶
type UserHandler ¶
type UserHandler struct {
AUsecase domain.UserUseCase
}
func (*UserHandler) CreateUser ¶
func (u *UserHandler) CreateUser(c echo.Context) error
CreateUser godoc @Summary Create User. @Description Create User. @Tags Users @Accept json @Param Body body entity.Send_User true "The body to create a user" @Produce json @Success 200 {object} entity.Users @Router /v1/users/create [post]
func (*UserHandler) DeleteUser ¶
func (u *UserHandler) DeleteUser(c echo.Context) error
DeleteUser godoc @Summary Delete User. @Description Delete User Data. @Tags Users @Accept json @Param id path integer true "User ID" @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Produce json @Success 200 "Usuário deletado com sucesso!" @Router /v1/users/delete/{id} [delete]
func (*UserHandler) GetAllUsers ¶
func (u *UserHandler) GetAllUsers(c echo.Context) error
GetAllUsers godoc @Summary Show all users. @Description Get all users list. @Tags Users @Accept */* @Produce json @Success 200 {object} entity.Users @Router /v1/users [get]
func (*UserHandler) GetUserById ¶
func (u *UserHandler) GetUserById(c echo.Context) error
GetUser godoc @Summary Show an user. @Description Get user. @Tags Users @Param id path integer true "User ID" @Accept */* @Produce json @Success 200 {object} entity.Users @Router /v1/users/{id} [get]
func (*UserHandler) UpdateUser ¶
func (u *UserHandler) UpdateUser(c echo.Context) error
UpdateUser godoc @Summary Update User. @Description Update User Data. @Tags Users @Accept json @Param id path integer true "User ID" @Param Authorization header string true "Insert your access token" default(Bearer <Add access token here>) @Param Body body entity.Send_User true "The body to update a user" @Produce json @Success 200 {object} entity.Send_User @Router /v1/users/update/{id} [put]