Versions in this module Expand all Collapse all v1 v1.0.0 Mar 3, 2023 Changes in this version + var ErrUserNotFound = errors.New("user not found") + type AffiliationInfo struct + Affiliations []AffiliationInfo + Identities []IdentityInfo + Name string + type AffiliationRequest struct + CAName string + Force bool + Name string + type AffiliationResponse struct + CAName string + type Attribute struct + ECert bool + Name string + Value string + type AttributeRequest struct + Name string + Optional bool + type CSRInfo struct + CN string + Hosts []string + type Client struct + func New(clientProvider context.ClientProvider, opts ...ClientOption) (*Client, error) + func (c *Client) AddAffiliation(request *AffiliationRequest) (*AffiliationResponse, error) + func (c *Client) CreateIdentity(request *IdentityRequest) (*IdentityResponse, error) + func (c *Client) CreateSigningIdentity(opts ...mspctx.SigningIdentityOption) (mspctx.SigningIdentity, error) + func (c *Client) Enroll(enrollmentID string, opts ...EnrollmentOption) error + func (c *Client) GetAffiliation(affiliation string, opts ...RequestOption) (*AffiliationResponse, error) + func (c *Client) GetAllAffiliations(opts ...RequestOption) (*AffiliationResponse, error) + func (c *Client) GetAllIdentities(opts ...RequestOption) ([]*IdentityResponse, error) + func (c *Client) GetCAInfo() (*GetCAInfoResponse, error) + func (c *Client) GetIdentity(ID string, opts ...RequestOption) (*IdentityResponse, error) + func (c *Client) GetSigningIdentity(id string) (mspctx.SigningIdentity, error) + func (c *Client) ModifyAffiliation(request *ModifyAffiliationRequest) (*AffiliationResponse, error) + func (c *Client) ModifyIdentity(request *IdentityRequest) (*IdentityResponse, error) + func (c *Client) Reenroll(enrollmentID string, opts ...EnrollmentOption) error + func (c *Client) Register(request *RegistrationRequest) (string, error) + func (c *Client) RemoveAffiliation(request *AffiliationRequest) (*AffiliationResponse, error) + func (c *Client) RemoveIdentity(request *RemoveIdentityRequest) (*IdentityResponse, error) + func (c *Client) Revoke(request *RevocationRequest) (*RevocationResponse, error) + type ClientOption func(*clientOptions) error + func WithCAInstance(caID string) ClientOption + func WithOrg(orgName string) ClientOption + type EnrollmentOption func(*enrollmentOptions) error + func WithAttributeRequests(attrReqs []*AttributeRequest) EnrollmentOption + func WithCSR(csr *CSRInfo) EnrollmentOption + func WithLabel(label string) EnrollmentOption + func WithProfile(profile string) EnrollmentOption + func WithSecret(secret string) EnrollmentOption + func WithType(typ string) EnrollmentOption + type GetCAInfoResponse struct + CAChain []byte + CAName string + IssuerPublicKey []byte + IssuerRevocationPublicKey []byte + Version string + type IdentityInfo struct + Affiliation string + Attributes []Attribute + ID string + MaxEnrollments int + Type string + type IdentityManager interface + CreateSigningIdentity func(ops ...msp.SigningIdentityOption) (msp.SigningIdentity, error) + GetSigningIdentity func(name string) (msp.SigningIdentity, error) + type IdentityRequest struct + Affiliation string + Attributes []Attribute + CAName string + ID string + MaxEnrollments int + Secret string + Type string + type IdentityResponse struct + Affiliation string + Attributes []Attribute + CAName string + ID string + MaxEnrollments int + Secret string + Type string + type ModifyAffiliationRequest struct + NewName string + type RegistrationRequest struct + Affiliation string + Attributes []Attribute + CAName string + MaxEnrollments int + Name string + Secret string + Type string + type RemoveIdentityRequest struct + CAName string + Force bool + ID string + type RequestOption func(*requestOptions) error + func WithCA(caName string) RequestOption + type RevocationRequest struct + AKI string + CAName string + GenCRL bool + Name string + Reason string + Serial string + type RevocationResponse struct + CRL []byte + RevokedCerts []RevokedCert + type RevokedCert struct + AKI string + Serial string