code: func getCredentials(sh search.QueryDescriber, importerType string) (string, string, error) {
  	var clientID, clientSecret string
  	res, err := sh.Query(context.TODO(), &search.SearchQuery{
  		Expression: "attr:camliNodeType:importer and attr:importerType:" + importerType,
  		Describe: &search.DescribeRequest{
  			Depth: 1,
  		},
  	})
  	if err != nil {
  		return clientID, clientSecret, err
  	}
  	if res.Describe == nil {
  		return clientID, clientSecret, errors.New("no importer node found")
  	}
  	var attrs url.Values
  	for _, resBlob := range res.Blobs {
  		blob := resBlob.Blob
  		desBlob, ok := res.Describe.Meta[blob.String()]
  		if !ok || desBlob.Permanode == nil {
  			continue
  		}
  		attrs = desBlob.Permanode.Attr
  		if attrs.Get("camliNodeType") != "importer" {
  			return clientID, clientSecret, errors.New("search result returned non importer node")
  		}
  		if t := attrs.Get("importerType"); t != importerType {
  			return clientID, clientSecret, fmt.Errorf("search result returned importer node of the wrong type: %v", t)
  		}
  		break
  	}
  	attrClientID, attrClientSecret := "authClientID", "authClientSecret"
  	attr := attrs[attrClientID]
  	if len(attr) != 1 {
  		return clientID, clientSecret, fmt.Errorf("no %v attribute", attrClientID)
  	}
  	clientID = attr[0]
  	attr = attrs[attrClientSecret]
  	if len(attr) != 1 {
  		return clientID, clientSecret, fmt.Errorf("no %v attribute", attrClientSecret)
  	}
  	clientSecret = attr[0]
  	return clientID, clientSecret, nil
  }
docs: // getCredentials returns the OAuth clientID and clientSecret found in the
  // importer node of the given importerType.