mocks

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelResources

type ChannelResources struct {
	MSPManagerStub func() msp.MSPManager

	ApplyStub func(configtx *common.ConfigEnvelope) error

	GetMSPIDsStub func() []string

	CapabilitiesStub func() channelconfig.ApplicationCapabilities

	LedgerStub func() ledger.PeerLedger
	// contains filtered or unexported fields
}

func (*ChannelResources) Apply

func (fake *ChannelResources) Apply(configtx *common.ConfigEnvelope) error

func (*ChannelResources) ApplyArgsForCall

func (fake *ChannelResources) ApplyArgsForCall(i int) *common.ConfigEnvelope

func (*ChannelResources) ApplyCallCount

func (fake *ChannelResources) ApplyCallCount() int

func (*ChannelResources) ApplyReturns

func (fake *ChannelResources) ApplyReturns(result1 error)

func (*ChannelResources) ApplyReturnsOnCall

func (fake *ChannelResources) ApplyReturnsOnCall(i int, result1 error)

func (*ChannelResources) Capabilities

func (*ChannelResources) CapabilitiesCallCount

func (fake *ChannelResources) CapabilitiesCallCount() int

func (*ChannelResources) CapabilitiesReturns

func (fake *ChannelResources) CapabilitiesReturns(result1 channelconfig.ApplicationCapabilities)

func (*ChannelResources) CapabilitiesReturnsOnCall

func (fake *ChannelResources) CapabilitiesReturnsOnCall(i int, result1 channelconfig.ApplicationCapabilities)

func (*ChannelResources) GetMSPIDs

func (fake *ChannelResources) GetMSPIDs() []string

func (*ChannelResources) GetMSPIDsCallCount

func (fake *ChannelResources) GetMSPIDsCallCount() int

func (*ChannelResources) GetMSPIDsReturns

func (fake *ChannelResources) GetMSPIDsReturns(result1 []string)

func (*ChannelResources) GetMSPIDsReturnsOnCall

func (fake *ChannelResources) GetMSPIDsReturnsOnCall(i int, result1 []string)

func (*ChannelResources) Invocations

func (fake *ChannelResources) Invocations() map[string][][]interface{}

func (*ChannelResources) Ledger

func (fake *ChannelResources) Ledger() ledger.PeerLedger

func (*ChannelResources) LedgerCallCount

func (fake *ChannelResources) LedgerCallCount() int

func (*ChannelResources) LedgerReturns

func (fake *ChannelResources) LedgerReturns(result1 ledger.PeerLedger)

func (*ChannelResources) LedgerReturnsOnCall

func (fake *ChannelResources) LedgerReturnsOnCall(i int, result1 ledger.PeerLedger)

func (*ChannelResources) MSPManager

func (fake *ChannelResources) MSPManager() msp.MSPManager

func (*ChannelResources) MSPManagerCallCount

func (fake *ChannelResources) MSPManagerCallCount() int

func (*ChannelResources) MSPManagerReturns

func (fake *ChannelResources) MSPManagerReturns(result1 msp.MSPManager)

func (*ChannelResources) MSPManagerReturnsOnCall

func (fake *ChannelResources) MSPManagerReturnsOnCall(i int, result1 msp.MSPManager)

type ContextProvider

type ContextProvider struct {
	ValidationContextForBlockStub func(channelID string, blockNum uint64) (context.Context, error)
	// contains filtered or unexported fields
}

func (*ContextProvider) Invocations

func (fake *ContextProvider) Invocations() map[string][][]interface{}

func (*ContextProvider) ValidationContextForBlock

func (fake *ContextProvider) ValidationContextForBlock(channelID string, blockNum uint64) (context.Context, error)

func (*ContextProvider) ValidationContextForBlockArgsForCall

func (fake *ContextProvider) ValidationContextForBlockArgsForCall(i int) (string, uint64)

func (*ContextProvider) ValidationContextForBlockCallCount

func (fake *ContextProvider) ValidationContextForBlockCallCount() int

func (*ContextProvider) ValidationContextForBlockReturns

func (fake *ContextProvider) ValidationContextForBlockReturns(result1 context.Context, result2 error)

func (*ContextProvider) ValidationContextForBlockReturnsOnCall

func (fake *ContextProvider) ValidationContextForBlockReturnsOnCall(i int, result1 context.Context, result2 error)

type DistributedValidator

type DistributedValidator struct {
	ValidatePartialStub func(ctx context.Context, block *cb.Block) (txflags.ValidationFlags, []string, error)

	SubmitValidationResultsStub func(results *validationresults.Results)

	GetValidatingPeersStub func(block *cb.Block) (discovery.PeerGroup, error)
	// contains filtered or unexported fields
}

func (*DistributedValidator) GetValidatingPeers

func (fake *DistributedValidator) GetValidatingPeers(block *cb.Block) (discovery.PeerGroup, error)

func (*DistributedValidator) GetValidatingPeersArgsForCall

func (fake *DistributedValidator) GetValidatingPeersArgsForCall(i int) *cb.Block

func (*DistributedValidator) GetValidatingPeersCallCount

func (fake *DistributedValidator) GetValidatingPeersCallCount() int

func (*DistributedValidator) GetValidatingPeersReturns

func (fake *DistributedValidator) GetValidatingPeersReturns(result1 discovery.PeerGroup, result2 error)

func (*DistributedValidator) GetValidatingPeersReturnsOnCall

func (fake *DistributedValidator) GetValidatingPeersReturnsOnCall(i int, result1 discovery.PeerGroup, result2 error)

func (*DistributedValidator) Invocations

func (fake *DistributedValidator) Invocations() map[string][][]interface{}

func (*DistributedValidator) SubmitValidationResults

func (fake *DistributedValidator) SubmitValidationResults(results *validationresults.Results)

func (*DistributedValidator) SubmitValidationResultsArgsForCall

func (fake *DistributedValidator) SubmitValidationResultsArgsForCall(i int) *validationresults.Results

func (*DistributedValidator) SubmitValidationResultsCallCount

func (fake *DistributedValidator) SubmitValidationResultsCallCount() int

func (*DistributedValidator) ValidatePartial

func (fake *DistributedValidator) ValidatePartial(ctx context.Context, block *cb.Block) (txflags.ValidationFlags, []string, error)

func (*DistributedValidator) ValidatePartialArgsForCall

func (fake *DistributedValidator) ValidatePartialArgsForCall(i int) (context.Context, *cb.Block)

func (*DistributedValidator) ValidatePartialCallCount

func (fake *DistributedValidator) ValidatePartialCallCount() int

func (*DistributedValidator) ValidatePartialReturns

func (fake *DistributedValidator) ValidatePartialReturns(result1 txflags.ValidationFlags, result2 []string, result3 error)

func (*DistributedValidator) ValidatePartialReturnsOnCall

func (fake *DistributedValidator) ValidatePartialReturnsOnCall(i int, result1 txflags.ValidationFlags, result2 []string, result3 error)

type DistributedValidatorProvider

type DistributedValidatorProvider struct {
	GetValidatorForChannelStub func(channelID string) vcommon.DistributedValidator
	// contains filtered or unexported fields
}

func (*DistributedValidatorProvider) GetValidatorForChannel

func (fake *DistributedValidatorProvider) GetValidatorForChannel(channelID string) vcommon.DistributedValidator

func (*DistributedValidatorProvider) GetValidatorForChannelArgsForCall

func (fake *DistributedValidatorProvider) GetValidatorForChannelArgsForCall(i int) string

func (*DistributedValidatorProvider) GetValidatorForChannelCallCount

func (fake *DistributedValidatorProvider) GetValidatorForChannelCallCount() int

func (*DistributedValidatorProvider) GetValidatorForChannelReturns

func (fake *DistributedValidatorProvider) GetValidatorForChannelReturns(result1 vcommon.DistributedValidator)

func (*DistributedValidatorProvider) GetValidatorForChannelReturnsOnCall

func (fake *DistributedValidatorProvider) GetValidatorForChannelReturnsOnCall(i int, result1 vcommon.DistributedValidator)

func (*DistributedValidatorProvider) Invocations

func (fake *DistributedValidatorProvider) Invocations() map[string][][]interface{}

type Semaphore

type Semaphore struct {
	AcquireStub func(ctx context.Context) error

	ReleaseStub func()
	// contains filtered or unexported fields
}

func (*Semaphore) Acquire

func (fake *Semaphore) Acquire(ctx context.Context) error

func (*Semaphore) AcquireArgsForCall

func (fake *Semaphore) AcquireArgsForCall(i int) context.Context

func (*Semaphore) AcquireCallCount

func (fake *Semaphore) AcquireCallCount() int

func (*Semaphore) AcquireReturns

func (fake *Semaphore) AcquireReturns(result1 error)

func (*Semaphore) AcquireReturnsOnCall

func (fake *Semaphore) AcquireReturnsOnCall(i int, result1 error)

func (*Semaphore) Invocations

func (fake *Semaphore) Invocations() map[string][][]interface{}

func (*Semaphore) Release

func (fake *Semaphore) Release()

func (*Semaphore) ReleaseCallCount

func (fake *Semaphore) ReleaseCallCount() int

type TxValidator

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

TxValidator implements a mock transaction validator

func NewTxValidator

func NewTxValidator() *TxValidator

NewTxValidator returns a mock transaction validator

func (*TxValidator) ValidateTx

func (m *TxValidator) ValidateTx(req *validatorv20.BlockValidationRequest, resultsChan chan<- *validatorv20.BlockValidationResult)

ValidateTx submits any mock validation results to the given results channel

func (*TxValidator) WithValidationResult

func (m *TxValidator) WithValidationResult(r *validatorv20.BlockValidationResult) *TxValidator

WithValidationResult adds mock validation results that will be submitted when Validate is invoked

Jump to

Keyboard shortcuts

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