Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
PostService service.PostService
}
func NewHandler ¶
func (Handler) Delete ¶
swagger:route DELETE /posts/{id} posts reqPostDelete
Delete the post ¶
This endpoint will delete the post and return
Responses: 200: Post 400: HTTPError 404: HTTPError 500: HTTPError
func (Handler) Draft ¶
swagger:route POST /posts/{id}/draft posts reqPostDraft
Change post status to draft ¶
This endpoint will change the status of the post to draft and return the extended post structure
Responses: 200: Post 400: HTTPError 404: HTTPError 500: HTTPError
func (Handler) GetByFilter ¶
swagger:route GET /posts posts reqGetPostByFilter
Getting a list of posts by filter ¶
This endpoint returns a list of extended post structures
Responses: 200: PostList 500: HTTPError
func (Handler) GetByID ¶
swagger:route GET /posts/{id} posts reqGetPostByID
Getting a post by ID ¶
This endpoint returns the structure of the post
Responses: 200: Post 400: HTTPError 404: HTTPError 500: HTTPError
Click to show internal directories.
Click to hide internal directories.