package
0.0.0-20250401191859-c6164388a779
Repository: https://github.com/axllent/ssbak.git
Documentation: pkg.go.dev
# Functions
AssetsFromTarGz extracts assets from a tar.gz.
AssetsToTarGz creates a tar.gz from the assets folder.
ByteToHr returns a human readable size as a string.
CalcSize returns the size of a directory or file.
CreateSSPak creates a regular POSIX tar file from a database and an assets archive.
DownloadToFile downloads a URL to a file.
ExtractSSPak extracts a SSPak (tar) file.
GithubLatest fetches the latest release info & returns release tag, filename & download url.
GithubUpdate the running binary with the latest release binary from Github.
GreaterThan compares the current version to a different version returning < 1 not upgradeable.
GzipFile will compress an existing file with gzip and save it was output.
HasEnoughSpace will return an error message if the provided location does not have sufficient storage space.
IsDir returns if a path is a directory.
IsFile returns if a path is a file.
MkDirIfNotExists will create a directory if it doesn't exist.
MySQLCreateDB a database, optionally dropping it.
MySQLDumpToGz uses mysqldump to stream a database dump directly into a gzip file.
MySQLLoadFromGz loads a GZ database file into the database, streaming the gz file to the mysql cli.
ReplaceFile replaces one file with another.
TarGZCompress creates a archive from the folder inputFilePath.
TarGZExtract extracts a archive from the file inputFilePath.
Unzip will decompress a zip archive, moving all files and folders within the zip file (src) to an output directory (dest).
# Variables
AllowPrereleases defines whether pre-releases may be included.
DBCreateWrapper is a map is database creation functions based on DB.Type.
DBDumpWrapper is a map of database dump to gzip functions based on DB.Type.
DBLoadWrapper is a map of database load-from-gzip functions based on DB.Type.
# Type aliases
Releases struct for Github releases json.