Documentation ¶
Index ¶
- func NewMockConfig(CAServerURL string) core.Config
- type MockConfig
- func (c *MockConfig) CAClientCertPath(org string) (string, error)
- func (c *MockConfig) CAClientCertPem(org string) (string, error)
- func (c *MockConfig) CAClientKeyPath(org string) (string, error)
- func (c *MockConfig) CAClientKeyPem(org string) (string, error)
- func (c *MockConfig) CAConfig(org string) (*core.CAConfig, error)
- func (c *MockConfig) CAKeyStorePath() string
- func (c *MockConfig) CAServerCertPaths(org string) ([]string, error)
- func (c *MockConfig) CAServerCertPems(org string) ([]string, error)
- func (c *MockConfig) ChannelConfig(name string) (*core.ChannelConfig, error)
- func (c *MockConfig) ChannelOrderers(name string) ([]core.OrdererConfig, error)
- func (c *MockConfig) ChannelPeers(name string) ([]core.ChannelPeer, error)
- func (c *MockConfig) Client() (*core.ClientConfig, error)
- func (c *MockConfig) CredentialStorePath() string
- func (c *MockConfig) CryptoConfigPath() string
- func (c *MockConfig) Ephemeral() bool
- func (c *MockConfig) EventServiceType() core.EventServiceType
- func (c *MockConfig) IsSecurityEnabled() bool
- func (c *MockConfig) KeyStorePath() string
- func (c *MockConfig) MSPID(org string) (string, error)
- func (c *MockConfig) NetworkConfig() (*core.NetworkConfig, error)
- func (c *MockConfig) NetworkPeers() ([]core.NetworkPeer, error)
- func (c *MockConfig) OrdererConfig(name string) (*core.OrdererConfig, error)
- func (c *MockConfig) OrderersConfig() ([]core.OrdererConfig, error)
- func (c *MockConfig) PeerConfig(org string, name string) (*core.PeerConfig, error)
- func (c *MockConfig) PeerConfigByURL(url string) (*core.PeerConfig, error)
- func (c *MockConfig) PeerMSPID(name string) (string, error)
- func (c *MockConfig) PeersConfig(org string) ([]core.PeerConfig, error)
- func (c *MockConfig) RandomOrdererConfig() (*core.OrdererConfig, error)
- func (c *MockConfig) SecurityAlgorithm() string
- func (c *MockConfig) SecurityLevel() int
- func (c *MockConfig) SecurityProvider() string
- func (c *MockConfig) SecurityProviderLabel() string
- func (c *MockConfig) SecurityProviderLibPath() string
- func (c *MockConfig) SecurityProviderPin() string
- func (c *MockConfig) SoftVerify() bool
- func (c *MockConfig) TLSCACertPool(cert ...*x509.Certificate) (*x509.CertPool, error)
- func (c *MockConfig) TLSClientCerts() ([]tls.Certificate, error)
- func (c *MockConfig) TcertBatchSize() int
- func (c *MockConfig) Timeout(core.TimeoutType) time.Duration
- func (c *MockConfig) TimeoutOrDefault(core.TimeoutType) time.Duration
- type MockFabricCAServer
- type MockKey
- type MockSigningIdentity
- func (m MockSigningIdentity) EnrollmentCertificate() []byte
- func (m MockSigningIdentity) Identifier() *msp.IdentityIdentifier
- func (m MockSigningIdentity) PrivateKey() core.Key
- func (m MockSigningIdentity) PublicVersion() msp.Identity
- func (m MockSigningIdentity) Serialize() ([]byte, error)
- func (m MockSigningIdentity) SetEnrollmentCertificate(cert []byte)
- func (m MockSigningIdentity) SetPrivateKey(key core.Key)
- func (m MockSigningIdentity) Sign(msg []byte) ([]byte, error)
- func (m MockSigningIdentity) Verify(msg []byte, sig []byte) error
- type MockUserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) 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) 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) 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) 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) 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) 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 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
type MockUserStore ¶
type MockUserStore struct { }
MockUserStore ...
func (*MockUserStore) Load ¶
func (m *MockUserStore) Load(identifier msp.IdentityIdentifier) (*msp.UserData, error)
Load ...