code: func (c *Client) CreateIdentity(request *IdentityRequest) (*IdentityResponse, error) {
  
  	ca, err := newCAClient(c.ctx, c.orgName)
  	if err != nil {
  		return nil, err
  	}
  
  	var attrs []mspapi.Attribute
  	for i := range request.Attributes {
  		attrs = append(attrs, mspapi.Attribute{Name: request.Attributes[i].Name, Value: request.Attributes[i].Value, ECert: request.Attributes[i].ECert})
  	}
  
  	req := &mspapi.IdentityRequest{
  		ID:             request.ID,
  		Type:           request.Type,
  		MaxEnrollments: request.MaxEnrollments,
  		Affiliation:    request.Affiliation,
  		Attributes:     attrs,
  		CAName:         request.CAName,
  		Secret:         request.Secret,
  	}
  
  	response, err := ca.CreateIdentity(req)
  	if err != nil {
  		return nil, err
  	}
  
  	return getIdentityResponse(response), nil
  }
docs: // CreateIdentity creates a new identity with the Fabric CA server. An enrollment secret is returned which can then be used,
  // along with the enrollment ID, to enroll a new identity.
  //  Parameters:
  //  request holds info about identity
  //
  //  Returns:
  //  Return identity info including the secret