Documentation ¶
Index ¶
- Constants
- func Archive(source, target string) (err error)
- func ArchiveWithPassphrase(source, target, passphrase string) (err error)
- func Extract(archive io.Reader, target string) (err error)
- func ExtractWithPassphrase(archivepath, target, passphrase string, flag int) (err error)
- func GetBackupPath(wd, projectName, backupName string) string
- func Gzip(reader io.Reader) (_ io.Reader, err error)
- func Tar(source string) (_ io.ReadWriter, err error)
- func TarFileList(fileList []utils.FileInfo) (_ io.ReadWriter, err error)
- func UnGzip(source io.Reader) (io.Reader, error)
- func Untar(tarball io.Reader, target string) error
Constants ¶
const DRY_RUN = 1
Variables ¶
This section is empty.
Functions ¶
func Archive ¶
Creates a .tar.gz archive. `source` is a path to a directory to archive. `target` is a path to the target `.tar.gz` file
func ArchiveWithPassphrase ¶
Creates a `.tar.gz` archive of the `source` directory, into the `traget` file, and encrypts it using `passphrase`
func ExtractWithPassphrase ¶
Decrypts and extracts an archive using a passphrase. `archivepath` is the path to the encrypted archive, `target` is the directory where the archive will be extracted, and `passphrase` is the passphrase used to decrypt.
func GetBackupPath ¶
GetBackupPath returns the path to file the backup archive will be written to
func Tar ¶
func Tar(source string) (_ io.ReadWriter, err error)
Tar creates a tar archive source is a path to a directory to archive
func TarFileList ¶
func TarFileList(fileList []utils.FileInfo) (_ io.ReadWriter, err error)
TarFileList function creates a tar archive from a list of files. the `fileList` may be optained through `utils.DirWalk()` target is the path to the output tarball, without the file extension
Types ¶
This section is empty.