rdrive

package
v0.0.3-beta Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintUsageStats

func PrintUsageStats(aboutService *drive.AboutService, log contracts.Logger)

Types

type Drive

type Drive struct {
	// contains filtered or unexported fields
}

func New

func New(
	filesService drive.FilesService,
	changesService drive.ChangesService,
	fileRepository file.Repository,
	log contracts.Logger,
	appState app.Store,
	cfg config.Cfg,
) Drive

func (*Drive) CreateFolder

func (d *Drive) CreateFolder(curFullPath string, parentIds []string) (string, error)

func (*Drive) Delete

func (d *Drive) Delete(file contracts.File) error

func (*Drive) FillDb

func (d *Drive) FillDb() error

FillDb synchronizes information about the files in google drive with the information about them in the local database. Having the information locally saves us from querying the server many times. With that information we can easily find a deleted, modified file not only by modification date, but also by hash and full path

func (*Drive) SaveChangesToDb

func (d *Drive) SaveChangesToDb() error

SaveChangesToDb gets changes since the last synchronization and saves the changes to the database

func (*Drive) SyncRemoteWithLocal

func (d *Drive) SyncRemoteWithLocal(file contracts.File) error

SyncRemoteWithLocal synchronizes the local file system with remote one file - file information from remote

func (*Drive) Update

func (d *Drive) Update(fileId string, name string, parentIds []string, oldParentIds []string) (*drive.File, error)

func (*Drive) Upload

func (d *Drive) Upload(curFullPath string, parentIds []string) error

Directories

Path Synopsis
db
Package specification describes rules and specifications of the remote files, such as if it can be downloaded, if it is a folder and so on.
Package specification describes rules and specifications of the remote files, such as if it can be downloaded, if it is a folder and so on.

Jump to

Keyboard shortcuts

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