http

package
v0.0.0-...-2f27ceb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

func NewAuthHandler(cfg *config.Config, authUsecase auth.Usecase, log logger.Logger) auth.DeliveryHandlers

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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL