service

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package mock_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
}

func NewArticleService

func NewArticleService(repo *repository.ArticleRepository) *ArticleService

func (*ArticleService) CreateArticle

func (s *ArticleService) CreateArticle(request request.ArticleRequest) (*ent.Article, error)

func (*ArticleService) DeleteArticle

func (s *ArticleService) DeleteArticle(id int) error

func (*ArticleService) GetArticleByID

func (s *ArticleService) GetArticleByID(id int) (*ent.Article, error)

func (*ArticleService) GetArticles

func (s *ArticleService) GetArticles() ([]*ent.Article, error)

func (*ArticleService) UpdateArticle

func (s *ArticleService) UpdateArticle(id int, request request.ArticleRequest) (*ent.Article, error)

type IArticleService

type IArticleService interface {
	GetArticles() ([]*ent.Article, error)
	GetArticleByID(id int) (*ent.Article, error)
	CreateArticle(request request.ArticleRequest) (*ent.Article, error)
	UpdateArticle(id int, request request.ArticleRequest) (*ent.Article, error)
	DeleteArticle(id int) error
}

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) CreateArticle

func (m *MockIArticleService) CreateArticle(request request.ArticleRequest) (*ent.Article, error)

CreateArticle mocks base method.

func (*MockIArticleService) DeleteArticle

func (m *MockIArticleService) DeleteArticle(id int) error

DeleteArticle mocks base method.

func (*MockIArticleService) EXPECT

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

func (*MockIArticleService) GetArticleByID

func (m *MockIArticleService) GetArticleByID(id int) (*ent.Article, error)

GetArticleByID mocks base method.

func (*MockIArticleService) GetArticles

func (m *MockIArticleService) GetArticles() ([]*ent.Article, error)

GetArticles mocks base method.

func (*MockIArticleService) UpdateArticle

func (m *MockIArticleService) UpdateArticle(id int, request request.ArticleRequest) (*ent.Article, error)

UpdateArticle mocks base method.

type MockIArticleServiceMockRecorder

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

MockIArticleServiceMockRecorder is the mock recorder for MockIArticleService.

func (*MockIArticleServiceMockRecorder) CreateArticle

func (mr *MockIArticleServiceMockRecorder) CreateArticle(request interface{}) *gomock.Call

CreateArticle indicates an expected call of CreateArticle.

func (*MockIArticleServiceMockRecorder) DeleteArticle

func (mr *MockIArticleServiceMockRecorder) DeleteArticle(id interface{}) *gomock.Call

DeleteArticle indicates an expected call of DeleteArticle.

func (*MockIArticleServiceMockRecorder) GetArticleByID

func (mr *MockIArticleServiceMockRecorder) GetArticleByID(id interface{}) *gomock.Call

GetArticleByID indicates an expected call of GetArticleByID.

func (*MockIArticleServiceMockRecorder) GetArticles

func (mr *MockIArticleServiceMockRecorder) GetArticles() *gomock.Call

GetArticles indicates an expected call of GetArticles.

func (*MockIArticleServiceMockRecorder) UpdateArticle

func (mr *MockIArticleServiceMockRecorder) UpdateArticle(id, request interface{}) *gomock.Call

UpdateArticle indicates an expected call of UpdateArticle.

Jump to

Keyboard shortcuts

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