Help us shape the future of Go! Take the 2026 Go Developer Survey

mock

package
v0.47.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockComputer

type BlockComputer struct {
	mock.Mock
}

BlockComputer is an autogenerated mock type for the BlockComputer type

func NewBlockComputer added in v0.26.1

func NewBlockComputer(t interface {
	mock.TestingT
	Cleanup(func())
}) *BlockComputer

NewBlockComputer creates a new instance of BlockComputer. 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 (*BlockComputer) EXPECT added in v0.46.0

func (_m *BlockComputer) EXPECT() *BlockComputer_Expecter

func (*BlockComputer) ExecuteBlock

func (_mock *BlockComputer) ExecuteBlock(ctx context.Context, parentBlockExecutionResultID flow.Identifier, block *entity.ExecutableBlock, snapshot1 snapshot.StorageSnapshot, derivedBlockData *derived.DerivedBlockData) (*execution.ComputationResult, error)

ExecuteBlock provides a mock function for the type BlockComputer

type BlockComputer_ExecuteBlock_Call added in v0.46.0

type BlockComputer_ExecuteBlock_Call struct {
	*mock.Call
}

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

func (*BlockComputer_ExecuteBlock_Call) Return added in v0.46.0

func (*BlockComputer_ExecuteBlock_Call) Run added in v0.46.0

func (_c *BlockComputer_ExecuteBlock_Call) Run(run func(ctx context.Context, parentBlockExecutionResultID flow.Identifier, block *entity.ExecutableBlock, snapshot1 snapshot.StorageSnapshot, derivedBlockData *derived.DerivedBlockData)) *BlockComputer_ExecuteBlock_Call

func (*BlockComputer_ExecuteBlock_Call) RunAndReturn added in v0.46.0

func (_c *BlockComputer_ExecuteBlock_Call) RunAndReturn(run func(ctx context.Context, parentBlockExecutionResultID flow.Identifier, block *entity.ExecutableBlock, snapshot1 snapshot.StorageSnapshot, derivedBlockData *derived.DerivedBlockData) (*execution.ComputationResult, error)) *BlockComputer_ExecuteBlock_Call

type BlockComputer_Expecter added in v0.46.0

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

func (*BlockComputer_Expecter) ExecuteBlock added in v0.46.0

func (_e *BlockComputer_Expecter) ExecuteBlock(ctx interface{}, parentBlockExecutionResultID interface{}, block interface{}, snapshot1 interface{}, derivedBlockData interface{}) *BlockComputer_ExecuteBlock_Call

ExecuteBlock is a helper method to define mock.On call

  • ctx context.Context
  • parentBlockExecutionResultID flow.Identifier
  • block *entity.ExecutableBlock
  • snapshot1 snapshot.StorageSnapshot
  • derivedBlockData *derived.DerivedBlockData

type TransactionWriteBehindLogger added in v0.32.0

type TransactionWriteBehindLogger struct {
	mock.Mock
}

TransactionWriteBehindLogger is an autogenerated mock type for the TransactionWriteBehindLogger type

func NewTransactionWriteBehindLogger added in v0.32.0

func NewTransactionWriteBehindLogger(t interface {
	mock.TestingT
	Cleanup(func())
}) *TransactionWriteBehindLogger

NewTransactionWriteBehindLogger creates a new instance of TransactionWriteBehindLogger. 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 (*TransactionWriteBehindLogger) AddTransactionResult added in v0.32.0

func (_mock *TransactionWriteBehindLogger) AddTransactionResult(txn computer.TransactionRequest, snapshot1 *snapshot.ExecutionSnapshot, output fvm.ProcedureOutput, timeSpent time.Duration, numTxnConflictRetries int)

AddTransactionResult provides a mock function for the type TransactionWriteBehindLogger

func (*TransactionWriteBehindLogger) EXPECT added in v0.46.0

type TransactionWriteBehindLogger_AddTransactionResult_Call added in v0.46.0

type TransactionWriteBehindLogger_AddTransactionResult_Call struct {
	*mock.Call
}

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

func (*TransactionWriteBehindLogger_AddTransactionResult_Call) Return added in v0.46.0

func (*TransactionWriteBehindLogger_AddTransactionResult_Call) Run added in v0.46.0

func (*TransactionWriteBehindLogger_AddTransactionResult_Call) RunAndReturn added in v0.46.0

type TransactionWriteBehindLogger_Expecter added in v0.46.0

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

func (*TransactionWriteBehindLogger_Expecter) AddTransactionResult added in v0.46.0

func (_e *TransactionWriteBehindLogger_Expecter) AddTransactionResult(txn interface{}, snapshot1 interface{}, output interface{}, timeSpent interface{}, numTxnConflictRetries interface{}) *TransactionWriteBehindLogger_AddTransactionResult_Call

AddTransactionResult is a helper method to define mock.On call

  • txn computer.TransactionRequest
  • snapshot1 *snapshot.ExecutionSnapshot
  • output fvm.ProcedureOutput
  • timeSpent time.Duration
  • numTxnConflictRetries int

type ViewCommitter added in v0.16.0

type ViewCommitter struct {
	mock.Mock
}

ViewCommitter is an autogenerated mock type for the ViewCommitter type

func NewViewCommitter added in v0.26.1

func NewViewCommitter(t interface {
	mock.TestingT
	Cleanup(func())
}) *ViewCommitter

NewViewCommitter creates a new instance of ViewCommitter. 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 (*ViewCommitter) CommitView added in v0.16.0

CommitView provides a mock function for the type ViewCommitter

func (*ViewCommitter) EXPECT added in v0.46.0

func (_m *ViewCommitter) EXPECT() *ViewCommitter_Expecter

type ViewCommitter_CommitView_Call added in v0.46.0

type ViewCommitter_CommitView_Call struct {
	*mock.Call
}

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

func (*ViewCommitter_CommitView_Call) Return added in v0.46.0

func (_c *ViewCommitter_CommitView_Call) Return(stateCommitment flow.StateCommitment, bytes []byte, trieUpdate *ledger.TrieUpdate, extendableStorageSnapshot1 execution.ExtendableStorageSnapshot, err error) *ViewCommitter_CommitView_Call

func (*ViewCommitter_CommitView_Call) Run added in v0.46.0

func (_c *ViewCommitter_CommitView_Call) Run(run func(executionSnapshot *snapshot.ExecutionSnapshot, extendableStorageSnapshot execution.ExtendableStorageSnapshot)) *ViewCommitter_CommitView_Call

func (*ViewCommitter_CommitView_Call) RunAndReturn added in v0.46.0

type ViewCommitter_Expecter added in v0.46.0

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

func (*ViewCommitter_Expecter) CommitView added in v0.46.0

func (_e *ViewCommitter_Expecter) CommitView(executionSnapshot interface{}, extendableStorageSnapshot interface{}) *ViewCommitter_CommitView_Call

CommitView is a helper method to define mock.On call

  • executionSnapshot *snapshot.ExecutionSnapshot
  • extendableStorageSnapshot execution.ExtendableStorageSnapshot

Jump to

Keyboard shortcuts

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