mocks

package
v2.15.0-beta0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Head[BLOCK_HASH types.Hashable] struct {
	mock.Mock
}

Head is an autogenerated mock type for the Head type

func NewHead

func NewHead[BLOCK_HASH types.Hashable](t interface {
	mock.TestingT
	Cleanup(func())
}) *Head[BLOCK_HASH]

NewHead creates a new instance of Head. 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 (*Head[BLOCK_HASH]) BlockDifficulty added in v2.8.0

func (_m *Head[BLOCK_HASH]) BlockDifficulty() *big.Int

BlockDifficulty provides a mock function with given fields:

func (*Head[BLOCK_HASH]) BlockHash

func (_m *Head[BLOCK_HASH]) BlockHash() BLOCK_HASH

BlockHash provides a mock function with given fields:

func (*Head[BLOCK_HASH]) BlockNumber

func (_m *Head[BLOCK_HASH]) BlockNumber() int64

BlockNumber provides a mock function with given fields:

func (*Head[BLOCK_HASH]) ChainLength

func (_m *Head[BLOCK_HASH]) ChainLength() uint32

ChainLength provides a mock function with given fields:

func (*Head[BLOCK_HASH]) EXPECT added in v2.13.1

func (_m *Head[BLOCK_HASH]) EXPECT() *Head_Expecter[BLOCK_HASH]

func (*Head[BLOCK_HASH]) EarliestHeadInChain

func (_m *Head[BLOCK_HASH]) EarliestHeadInChain() types.Head[BLOCK_HASH]

EarliestHeadInChain provides a mock function with given fields:

func (*Head[BLOCK_HASH]) GetParent

func (_m *Head[BLOCK_HASH]) GetParent() types.Head[BLOCK_HASH]

GetParent provides a mock function with given fields:

func (*Head[BLOCK_HASH]) GetParentHash added in v2.3.0

func (_m *Head[BLOCK_HASH]) GetParentHash() BLOCK_HASH

GetParentHash provides a mock function with given fields:

func (*Head[BLOCK_HASH]) GetTimestamp added in v2.8.0

func (_m *Head[BLOCK_HASH]) GetTimestamp() time.Time

GetTimestamp provides a mock function with given fields:

func (*Head[BLOCK_HASH]) HashAtHeight

func (_m *Head[BLOCK_HASH]) HashAtHeight(blockNum int64) BLOCK_HASH

HashAtHeight provides a mock function with given fields: blockNum

func (*Head[BLOCK_HASH]) HeadAtHeight added in v2.13.1

func (_m *Head[BLOCK_HASH]) HeadAtHeight(blockNum int64) (types.Head[BLOCK_HASH], error)

HeadAtHeight provides a mock function with given fields: blockNum

func (*Head[BLOCK_HASH]) IsValid added in v2.11.0

func (_m *Head[BLOCK_HASH]) IsValid() bool

IsValid provides a mock function with given fields:

func (*Head[BLOCK_HASH]) LatestFinalizedHead added in v2.13.0

func (_m *Head[BLOCK_HASH]) LatestFinalizedHead() types.Head[BLOCK_HASH]

LatestFinalizedHead provides a mock function with given fields:

type Head_BlockDifficulty_Call added in v2.13.1

type Head_BlockDifficulty_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_BlockDifficulty_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_BlockDifficulty_Call[BLOCK_HASH]) Return(_a0 *big.Int) *Head_BlockDifficulty_Call[BLOCK_HASH]

func (*Head_BlockDifficulty_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_BlockDifficulty_Call[BLOCK_HASH]) Run(run func()) *Head_BlockDifficulty_Call[BLOCK_HASH]

func (*Head_BlockDifficulty_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_BlockDifficulty_Call[BLOCK_HASH]) RunAndReturn(run func() *big.Int) *Head_BlockDifficulty_Call[BLOCK_HASH]

type Head_BlockHash_Call added in v2.13.1

type Head_BlockHash_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_BlockHash_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_BlockHash_Call[BLOCK_HASH]) Return(_a0 BLOCK_HASH) *Head_BlockHash_Call[BLOCK_HASH]

func (*Head_BlockHash_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_BlockHash_Call[BLOCK_HASH]) Run(run func()) *Head_BlockHash_Call[BLOCK_HASH]

func (*Head_BlockHash_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_BlockHash_Call[BLOCK_HASH]) RunAndReturn(run func() BLOCK_HASH) *Head_BlockHash_Call[BLOCK_HASH]

type Head_BlockNumber_Call added in v2.13.1

type Head_BlockNumber_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_BlockNumber_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_BlockNumber_Call[BLOCK_HASH]) Return(_a0 int64) *Head_BlockNumber_Call[BLOCK_HASH]

func (*Head_BlockNumber_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_BlockNumber_Call[BLOCK_HASH]) Run(run func()) *Head_BlockNumber_Call[BLOCK_HASH]

func (*Head_BlockNumber_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_BlockNumber_Call[BLOCK_HASH]) RunAndReturn(run func() int64) *Head_BlockNumber_Call[BLOCK_HASH]

type Head_ChainLength_Call added in v2.13.1

type Head_ChainLength_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_ChainLength_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_ChainLength_Call[BLOCK_HASH]) Return(_a0 uint32) *Head_ChainLength_Call[BLOCK_HASH]

func (*Head_ChainLength_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_ChainLength_Call[BLOCK_HASH]) Run(run func()) *Head_ChainLength_Call[BLOCK_HASH]

func (*Head_ChainLength_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_ChainLength_Call[BLOCK_HASH]) RunAndReturn(run func() uint32) *Head_ChainLength_Call[BLOCK_HASH]

type Head_EarliestHeadInChain_Call added in v2.13.1

type Head_EarliestHeadInChain_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_EarliestHeadInChain_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_EarliestHeadInChain_Call[BLOCK_HASH]) Return(_a0 types.Head[BLOCK_HASH]) *Head_EarliestHeadInChain_Call[BLOCK_HASH]

func (*Head_EarliestHeadInChain_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_EarliestHeadInChain_Call[BLOCK_HASH]) Run(run func()) *Head_EarliestHeadInChain_Call[BLOCK_HASH]

func (*Head_EarliestHeadInChain_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_EarliestHeadInChain_Call[BLOCK_HASH]) RunAndReturn(run func() types.Head[BLOCK_HASH]) *Head_EarliestHeadInChain_Call[BLOCK_HASH]

type Head_Expecter added in v2.13.1

type Head_Expecter[BLOCK_HASH types.Hashable] struct {
	// contains filtered or unexported fields
}

func (*Head_Expecter[BLOCK_HASH]) BlockDifficulty added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) BlockDifficulty() *Head_BlockDifficulty_Call[BLOCK_HASH]

BlockDifficulty is a helper method to define mock.On call

func (*Head_Expecter[BLOCK_HASH]) BlockHash added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) BlockHash() *Head_BlockHash_Call[BLOCK_HASH]

BlockHash is a helper method to define mock.On call

func (*Head_Expecter[BLOCK_HASH]) BlockNumber added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) BlockNumber() *Head_BlockNumber_Call[BLOCK_HASH]

BlockNumber is a helper method to define mock.On call

func (*Head_Expecter[BLOCK_HASH]) ChainLength added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) ChainLength() *Head_ChainLength_Call[BLOCK_HASH]

ChainLength is a helper method to define mock.On call

func (*Head_Expecter[BLOCK_HASH]) EarliestHeadInChain added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) EarliestHeadInChain() *Head_EarliestHeadInChain_Call[BLOCK_HASH]

EarliestHeadInChain is a helper method to define mock.On call

func (*Head_Expecter[BLOCK_HASH]) GetParent added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) GetParent() *Head_GetParent_Call[BLOCK_HASH]

GetParent is a helper method to define mock.On call

func (*Head_Expecter[BLOCK_HASH]) GetParentHash added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) GetParentHash() *Head_GetParentHash_Call[BLOCK_HASH]

GetParentHash is a helper method to define mock.On call

func (*Head_Expecter[BLOCK_HASH]) GetTimestamp added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) GetTimestamp() *Head_GetTimestamp_Call[BLOCK_HASH]

GetTimestamp is a helper method to define mock.On call

func (*Head_Expecter[BLOCK_HASH]) HashAtHeight added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) HashAtHeight(blockNum interface{}) *Head_HashAtHeight_Call[BLOCK_HASH]

HashAtHeight is a helper method to define mock.On call

  • blockNum int64

func (*Head_Expecter[BLOCK_HASH]) HeadAtHeight added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) HeadAtHeight(blockNum interface{}) *Head_HeadAtHeight_Call[BLOCK_HASH]

HeadAtHeight is a helper method to define mock.On call

  • blockNum int64

func (*Head_Expecter[BLOCK_HASH]) IsValid added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) IsValid() *Head_IsValid_Call[BLOCK_HASH]

IsValid is a helper method to define mock.On call

func (*Head_Expecter[BLOCK_HASH]) LatestFinalizedHead added in v2.13.1

func (_e *Head_Expecter[BLOCK_HASH]) LatestFinalizedHead() *Head_LatestFinalizedHead_Call[BLOCK_HASH]

LatestFinalizedHead is a helper method to define mock.On call

type Head_GetParentHash_Call added in v2.13.1

type Head_GetParentHash_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_GetParentHash_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_GetParentHash_Call[BLOCK_HASH]) Return(_a0 BLOCK_HASH) *Head_GetParentHash_Call[BLOCK_HASH]

func (*Head_GetParentHash_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_GetParentHash_Call[BLOCK_HASH]) Run(run func()) *Head_GetParentHash_Call[BLOCK_HASH]

func (*Head_GetParentHash_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_GetParentHash_Call[BLOCK_HASH]) RunAndReturn(run func() BLOCK_HASH) *Head_GetParentHash_Call[BLOCK_HASH]

type Head_GetParent_Call added in v2.13.1

type Head_GetParent_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_GetParent_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_GetParent_Call[BLOCK_HASH]) Return(_a0 types.Head[BLOCK_HASH]) *Head_GetParent_Call[BLOCK_HASH]

func (*Head_GetParent_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_GetParent_Call[BLOCK_HASH]) Run(run func()) *Head_GetParent_Call[BLOCK_HASH]

func (*Head_GetParent_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_GetParent_Call[BLOCK_HASH]) RunAndReturn(run func() types.Head[BLOCK_HASH]) *Head_GetParent_Call[BLOCK_HASH]

type Head_GetTimestamp_Call added in v2.13.1

type Head_GetTimestamp_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_GetTimestamp_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_GetTimestamp_Call[BLOCK_HASH]) Return(_a0 time.Time) *Head_GetTimestamp_Call[BLOCK_HASH]

func (*Head_GetTimestamp_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_GetTimestamp_Call[BLOCK_HASH]) Run(run func()) *Head_GetTimestamp_Call[BLOCK_HASH]

func (*Head_GetTimestamp_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_GetTimestamp_Call[BLOCK_HASH]) RunAndReturn(run func() time.Time) *Head_GetTimestamp_Call[BLOCK_HASH]

type Head_HashAtHeight_Call added in v2.13.1

type Head_HashAtHeight_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_HashAtHeight_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_HashAtHeight_Call[BLOCK_HASH]) Return(_a0 BLOCK_HASH) *Head_HashAtHeight_Call[BLOCK_HASH]

func (*Head_HashAtHeight_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_HashAtHeight_Call[BLOCK_HASH]) Run(run func(blockNum int64)) *Head_HashAtHeight_Call[BLOCK_HASH]

func (*Head_HashAtHeight_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_HashAtHeight_Call[BLOCK_HASH]) RunAndReturn(run func(int64) BLOCK_HASH) *Head_HashAtHeight_Call[BLOCK_HASH]

type Head_HeadAtHeight_Call added in v2.13.1

type Head_HeadAtHeight_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_HeadAtHeight_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_HeadAtHeight_Call[BLOCK_HASH]) Return(_a0 types.Head[BLOCK_HASH], _a1 error) *Head_HeadAtHeight_Call[BLOCK_HASH]

func (*Head_HeadAtHeight_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_HeadAtHeight_Call[BLOCK_HASH]) Run(run func(blockNum int64)) *Head_HeadAtHeight_Call[BLOCK_HASH]

func (*Head_HeadAtHeight_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_HeadAtHeight_Call[BLOCK_HASH]) RunAndReturn(run func(int64) (types.Head[BLOCK_HASH], error)) *Head_HeadAtHeight_Call[BLOCK_HASH]

type Head_IsValid_Call added in v2.13.1

type Head_IsValid_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_IsValid_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_IsValid_Call[BLOCK_HASH]) Return(_a0 bool) *Head_IsValid_Call[BLOCK_HASH]

func (*Head_IsValid_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_IsValid_Call[BLOCK_HASH]) Run(run func()) *Head_IsValid_Call[BLOCK_HASH]

func (*Head_IsValid_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_IsValid_Call[BLOCK_HASH]) RunAndReturn(run func() bool) *Head_IsValid_Call[BLOCK_HASH]

type Head_LatestFinalizedHead_Call added in v2.13.1

type Head_LatestFinalizedHead_Call[BLOCK_HASH types.Hashable] struct {
	*mock.Call
}

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

func (*Head_LatestFinalizedHead_Call[BLOCK_HASH]) Return added in v2.13.1

func (_c *Head_LatestFinalizedHead_Call[BLOCK_HASH]) Return(_a0 types.Head[BLOCK_HASH]) *Head_LatestFinalizedHead_Call[BLOCK_HASH]

func (*Head_LatestFinalizedHead_Call[BLOCK_HASH]) Run added in v2.13.1

func (_c *Head_LatestFinalizedHead_Call[BLOCK_HASH]) Run(run func()) *Head_LatestFinalizedHead_Call[BLOCK_HASH]

func (*Head_LatestFinalizedHead_Call[BLOCK_HASH]) RunAndReturn added in v2.13.1

func (_c *Head_LatestFinalizedHead_Call[BLOCK_HASH]) RunAndReturn(run func() types.Head[BLOCK_HASH]) *Head_LatestFinalizedHead_Call[BLOCK_HASH]

type Subscription added in v2.3.0

type Subscription struct {
	mock.Mock
}

Subscription is an autogenerated mock type for the Subscription type

func NewSubscription added in v2.3.0

func NewSubscription(t interface {
	mock.TestingT
	Cleanup(func())
}) *Subscription

NewSubscription creates a new instance of Subscription. 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 (*Subscription) EXPECT added in v2.13.1

func (_m *Subscription) EXPECT() *Subscription_Expecter

func (*Subscription) Err added in v2.3.0

func (_m *Subscription) Err() <-chan error

Err provides a mock function with given fields:

func (*Subscription) Unsubscribe added in v2.3.0

func (_m *Subscription) Unsubscribe()

Unsubscribe provides a mock function with given fields:

type Subscription_Err_Call added in v2.13.1

type Subscription_Err_Call struct {
	*mock.Call
}

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

func (*Subscription_Err_Call) Return added in v2.13.1

func (_c *Subscription_Err_Call) Return(_a0 <-chan error) *Subscription_Err_Call

func (*Subscription_Err_Call) Run added in v2.13.1

func (_c *Subscription_Err_Call) Run(run func()) *Subscription_Err_Call

func (*Subscription_Err_Call) RunAndReturn added in v2.13.1

func (_c *Subscription_Err_Call) RunAndReturn(run func() <-chan error) *Subscription_Err_Call

type Subscription_Expecter added in v2.13.1

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

func (*Subscription_Expecter) Err added in v2.13.1

Err is a helper method to define mock.On call

func (*Subscription_Expecter) Unsubscribe added in v2.13.1

Unsubscribe is a helper method to define mock.On call

type Subscription_Unsubscribe_Call added in v2.13.1

type Subscription_Unsubscribe_Call struct {
	*mock.Call
}

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

func (*Subscription_Unsubscribe_Call) Return added in v2.13.1

func (*Subscription_Unsubscribe_Call) Run added in v2.13.1

func (*Subscription_Unsubscribe_Call) RunAndReturn added in v2.13.1

func (_c *Subscription_Unsubscribe_Call) RunAndReturn(run func()) *Subscription_Unsubscribe_Call

Jump to

Keyboard shortcuts

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