http

package
v1.0.1-0...-a8ddb80 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewArticleHandler

func NewArticleHandler(e *echo.Echo, us domain.ArticleUsecase)

NewArticleHandler will initialize the articles/ resources endpoint

Types

type ArticleHandler

type ArticleHandler struct {
	AUsecase domain.ArticleUsecase
}

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) (err 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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