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 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.
Click to show internal directories.
Click to hide internal directories.