mocks

package
v0.0.0-...-9f87b0a Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleRepository

type ArticleRepository struct {
	mock.Mock
}

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

func (_m *ArticleRepository) GetByID(ctx context.Context, id int64) (domain.Article, error)

GetByID provides a mock function with given fields: ctx, id

func (*ArticleRepository) GetByTitle

func (_m *ArticleRepository) GetByTitle(ctx context.Context, title string) (domain.Article, error)

GetByTitle provides a mock function with given fields: ctx, title

func (*ArticleRepository) Store

func (_m *ArticleRepository) Store(ctx context.Context, a *domain.Article) error

Store provides a mock function with given fields: ctx, a

func (*ArticleRepository) Update

func (_m *ArticleRepository) Update(ctx context.Context, ar *domain.Article) error

Update provides a mock function with given fields: ctx, ar

type AuthorRepository

type AuthorRepository struct {
	mock.Mock
}

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.

func (*AuthorRepository) GetByID

func (_m *AuthorRepository) GetByID(ctx context.Context, id int64) (domain.Author, error)

GetByID provides a mock function with given fields: ctx, id

Jump to

Keyboard shortcuts

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