filetree

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2015 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package filetree implements a lookup table for files in a tree structure.

Table format:

dirs:<corpus>\n<root>\n<path> -> srvpb.FileDirectory
dirs:corpusRoots              -> srvpb.CorpusRoots

Index

Constants

This section is empty.

Variables

View Source
var CorpusRootsKey = []byte(dirTablePrefix + "corpusRoots")

CorpusRootsKey is the filetree lookup key for the tree's srvpb.CorpusRoots.

Functions

func DirKey

func DirKey(corpus, root, path string) []byte

DirKey returns the filetree lookup table key for the given corpus path.

Types

type Table

type Table struct{ table.Proto }

Table implements the FileTree interface using a static lookup table.

func (*Table) CorpusRoots

func (t *Table) CorpusRoots(ctx context.Context, req *ftpb.CorpusRootsRequest) (*ftpb.CorpusRootsReply, error)

CorpusRoots implements part of the filetree Service interface.

func (*Table) Directory

func (t *Table) Directory(ctx context.Context, req *ftpb.DirectoryRequest) (*ftpb.DirectoryReply, error)

Directory implements part of the filetree Service interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL