Documentation ¶
Overview ¶
Package repository is a generated GoMock package.
Index ¶
- type ArticleRepository
- func (_i *ArticleRepository) Create(article *schema.Article) (err error)
- func (_i *ArticleRepository) Delete(id uint64) error
- func (_i *ArticleRepository) FindOne(id uint64) (article *schema.Article, err error)
- func (_i *ArticleRepository) GetArticles() (articles []*schema.Article, err error)
- func (_i *ArticleRepository) Update(id uint64, article *schema.Article) (err error)
- type IArticleRepository
- type MockIArticleRepository
- func (m *MockIArticleRepository) Create(arg0 *schema.Article) error
- func (m *MockIArticleRepository) Delete(arg0 uint64) error
- func (m *MockIArticleRepository) EXPECT() *MockIArticleRepositoryMockRecorder
- func (m *MockIArticleRepository) FindOne(arg0 uint64) (*schema.Article, error)
- func (m *MockIArticleRepository) GetArticles() ([]*schema.Article, error)
- func (m *MockIArticleRepository) Update(arg0 uint64, arg1 *schema.Article) error
- type MockIArticleRepositoryMockRecorder
- func (mr *MockIArticleRepositoryMockRecorder) Create(arg0 interface{}) *gomock.Call
- func (mr *MockIArticleRepositoryMockRecorder) Delete(arg0 interface{}) *gomock.Call
- func (mr *MockIArticleRepositoryMockRecorder) FindOne(arg0 interface{}) *gomock.Call
- func (mr *MockIArticleRepositoryMockRecorder) GetArticles() *gomock.Call
- func (mr *MockIArticleRepositoryMockRecorder) Update(arg0, arg1 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(db *database.Database) *ArticleRepository
func (*ArticleRepository) Create ¶
func (_i *ArticleRepository) Create(article *schema.Article) (err error)
func (*ArticleRepository) Delete ¶
func (_i *ArticleRepository) Delete(id uint64) error
func (*ArticleRepository) FindOne ¶
func (_i *ArticleRepository) FindOne(id uint64) (article *schema.Article, err error)
func (*ArticleRepository) GetArticles ¶
func (_i *ArticleRepository) GetArticles() (articles []*schema.Article, err error)
implement interface of IArticleRepository
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) Create ¶
func (m *MockIArticleRepository) Create(arg0 *schema.Article) error
Create mocks base method.
func (*MockIArticleRepository) Delete ¶
func (m *MockIArticleRepository) Delete(arg0 uint64) error
Delete 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) FindOne ¶
func (m *MockIArticleRepository) FindOne(arg0 uint64) (*schema.Article, error)
FindOne mocks base method.
func (*MockIArticleRepository) GetArticles ¶
func (m *MockIArticleRepository) GetArticles() ([]*schema.Article, error)
GetArticles mocks base method.
type MockIArticleRepositoryMockRecorder ¶
type MockIArticleRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockIArticleRepositoryMockRecorder is the mock recorder for MockIArticleRepository.
func (*MockIArticleRepositoryMockRecorder) Create ¶
func (mr *MockIArticleRepositoryMockRecorder) Create(arg0 interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockIArticleRepositoryMockRecorder) Delete ¶
func (mr *MockIArticleRepositoryMockRecorder) Delete(arg0 interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockIArticleRepositoryMockRecorder) FindOne ¶
func (mr *MockIArticleRepositoryMockRecorder) FindOne(arg0 interface{}) *gomock.Call
FindOne indicates an expected call of FindOne.
func (*MockIArticleRepositoryMockRecorder) GetArticles ¶
func (mr *MockIArticleRepositoryMockRecorder) GetArticles() *gomock.Call
GetArticles indicates an expected call of GetArticles.
func (*MockIArticleRepositoryMockRecorder) Update ¶
func (mr *MockIArticleRepositoryMockRecorder) Update(arg0, arg1 interface{}) *gomock.Call
Update indicates an expected call of Update.