code: func (c *Client) Register(request *RegistrationRequest) (string, error) {
  	ca, err := newCAClient(c.ctx, c.orgName)
  	if err != nil {
  		return "", err
  	}
  
  	var a []mspapi.Attribute
  	for i := range request.Attributes {
  		a = append(a, mspapi.Attribute{Name: request.Attributes[i].Name, Value: request.Attributes[i].Value, ECert: request.Attributes[i].ECert})
  	}
  
  	r := mspapi.RegistrationRequest{
  		Name:           request.Name,
  		Type:           request.Type,
  		MaxEnrollments: request.MaxEnrollments,
  		Affiliation:    request.Affiliation,
  		Attributes:     a,
  		CAName:         request.CAName,
  		Secret:         request.Secret,
  	}
  	return ca.Register(&r)
  }
docs: // Register registers a User with the Fabric CA
  //  Parameters:
  //  request is registration request
  //
  //  Returns:
  //  enrolment secret