mocks

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockClient

type BlockClient struct {
	mock.Mock
}

BlockClient is an autogenerated mock type for the BlockClient type

func NewBlockClient

func NewBlockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *BlockClient

NewBlockClient creates a new instance of BlockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*BlockClient) EXPECT added in v1.4.0

func (_m *BlockClient) EXPECT() *BlockClient_Expecter

func (*BlockClient) GetBlock

func (_m *BlockClient) GetBlock(ctx context.Context, height int64, peerID types.NodeID) (*promise.Promise[*blocksync.BlockResponse], error)

GetBlock provides a mock function with given fields: ctx, height, peerID

func (*BlockClient) GetSyncStatus

func (_m *BlockClient) GetSyncStatus(ctx context.Context) error

GetSyncStatus provides a mock function with given fields: ctx

func (*BlockClient) Send

func (_m *BlockClient) Send(ctx context.Context, msg any) error

Send provides a mock function with given fields: ctx, msg

type BlockClient_Expecter added in v1.4.0

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

func (*BlockClient_Expecter) GetBlock added in v1.4.0

func (_e *BlockClient_Expecter) GetBlock(ctx interface{}, height interface{}, peerID interface{}) *BlockClient_GetBlock_Call

GetBlock is a helper method to define mock.On call

  • ctx context.Context
  • height int64
  • peerID types.NodeID

func (*BlockClient_Expecter) GetSyncStatus added in v1.4.0

func (_e *BlockClient_Expecter) GetSyncStatus(ctx interface{}) *BlockClient_GetSyncStatus_Call

GetSyncStatus is a helper method to define mock.On call

  • ctx context.Context

func (*BlockClient_Expecter) Send added in v1.4.0

func (_e *BlockClient_Expecter) Send(ctx interface{}, msg interface{}) *BlockClient_Send_Call

Send is a helper method to define mock.On call

  • ctx context.Context
  • msg any

type BlockClient_GetBlock_Call added in v1.4.0

type BlockClient_GetBlock_Call struct {
	*mock.Call
}

BlockClient_GetBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlock'

func (*BlockClient_GetBlock_Call) Return added in v1.4.0

func (*BlockClient_GetBlock_Call) Run added in v1.4.0

func (_c *BlockClient_GetBlock_Call) Run(run func(ctx context.Context, height int64, peerID types.NodeID)) *BlockClient_GetBlock_Call

func (*BlockClient_GetBlock_Call) RunAndReturn added in v1.4.0

type BlockClient_GetSyncStatus_Call added in v1.4.0

type BlockClient_GetSyncStatus_Call struct {
	*mock.Call
}

BlockClient_GetSyncStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSyncStatus'

func (*BlockClient_GetSyncStatus_Call) Return added in v1.4.0

func (*BlockClient_GetSyncStatus_Call) Run added in v1.4.0

func (*BlockClient_GetSyncStatus_Call) RunAndReturn added in v1.4.0

type BlockClient_Send_Call added in v1.4.0

type BlockClient_Send_Call struct {
	*mock.Call
}

BlockClient_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send'

func (*BlockClient_Send_Call) Return added in v1.4.0

func (*BlockClient_Send_Call) Run added in v1.4.0

func (_c *BlockClient_Send_Call) Run(run func(ctx context.Context, msg any)) *BlockClient_Send_Call

func (*BlockClient_Send_Call) RunAndReturn added in v1.4.0

func (_c *BlockClient_Send_Call) RunAndReturn(run func(context.Context, any) error) *BlockClient_Send_Call

type SnapshotClient

type SnapshotClient struct {
	mock.Mock
}

SnapshotClient is an autogenerated mock type for the SnapshotClient type

func NewSnapshotClient

func NewSnapshotClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *SnapshotClient

NewSnapshotClient creates a new instance of SnapshotClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*SnapshotClient) EXPECT added in v1.4.0

func (*SnapshotClient) GetChunk

func (_m *SnapshotClient) GetChunk(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32) (*promise.Promise[*statesync.ChunkResponse], error)

GetChunk provides a mock function with given fields: ctx, peerID, height, format, index

func (*SnapshotClient) GetLightBlock

func (_m *SnapshotClient) GetLightBlock(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.LightBlockResponse], error)

GetLightBlock provides a mock function with given fields: ctx, peerID, height

func (*SnapshotClient) GetParams

func (_m *SnapshotClient) GetParams(ctx context.Context, peerID types.NodeID, height uint64) (*promise.Promise[*statesync.ParamsResponse], error)

GetParams provides a mock function with given fields: ctx, peerID, height

func (*SnapshotClient) GetSnapshots

func (_m *SnapshotClient) GetSnapshots(ctx context.Context, peerID types.NodeID) error

GetSnapshots provides a mock function with given fields: ctx, peerID

type SnapshotClient_Expecter added in v1.4.0

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

func (*SnapshotClient_Expecter) GetChunk added in v1.4.0

func (_e *SnapshotClient_Expecter) GetChunk(ctx interface{}, peerID interface{}, height interface{}, format interface{}, index interface{}) *SnapshotClient_GetChunk_Call

GetChunk is a helper method to define mock.On call

  • ctx context.Context
  • peerID types.NodeID
  • height uint64
  • format uint32
  • index uint32

func (*SnapshotClient_Expecter) GetLightBlock added in v1.4.0

func (_e *SnapshotClient_Expecter) GetLightBlock(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetLightBlock_Call

GetLightBlock is a helper method to define mock.On call

  • ctx context.Context
  • peerID types.NodeID
  • height uint64

func (*SnapshotClient_Expecter) GetParams added in v1.4.0

func (_e *SnapshotClient_Expecter) GetParams(ctx interface{}, peerID interface{}, height interface{}) *SnapshotClient_GetParams_Call

GetParams is a helper method to define mock.On call

  • ctx context.Context
  • peerID types.NodeID
  • height uint64

func (*SnapshotClient_Expecter) GetSnapshots added in v1.4.0

func (_e *SnapshotClient_Expecter) GetSnapshots(ctx interface{}, peerID interface{}) *SnapshotClient_GetSnapshots_Call

GetSnapshots is a helper method to define mock.On call

  • ctx context.Context
  • peerID types.NodeID

type SnapshotClient_GetChunk_Call added in v1.4.0

type SnapshotClient_GetChunk_Call struct {
	*mock.Call
}

SnapshotClient_GetChunk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChunk'

func (*SnapshotClient_GetChunk_Call) Return added in v1.4.0

func (*SnapshotClient_GetChunk_Call) Run added in v1.4.0

func (_c *SnapshotClient_GetChunk_Call) Run(run func(ctx context.Context, peerID types.NodeID, height uint64, format uint32, index uint32)) *SnapshotClient_GetChunk_Call

func (*SnapshotClient_GetChunk_Call) RunAndReturn added in v1.4.0

type SnapshotClient_GetLightBlock_Call added in v1.4.0

type SnapshotClient_GetLightBlock_Call struct {
	*mock.Call
}

SnapshotClient_GetLightBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLightBlock'

func (*SnapshotClient_GetLightBlock_Call) Return added in v1.4.0

func (*SnapshotClient_GetLightBlock_Call) Run added in v1.4.0

func (*SnapshotClient_GetLightBlock_Call) RunAndReturn added in v1.4.0

type SnapshotClient_GetParams_Call added in v1.4.0

type SnapshotClient_GetParams_Call struct {
	*mock.Call
}

SnapshotClient_GetParams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParams'

func (*SnapshotClient_GetParams_Call) Return added in v1.4.0

func (*SnapshotClient_GetParams_Call) Run added in v1.4.0

func (*SnapshotClient_GetParams_Call) RunAndReturn added in v1.4.0

type SnapshotClient_GetSnapshots_Call added in v1.4.0

type SnapshotClient_GetSnapshots_Call struct {
	*mock.Call
}

SnapshotClient_GetSnapshots_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSnapshots'

func (*SnapshotClient_GetSnapshots_Call) Return added in v1.4.0

func (*SnapshotClient_GetSnapshots_Call) Run added in v1.4.0

func (*SnapshotClient_GetSnapshots_Call) RunAndReturn added in v1.4.0

Jump to

Keyboard shortcuts

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