Documentation
¶
Index ¶
- Variables
- func IndicesAbsPath(dir, child string) string
- func LeastNonExistantRoot(contextAbsPath string) string
- type Context
- func (c *Context) AbsPathOf(fileOrDirPath string) string
- func (c *Context) DeserializeIndex(dir, path string) (*Index, error)
- func (c *Context) Read() (err error)
- func (c *Context) RemoveIndex(index *Index, p string) error
- func (c *Context) SerializeIndex(index *Index, p string) (err error)
- func (c *Context) Write() (err error)
- type Index
- type Mount
- type MountPoint
Constants ¶
This section is empty.
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") ErrEmptyFileIdForIndex = errors.New("fileId for index must be non-empty") )
Functions ¶
func IndicesAbsPath ¶
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) DeserializeIndex ¶
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.