Documentation ¶
Overview ¶
Package mock_service is a generated GoMock package.
Index ¶
- type ArticleService
- func (s *ArticleService) CreateArticle(request request.ArticleRequest) (*ent.Article, error)
- func (s *ArticleService) DeleteArticle(id int) error
- func (s *ArticleService) GetArticleByID(id int) (*ent.Article, error)
- func (s *ArticleService) GetArticles() ([]*ent.Article, error)
- func (s *ArticleService) UpdateArticle(id int, request request.ArticleRequest) (*ent.Article, error)
- type IArticleService
- type MockIArticleService
- func (m *MockIArticleService) CreateArticle(request request.ArticleRequest) (*ent.Article, error)
- func (m *MockIArticleService) DeleteArticle(id int) error
- func (m *MockIArticleService) EXPECT() *MockIArticleServiceMockRecorder
- func (m *MockIArticleService) GetArticleByID(id int) (*ent.Article, error)
- func (m *MockIArticleService) GetArticles() ([]*ent.Article, error)
- func (m *MockIArticleService) UpdateArticle(id int, request request.ArticleRequest) (*ent.Article, error)
- type MockIArticleServiceMockRecorder
- func (mr *MockIArticleServiceMockRecorder) CreateArticle(request interface{}) *gomock.Call
- func (mr *MockIArticleServiceMockRecorder) DeleteArticle(id interface{}) *gomock.Call
- func (mr *MockIArticleServiceMockRecorder) GetArticleByID(id interface{}) *gomock.Call
- func (mr *MockIArticleServiceMockRecorder) GetArticles() *gomock.Call
- func (mr *MockIArticleServiceMockRecorder) UpdateArticle(id, request interface{}) *gomock.Call
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 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 ¶
func (m *MockIArticleService) EXPECT() *MockIArticleServiceMockRecorder
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.