Documentation ¶
Index ¶
- type ArticleRepository
- func (_m *ArticleRepository) Delete(ctx context.Context, id int64) error
- func (_m *ArticleRepository) Fetch(ctx context.Context, cursor string, num int64) ([]domain.Article, string, error)
- func (_m *ArticleRepository) GetByID(ctx context.Context, id int64) (domain.Article, error)
- func (_m *ArticleRepository) GetByTitle(ctx context.Context, title string) (domain.Article, error)
- func (_m *ArticleRepository) Store(ctx context.Context, a *domain.Article) error
- func (_m *ArticleRepository) Update(ctx context.Context, ar *domain.Article) error
- type AuthorRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleRepository ¶
ArticleRepository is an autogenerated mock type for the ArticleRepository type
func NewArticleRepository ¶
func NewArticleRepository(t interface { mock.TestingT Cleanup(func()) }) *ArticleRepository
NewArticleRepository creates a new instance of ArticleRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ArticleRepository) Delete ¶
func (_m *ArticleRepository) Delete(ctx context.Context, id int64) error
Delete provides a mock function with given fields: ctx, id
func (*ArticleRepository) Fetch ¶
func (_m *ArticleRepository) Fetch(ctx context.Context, cursor string, num int64) ([]domain.Article, string, error)
Fetch provides a mock function with given fields: ctx, cursor, num
func (*ArticleRepository) GetByTitle ¶
GetByTitle provides a mock function with given fields: ctx, title
type AuthorRepository ¶
AuthorRepository is an autogenerated mock type for the AuthorRepository type
func NewAuthorRepository ¶
func NewAuthorRepository(t interface { mock.TestingT Cleanup(func()) }) *AuthorRepository
NewAuthorRepository creates a new instance of AuthorRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.