Documentation ¶
Overview ¶
Package mock_repository is a generated GoMock package.
Index ¶
- type ArticleRepository
- func (s *ArticleRepository) CreateArticle(request request.ArticleRequest) (*ent.Article, error)
- func (s *ArticleRepository) DeleteArticle(id int) error
- func (s *ArticleRepository) GetArticleByID(id int) (*ent.Article, error)
- func (s *ArticleRepository) GetArticles() ([]*ent.Article, error)
- func (s *ArticleRepository) UpdateArticle(id int, request request.ArticleRequest) (*ent.Article, error)
- type IArticleRepository
- type MockIArticleRepository
- func (m *MockIArticleRepository) CreateArticle(request request.ArticleRequest) (*ent.Article, error)
- func (m *MockIArticleRepository) DeleteArticle(id int) error
- func (m *MockIArticleRepository) EXPECT() *MockIArticleRepositoryMockRecorder
- func (m *MockIArticleRepository) GetArticleByID(id int) (*ent.Article, error)
- func (m *MockIArticleRepository) GetArticles() ([]*ent.Article, error)
- func (m *MockIArticleRepository) UpdateArticle(id int, request request.ArticleRequest) (*ent.Article, error)
- type MockIArticleRepositoryMockRecorder
- func (mr *MockIArticleRepositoryMockRecorder) CreateArticle(request interface{}) *gomock.Call
- func (mr *MockIArticleRepositoryMockRecorder) DeleteArticle(id interface{}) *gomock.Call
- func (mr *MockIArticleRepositoryMockRecorder) GetArticleByID(id interface{}) *gomock.Call
- func (mr *MockIArticleRepositoryMockRecorder) GetArticles() *gomock.Call
- func (mr *MockIArticleRepositoryMockRecorder) UpdateArticle(id, request interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleRepository ¶
func NewArticleRepository ¶
func NewArticleRepository(database *database.Database) *ArticleRepository
func (*ArticleRepository) CreateArticle ¶
func (s *ArticleRepository) CreateArticle(request request.ArticleRequest) (*ent.Article, error)
func (*ArticleRepository) DeleteArticle ¶
func (s *ArticleRepository) DeleteArticle(id int) error
func (*ArticleRepository) GetArticleByID ¶
func (s *ArticleRepository) GetArticleByID(id int) (*ent.Article, error)
func (*ArticleRepository) GetArticles ¶
func (s *ArticleRepository) GetArticles() ([]*ent.Article, error)
func (*ArticleRepository) UpdateArticle ¶
func (s *ArticleRepository) UpdateArticle(id int, request request.ArticleRequest) (*ent.Article, error)
type IArticleRepository ¶
type MockIArticleRepository ¶
type MockIArticleRepository struct {
// contains filtered or unexported fields
}
MockIArticleRepository is a mock of IArticleRepository interface.
func NewMockIArticleRepository ¶
func NewMockIArticleRepository(ctrl *gomock.Controller) *MockIArticleRepository
NewMockIArticleRepository creates a new mock instance.
func (*MockIArticleRepository) CreateArticle ¶
func (m *MockIArticleRepository) CreateArticle(request request.ArticleRequest) (*ent.Article, error)
CreateArticle mocks base method.
func (*MockIArticleRepository) DeleteArticle ¶
func (m *MockIArticleRepository) DeleteArticle(id int) error
DeleteArticle mocks base method.
func (*MockIArticleRepository) EXPECT ¶
func (m *MockIArticleRepository) EXPECT() *MockIArticleRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIArticleRepository) GetArticleByID ¶
func (m *MockIArticleRepository) GetArticleByID(id int) (*ent.Article, error)
GetArticleByID mocks base method.
func (*MockIArticleRepository) GetArticles ¶
func (m *MockIArticleRepository) GetArticles() ([]*ent.Article, error)
GetArticles mocks base method.
func (*MockIArticleRepository) UpdateArticle ¶
func (m *MockIArticleRepository) UpdateArticle(id int, request request.ArticleRequest) (*ent.Article, error)
UpdateArticle mocks base method.
type MockIArticleRepositoryMockRecorder ¶
type MockIArticleRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockIArticleRepositoryMockRecorder is the mock recorder for MockIArticleRepository.
func (*MockIArticleRepositoryMockRecorder) CreateArticle ¶
func (mr *MockIArticleRepositoryMockRecorder) CreateArticle(request interface{}) *gomock.Call
CreateArticle indicates an expected call of CreateArticle.
func (*MockIArticleRepositoryMockRecorder) DeleteArticle ¶
func (mr *MockIArticleRepositoryMockRecorder) DeleteArticle(id interface{}) *gomock.Call
DeleteArticle indicates an expected call of DeleteArticle.
func (*MockIArticleRepositoryMockRecorder) GetArticleByID ¶
func (mr *MockIArticleRepositoryMockRecorder) GetArticleByID(id interface{}) *gomock.Call
GetArticleByID indicates an expected call of GetArticleByID.
func (*MockIArticleRepositoryMockRecorder) GetArticles ¶
func (mr *MockIArticleRepositoryMockRecorder) GetArticles() *gomock.Call
GetArticles indicates an expected call of GetArticles.
func (*MockIArticleRepositoryMockRecorder) UpdateArticle ¶
func (mr *MockIArticleRepositoryMockRecorder) UpdateArticle(id, request interface{}) *gomock.Call
UpdateArticle indicates an expected call of UpdateArticle.