http

package
v0.0.0-...-ae1130f Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 11 Imported by: 0

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 Response

type Response struct {
	Message string `json:"message"`
}

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]

Jump to

Keyboard shortcuts

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