// getFoldersForRekey registers to receive updates about folders needing rekey actions.
14349
func (md *MDServerRemote) getFoldersForRekey(ctx context.Context,
	client keybase1.MetadataClient) error {
	// get this device's crypt public key
	session, err := md.config.KBPKI().GetCurrentSession(ctx)
	if err != nil {
		return err
	}
	return client.GetFoldersForRekey(ctx, session.CryptPublicKey.KID())
}
221874
func (c *Client) GetIGFolders() (Refs, error) {
	igFolders, err := c.api.GetIGFolders()
	if err != nil {
		return nil, err
	}
	return igFolders.Folders, nil
}
1099881
func (obj *Global) GetDefaultAppFolder(ctx context.Context) (string, error) {
	result := &struct {
		Path string	`json:"qPath"`
	} {}
	err := obj.rpc(ctx, "GetDefaultAppFolder", result)
	return result.Path, err 
}
285281
func (f *Folder) FindFolder(name string) (tree.Tree, error) {
	sub := f.findFolder(strings.Split(strings.TrimSuffix(name, sep), sep))
	if sub == nil {
		return nil, errors.Errorf("Entry not found")
	}
	return sub, nil
}
570066
func (md *MDServerMemory) GetKeyBundles(ctx context.Context,
	tlfID tlf.ID, wkbID kbfsmd.TLFWriterKeyBundleID, rkbID kbfsmd.TLFReaderKeyBundleID) (
	*kbfsmd.TLFWriterKeyBundleV3, *kbfsmd.TLFReaderKeyBundleV3, error) {
	if err := checkContext(ctx); err != nil {
		return nil, nil, err
	}

	md.lock.RLock()
	defer md.lock.RUnlock()

	wkb, rkb, err := md.getKeyBundlesRLocked(tlfID, wkbID, rkbID)
	if err != nil {
		return nil, nil, kbfsmd.ServerError{Err: err}
	}
	return wkb, rkb, nil
}
858569
func GetSecretForPV(restSecretNamespace, restSecretName, volumePluginName string, kubeClient kubernetes.Interface) (map[string]string, error) {
	secret := make(map[string]string)
	if kubeClient == nil {
		return secret, fmt.Errorf("Cannot get kube client")
	}
	secrets, err := kubeClient.Core().Secrets(restSecretNamespace).Get(restSecretName, metav1.GetOptions{})
	if err != nil {
		return secret, err
	}
	if secrets.Type != v1.SecretType(volumePluginName) {
		return secret, fmt.Errorf("cannot get secret of type %s", volumePluginName)
	}
	for name, data := range secrets.Data {
		secret[name] = string(data)
	}
	return secret, nil
}
671278
func (c *Client) GetVolumeFolder(id string, name string) (VolumeFolder, error) {
	volumeFolder, err := c.api.GetVolumeFolder(id, name)
	if err != nil {
		return nil, err
	}
	return volumeFolder.Content, nil
}
996565
func (k *SimpleFS) SimpleFSFolderEditHistory(
	ctx context.Context, path keybase1.Path) (
	res keybase1.FSFolderEditHistory, err error) {
	ctx = k.makeContext(ctx)
	fb, _, err := k.getFolderBranchFromPath(ctx, path)
	if err != nil {
		return keybase1.FSFolderEditHistory{}, err
	}
	if fb == (data.FolderBranch{}) {
		return keybase1.FSFolderEditHistory{}, nil
	}

	// Now get the edit history.
	return k.config.KBFSOps().GetEditHistory(ctx, fb)
}
296922
func (f *Folder) getFolder(name string) *Folder {
	if next, found := f.Folders[name]; found {
		return next
	}
	next := newFolder(name)
	f.Folders[name] = next
	return next
}
159076
func (stub *ChaincodeStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error) {
	response, err := stub.handler.handleGetHistoryForKey(key, stub.ChannelId, stub.TxID)
	if err != nil {
		return nil, err
	}
	return &HistoryQueryIterator{CommonIterator: &CommonIterator{stub.handler, stub.ChannelId, stub.TxID, response, 0}}, nil
}
1063612
func getHandleFromFolderName(
	ctx context.Context, kbpki KBPKI, idGetter tlfhandle.IDGetter,
	syncGetter syncedTlfGetterSetter, tlfName string,
	public bool) (*tlfhandle.Handle, error) {
	// TODO(KBFS-2185): update the protocol to support requests
	// for single-team TLFs.
	t := tlf.Private
	if public {
		t = tlf.Public
	}
	return GetHandleFromFolderNameAndType(
		ctx, kbpki, idGetter, syncGetter, tlfName, t)
}
242777
func (b *BigIP) Folders() (*Folders, error) {
	var folders Folders
	err, _ := b.getForEntity(&folders, uriSys, uriFolder)
	if err != nil {
		return nil, err
	}

	return &folders, nil
}
926795
func (c *Corpus) GetParentDirs(ctx context.Context, childRef blob.Ref) (map[blob.Ref]struct{}, error) {
	parents, ok := c.fileParents[childRef]
	if !ok {
		if _, ok := c.files[childRef]; !ok {
			return nil, os.ErrNotExist
		}
		return nil, nil
	}
	return parents, nil
}
163710
func (c *DbClient) GetDataForKey(key string) (*decoder.FileDataEntry, bool) {
	c.Lock()
	defer c.Unlock()

	for _, file := range c.db {
		value, ok := file[key]
		if ok {
			return &decoder.FileDataEntry{
				Key:   key,
				Value: value.data,
			}, true
		}
	}
	return nil, false
}
554175
func (f *FileStore) WalkKeys(seek []byte, fn func(key []byte, typ byte) error) error {
	f.mu.RLock()
	if len(f.files) == 0 {
		f.mu.RUnlock()
		return nil
	}

	// Ensure files are not unmapped while we're iterating over them.
	for _, r := range f.files {
		r.Ref()
		defer r.Unref()
	}

	ki := newMergeKeyIterator(f.files, seek)
	f.mu.RUnlock()
	for ki.Next() {
		key, typ := ki.Read()
		if err := fn(key, typ); err != nil {
			return err
		}
	}

	return ki.Err()
}
618644
func (f *FileStore) getPathByKey(key string) string {
	return filepath.Join(f.directoryPath, key)
}
778339
func (ctx *Context) GETKeysBytes() [][]byte {
	var res [][]byte
	ctx.Request.URI().QueryArgs().VisitAll(func(key, value []byte) {
		res = append(res, key)
	})
	return res
}