Documentation ¶
Index ¶
- Constants
- Variables
- func DbSuffixedPath(dir string) string
- func LeastNonExistantRoot(contextAbsPath string) string
- type Context
- func (c *Context) AbsPathOf(fileOrDirPath string) string
- func (c *Context) CreateIndicesBucket() error
- func (c *Context) DeInitialize(prompter func(...interface{}) bool, returnOnAnyError bool) (err error)
- func (c *Context) DeserializeIndex(key string) (*Index, error)
- func (c *Context) ListKeys(dir, bucketName string) (chan string, error)
- func (c *Context) OpenDB() (db *bolt.DB, err error)
- func (c *Context) PopIndicesKey(key string) error
- func (c *Context) Read() (err error)
- func (c *Context) RemoveIndex(index *Index, p string) error
- func (c *Context) SerializeIndex(index *Index) (err error)
- func (c *Context) Write() (err error)
- type Index
- type Mount
- type MountPoint
Constants ¶
View Source
const ( IndicesKey = "indices" DriveDb = "drivedb" )
View Source
const (
O_RWForAll = 0666
)
Variables ¶
View Source
var ( GDDirSuffix = ".gd" PathSeparator = fmt.Sprintf("%c", os.PathSeparator) ErrNoDriveContext = errors.New("no drive context found; run `drive init` or go into one of the directories (sub directories) that you performed `drive init`") ErrDerefNilIndex = errors.New("cannot dereference a nil index") ErrDerefNilDB = errors.New("cannot dereference a nil db") ErrEmptyFileIdForIndex = errors.New("fileId for index must be non-empty") ErrNoSuchDbKey = errors.New("no such db key exists") ErrNoSuchDbBucket = errors.New("no such bucket exists") )
Functions ¶
func DbSuffixedPath ¶ added in v0.2.6
func LeastNonExistantRoot ¶
Types ¶
type Context ¶
type Context struct { ClientId string `json:"client_id"` ClientSecret string `json:"client_secret"` RefreshToken string `json:"refresh_token"` AbsPath string `json:"-"` }
func Discover ¶
Discovers the gd directory, if no gd directory or credentials could be found for the path, returns ErrNoContext.
func Initialize ¶
func (*Context) CreateIndicesBucket ¶ added in v0.2.6
func (*Context) DeInitialize ¶ added in v0.2.6
func (*Context) PopIndicesKey ¶ added in v0.2.6
func (*Context) RemoveIndex ¶ added in v0.2.5
func (*Context) SerializeIndex ¶
type Mount ¶
type Mount struct { CreatedMountDir string ShortestMountRoot string Points []*MountPoint }
type MountPoint ¶
func (*MountPoint) Unmount ¶
func (mpt *MountPoint) Unmount() error
Click to show internal directories.
Click to hide internal directories.