Documentation ¶
Index ¶
- func AuthRoutes(authGroup *echo.Group, h auth.DeliveryHandlers, au auth.Usecase, ...)
- func NewAuthHandler(cfg *config.Config, authUsecase auth.Usecase, log logger.Logger) auth.DeliveryHandlers
- type AuthHandler
- func (h *AuthHandler) CatchMonster() echo.HandlerFunc
- func (h *AuthHandler) DeleteUser() echo.HandlerFunc
- func (h *AuthHandler) DetailUser() echo.HandlerFunc
- func (h *AuthHandler) ListUser() echo.HandlerFunc
- func (h *AuthHandler) Login() echo.HandlerFunc
- func (h *AuthHandler) Me() echo.HandlerFunc
- func (h *AuthHandler) Register() echo.HandlerFunc
- func (h *AuthHandler) UpdateUser() echo.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthRoutes ¶
func AuthRoutes(authGroup *echo.Group, h auth.DeliveryHandlers, au auth.Usecase, cfg *config.Config, mw *middleware.MiddlewareManager)
func NewAuthHandler ¶
Types ¶
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func (*AuthHandler) CatchMonster ¶
func (h *AuthHandler) CatchMonster() echo.HandlerFunc
CatchMonster godoc @Summary Catch monster @Description capture a monster @Tags Auth @Accept json @Param id path int true "id" @Produce json @Success 200 {object} domain.UserMonsterBody @Router /auth/{id} [post]
func (*AuthHandler) DeleteUser ¶
func (h *AuthHandler) DeleteUser() echo.HandlerFunc
DeleteUser godoc @Summary Delete user @Description delete existing user @Tags Auth @Accept json @Param id path int true "id" @Produce json @Success 200 {string} string "ok" @Failure 500 {object} httpErr.RestError @Router /auth/{id} [delete]
func (*AuthHandler) DetailUser ¶
func (h *AuthHandler) DetailUser() echo.HandlerFunc
DetailUser godoc @Summary Detail user @Description get user detail @Tags Auth @Accept json @Param id path int true "id" @Produce json @Success 200 {object} domain.User @Router /auth/{id} [get]
func (*AuthHandler) ListUser ¶
func (h *AuthHandler) ListUser() echo.HandlerFunc
ListUser godoc @Summary Get user list @Description list of users @Tags Auth @Accept json @Produce json @Success 200 {object} domain.User @Router /auth/user/list [get]
func (*AuthHandler) Login ¶
func (h *AuthHandler) Login() echo.HandlerFunc
Login godoc @Summary user authentication @Description returns user and token @Tags Auth @Accept json @Produce json @Success 200 {object} domain.User @Router /auth [post]
func (*AuthHandler) Me ¶
func (h *AuthHandler) Me() echo.HandlerFunc
Me godoc @Summary Get user by id @Description Get current user by id @Tags Auth @Accept json @Produce json @Success 200 {object} domain.User @Failure 500 {object} httpErr.RestError @Router /auth/me [get]
func (*AuthHandler) Register ¶
func (h *AuthHandler) Register() echo.HandlerFunc
Register godoc @Summary Register new user @Description register new user, returns user and token @Tags Auth @Accept json @Produce json @Success 201 {object} domain.User @Router /auth/new [post]
func (*AuthHandler) UpdateUser ¶
func (h *AuthHandler) UpdateUser() echo.HandlerFunc
UpdateUser godoc @Summary Update user @Description update existing user @Tags Auth @Accept json @Param id path int true "id" @Produce json @Success 200 {object} domain.User @Router /auth/{id} [put]