http

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthorHandler

func NewAuthorHandler(e *echo.Echo, middleware *middleware.Middleware, authorUC usecase.AuthorUsecase)

NewAuthorHandler will initialize the authors/ resources endpoint

Types

type AuthorHandler

type AuthorHandler struct {
	AuthorUC usecase.AuthorUsecase
}

func (*AuthorHandler) Create

func (h *AuthorHandler) Create(c echo.Context) error

Create godoc @Summary Create Author @Description Create Author @Tags Authors @Accept json @Produce json @Param author body request.CreateAuthorReq true "Author to create" @Success 200 @Router /api/v1/authors [post]

func (*AuthorHandler) Delete

func (h *AuthorHandler) Delete(c echo.Context) error

Delete godoc @Summary Delete Author @Description Delete Author @Tags Authors @Accept json @Produce json @Param id path string true "author id" @Success 200 @Router /api/v1/authors/{id} [delete]

func (*AuthorHandler) Fetch

func (h *AuthorHandler) Fetch(c echo.Context) error

Fetch godoc @Summary Fetch Author @Description Fetch Author @Tags Authors @Accept json @Produce json @Success 200 @Router /api/v1/authors [get]

func (*AuthorHandler) GetByID

func (h *AuthorHandler) GetByID(c echo.Context) error

GetByID godoc @Summary Get Author @Description Get Author @Tags Authors @Accept json @Produce json @Param id path string true "author id" @Success 200 @Router /api/v1/authors/{id} [get]

func (*AuthorHandler) Update

func (h *AuthorHandler) Update(c echo.Context) error

Update godoc @Summary Update Author @Description Update Author @Tags Authors @Accept json @Produce json @Param id path string true "author id" @Param author body request.UpdateAuthorReq true "Author to update" @Success 200 @Router /api/v1/authors/{id} [put]

Jump to

Keyboard shortcuts

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