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]