controller

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 7 Imported by: 0

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 IArticleController interface {
	Index(c *fiber.Ctx) error
	Show(c *fiber.Ctx) error
}

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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIArticleController) Index

func (m *MockIArticleController) Index(arg0 *fiber.Ctx) error

Index mocks base method.

func (*MockIArticleController) Show

func (m *MockIArticleController) Show(arg0 *fiber.Ctx) error

Show mocks base method.

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.

Jump to

Keyboard shortcuts

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