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) CAClientCertFile(org string) (string, error)
- func (c *MockConfig) CAClientKeyFile(org string) (string, error)
- func (c *MockConfig) CAConfig(org string) (*apiconfig.CAConfig, error)
- func (c *MockConfig) CAKeyStorePath() string
- func (c *MockConfig) CAServerCertFiles(org string) ([]string, error)
- func (c *MockConfig) CSPConfig() *bccspFactory.FactoryOpts
- func (c *MockConfig) ChannelConfig(name string) (*apiconfig.ChannelConfig, 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) 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) 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(tlsCertificate string) (*x509.CertPool, 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() bccsp.Key
- func (u *MockUser) Roles() []string
- func (u *MockUser) SetEnrollmentCertificate(cert []byte)
- func (u *MockUser) SetMspID(mspID string)
- func (u *MockUser) SetPrivateKey(privateKey bccsp.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) CAClientCertFile ¶
func (c *MockConfig) CAClientCertFile(org string) (string, error)
CAClientCertFile Read configuration option for the fabric CA client cert file
func (*MockConfig) CAClientKeyFile ¶
func (c *MockConfig) CAClientKeyFile(org string) (string, error)
CAClientKeyFile Read configuration option for the fabric CA client key file
func (*MockConfig) CAConfig ¶
func (c *MockConfig) CAConfig(org string) (*apiconfig.CAConfig, error)
CAConfig return ca configuration
func (*MockConfig) CAServerCertFiles ¶
func (c *MockConfig) CAServerCertFiles(org string) ([]string, error)
CAServerCertFiles Read configuration option for the server certificate files
func (*MockConfig) CSPConfig ¶
func (c *MockConfig) CSPConfig() *bccspFactory.FactoryOpts
CSPConfig ...
func (*MockConfig) ChannelConfig ¶
func (c *MockConfig) ChannelConfig(name string) (*apiconfig.ChannelConfig, error)
ChannelConfig returns the channel configuration
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) 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) 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(tlsCertificate string) (*x509.CertPool, error)
TLSCACertPool ...
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) SetEnrollmentCertificate ¶
SetEnrollmentCertificate ... *
- Set the user’s Enrollment Certificate.