repo

package
v0.0.0-...-4fb02c9 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 7 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 BlockAdapter

type BlockAdapter interface {
	ScanBlock(c context.Context, req ScanBlockRequest, blockCh chan<- *biz.Block) error
}

type BlockCreator

type BlockCreator interface {
	Create(c context.Context, block *biz.Block) error
}

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

type ListBlockCondition struct {
	Start  time.Time
	End    time.Time
	Limit  int64
	Offset int64
}

ListBlockCondition is the condition for list block.

type ListCondition

type ListCondition struct {
	Limit int64
	Skip  int64
}

ListCondition is the condition for list.

type ListTransactionsCondition

type ListTransactionsCondition struct {
	Limit  int
	Offset int
}

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

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.

func (*MockBlockAdapterMockRecorder) ScanBlock

func (mr *MockBlockAdapterMockRecorder) ScanBlock(c, req, blockCh any) *gomock.Call

ScanBlock indicates an expected call of ScanBlock.

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

func (m *MockBlockCreator) Create(c context.Context, block *biz.Block) error

Create mocks base method.

func (*MockBlockCreator) EXPECT

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.

func (*MockBlockCreatorMockRecorder) Create

func (mr *MockBlockCreatorMockRecorder) Create(c, block any) *gomock.Call

Create indicates an expected call of Create.

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

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

func (*MockBlockGetter) GetByID

func (m *MockBlockGetter) GetByID(c context.Context, id string) (*biz.Block, error)

GetByID mocks base method.

func (*MockBlockGetter) List

List mocks base method.

type MockBlockGetterMockRecorder

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

MockBlockGetterMockRecorder is the mock recorder for MockBlockGetter.

func (*MockBlockGetterMockRecorder) GetByID

func (mr *MockBlockGetterMockRecorder) GetByID(c, id any) *gomock.Call

GetByID indicates an expected call of GetByID.

func (*MockBlockGetterMockRecorder) List

func (mr *MockBlockGetterMockRecorder) List(c, cond any) *gomock.Call

List indicates an expected call of List.

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

func (m *MockBlockRepo) Create(c context.Context, block *biz.Block) error

Create mocks base method.

func (*MockBlockRepo) EXPECT

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

func (*MockBlockRepo) GetByID

func (m *MockBlockRepo) GetByID(c context.Context, id string) (*biz.Block, error)

GetByID mocks base method.

func (*MockBlockRepo) List

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.

func (*MockBlockRepoMockRecorder) GetByID

func (mr *MockBlockRepoMockRecorder) GetByID(c, id any) *gomock.Call

GetByID indicates an expected call of GetByID.

func (*MockBlockRepoMockRecorder) List

func (mr *MockBlockRepoMockRecorder) List(c, cond any) *gomock.Call

List indicates an expected call of List.

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

func (m *MockIBlockRepo) Create(c context.Context, item *model.Block) error

Create mocks base method.

func (*MockIBlockRepo) EXPECT

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

func (*MockIBlockRepo) GetByID

func (m *MockIBlockRepo) GetByID(c context.Context, id string) (*model.Block, error)

GetByID mocks base method.

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.

func (*MockIBlockRepoMockRecorder) GetByID

func (mr *MockIBlockRepoMockRecorder) GetByID(c, id any) *gomock.Call

GetByID indicates an expected call of GetByID.

func (*MockIBlockRepoMockRecorder) List

func (mr *MockIBlockRepoMockRecorder) List(c, condition any) *gomock.Call

List indicates an expected call of List.

type ScanBlockRequest

type ScanBlockRequest struct {
	StartHeight uint32
	EndHeight   uint32
}

ScanBlockRequest is the request for scan block.

Jump to

Keyboard shortcuts

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