code: func (c *fabricCAAdapter) GetIdentity(key core.Key, cert []byte, id, caname string) (*api.IdentityResponse, error) {
  
  	logger.Debugf("Retrieving identity [%s]", id)
  
  	registrar, err := c.newIdentity(key, cert)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to create CA signing identity")
  	}
  
  	response, err := registrar.GetIdentity(id, caname)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to get identity")
  	}
  
  	var attributes []api.Attribute
  	for i := range response.Attributes {
  		attributes = append(attributes, api.Attribute{Name: response.Attributes[i].Name, Value: response.Attributes[i].Value, ECert: response.Attributes[i].ECert})
  	}
  
  	ret := &api.IdentityResponse{ID: response.ID,
  		Affiliation:    response.Affiliation,
  		Type:           response.Type,
  		Attributes:     attributes,
  		MaxEnrollments: response.MaxEnrollments,
  		CAName:         response.CAName,
  	}
  
  	return ret, nil
  }
docs: // GetIdentity retrieves identity information
  // key: registrar private key
  // cert: registrar enrollment certificate
  // id: identity id