Documentation ¶
Overview ¶
Package repo is a generated GoMock package.
Index ¶
- type IWordbookRepo
- type ListOption
- type MockIWordbookRepo
- func (m *MockIWordbookRepo) AddWord(ctx contextx.Contextx, book *agg.Wordbook, word string) error
- func (m *MockIWordbookRepo) Create(ctx contextx.Contextx, book *agg.Wordbook) error
- func (m *MockIWordbookRepo) EXPECT() *MockIWordbookRepoMockRecorder
- func (m *MockIWordbookRepo) GetByName(ctx contextx.Contextx, name string) (*agg.Wordbook, error)
- func (m *MockIWordbookRepo) List(ctx contextx.Contextx, opts ListOption) ([]*agg.Wordbook, int, error)
- type MockIWordbookRepoMockRecorder
- func (mr *MockIWordbookRepoMockRecorder) AddWord(ctx, book, word interface{}) *gomock.Call
- func (mr *MockIWordbookRepoMockRecorder) Create(ctx, book interface{}) *gomock.Call
- func (mr *MockIWordbookRepoMockRecorder) GetByName(ctx, name interface{}) *gomock.Call
- func (mr *MockIWordbookRepoMockRecorder) List(ctx, opts interface{}) *gomock.Call
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 ¶
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) EXPECT ¶
func (m *MockIWordbookRepo) EXPECT() *MockIWordbookRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
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.
Click to show internal directories.
Click to hide internal directories.