bak

package
v0.0.0-...-36af7d8 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archiver

type Archiver struct {
	TimeFormat string
	BackupPath string
	// contains filtered or unexported fields
}

Archiver performs, stores and rotates mysql backups.

func (*Archiver) Archive

func (arch *Archiver) Archive(database string) (eArch error)

Archive performs a backup on the given database.

func (*Archiver) Rotate

func (arch *Archiver) Rotate(database string) error

Rotate purges old backups in a given database subdirectory.

func (*Archiver) SetLogger

func (arch *Archiver) SetLogger(l *log.Logger)

SetLogger lets callers configure the internal logger used.

type Finfo

type Finfo struct {
	os.FileInfo
	// contains filtered or unexported fields
}

Finfo embeds os.FileInfo alongside an easily compared created time (int64)

type FinfoList

type FinfoList []*Finfo

FinfoList implements sort.Interface

func (FinfoList) Len

func (fil FinfoList) Len() int

func (FinfoList) Less

func (fil FinfoList) Less(i, j int) bool

Less prefers the latest time

func (FinfoList) Swap

func (fil FinfoList) Swap(i, j int)

Jump to

Keyboard shortcuts

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