mocks

package
v0.0.0-...-420fffb Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBTCClient

type MockBTCClient struct {
	mock.Mock
}

MockBTCClient is an autogenerated mock type for the BTCClient type

func NewMockBTCClient

func NewMockBTCClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBTCClient

NewMockBTCClient creates a new instance of MockBTCClient. 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 (*MockBTCClient) BlockEventChannel

func (_m *MockBTCClient) BlockEventChannel() <-chan *btc.BlockEvent

BlockEventChannel provides a mock function with no fields

func (*MockBTCClient) EXPECT

func (_m *MockBTCClient) EXPECT() *MockBTCClient_Expecter

func (*MockBTCClient) GetBTCBlockByHash

func (_m *MockBTCClient) GetBTCBlockByHash(blockHash *chainhash.Hash) (*types.IndexedBlock, error)

GetBTCBlockByHash provides a mock function with given fields: blockHash

func (*MockBTCClient) GetBTCBlockByHeight

func (_m *MockBTCClient) GetBTCBlockByHeight(height int64) (*types.IndexedBlock, error)

GetBTCBlockByHeight provides a mock function with given fields: height

func (*MockBTCClient) GetBTCBlockHeaderByHeight

func (_m *MockBTCClient) GetBTCBlockHeaderByHeight(height int64) (*wire.BlockHeader, error)

GetBTCBlockHeaderByHeight provides a mock function with given fields: height

func (*MockBTCClient) GetBTCTailBlocksByHeight

func (_m *MockBTCClient) GetBTCTailBlocksByHeight(height int64, fullBlocks bool) ([]*types.IndexedBlock, error)

GetBTCTailBlocksByHeight provides a mock function with given fields: height, fullBlocks

func (*MockBTCClient) GetBTCTipBlock

func (_m *MockBTCClient) GetBTCTipBlock() (*chainhash.Hash, int64, error)

GetBTCTipBlock provides a mock function with no fields

func (*MockBTCClient) Stop

func (_m *MockBTCClient) Stop()

Stop provides a mock function with no fields

func (*MockBTCClient) SubscribeNewBlocks

func (_m *MockBTCClient) SubscribeNewBlocks()

SubscribeNewBlocks provides a mock function with no fields

func (*MockBTCClient) WaitForShutdown

func (_m *MockBTCClient) WaitForShutdown()

WaitForShutdown provides a mock function with no fields

type MockBTCClient_BlockEventChannel_Call

type MockBTCClient_BlockEventChannel_Call struct {
	*mock.Call
}

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

func (*MockBTCClient_BlockEventChannel_Call) Return

func (*MockBTCClient_BlockEventChannel_Call) Run

func (*MockBTCClient_BlockEventChannel_Call) RunAndReturn

type MockBTCClient_Expecter

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

func (*MockBTCClient_Expecter) BlockEventChannel

BlockEventChannel is a helper method to define mock.On call

func (*MockBTCClient_Expecter) GetBTCBlockByHash

func (_e *MockBTCClient_Expecter) GetBTCBlockByHash(blockHash interface{}) *MockBTCClient_GetBTCBlockByHash_Call

GetBTCBlockByHash is a helper method to define mock.On call

  • blockHash *chainhash.Hash

func (*MockBTCClient_Expecter) GetBTCBlockByHeight

func (_e *MockBTCClient_Expecter) GetBTCBlockByHeight(height interface{}) *MockBTCClient_GetBTCBlockByHeight_Call

GetBTCBlockByHeight is a helper method to define mock.On call

  • height int64

func (*MockBTCClient_Expecter) GetBTCBlockHeaderByHeight

func (_e *MockBTCClient_Expecter) GetBTCBlockHeaderByHeight(height interface{}) *MockBTCClient_GetBTCBlockHeaderByHeight_Call

GetBTCBlockHeaderByHeight is a helper method to define mock.On call

  • height int64

func (*MockBTCClient_Expecter) GetBTCTailBlocksByHeight

func (_e *MockBTCClient_Expecter) GetBTCTailBlocksByHeight(height interface{}, fullBlocks interface{}) *MockBTCClient_GetBTCTailBlocksByHeight_Call

GetBTCTailBlocksByHeight is a helper method to define mock.On call

  • height int64
  • fullBlocks bool

func (*MockBTCClient_Expecter) GetBTCTipBlock

GetBTCTipBlock is a helper method to define mock.On call

func (*MockBTCClient_Expecter) Stop

Stop is a helper method to define mock.On call

func (*MockBTCClient_Expecter) SubscribeNewBlocks

SubscribeNewBlocks is a helper method to define mock.On call

func (*MockBTCClient_Expecter) WaitForShutdown

WaitForShutdown is a helper method to define mock.On call

type MockBTCClient_GetBTCBlockByHash_Call

type MockBTCClient_GetBTCBlockByHash_Call struct {
	*mock.Call
}

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

func (*MockBTCClient_GetBTCBlockByHash_Call) Return

func (*MockBTCClient_GetBTCBlockByHash_Call) Run

func (*MockBTCClient_GetBTCBlockByHash_Call) RunAndReturn

type MockBTCClient_GetBTCBlockByHeight_Call

type MockBTCClient_GetBTCBlockByHeight_Call struct {
	*mock.Call
}

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

func (*MockBTCClient_GetBTCBlockByHeight_Call) Return

func (*MockBTCClient_GetBTCBlockByHeight_Call) Run

func (*MockBTCClient_GetBTCBlockByHeight_Call) RunAndReturn

type MockBTCClient_GetBTCBlockHeaderByHeight_Call

type MockBTCClient_GetBTCBlockHeaderByHeight_Call struct {
	*mock.Call
}

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

func (*MockBTCClient_GetBTCBlockHeaderByHeight_Call) Return

func (*MockBTCClient_GetBTCBlockHeaderByHeight_Call) Run

func (*MockBTCClient_GetBTCBlockHeaderByHeight_Call) RunAndReturn

type MockBTCClient_GetBTCTailBlocksByHeight_Call

type MockBTCClient_GetBTCTailBlocksByHeight_Call struct {
	*mock.Call
}

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

func (*MockBTCClient_GetBTCTailBlocksByHeight_Call) Return

func (*MockBTCClient_GetBTCTailBlocksByHeight_Call) Run

func (*MockBTCClient_GetBTCTailBlocksByHeight_Call) RunAndReturn

type MockBTCClient_GetBTCTipBlock_Call

type MockBTCClient_GetBTCTipBlock_Call struct {
	*mock.Call
}

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

func (*MockBTCClient_GetBTCTipBlock_Call) Return

func (*MockBTCClient_GetBTCTipBlock_Call) Run

func (*MockBTCClient_GetBTCTipBlock_Call) RunAndReturn

type MockBTCClient_Stop_Call

type MockBTCClient_Stop_Call struct {
	*mock.Call
}

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

func (*MockBTCClient_Stop_Call) Return

func (*MockBTCClient_Stop_Call) Run

func (_c *MockBTCClient_Stop_Call) Run(run func()) *MockBTCClient_Stop_Call

func (*MockBTCClient_Stop_Call) RunAndReturn

func (_c *MockBTCClient_Stop_Call) RunAndReturn(run func()) *MockBTCClient_Stop_Call

type MockBTCClient_SubscribeNewBlocks_Call

type MockBTCClient_SubscribeNewBlocks_Call struct {
	*mock.Call
}

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

func (*MockBTCClient_SubscribeNewBlocks_Call) Return

func (*MockBTCClient_SubscribeNewBlocks_Call) Run

func (*MockBTCClient_SubscribeNewBlocks_Call) RunAndReturn

type MockBTCClient_WaitForShutdown_Call

type MockBTCClient_WaitForShutdown_Call struct {
	*mock.Call
}

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

func (*MockBTCClient_WaitForShutdown_Call) Return

func (*MockBTCClient_WaitForShutdown_Call) Run

func (*MockBTCClient_WaitForShutdown_Call) RunAndReturn

type MockBitcoinSPV

type MockBitcoinSPV struct {
	mock.Mock
}

MockBitcoinSPV is an autogenerated mock type for the BitcoinSPV type

func NewMockBitcoinSPV

func NewMockBitcoinSPV(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBitcoinSPV

NewMockBitcoinSPV creates a new instance of MockBitcoinSPV. 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 (*MockBitcoinSPV) ContainsBlock

func (_m *MockBitcoinSPV) ContainsBlock(ctx context.Context, blockHash chainhash.Hash) (bool, error)

ContainsBlock provides a mock function with given fields: ctx, blockHash

func (*MockBitcoinSPV) EXPECT

func (*MockBitcoinSPV) GetLatestBlockInfo

func (_m *MockBitcoinSPV) GetLatestBlockInfo(ctx context.Context) (*clients.BlockInfo, error)

GetLatestBlockInfo provides a mock function with given fields: ctx

func (*MockBitcoinSPV) InsertHeaders

func (_m *MockBitcoinSPV) InsertHeaders(ctx context.Context, blockHeaders []wire.BlockHeader) error

InsertHeaders provides a mock function with given fields: ctx, blockHeaders

func (*MockBitcoinSPV) Stop

func (_m *MockBitcoinSPV) Stop()

Stop provides a mock function with no fields

type MockBitcoinSPV_ContainsBlock_Call

type MockBitcoinSPV_ContainsBlock_Call struct {
	*mock.Call
}

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

func (*MockBitcoinSPV_ContainsBlock_Call) Return

func (*MockBitcoinSPV_ContainsBlock_Call) Run

func (*MockBitcoinSPV_ContainsBlock_Call) RunAndReturn

type MockBitcoinSPV_Expecter

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

func (*MockBitcoinSPV_Expecter) ContainsBlock

func (_e *MockBitcoinSPV_Expecter) ContainsBlock(ctx interface{}, blockHash interface{}) *MockBitcoinSPV_ContainsBlock_Call

ContainsBlock is a helper method to define mock.On call

  • ctx context.Context
  • blockHash chainhash.Hash

func (*MockBitcoinSPV_Expecter) GetLatestBlockInfo

func (_e *MockBitcoinSPV_Expecter) GetLatestBlockInfo(ctx interface{}) *MockBitcoinSPV_GetLatestBlockInfo_Call

GetLatestBlockInfo is a helper method to define mock.On call

  • ctx context.Context

func (*MockBitcoinSPV_Expecter) InsertHeaders

func (_e *MockBitcoinSPV_Expecter) InsertHeaders(ctx interface{}, blockHeaders interface{}) *MockBitcoinSPV_InsertHeaders_Call

InsertHeaders is a helper method to define mock.On call

  • ctx context.Context
  • blockHeaders []wire.BlockHeader

func (*MockBitcoinSPV_Expecter) Stop

Stop is a helper method to define mock.On call

type MockBitcoinSPV_GetLatestBlockInfo_Call

type MockBitcoinSPV_GetLatestBlockInfo_Call struct {
	*mock.Call
}

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

func (*MockBitcoinSPV_GetLatestBlockInfo_Call) Return

func (*MockBitcoinSPV_GetLatestBlockInfo_Call) Run

func (*MockBitcoinSPV_GetLatestBlockInfo_Call) RunAndReturn

type MockBitcoinSPV_InsertHeaders_Call

type MockBitcoinSPV_InsertHeaders_Call struct {
	*mock.Call
}

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

func (*MockBitcoinSPV_InsertHeaders_Call) Return

func (*MockBitcoinSPV_InsertHeaders_Call) Run

func (*MockBitcoinSPV_InsertHeaders_Call) RunAndReturn

type MockBitcoinSPV_Stop_Call

type MockBitcoinSPV_Stop_Call struct {
	*mock.Call
}

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

func (*MockBitcoinSPV_Stop_Call) Return

func (*MockBitcoinSPV_Stop_Call) Run

func (*MockBitcoinSPV_Stop_Call) RunAndReturn

func (_c *MockBitcoinSPV_Stop_Call) RunAndReturn(run func()) *MockBitcoinSPV_Stop_Call

type MockIndexer

type MockIndexer struct {
	mock.Mock
}

MockIndexer is an autogenerated mock type for the Indexer type

func NewMockIndexer

func NewMockIndexer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockIndexer

NewMockIndexer creates a new instance of MockIndexer. 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 (*MockIndexer) EXPECT

func (_m *MockIndexer) EXPECT() *MockIndexer_Expecter

func (*MockIndexer) GetLatestHeight

func (_m *MockIndexer) GetLatestHeight() (int64, error)

GetLatestHeight provides a mock function with no fields

func (*MockIndexer) SendBlocks

func (_m *MockIndexer) SendBlocks(ctx context.Context, blocks []*types.IndexedBlock) error

SendBlocks provides a mock function with given fields: ctx, blocks

type MockIndexer_Expecter

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

func (*MockIndexer_Expecter) GetLatestHeight

GetLatestHeight is a helper method to define mock.On call

func (*MockIndexer_Expecter) SendBlocks

func (_e *MockIndexer_Expecter) SendBlocks(ctx interface{}, blocks interface{}) *MockIndexer_SendBlocks_Call

SendBlocks is a helper method to define mock.On call

  • ctx context.Context
  • blocks []*types.IndexedBlock

type MockIndexer_GetLatestHeight_Call

type MockIndexer_GetLatestHeight_Call struct {
	*mock.Call
}

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

func (*MockIndexer_GetLatestHeight_Call) Return

func (*MockIndexer_GetLatestHeight_Call) Run

func (*MockIndexer_GetLatestHeight_Call) RunAndReturn

type MockIndexer_SendBlocks_Call

type MockIndexer_SendBlocks_Call struct {
	*mock.Call
}

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

func (*MockIndexer_SendBlocks_Call) Return

func (*MockIndexer_SendBlocks_Call) Run

func (*MockIndexer_SendBlocks_Call) RunAndReturn

Jump to

Keyboard shortcuts

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