Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostHandler ¶
func NewPostHandler(app *fiber.App, p domain.PostUsecase)
NewPostHandler will initialize the post resource endpoint
Types ¶
type PostHandler ¶
type PostHandler struct {
PUsecase domain.PostUsecase
}
PostHandler represent the rest handler for post
func (*PostHandler) Delete ¶
func (ph *PostHandler) Delete(c *fiber.Ctx) error
Delete will delete post by given param
func (*PostHandler) FetchPost ¶
func (ph *PostHandler) FetchPost(c *fiber.Ctx) error
FetchPost will fetch the Post based on given params
func (*PostHandler) GetByID ¶
func (ph *PostHandler) GetByID(c *fiber.Ctx) error
GetByID will get post by given id
func (*PostHandler) Store ¶
func (ph *PostHandler) Store(c *fiber.Ctx) (err error)
Store will store the new Post base on given data
type ResponseError ¶
ResponseError represent the response error struct
Click to show internal directories.
Click to hide internal directories.