Documentation ¶
Overview ¶
Package handlerblock is a generated GoMock package.
Index ¶
- type BlockHandler
- type BlockService
- type MockBlockService
- func (m *MockBlockService) EXPECT() *MockBlockServiceMockRecorder
- func (m *MockBlockService) GetBlockByHash(ctx context.Context, hash common.Hash) (*models.Block, error)
- func (m *MockBlockService) GetBlockByNumber(ctx context.Context, id *big.Int) (*models.Block, error)
- func (m *MockBlockService) GetBlockHeaderByHash(ctx context.Context, hash common.Hash) (*models.Block, error)
- func (m *MockBlockService) GetBlockHeaderByNumber(ctx context.Context, id *big.Int) (*models.Block, error)
- type MockBlockServiceMockRecorder
- func (mr *MockBlockServiceMockRecorder) GetBlockByHash(ctx, hash interface{}) *gomock.Call
- func (mr *MockBlockServiceMockRecorder) GetBlockByNumber(ctx, id interface{}) *gomock.Call
- func (mr *MockBlockServiceMockRecorder) GetBlockHeaderByHash(ctx, hash interface{}) *gomock.Call
- func (mr *MockBlockServiceMockRecorder) GetBlockHeaderByNumber(ctx, id interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHandler ¶
type BlockHandler struct {
// contains filtered or unexported fields
}
BlockHandler is a callback handler.
func (*BlockHandler) Get ¶
func (h *BlockHandler) Get(c *fiber.Ctx) error
Get returns block by number or hash or "latest"
func (*BlockHandler) GetHeader ¶
func (h *BlockHandler) GetHeader(c *fiber.Ctx) error
GetHeader returns block header by number or hash or "latest"
type BlockService ¶
type BlockService interface { GetBlockByNumber(ctx context.Context, id *big.Int) (*models.Block, error) GetBlockByHash(ctx context.Context, hash common.Hash) (*models.Block, error) GetBlockHeaderByNumber(ctx context.Context, id *big.Int) (*models.Block, error) GetBlockHeaderByHash(ctx context.Context, hash common.Hash) (*models.Block, error) }
BlockService is a block service.
type MockBlockService ¶
type MockBlockService struct {
// contains filtered or unexported fields
}
MockBlockService is a mock of BlockService interface.
func NewMockBlockService ¶
func NewMockBlockService(ctrl *gomock.Controller) *MockBlockService
NewMockBlockService creates a new mock instance.
func (*MockBlockService) EXPECT ¶
func (m *MockBlockService) EXPECT() *MockBlockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBlockService) GetBlockByHash ¶
func (m *MockBlockService) GetBlockByHash(ctx context.Context, hash common.Hash) (*models.Block, error)
GetBlockByHash mocks base method.
func (*MockBlockService) GetBlockByNumber ¶
func (m *MockBlockService) GetBlockByNumber(ctx context.Context, id *big.Int) (*models.Block, error)
GetBlockByNumber mocks base method.
func (*MockBlockService) GetBlockHeaderByHash ¶
func (m *MockBlockService) GetBlockHeaderByHash(ctx context.Context, hash common.Hash) (*models.Block, error)
GetBlockHeaderByHash mocks base method.
func (*MockBlockService) GetBlockHeaderByNumber ¶
func (m *MockBlockService) GetBlockHeaderByNumber(ctx context.Context, id *big.Int) (*models.Block, error)
GetBlockHeaderByNumber mocks base method.
type MockBlockServiceMockRecorder ¶
type MockBlockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockBlockServiceMockRecorder is the mock recorder for MockBlockService.
func (*MockBlockServiceMockRecorder) GetBlockByHash ¶
func (mr *MockBlockServiceMockRecorder) GetBlockByHash(ctx, hash interface{}) *gomock.Call
GetBlockByHash indicates an expected call of GetBlockByHash.
func (*MockBlockServiceMockRecorder) GetBlockByNumber ¶
func (mr *MockBlockServiceMockRecorder) GetBlockByNumber(ctx, id interface{}) *gomock.Call
GetBlockByNumber indicates an expected call of GetBlockByNumber.
func (*MockBlockServiceMockRecorder) GetBlockHeaderByHash ¶
func (mr *MockBlockServiceMockRecorder) GetBlockHeaderByHash(ctx, hash interface{}) *gomock.Call
GetBlockHeaderByHash indicates an expected call of GetBlockHeaderByHash.
func (*MockBlockServiceMockRecorder) GetBlockHeaderByNumber ¶
func (mr *MockBlockServiceMockRecorder) GetBlockHeaderByNumber(ctx, id interface{}) *gomock.Call
GetBlockHeaderByNumber indicates an expected call of GetBlockHeaderByNumber.