backup

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2018 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GoogleDriveMethod = "google"
	TestMockMethod    = "mock"
)

Variables

This section is empty.

Functions

func Init

func Init(conf config.Backup, targetDir string) error

func Shutdown

func Shutdown()

Types

type GoogleDriveBackupService

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

func (*GoogleDriveBackupService) Authenticate

func (b *GoogleDriveBackupService) Authenticate() error

func (*GoogleDriveBackupService) Upload

func (b *GoogleDriveBackupService) Upload(filePath string) error

type MockBackupService

type MockBackupService struct {
}

func (*MockBackupService) Authenticate

func (b *MockBackupService) Authenticate() error

func (*MockBackupService) Upload

func (b *MockBackupService) Upload(file string) error

type State

type State string
const (
	StateActiveIdle    State = "ACTIVE_IDLE"
	StateActiveRunning State = "ACTIVE_RUNNING"
	StateDeactivated   State = "NOT_ACTIVE"
)

func GetStatus

func GetStatus() State

type UploadService

type UploadService interface {
	Authenticate() error
	Upload(string) error
}

Jump to

Keyboard shortcuts

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