backup

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src string, dst string) error

Dir copies a whole directory recursively

func File

func File(src, dst string) error

File copies a single file from src to dst

Types

type Backup

type Backup struct {
	Options []string
	// contains filtered or unexported fields
}

func NewBackup

func NewBackup(cfg *BackupConfig,
	db *gorm.DB) *Backup

func (*Backup) List

func (b *Backup) List() (list []string)

func (*Backup) New

func (b *Backup) New() (err error)

func (*Backup) Restore

func (b *Backup) Restore(name string) (err error)

type BackupConfig

type BackupConfig struct {
	Path   string
	PgUser string
	PgPass string
	PgHost string
	PgName string
	PgPort string
}

func NewBackupConfig

func NewBackupConfig(cfg *config.AppConfig) *BackupConfig

Jump to

Keyboard shortcuts

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