Documentation
¶
Index ¶
- type MockClient
- func (c *MockClient) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*flow.BlockHeader, error)
- func (c *MockClient) GetEventsForHeightRange(ctx context.Context, eventType string, startHeight uint64, endHeight uint64) ([]flow.BlockEvents, error)
- func (c *MockClient) GetLatestBlockHeader(ctx context.Context, sealed bool) (*flow.BlockHeader, error)
- func (c *MockClient) GetNodeVersionInfo(ctx context.Context) (*flow.NodeVersionInfo, error)
- func (c *MockClient) GetTransactionResultsByBlockID(ctx context.Context, blockID flow.Identifier) ([]*flow.TransactionResult, error)
- func (c *MockClient) SubscribeEventsByBlockHeight(ctx context.Context, startHeight uint64, filter flow.EventFilter, ...) (<-chan flow.BlockEvents, <-chan error, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClient ¶
type MockClient struct {
*mocks.Client
GetLatestBlockHeaderFunc func(context.Context, bool) (*flow.BlockHeader, error)
GetBlockHeaderByHeightFunc func(context.Context, uint64) (*flow.BlockHeader, error)
SubscribeEventsByBlockHeightFunc func(context.Context, uint64, flow.EventFilter, ...access.SubscribeOption) (<-chan flow.BlockEvents, <-chan error, error)
GetNodeVersionInfoFunc func(ctx context.Context) (*flow.NodeVersionInfo, error)
GetEventsForHeightRangeFunc func(
ctx context.Context, eventType string, startHeight uint64, endHeight uint64,
) ([]flow.BlockEvents, error)
GetTransactionResultsByBlockIDFunc func(ctx context.Context, blockID flow.Identifier) ([]*flow.TransactionResult, error)
}
func SetupClient ¶ added in v0.36.1
func SetupClient(startHeight uint64, endHeight uint64) (*MockClient, chan flow.BlockEvents)
func SetupClientForRange ¶
func SetupClientForRange(startHeight uint64, endHeight uint64) *MockClient
func (*MockClient) GetBlockHeaderByHeight ¶
func (c *MockClient) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*flow.BlockHeader, error)
func (*MockClient) GetEventsForHeightRange ¶ added in v1.0.0
func (*MockClient) GetLatestBlockHeader ¶
func (c *MockClient) GetLatestBlockHeader(ctx context.Context, sealed bool) (*flow.BlockHeader, error)
func (*MockClient) GetNodeVersionInfo ¶
func (c *MockClient) GetNodeVersionInfo(ctx context.Context) (*flow.NodeVersionInfo, error)
func (*MockClient) GetTransactionResultsByBlockID ¶ added in v1.3.0
func (c *MockClient) GetTransactionResultsByBlockID( ctx context.Context, blockID flow.Identifier, ) ([]*flow.TransactionResult, error)
func (*MockClient) SubscribeEventsByBlockHeight ¶
func (c *MockClient) SubscribeEventsByBlockHeight( ctx context.Context, startHeight uint64, filter flow.EventFilter, opts ...access.SubscribeOption, ) (<-chan flow.BlockEvents, <-chan error, error)
Click to show internal directories.
Click to hide internal directories.