drive

package
v0.0.0-...-3583f36 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLessThanTwoSnapshots = errors.New("Less than two snapshots exist")
	ErrNoSuchFolder         = errors.New("No such folder")
)

Functions

This section is empty.

Types

type DriveService

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

func NewDriveService

func NewDriveService(dataDir string, driveSvc *drive.Service) *DriveService

func (*DriveService) LastTwoDirs

func (s *DriveService) LastTwoDirs() (string, string, error)

func (*DriveService) TakeAndPersistSnapshot

func (s *DriveService) TakeAndPersistSnapshot(snapshotName, googleDocsFolder string) error

func (*DriveService) TakeAndPersistTimedSnapshot

func (s *DriveService) TakeAndPersistTimedSnapshot(googleDocsFolder string) error

type File

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

func NewFile

func NewFile(relativePath string, content []byte) *File

type GoogleAuthenticator

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

func NewGoogleAuthenticator

func NewGoogleAuthenticator(secretDir string) *GoogleAuthenticator

func (*GoogleAuthenticator) GetOrCreateClient

func (a *GoogleAuthenticator) GetOrCreateClient() (*http.Client, error)

GetOrCreateClient reads credentials.json from the supplied secretDir. It then goes on to either create a client object from the saved token.json or create one and persist the token.json in the sercertDir.

Jump to

Keyboard shortcuts

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