Versions in this module Expand all Collapse all v0 v0.1.0 Jul 23, 2020 Changes in this version + func BytesToX509Cert(bytes []byte) (*x509.Certificate, error) + func GetCertID(bytes []byte) (string, string, error) + func NormalizeURL(addr string) (*url.URL, error) + type CAConfig struct + type CertificateDecoder struct + type CertificateStatus string + const Good + const Revoked + type Client struct + Config *ClientConfig + HomeDir string + func (c *Client) Enroll(req *api.EnrollmentRequest) (*EnrollmentResponse, error) + func (c *Client) GenCSR(req *api.CSRInfo, id string) ([]byte, core.Key, error) + func (c *Client) GetCAInfo(req *api.GetCAInfoRequest) (*GetCAInfoResponse, error) + func (c *Client) GetCSP() core.CryptoSuite + func (c *Client) GetFabCAVersion() (string, error) + func (c *Client) Init() error + func (c *Client) NewIdentity(creds []credential.Credential) (*Identity, error) + func (c *Client) NewX509Identity(name string, creds []credential.Credential) x509cred.Identity + func (c *Client) SendReq(req *http.Request, result interface{}) (err error) + func (c *Client) StreamResponse(req *http.Request, stream string, cb func(*json.Decoder) error) (err error) + type ClientConfig struct + CAInfo api.GetCAInfoRequest + CAName string + CSP core.CryptoSuite + CSR api.CSRInfo + Debug bool + Enrollment api.EnrollmentRequest + ID api.RegistrationRequest + LogLevel string + MSPDir string + Revoke api.RevocationRequest + ServerName string + TLS tls.ClientTLSConfig + URL string + type EnrollmentResponse struct + CAInfo GetCAInfoResponse + Identity *Identity + type GetCAInfoResponse struct + CAChain []byte + CAName string + IssuerPublicKey []byte + IssuerRevocationPublicKey []byte + Version string + type Identity struct + func NewIdentity(client *Client, name string, creds []credential.Credential) *Identity + func (i *Identity) AddAffiliation(req *api.AddAffiliationRequest) (*api.AffiliationResponse, error) + func (i *Identity) AddIdentity(req *api.AddIdentityRequest) (*api.IdentityResponse, error) + func (i *Identity) Delete(endpoint string, result interface{}, queryParam map[string]string) error + func (i *Identity) Get(endpoint, caname string, result interface{}) error + func (i *Identity) GetAffiliation(affiliation, caname string) (*api.AffiliationResponse, error) + func (i *Identity) GetAllAffiliations(caname string) (*api.AffiliationResponse, error) + func (i *Identity) GetAllIdentities(caname string, cb func(*json.Decoder) error) error + func (i *Identity) GetECert() *x509.Signer + func (i *Identity) GetIdentity(id, caname string) (*api.GetIDResponse, error) + func (i *Identity) GetName() string + func (i *Identity) GetStreamResponse(endpoint string, queryParam map[string]string, stream string, ...) error + func (i *Identity) ModifyAffiliation(req *api.ModifyAffiliationRequest) (*api.AffiliationResponse, error) + func (i *Identity) ModifyIdentity(req *api.ModifyIdentityRequest) (*api.IdentityResponse, error) + func (i *Identity) Post(endpoint string, reqBody []byte, result interface{}, ...) error + func (i *Identity) Put(endpoint string, reqBody []byte, queryParam map[string]string, ...) error + func (i *Identity) Reenroll(req *api.ReenrollmentRequest) (*EnrollmentResponse, error) + func (i *Identity) Register(req *api.RegistrationRequest) (rr *api.RegistrationResponse, err error) + func (i *Identity) RemoveAffiliation(req *api.RemoveAffiliationRequest) (*api.AffiliationResponse, error) + func (i *Identity) RemoveIdentity(req *api.RemoveIdentityRequest) (*api.IdentityResponse, error) + func (i *Identity) Revoke(req *api.RevocationRequest) (*api.RevocationResponse, error) + type ServerConfig struct + CAcfg CAConfig