repo

package
v0.0.0-...-d01fd15 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package repo is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IWordbookRepo

type IWordbookRepo interface {
	// Create is used to create a wordbook.
	Create(ctx contextx.Contextx, book *agg.Wordbook) (err error)

	// GetByName is used to get a wordbook by name.
	GetByName(ctx contextx.Contextx, name string) (item *agg.Wordbook, err error)

	// List is used to list wordbooks.
	List(ctx contextx.Contextx, opts ListOption) (items []*agg.Wordbook, total int, err error)

	// AddWord is used to add word to wordbook.
	AddWord(ctx contextx.Contextx, book *agg.Wordbook, word string) (err error)
}

IWordbookRepo is the interface for wordbook repository.

type ListOption

type ListOption struct {
	Limit  int
	Offset int
}

ListOption is the option for list wordbooks.

type MockIWordbookRepo

type MockIWordbookRepo struct {
	// contains filtered or unexported fields
}

MockIWordbookRepo is a mock of IWordbookRepo interface.

func NewMockIWordbookRepo

func NewMockIWordbookRepo(ctrl *gomock.Controller) *MockIWordbookRepo

NewMockIWordbookRepo creates a new mock instance.

func (*MockIWordbookRepo) AddWord

func (m *MockIWordbookRepo) AddWord(ctx contextx.Contextx, book *agg.Wordbook, word string) error

AddWord mocks base method.

func (*MockIWordbookRepo) Create

func (m *MockIWordbookRepo) Create(ctx contextx.Contextx, book *agg.Wordbook) error

Create mocks base method.

func (*MockIWordbookRepo) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIWordbookRepo) GetByName

func (m *MockIWordbookRepo) GetByName(ctx contextx.Contextx, name string) (*agg.Wordbook, error)

GetByName mocks base method.

func (*MockIWordbookRepo) List

func (m *MockIWordbookRepo) List(ctx contextx.Contextx, opts ListOption) ([]*agg.Wordbook, int, error)

List mocks base method.

type MockIWordbookRepoMockRecorder

type MockIWordbookRepoMockRecorder struct {
	// contains filtered or unexported fields
}

MockIWordbookRepoMockRecorder is the mock recorder for MockIWordbookRepo.

func (*MockIWordbookRepoMockRecorder) AddWord

func (mr *MockIWordbookRepoMockRecorder) AddWord(ctx, book, word interface{}) *gomock.Call

AddWord indicates an expected call of AddWord.

func (*MockIWordbookRepoMockRecorder) Create

func (mr *MockIWordbookRepoMockRecorder) Create(ctx, book interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockIWordbookRepoMockRecorder) GetByName

func (mr *MockIWordbookRepoMockRecorder) GetByName(ctx, name interface{}) *gomock.Call

GetByName indicates an expected call of GetByName.

func (*MockIWordbookRepoMockRecorder) List

func (mr *MockIWordbookRepoMockRecorder) List(ctx, opts interface{}) *gomock.Call

List indicates an expected call of List.

Jump to

Keyboard shortcuts

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