Documentation ¶
Overview ¶
Package controller is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleController ¶
type ArticleController struct {
// contains filtered or unexported fields
}
func NewArticleController ¶
func NewArticleController(articleService *service.ArticleService) *ArticleController
func (*ArticleController) Delete ¶
func (_i *ArticleController) Delete(c *fiber.Ctx) error
delete article @Summary delete article @Description API for delete article @Tags Task @Security Bearer @Param id path int true "Article ID" @Success 200 {object} response.Response @Failure 401 {object} response.Response @Failure 404 {object} response.Response @Failure 422 {object} response.Response @Failure 500 {object} response.Response @Router /articles/:id [delete]
func (*ArticleController) Index ¶
func (_i *ArticleController) Index(c *fiber.Ctx) error
get all articles @Summary Get all articles @Description API for getting all articles @Tags Task @Security Bearer @Success 200 {object} response.Response @Failure 401 {object} response.Response @Failure 404 {object} response.Response @Failure 422 {object} response.Response @Failure 500 {object} response.Response @Router /articles [get]
func (*ArticleController) Show ¶
func (_i *ArticleController) Show(c *fiber.Ctx) error
get one article @Summary Get one article @Description API for getting one article @Tags Task @Security Bearer @Param id path int true "Article ID" @Success 200 {object} response.Response @Failure 401 {object} response.Response @Failure 404 {object} response.Response @Failure 422 {object} response.Response @Failure 500 {object} response.Response @Router /articles/:id [get]
func (*ArticleController) Store ¶
func (_i *ArticleController) Store(c *fiber.Ctx) error
create article @Summary Create article @Description API for create article @Tags Task @Security Bearer @Body request.ArticleRequest @Success 200 {object} response.Response @Failure 401 {object} response.Response @Failure 404 {object} response.Response @Failure 422 {object} response.Response @Failure 500 {object} response.Response @Router /articles [post]
func (*ArticleController) Update ¶
func (_i *ArticleController) Update(c *fiber.Ctx) error
update article @Summary update article @Description API for update article @Tags Task @Security Bearer @Body request.ArticleRequest @Param id path int true "Article ID" @Success 200 {object} response.Response @Failure 401 {object} response.Response @Failure 404 {object} response.Response @Failure 422 {object} response.Response @Failure 500 {object} response.Response @Router /articles/:id [put]
type Controller ¶
type Controller struct {
Article *ArticleController
}
func NewController ¶
func NewController(articleService *service.ArticleService) *Controller
type IArticleController ¶
type MockIArticleController ¶
type MockIArticleController struct {
// contains filtered or unexported fields
}
MockIArticleController is a mock of IArticleController interface.
func NewMockIArticleController ¶
func NewMockIArticleController(ctrl *gomock.Controller) *MockIArticleController
NewMockIArticleController creates a new mock instance.
func (*MockIArticleController) EXPECT ¶
func (m *MockIArticleController) EXPECT() *MockIArticleControllerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockIArticleControllerMockRecorder ¶
type MockIArticleControllerMockRecorder struct {
// contains filtered or unexported fields
}
MockIArticleControllerMockRecorder is the mock recorder for MockIArticleController.
func (*MockIArticleControllerMockRecorder) Index ¶
func (mr *MockIArticleControllerMockRecorder) Index(arg0 interface{}) *gomock.Call
Index indicates an expected call of Index.
func (*MockIArticleControllerMockRecorder) Show ¶
func (mr *MockIArticleControllerMockRecorder) Show(arg0 interface{}) *gomock.Call
Show indicates an expected call of Show.