service

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: 5 Imported by: 0

Documentation

Overview

Package service is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleService

type ArticleService struct {
	Repo *repository.ArticleRepository
}

ArticleService

func NewArticleService

func NewArticleService(repo *repository.ArticleRepository) *ArticleService

init ArticleService

func (*ArticleService) All

func (_i *ArticleService) All() (articles []*response.Article, err error)

implement interface of ArticleService

func (*ArticleService) Destroy

func (_i *ArticleService) Destroy(id uint64) error

func (*ArticleService) Show

func (_i *ArticleService) Show(id uint64) (article *response.Article, err error)

func (*ArticleService) Store

func (_i *ArticleService) Store(req request.ArticleRequest) (err error)

func (*ArticleService) Update

func (_i *ArticleService) Update(id uint64, req request.ArticleRequest) (err error)

type IArticleService

type IArticleService interface {
	All() (articles []*response.Article, err error)
	Show(id uint64) (article *response.Article, err error)
	Store(req request.ArticleRequest) (err error)
	Update(id uint64, req request.ArticleRequest) (err error)
	Destroy(id uint64) error
}

define interface of IArticleService

type MockIArticleService

type MockIArticleService struct {
	// contains filtered or unexported fields
}

MockIArticleService is a mock of IArticleService interface.

func NewMockIArticleService

func NewMockIArticleService(ctrl *gomock.Controller) *MockIArticleService

NewMockIArticleService creates a new mock instance.

func (*MockIArticleService) All

func (m *MockIArticleService) All() ([]*response.Article, error)

All mocks base method.

func (*MockIArticleService) Destroy

func (m *MockIArticleService) Destroy(arg0 uint64) error

Destroy mocks base method.

func (*MockIArticleService) EXPECT

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

func (*MockIArticleService) Show

func (m *MockIArticleService) Show(arg0 uint64) (*response.Article, error)

Show mocks base method.

func (*MockIArticleService) Store

Store mocks base method.

func (*MockIArticleService) Update

func (m *MockIArticleService) Update(arg0 uint64, arg1 request.ArticleRequest) error

Update mocks base method.

type MockIArticleServiceMockRecorder

type MockIArticleServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockIArticleServiceMockRecorder is the mock recorder for MockIArticleService.

func (*MockIArticleServiceMockRecorder) All

All indicates an expected call of All.

func (*MockIArticleServiceMockRecorder) Destroy

func (mr *MockIArticleServiceMockRecorder) Destroy(arg0 interface{}) *gomock.Call

Destroy indicates an expected call of Destroy.

func (*MockIArticleServiceMockRecorder) Show

func (mr *MockIArticleServiceMockRecorder) Show(arg0 interface{}) *gomock.Call

Show indicates an expected call of Show.

func (*MockIArticleServiceMockRecorder) Store

func (mr *MockIArticleServiceMockRecorder) Store(arg0 interface{}) *gomock.Call

Store indicates an expected call of Store.

func (*MockIArticleServiceMockRecorder) Update

func (mr *MockIArticleServiceMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call

Update indicates an expected call of Update.

Jump to

Keyboard shortcuts

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