Documentation ¶
Index ¶
- func Enroll(w http.ResponseWriter, req *http.Request)
- func NewMockConfig(CAServerURL string) apiconfig.Config
- func Reenroll(w http.ResponseWriter, req *http.Request)
- func Register(w http.ResponseWriter, req *http.Request)
- func StartFabricCAMockServer(address string) error
- 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) (*apiconfig.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) (*apiconfig.ChannelConfig, error)
- func (c *MockConfig) ChannelOrderers(name string) ([]apiconfig.OrdererConfig, error)
- func (c *MockConfig) ChannelPeers(name string) ([]apiconfig.ChannelPeer, error)
- func (c *MockConfig) Client() (*apiconfig.ClientConfig, error)
- func (c *MockConfig) CryptoConfigPath() string
- func (c *MockConfig) Ephemeral() bool
- func (c *MockConfig) IsSecurityEnabled() bool
- func (c *MockConfig) KeyStorePath() string
- func (c *MockConfig) MspID(org string) (string, error)
- func (c *MockConfig) NetworkConfig() (*apiconfig.NetworkConfig, error)
- func (c *MockConfig) NetworkPeers() ([]apiconfig.NetworkPeer, error)
- func (c *MockConfig) OrdererConfig(name string) (*apiconfig.OrdererConfig, error)
- func (c *MockConfig) OrderersConfig() ([]apiconfig.OrdererConfig, error)
- func (c *MockConfig) PeerConfig(org string, name string) (*apiconfig.PeerConfig, error)
- func (c *MockConfig) PeerMspID(name string) (string, error)
- func (c *MockConfig) PeersConfig(org string) ([]apiconfig.PeerConfig, error)
- func (c *MockConfig) RandomOrdererConfig() (*apiconfig.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) SetTLSCACertPool(pool *x509.CertPool)
- 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) TimeoutOrDefault(apiconfig.TimeoutType) time.Duration
- type MockKey
- type MockUser
- func (u *MockUser) EnrollmentCertificate() []byte
- func (u *MockUser) GenerateTcerts(count int, attributes []string)
- func (u *MockUser) Identity() ([]byte, error)
- func (u *MockUser) MspID() string
- func (u *MockUser) Name() string
- func (u *MockUser) PrivateKey() apicryptosuite.Key
- func (u *MockUser) Roles() []string
- func (u *MockUser) SetEnrollmentCertificate(cert []byte)
- func (u *MockUser) SetMspID(mspID string)
- func (u *MockUser) SetPrivateKey(privateKey apicryptosuite.Key)
- func (u *MockUser) SetRoles(roles []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartFabricCAMockServer ¶
StartFabricCAMockServer Start fabric ca mock server
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) (*apiconfig.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) (*apiconfig.ChannelConfig, error)
ChannelConfig returns the channel configuration
func (*MockConfig) ChannelOrderers ¶
func (c *MockConfig) ChannelOrderers(name string) ([]apiconfig.OrdererConfig, error)
ChannelOrderers returns a list of channel orderers
func (*MockConfig) ChannelPeers ¶
func (c *MockConfig) ChannelPeers(name string) ([]apiconfig.ChannelPeer, error)
ChannelPeers returns the channel peers configuration
func (*MockConfig) Client ¶
func (c *MockConfig) Client() (*apiconfig.ClientConfig, error)
Client returns the Client config
func (*MockConfig) CryptoConfigPath ¶
func (c *MockConfig) CryptoConfigPath() string
CryptoConfigPath ...
func (*MockConfig) IsSecurityEnabled ¶
func (c *MockConfig) IsSecurityEnabled() bool
IsSecurityEnabled ...
func (*MockConfig) NetworkConfig ¶
func (c *MockConfig) NetworkConfig() (*apiconfig.NetworkConfig, error)
NetworkConfig not implemented
func (*MockConfig) NetworkPeers ¶
func (c *MockConfig) NetworkPeers() ([]apiconfig.NetworkPeer, error)
NetworkPeers returns the mock network peers configuration
func (*MockConfig) OrdererConfig ¶
func (c *MockConfig) OrdererConfig(name string) (*apiconfig.OrdererConfig, error)
OrdererConfig not implemented
func (*MockConfig) OrderersConfig ¶
func (c *MockConfig) OrderersConfig() ([]apiconfig.OrdererConfig, error)
OrderersConfig returns a list of defined orderers
func (*MockConfig) PeerConfig ¶
func (c *MockConfig) PeerConfig(org string, name string) (*apiconfig.PeerConfig, error)
PeerConfig Retrieves a specific peer from the configuration by org and name
func (*MockConfig) PeerMspID ¶
func (c *MockConfig) PeerMspID(name string) (string, error)
PeerMspID not implemented
func (*MockConfig) PeersConfig ¶
func (c *MockConfig) PeersConfig(org string) ([]apiconfig.PeerConfig, error)
PeersConfig Retrieves the fabric peers from the config file provided
func (*MockConfig) RandomOrdererConfig ¶
func (c *MockConfig) RandomOrdererConfig() (*apiconfig.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) SetTLSCACertPool ¶
func (c *MockConfig) SetTLSCACertPool(pool *x509.CertPool)
SetTLSCACertPool ...
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) TimeoutOrDefault ¶
func (c *MockConfig) TimeoutOrDefault(apiconfig.TimeoutType) time.Duration
TimeoutOrDefault not implemented
type MockUser ¶
type MockUser struct {
// contains filtered or unexported fields
}
MockUser ...
func (*MockUser) EnrollmentCertificate ¶
EnrollmentCertificate ... *
- Returns the underlying ECert representing this user’s identity.
func (*MockUser) GenerateTcerts ¶
GenerateTcerts ... *
- Gets a batch of TCerts to use for transaction. there is a 1-to-1 relationship between
- TCert and Transaction. The TCert can be generated locally by the SDK using the user’s crypto materials.
- @param {int} count how many in the batch to obtain
- @param {[]string} attributes list of attributes to include in the TCert
- @return {[]tcert} An array of TCerts
func (*MockUser) PrivateKey ¶
func (u *MockUser) PrivateKey() apicryptosuite.Key
PrivateKey ... *
- deprecated.
func (*MockUser) SetEnrollmentCertificate ¶
SetEnrollmentCertificate ... *
- Set the user’s Enrollment Certificate.
func (*MockUser) SetPrivateKey ¶
func (u *MockUser) SetPrivateKey(privateKey apicryptosuite.Key)
SetPrivateKey ... *
- deprecated.