Documentation ¶
Index ¶
- func GetZipPath(repoName string) (string, error)
- func ZipFolder(sourcePath, zipPath string) error
- type GoogleDriveDeviceCodeResponse
- type GoogleIDToken
- type GoogleTokenResponse
- type Uploader
- type UploaderGoogleDrive
- func (u *UploaderGoogleDrive) Connect() error
- func (u *UploaderGoogleDrive) Enabled() bool
- func (u *UploaderGoogleDrive) GetPreviousBackupTimes() (res map[string]time.Time, err error)
- func (u *UploaderGoogleDrive) Name() string
- func (u *UploaderGoogleDrive) Push(changedRepos []string, infoFile map[string]time.Time) (err error)
- func (u *UploaderGoogleDrive) Type() string
- type UploaderLocalFolders
- func (u *UploaderLocalFolders) Connect() error
- func (u *UploaderLocalFolders) Enabled() bool
- func (u *UploaderLocalFolders) GetPreviousBackupTimes() (res map[string]time.Time, err error)
- func (u *UploaderLocalFolders) Name() string
- func (u *UploaderLocalFolders) Push(changedRepos []string, infoFile map[string]time.Time) (err error)
- func (u *UploaderLocalFolders) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetZipPath ¶
Types ¶
type GoogleIDToken ¶
type GoogleIDToken struct {
Email string `json:"email"`
}
type GoogleTokenResponse ¶
type GoogleTokenResponse struct { Error string `json:"error"` AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` RefreshToken string `json:"refresh_token"` IDToken string `json:"id_token"` // Not part of the response RefreshedAt time.Time `json:"obtained_at"` }
type Uploader ¶
type Uploader interface { Type() string // Returns the name of the uploader to be displayed Name() string // Returns whether the uploader is enabled Enabled() bool // Checks that the uploader is properly configured and can connect to the remote service; this includes authentication Connect() error // Basically returns the top level gh_backup_info.json file GetPreviousBackupTimes() (map[string]time.Time, error) // Push the backup to the remote service Push(changedRepos []string, infoFile map[string]time.Time) error }
type UploaderGoogleDrive ¶
type UploaderGoogleDrive struct {
// contains filtered or unexported fields
}
func NewUploaderGoogleDrive ¶
func NewUploaderGoogleDrive(settings *config.BackupMethod) *UploaderGoogleDrive
func (*UploaderGoogleDrive) Connect ¶
func (u *UploaderGoogleDrive) Connect() error
func (*UploaderGoogleDrive) Enabled ¶
func (u *UploaderGoogleDrive) Enabled() bool
func (*UploaderGoogleDrive) GetPreviousBackupTimes ¶
func (u *UploaderGoogleDrive) GetPreviousBackupTimes() (res map[string]time.Time, err error)
func (*UploaderGoogleDrive) Name ¶
func (u *UploaderGoogleDrive) Name() string
func (*UploaderGoogleDrive) Type ¶
func (u *UploaderGoogleDrive) Type() string
type UploaderLocalFolders ¶
type UploaderLocalFolders struct { FolderPath string // contains filtered or unexported fields }
func NewUploaderLocalFolders ¶
func NewUploaderLocalFolders(settings *config.BackupMethod) *UploaderLocalFolders
func (*UploaderLocalFolders) Connect ¶
func (u *UploaderLocalFolders) Connect() error
func (*UploaderLocalFolders) Enabled ¶
func (u *UploaderLocalFolders) Enabled() bool
func (*UploaderLocalFolders) GetPreviousBackupTimes ¶
func (u *UploaderLocalFolders) GetPreviousBackupTimes() (res map[string]time.Time, err error)
func (*UploaderLocalFolders) Name ¶
func (u *UploaderLocalFolders) Name() string
func (*UploaderLocalFolders) Type ¶
func (u *UploaderLocalFolders) Type() string
Click to show internal directories.
Click to hide internal directories.