mockmsp

package
v1.0.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockConfig

func NewMockConfig(CAServerURL string) core.Config

NewMockConfig ...

Types

type MockConfig

type MockConfig struct {
	CAServerURL string
}

MockConfig ...

func (*MockConfig) CAClientCertPath

func (c *MockConfig) CAClientCertPath(org string) (string, error)

CAClientCertPath Read configuration option for the fabric CA client cert file

func (*MockConfig) CAClientCertPem

func (c *MockConfig) CAClientCertPem(org string) (string, error)

CAClientCertPem Read configuration option for the fabric CA client cert from a string

func (*MockConfig) CAClientKeyPath

func (c *MockConfig) CAClientKeyPath(org string) (string, error)

CAClientKeyPath Read configuration option for the fabric CA client key file

func (*MockConfig) CAClientKeyPem

func (c *MockConfig) CAClientKeyPem(org string) (string, error)

CAClientKeyPem Read configuration option for the fabric CA client key from a string

func (*MockConfig) CAConfig

func (c *MockConfig) CAConfig(org string) (*core.CAConfig, error)

CAConfig return ca configuration

func (*MockConfig) CAKeyStorePath

func (c *MockConfig) CAKeyStorePath() string

CAKeyStorePath ...

func (*MockConfig) CAServerCertPaths

func (c *MockConfig) CAServerCertPaths(org string) ([]string, error)

CAServerCertPaths Read configuration option for the server certificate files

func (*MockConfig) CAServerCertPems

func (c *MockConfig) CAServerCertPems(org string) ([]string, error)

CAServerCertPems Read configuration option for the server certificate embedded pems

func (*MockConfig) ChannelConfig

func (c *MockConfig) ChannelConfig(name string) (*core.ChannelConfig, error)

ChannelConfig returns the channel configuration

func (*MockConfig) ChannelOrderers

func (c *MockConfig) ChannelOrderers(name string) ([]core.OrdererConfig, error)

ChannelOrderers returns a list of channel orderers

func (*MockConfig) ChannelPeers

func (c *MockConfig) ChannelPeers(name string) ([]core.ChannelPeer, error)

ChannelPeers returns the channel peers configuration

func (*MockConfig) Client

func (c *MockConfig) Client() (*core.ClientConfig, error)

Client returns the Client config

func (*MockConfig) CredentialStorePath

func (c *MockConfig) CredentialStorePath() string

CredentialStorePath ...

func (*MockConfig) CryptoConfigPath

func (c *MockConfig) CryptoConfigPath() string

CryptoConfigPath ...

func (*MockConfig) Ephemeral

func (c *MockConfig) Ephemeral() bool

Ephemeral flag

func (*MockConfig) EventServiceType

func (c *MockConfig) EventServiceType() core.EventServiceType

EventServiceType returns the type of event service client to use

func (*MockConfig) IsSecurityEnabled

func (c *MockConfig) IsSecurityEnabled() bool

IsSecurityEnabled ...

func (*MockConfig) KeyStorePath

func (c *MockConfig) KeyStorePath() string

KeyStorePath ...

func (*MockConfig) MSPID

func (c *MockConfig) MSPID(org string) (string, error)

MSPID ...

func (*MockConfig) NetworkConfig

func (c *MockConfig) NetworkConfig() (*core.NetworkConfig, error)

NetworkConfig not implemented

func (*MockConfig) NetworkPeers

func (c *MockConfig) NetworkPeers() ([]core.NetworkPeer, error)

NetworkPeers returns the mock network peers configuration

func (*MockConfig) OrdererConfig

func (c *MockConfig) OrdererConfig(name string) (*core.OrdererConfig, error)

OrdererConfig not implemented

func (*MockConfig) OrderersConfig

func (c *MockConfig) OrderersConfig() ([]core.OrdererConfig, error)

OrderersConfig returns a list of defined orderers

func (*MockConfig) PeerConfig

func (c *MockConfig) PeerConfig(org string, name string) (*core.PeerConfig, error)

PeerConfig Retrieves a specific peer from the configuration by org and name

func (*MockConfig) PeerConfigByURL

func (c *MockConfig) PeerConfigByURL(url string) (*core.PeerConfig, error)

PeerConfigByURL retrieves PeerConfig by URL

func (*MockConfig) PeerMSPID

func (c *MockConfig) PeerMSPID(name string) (string, error)

PeerMSPID not implemented

func (*MockConfig) PeersConfig

func (c *MockConfig) PeersConfig(org string) ([]core.PeerConfig, error)

PeersConfig Retrieves the fabric peers from the config file provided

func (*MockConfig) RandomOrdererConfig

func (c *MockConfig) RandomOrdererConfig() (*core.OrdererConfig, error)

RandomOrdererConfig not implemented

func (*MockConfig) SecurityAlgorithm

func (c *MockConfig) SecurityAlgorithm() string

SecurityAlgorithm ...

func (*MockConfig) SecurityLevel

func (c *MockConfig) SecurityLevel() int

SecurityLevel ...

func (*MockConfig) SecurityProvider

func (c *MockConfig) SecurityProvider() string

SecurityProvider provider SW or PKCS11

func (*MockConfig) SecurityProviderLabel

func (c *MockConfig) SecurityProviderLabel() string

SecurityProviderLabel will be set only if provider is PKCS11

func (*MockConfig) SecurityProviderLibPath

func (c *MockConfig) SecurityProviderLibPath() string

SecurityProviderLibPath will be set only if provider is PKCS11

func (*MockConfig) SecurityProviderPin

func (c *MockConfig) SecurityProviderPin() string

SecurityProviderPin will be set only if provider is PKCS11

func (*MockConfig) SoftVerify

func (c *MockConfig) SoftVerify() bool

SoftVerify flag

func (*MockConfig) TLSCACertPool

func (c *MockConfig) TLSCACertPool(cert ...*x509.Certificate) (*x509.CertPool, error)

TLSCACertPool ...

func (*MockConfig) TLSClientCerts

func (c *MockConfig) TLSClientCerts() ([]tls.Certificate, error)

TLSClientCerts ...

func (*MockConfig) TcertBatchSize

func (c *MockConfig) TcertBatchSize() int

TcertBatchSize ...

func (*MockConfig) Timeout

func (c *MockConfig) Timeout(core.TimeoutType) time.Duration

Timeout not implemented

func (*MockConfig) TimeoutOrDefault

func (c *MockConfig) TimeoutOrDefault(core.TimeoutType) time.Duration

TimeoutOrDefault not implemented

type MockFabricCAServer

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

MockFabricCAServer is a mock for FabricCAServer

func (*MockFabricCAServer) Running

func (s *MockFabricCAServer) Running() bool

Running returns the status of the mock server

func (*MockFabricCAServer) Start

func (s *MockFabricCAServer) Start(lis net.Listener, cryptoSuite core.CryptoSuite)

Start fabric CA mock server

type MockKey

type MockKey struct {
}

MockKey mockcore BCCSP key

func (*MockKey) Bytes

func (m *MockKey) Bytes() ([]byte, error)

Bytes ...

func (*MockKey) Private

func (m *MockKey) Private() bool

Private ...

func (*MockKey) PublicKey

func (m *MockKey) PublicKey() (bccsp.Key, error)

PublicKey ...

func (*MockKey) SKI

func (m *MockKey) SKI() []byte

SKI ...

func (*MockKey) Symmetric

func (m *MockKey) Symmetric() bool

Symmetric ...

type MockSigningIdentity

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

MockSigningIdentity ...

func NewMockSigningIdentity

func NewMockSigningIdentity(id string, mspid string) *MockSigningIdentity

NewMockSigningIdentity to return mock user with MSPID

func (MockSigningIdentity) EnrollmentCertificate

func (m MockSigningIdentity) EnrollmentCertificate() []byte

EnrollmentCertificate Returns the underlying ECert representing this user’s identity.

func (MockSigningIdentity) Identifier

func (m MockSigningIdentity) Identifier() *msp.IdentityIdentifier

Identifier returns the identifier of that identity

func (MockSigningIdentity) PrivateKey

func (m MockSigningIdentity) PrivateKey() core.Key

PrivateKey returns the crypto suite representation of the private key

func (MockSigningIdentity) PublicVersion

func (m MockSigningIdentity) PublicVersion() msp.Identity

PublicVersion returns the public parts of this identity

func (MockSigningIdentity) Serialize

func (m MockSigningIdentity) Serialize() ([]byte, error)

Serialize converts an identity to bytes

func (MockSigningIdentity) SetEnrollmentCertificate

func (m MockSigningIdentity) SetEnrollmentCertificate(cert []byte)

SetEnrollmentCertificate sets yhe enrollment certificate.

func (MockSigningIdentity) SetPrivateKey

func (m MockSigningIdentity) SetPrivateKey(key core.Key)

SetPrivateKey sets the private key

func (MockSigningIdentity) Sign

func (m MockSigningIdentity) Sign(msg []byte) ([]byte, error)

Sign the message

func (MockSigningIdentity) Verify

func (m MockSigningIdentity) Verify(msg []byte, sig []byte) error

Verify a signature over some message using this identity as reference

type MockUserStore

type MockUserStore struct {
}

MockUserStore ...

func (*MockUserStore) Load

func (m *MockUserStore) Load(identifier msp.IdentityIdentifier) (*msp.UserData, error)

Load ...

func (*MockUserStore) Store

func (m *MockUserStore) Store(*msp.UserData) error

Store ...

Jump to

Keyboard shortcuts

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