Documentation ¶
Overview ¶
Package repo is a generated GoMock package.
Index ¶
- type BlockAdapter
- type BlockCreator
- type BlockGetter
- type BlockRepo
- type IBlockRepo
- type ITransactionRepo
- type ListBlockCondition
- type ListCondition
- type ListTransactionsCondition
- type MockBlockAdapter
- type MockBlockAdapterMockRecorder
- type MockBlockCreator
- type MockBlockCreatorMockRecorder
- type MockBlockGetter
- type MockBlockGetterMockRecorder
- type MockBlockRepo
- func (m *MockBlockRepo) Create(c context.Context, block *biz.Block) error
- func (m *MockBlockRepo) EXPECT() *MockBlockRepoMockRecorder
- func (m *MockBlockRepo) GetByID(c context.Context, id string) (*biz.Block, error)
- func (m *MockBlockRepo) List(c context.Context, cond ListBlockCondition) ([]*biz.Block, int, error)
- type MockBlockRepoMockRecorder
- type MockIBlockRepo
- func (m *MockIBlockRepo) Create(c context.Context, item *model.Block) error
- func (m *MockIBlockRepo) EXPECT() *MockIBlockRepoMockRecorder
- func (m *MockIBlockRepo) GetByID(c context.Context, id string) (*model.Block, error)
- func (m *MockIBlockRepo) List(c context.Context, condition ListCondition) ([]*model.Block, int, error)
- type MockIBlockRepoMockRecorder
- type ScanBlockRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockAdapter ¶
type BlockCreator ¶
BlockCreator is the creator for block.
type BlockGetter ¶
type BlockGetter interface { GetByID(c context.Context, id string) (*biz.Block, error) List(c context.Context, cond ListBlockCondition) ([]*biz.Block, int, error) }
BlockGetter is the getter for block.
type BlockRepo ¶
type BlockRepo interface { BlockCreator BlockGetter }
BlockRepo is the repository for block.
type IBlockRepo ¶
type IBlockRepo interface { GetByID(c context.Context, id string) (item *model.Block, err error) Create(c context.Context, item *model.Block) (err error) List(c context.Context, condition ListCondition) (items []*model.Block, total int, err error) }
IBlockRepo is the interface for block repository.
type ITransactionRepo ¶
type ITransactionRepo interface { Create(c context.Context, item *model.Transaction) (err error) GetByID(c context.Context, id string) (item *model.Transaction, err error) List(c context.Context, cond ListTransactionsCondition) (items []*model.Transaction, total int, err error) ListByAccount( c context.Context, accountID string, cond ListTransactionsCondition, ) (items []*model.Transaction, total int, err error) }
ITransactionRepo is the interface for transaction repository.
type ListBlockCondition ¶
ListBlockCondition is the condition for list block.
type ListCondition ¶
ListCondition is the condition for list.
type ListTransactionsCondition ¶
ListTransactionsCondition is the condition for list.
type MockBlockAdapter ¶
type MockBlockAdapter struct {
// contains filtered or unexported fields
}
MockBlockAdapter is a mock of BlockAdapter interface.
func NewMockBlockAdapter ¶
func NewMockBlockAdapter(ctrl *gomock.Controller) *MockBlockAdapter
NewMockBlockAdapter creates a new mock instance.
func (*MockBlockAdapter) EXPECT ¶
func (m *MockBlockAdapter) EXPECT() *MockBlockAdapterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBlockAdapter) ScanBlock ¶
func (m *MockBlockAdapter) ScanBlock(c context.Context, req ScanBlockRequest, blockCh chan<- *biz.Block) error
ScanBlock mocks base method.
type MockBlockAdapterMockRecorder ¶
type MockBlockAdapterMockRecorder struct {
// contains filtered or unexported fields
}
MockBlockAdapterMockRecorder is the mock recorder for MockBlockAdapter.
type MockBlockCreator ¶
type MockBlockCreator struct {
// contains filtered or unexported fields
}
MockBlockCreator is a mock of BlockCreator interface.
func NewMockBlockCreator ¶
func NewMockBlockCreator(ctrl *gomock.Controller) *MockBlockCreator
NewMockBlockCreator creates a new mock instance.
func (*MockBlockCreator) EXPECT ¶
func (m *MockBlockCreator) EXPECT() *MockBlockCreatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockBlockCreatorMockRecorder ¶
type MockBlockCreatorMockRecorder struct {
// contains filtered or unexported fields
}
MockBlockCreatorMockRecorder is the mock recorder for MockBlockCreator.
type MockBlockGetter ¶
type MockBlockGetter struct {
// contains filtered or unexported fields
}
MockBlockGetter is a mock of BlockGetter interface.
func NewMockBlockGetter ¶
func NewMockBlockGetter(ctrl *gomock.Controller) *MockBlockGetter
NewMockBlockGetter creates a new mock instance.
func (*MockBlockGetter) EXPECT ¶
func (m *MockBlockGetter) EXPECT() *MockBlockGetterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBlockGetter) List ¶
func (m *MockBlockGetter) List(c context.Context, cond ListBlockCondition) ([]*biz.Block, int, error)
List mocks base method.
type MockBlockGetterMockRecorder ¶
type MockBlockGetterMockRecorder struct {
// contains filtered or unexported fields
}
MockBlockGetterMockRecorder is the mock recorder for MockBlockGetter.
type MockBlockRepo ¶
type MockBlockRepo struct {
// contains filtered or unexported fields
}
MockBlockRepo is a mock of BlockRepo interface.
func NewMockBlockRepo ¶
func NewMockBlockRepo(ctrl *gomock.Controller) *MockBlockRepo
NewMockBlockRepo creates a new mock instance.
func (*MockBlockRepo) EXPECT ¶
func (m *MockBlockRepo) EXPECT() *MockBlockRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBlockRepo) List ¶
func (m *MockBlockRepo) List(c context.Context, cond ListBlockCondition) ([]*biz.Block, int, error)
List mocks base method.
type MockBlockRepoMockRecorder ¶
type MockBlockRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockBlockRepoMockRecorder is the mock recorder for MockBlockRepo.
func (*MockBlockRepoMockRecorder) Create ¶
func (mr *MockBlockRepoMockRecorder) Create(c, block any) *gomock.Call
Create indicates an expected call of Create.
type MockIBlockRepo ¶
type MockIBlockRepo struct {
// contains filtered or unexported fields
}
MockIBlockRepo is a mock of IBlockRepo interface.
func NewMockIBlockRepo ¶
func NewMockIBlockRepo(ctrl *gomock.Controller) *MockIBlockRepo
NewMockIBlockRepo creates a new mock instance.
func (*MockIBlockRepo) EXPECT ¶
func (m *MockIBlockRepo) EXPECT() *MockIBlockRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIBlockRepo) List ¶
func (m *MockIBlockRepo) List(c context.Context, condition ListCondition) ([]*model.Block, int, error)
List mocks base method.
type MockIBlockRepoMockRecorder ¶
type MockIBlockRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockIBlockRepoMockRecorder is the mock recorder for MockIBlockRepo.
func (*MockIBlockRepoMockRecorder) Create ¶
func (mr *MockIBlockRepoMockRecorder) Create(c, item any) *gomock.Call
Create indicates an expected call of Create.
type ScanBlockRequest ¶
ScanBlockRequest is the request for scan block.