http

package
v0.0.0-...-53a7344 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewArticleHandler

func NewArticleHandler(e *echo.Echo, us article.Usecase)

NewArticleHandler will initialize the articles/ resources endpoint

Types

type ArticleHandler

type ArticleHandler struct {
	AUsecase article.Usecase
}

ArticleHandler represent the httphandler for article

func (*ArticleHandler) Delete

func (a *ArticleHandler) Delete(c echo.Context) error

Delete will delete article by given param

func (*ArticleHandler) FetchArticle

func (a *ArticleHandler) FetchArticle(c echo.Context) error

FetchArticle will fetch the article based on given params

func (*ArticleHandler) GetByID

func (a *ArticleHandler) GetByID(c echo.Context) error

GetByID will get article by given id

func (*ArticleHandler) Store

func (a *ArticleHandler) Store(c echo.Context) error

Store will store the article by given request body

type ResponseError

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

ResponseError represent the reseponse error struct

Jump to

Keyboard shortcuts

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