backup

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: GPL-3.0 Imports: 16 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
}

Backup ...

func NewBackup

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

NewBackup ...

func (*Backup) List

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

List ...

func (*Backup) New

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

New ...

func (*Backup) Restore

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

Restore ...

func (*Backup) Shutdown added in v0.7.1

func (b *Backup) Shutdown(ctx context.Context) (err error)

Shutdown ...

type BackupConfig

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

BackupConfig ...

Jump to

Keyboard shortcuts

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