mockfab

package
v1.0.0-alpha5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package mockfab is a generated GoMock package.

Index

Constants

View Source
const ErrorMessage = "default error message"

ErrorMessage is a mock error message

Variables

View Source
var BadCert = &x509.Certificate{Raw: []byte{1, 2}}

BadCert is a mock of a bad certificate

View Source
var CertPool = x509.NewCertPool()

CertPool is a mock of a *x509.CertPool

View Source
var GoodCert = &x509.Certificate{Raw: []byte{0, 1, 2}}

GoodCert is a mock of a good certificate

View Source
var TLSCert = tls.Certificate{Certificate: [][]byte{{3}, {4}}}

TLSCert is a mock of a tls.Certificate{}

Functions

This section is empty.

Types

type MockCertPool

type MockCertPool struct {
	CertPool *x509.CertPool
	Err      error
}

MockCertPool for unit tests to mock CertPool

func (*MockCertPool) Add

func (c *MockCertPool) Add(certs ...*x509.Certificate)

Add mock impl of adding certs to cert pool queue

func (*MockCertPool) Get

func (c *MockCertPool) Get() (*x509.CertPool, error)

Get mock implementation of fab CertPool.Get()

type MockEndpointConfig

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

MockEndpointConfig is a mock of EndpointConfig interface

func BadTLSClientMockConfig

func BadTLSClientMockConfig(mockCtrl *gomock.Controller) *MockEndpointConfig

BadTLSClientMockConfig returns a mock config for testing with TLSClientCerts() that always returns an error

func CustomMockConfig

func CustomMockConfig(mockCtrl *gomock.Controller, certPool *x509.CertPool) *MockEndpointConfig

CustomMockConfig returns a custom mock config with custom certpool for testing

func DefaultMockConfig

func DefaultMockConfig(mockCtrl *gomock.Controller) *MockEndpointConfig

DefaultMockConfig returns a default mock config for testing

func NewMockEndpointConfig

func NewMockEndpointConfig(ctrl *gomock.Controller) *MockEndpointConfig

NewMockEndpointConfig creates a new mock instance

func (*MockEndpointConfig) ChannelConfig

func (m *MockEndpointConfig) ChannelConfig(arg0 string) *fab.ChannelEndpointConfig

ChannelConfig mocks base method

func (*MockEndpointConfig) ChannelOrderers

func (m *MockEndpointConfig) ChannelOrderers(arg0 string) []fab.OrdererConfig

ChannelOrderers mocks base method

func (*MockEndpointConfig) ChannelPeers

func (m *MockEndpointConfig) ChannelPeers(arg0 string) []fab.ChannelPeer

ChannelPeers mocks base method

func (*MockEndpointConfig) CryptoConfigPath

func (m *MockEndpointConfig) CryptoConfigPath() string

CryptoConfigPath mocks base method

func (*MockEndpointConfig) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockEndpointConfig) NetworkConfig

func (m *MockEndpointConfig) NetworkConfig() *fab.NetworkConfig

NetworkConfig mocks base method

func (*MockEndpointConfig) NetworkPeers

func (m *MockEndpointConfig) NetworkPeers() []fab.NetworkPeer

NetworkPeers mocks base method

func (*MockEndpointConfig) OrdererConfig

func (m *MockEndpointConfig) OrdererConfig(arg0 string) (*fab.OrdererConfig, bool)

OrdererConfig mocks base method

func (*MockEndpointConfig) OrderersConfig

func (m *MockEndpointConfig) OrderersConfig() []fab.OrdererConfig

OrderersConfig mocks base method

func (*MockEndpointConfig) PeerConfig

func (m *MockEndpointConfig) PeerConfig(arg0 string) (*fab.PeerConfig, bool)

PeerConfig mocks base method

func (*MockEndpointConfig) PeersConfig

func (m *MockEndpointConfig) PeersConfig(arg0 string) ([]fab.PeerConfig, bool)

PeersConfig mocks base method

func (*MockEndpointConfig) TLSCACertPool

func (m *MockEndpointConfig) TLSCACertPool() fab.CertPool

TLSCACertPool mocks base method

func (*MockEndpointConfig) TLSClientCerts

func (m *MockEndpointConfig) TLSClientCerts() []tls.Certificate

TLSClientCerts mocks base method

func (*MockEndpointConfig) Timeout

func (m *MockEndpointConfig) Timeout(arg0 fab.TimeoutType) time.Duration

Timeout mocks base method

type MockEndpointConfigMockRecorder

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

MockEndpointConfigMockRecorder is the mock recorder for MockEndpointConfig

func (*MockEndpointConfigMockRecorder) ChannelConfig

func (mr *MockEndpointConfigMockRecorder) ChannelConfig(arg0 interface{}) *gomock.Call

ChannelConfig indicates an expected call of ChannelConfig

func (*MockEndpointConfigMockRecorder) ChannelOrderers

func (mr *MockEndpointConfigMockRecorder) ChannelOrderers(arg0 interface{}) *gomock.Call

ChannelOrderers indicates an expected call of ChannelOrderers

func (*MockEndpointConfigMockRecorder) ChannelPeers

func (mr *MockEndpointConfigMockRecorder) ChannelPeers(arg0 interface{}) *gomock.Call

ChannelPeers indicates an expected call of ChannelPeers

func (*MockEndpointConfigMockRecorder) CryptoConfigPath

func (mr *MockEndpointConfigMockRecorder) CryptoConfigPath() *gomock.Call

CryptoConfigPath indicates an expected call of CryptoConfigPath

func (*MockEndpointConfigMockRecorder) NetworkConfig

func (mr *MockEndpointConfigMockRecorder) NetworkConfig() *gomock.Call

NetworkConfig indicates an expected call of NetworkConfig

func (*MockEndpointConfigMockRecorder) NetworkPeers

func (mr *MockEndpointConfigMockRecorder) NetworkPeers() *gomock.Call

NetworkPeers indicates an expected call of NetworkPeers

func (*MockEndpointConfigMockRecorder) OrdererConfig

func (mr *MockEndpointConfigMockRecorder) OrdererConfig(arg0 interface{}) *gomock.Call

OrdererConfig indicates an expected call of OrdererConfig

func (*MockEndpointConfigMockRecorder) OrderersConfig

func (mr *MockEndpointConfigMockRecorder) OrderersConfig() *gomock.Call

OrderersConfig indicates an expected call of OrderersConfig

func (*MockEndpointConfigMockRecorder) PeerConfig

func (mr *MockEndpointConfigMockRecorder) PeerConfig(arg0 interface{}) *gomock.Call

PeerConfig indicates an expected call of PeerConfig

func (*MockEndpointConfigMockRecorder) PeersConfig

func (mr *MockEndpointConfigMockRecorder) PeersConfig(arg0 interface{}) *gomock.Call

PeersConfig indicates an expected call of PeersConfig

func (*MockEndpointConfigMockRecorder) TLSCACertPool

func (mr *MockEndpointConfigMockRecorder) TLSCACertPool() *gomock.Call

TLSCACertPool indicates an expected call of TLSCACertPool

func (*MockEndpointConfigMockRecorder) TLSClientCerts

func (mr *MockEndpointConfigMockRecorder) TLSClientCerts() *gomock.Call

TLSClientCerts indicates an expected call of TLSClientCerts

func (*MockEndpointConfigMockRecorder) Timeout

func (mr *MockEndpointConfigMockRecorder) Timeout(arg0 interface{}) *gomock.Call

Timeout indicates an expected call of Timeout

type MockProposalProcessor

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

MockProposalProcessor is a mock of ProposalProcessor interface

func NewMockProposalProcessor

func NewMockProposalProcessor(ctrl *gomock.Controller) *MockProposalProcessor

NewMockProposalProcessor creates a new mock instance

func (*MockProposalProcessor) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockProposalProcessor) ProcessTransactionProposal

ProcessTransactionProposal mocks base method

type MockProposalProcessorMockRecorder

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

MockProposalProcessorMockRecorder is the mock recorder for MockProposalProcessor

func (*MockProposalProcessorMockRecorder) ProcessTransactionProposal

func (mr *MockProposalProcessorMockRecorder) ProcessTransactionProposal(arg0, arg1 interface{}) *gomock.Call

ProcessTransactionProposal indicates an expected call of ProcessTransactionProposal

type MockProviders

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

MockProviders is a mock of Providers interface

func NewMockProviders

func NewMockProviders(ctrl *gomock.Controller) *MockProviders

NewMockProviders creates a new mock instance

func (*MockProviders) ChannelProvider

func (m *MockProviders) ChannelProvider() fab.ChannelProvider

ChannelProvider mocks base method

func (*MockProviders) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockProviders) EndpointConfig

func (m *MockProviders) EndpointConfig() fab.EndpointConfig

EndpointConfig mocks base method

func (*MockProviders) GetMetrics

func (m *MockProviders) GetMetrics() *metrics.ClientMetrics

GetMetrics mocks base method

func (*MockProviders) InfraProvider

func (m *MockProviders) InfraProvider() fab.InfraProvider

InfraProvider mocks base method

func (*MockProviders) LocalDiscoveryProvider

func (m *MockProviders) LocalDiscoveryProvider() fab.LocalDiscoveryProvider

LocalDiscoveryProvider mocks base method

type MockProvidersMockRecorder

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

MockProvidersMockRecorder is the mock recorder for MockProviders

func (*MockProvidersMockRecorder) ChannelProvider

func (mr *MockProvidersMockRecorder) ChannelProvider() *gomock.Call

ChannelProvider indicates an expected call of ChannelProvider

func (*MockProvidersMockRecorder) EndpointConfig

func (mr *MockProvidersMockRecorder) EndpointConfig() *gomock.Call

EndpointConfig indicates an expected call of EndpointConfig

func (*MockProvidersMockRecorder) GetMetrics

func (mr *MockProvidersMockRecorder) GetMetrics() *gomock.Call

GetMetrics indicates an expected call of GetMetrics

func (*MockProvidersMockRecorder) InfraProvider

func (mr *MockProvidersMockRecorder) InfraProvider() *gomock.Call

InfraProvider indicates an expected call of InfraProvider

func (*MockProvidersMockRecorder) LocalDiscoveryProvider

func (mr *MockProvidersMockRecorder) LocalDiscoveryProvider() *gomock.Call

LocalDiscoveryProvider indicates an expected call of LocalDiscoveryProvider

Jump to

Keyboard shortcuts

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