blockchainmocks

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 8 Imported by: ? 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 Callbacks

type Callbacks struct {
	mock.Mock
}

Callbacks is an autogenerated mock type for the Callbacks type

func NewCallbacks

func NewCallbacks(t interface {
	mock.TestingT
	Cleanup(func())
}) *Callbacks

NewCallbacks creates a new instance of Callbacks. 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 (*Callbacks) BlockchainEventBatch

func (_m *Callbacks) BlockchainEventBatch(batch []*blockchain.EventToDispatch) error

BlockchainEventBatch provides a mock function with given fields: batch

type Plugin

type Plugin struct {
	mock.Mock
}

Plugin is an autogenerated mock type for the Plugin type

func NewPlugin

func NewPlugin(t interface {
	mock.TestingT
	Cleanup(func())
}) *Plugin

NewPlugin creates a new instance of Plugin. 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 (*Plugin) AddContractListener

func (_m *Plugin) AddContractListener(ctx context.Context, subscription *core.ContractListener, lastProtocolID string) error

AddContractListener provides a mock function with given fields: ctx, subscription, lastProtocolID

func (*Plugin) AddFireflySubscription

func (_m *Plugin) AddFireflySubscription(ctx context.Context, namespace *core.Namespace, contract *blockchain.MultipartyContract, lastProtocolID string) (string, error)

AddFireflySubscription provides a mock function with given fields: ctx, namespace, contract, lastProtocolID

func (*Plugin) Capabilities

func (_m *Plugin) Capabilities() *blockchain.Capabilities

Capabilities provides a mock function with given fields:

func (*Plugin) CheckOverlappingLocations

func (_m *Plugin) CheckOverlappingLocations(ctx context.Context, left *fftypes.JSONAny, right *fftypes.JSONAny) (bool, error)

CheckOverlappingLocations provides a mock function with given fields: ctx, left, right

func (*Plugin) DeleteContractListener

func (_m *Plugin) DeleteContractListener(ctx context.Context, subscription *core.ContractListener, okNotFound bool) error

DeleteContractListener provides a mock function with given fields: ctx, subscription, okNotFound

func (*Plugin) DeployContract

func (_m *Plugin) DeployContract(ctx context.Context, nsOpID string, signingKey string, definition *fftypes.JSONAny, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (bool, error)

DeployContract provides a mock function with given fields: ctx, nsOpID, signingKey, definition, contract, input, options

func (*Plugin) GenerateErrorSignature

func (_m *Plugin) GenerateErrorSignature(ctx context.Context, errorDef *fftypes.FFIErrorDefinition) string

GenerateErrorSignature provides a mock function with given fields: ctx, errorDef

func (*Plugin) GenerateEventSignature

func (_m *Plugin) GenerateEventSignature(ctx context.Context, event *fftypes.FFIEventDefinition) (string, error)

GenerateEventSignature provides a mock function with given fields: ctx, event

func (*Plugin) GenerateEventSignatureWithLocation

func (_m *Plugin) GenerateEventSignatureWithLocation(ctx context.Context, event *fftypes.FFIEventDefinition, location *fftypes.JSONAny) (string, error)

GenerateEventSignatureWithLocation provides a mock function with given fields: ctx, event, location

func (*Plugin) GenerateFFI

func (_m *Plugin) GenerateFFI(ctx context.Context, generationRequest *fftypes.FFIGenerationRequest) (*fftypes.FFI, error)

GenerateFFI provides a mock function with given fields: ctx, generationRequest

func (*Plugin) GetAndConvertDeprecatedContractConfig

func (_m *Plugin) GetAndConvertDeprecatedContractConfig(ctx context.Context) (*fftypes.JSONAny, string, error)

GetAndConvertDeprecatedContractConfig provides a mock function with given fields: ctx

func (*Plugin) GetContractListenerStatus

func (_m *Plugin) GetContractListenerStatus(ctx context.Context, namespace string, subID string, okNotFound bool) (bool, interface{}, fftypes.FFEnum, error)

GetContractListenerStatus provides a mock function with given fields: ctx, namespace, subID, okNotFound

func (*Plugin) GetFFIParamValidator

func (_m *Plugin) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamValidator, error)

GetFFIParamValidator provides a mock function with given fields: ctx

func (*Plugin) GetNetworkVersion

func (_m *Plugin) GetNetworkVersion(ctx context.Context, location *fftypes.JSONAny) (int, error)

GetNetworkVersion provides a mock function with given fields: ctx, location

func (*Plugin) GetTransactionStatus

func (_m *Plugin) GetTransactionStatus(ctx context.Context, operation *core.Operation) (interface{}, error)

GetTransactionStatus provides a mock function with given fields: ctx, operation

func (*Plugin) Init

func (_m *Plugin) Init(ctx context.Context, cancelCtx context.CancelFunc, _a2 config.Section, _a3 metrics.Manager, cacheManager cache.Manager) error

Init provides a mock function with given fields: ctx, cancelCtx, _a2, _a3, cacheManager

func (*Plugin) InitConfig

func (_m *Plugin) InitConfig(_a0 config.Section)

InitConfig provides a mock function with given fields: _a0

func (*Plugin) InvokeContract

func (_m *Plugin) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error)

InvokeContract provides a mock function with given fields: ctx, nsOpID, signingKey, location, parsedMethod, input, options, batch

func (*Plugin) Name

func (_m *Plugin) Name() string

Name provides a mock function with given fields:

func (*Plugin) NormalizeContractLocation

func (_m *Plugin) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (*fftypes.JSONAny, error)

NormalizeContractLocation provides a mock function with given fields: ctx, ntype, location

func (*Plugin) ParseInterface

func (_m *Plugin) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, errors []*fftypes.FFIError) (interface{}, error)

ParseInterface provides a mock function with given fields: ctx, method, errors

func (*Plugin) QueryContract

func (_m *Plugin) QueryContract(ctx context.Context, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}) (interface{}, error)

QueryContract provides a mock function with given fields: ctx, signingKey, location, parsedMethod, input, options

func (*Plugin) RemoveFireflySubscription

func (_m *Plugin) RemoveFireflySubscription(ctx context.Context, subID string)

RemoveFireflySubscription provides a mock function with given fields: ctx, subID

func (*Plugin) ResolveSigningKey

func (_m *Plugin) ResolveSigningKey(ctx context.Context, keyRef string, intent blockchain.ResolveKeyIntent) (string, error)

ResolveSigningKey provides a mock function with given fields: ctx, keyRef, intent

func (*Plugin) SetHandler

func (_m *Plugin) SetHandler(namespace string, handler blockchain.Callbacks)

SetHandler provides a mock function with given fields: namespace, handler

func (*Plugin) SetOperationHandler

func (_m *Plugin) SetOperationHandler(namespace string, handler core.OperationCallbacks)

SetOperationHandler provides a mock function with given fields: namespace, handler

func (*Plugin) StartNamespace

func (_m *Plugin) StartNamespace(ctx context.Context, namespace string) error

StartNamespace provides a mock function with given fields: ctx, namespace

func (*Plugin) StopNamespace

func (_m *Plugin) StopNamespace(ctx context.Context, namespace string) error

StopNamespace provides a mock function with given fields: ctx, namespace

func (*Plugin) SubmitBatchPin

func (_m *Plugin) SubmitBatchPin(ctx context.Context, nsOpID string, networkNamespace string, signingKey string, batch *blockchain.BatchPin, location *fftypes.JSONAny) error

SubmitBatchPin provides a mock function with given fields: ctx, nsOpID, networkNamespace, signingKey, batch, location

func (*Plugin) SubmitNetworkAction

func (_m *Plugin) SubmitNetworkAction(ctx context.Context, nsOpID string, signingKey string, action fftypes.FFEnum, location *fftypes.JSONAny) error

SubmitNetworkAction provides a mock function with given fields: ctx, nsOpID, signingKey, action, location

func (*Plugin) ValidateInvokeRequest

func (_m *Plugin) ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error

ValidateInvokeRequest provides a mock function with given fields: ctx, parsedMethod, input, hasMessage

func (*Plugin) VerifierType

func (_m *Plugin) VerifierType() fftypes.FFEnum

VerifierType provides a mock function with given fields:

Jump to

Keyboard shortcuts

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