Documentation ¶
Overview ¶
Utilities required for go-archive-it
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Archive ¶
Archive takes 3 arguments, and calls the appropriate archive function, passing on it's other arguments.
args:
vaultPath string: The path to the directory that will be archived archivePath string: The name of the directory where all of the archives are to be stored archiveType uint8: The type of archive that is to be created - 0 = .tar - 1 = .tar.gz
This function does not return a value and logs it's own errors.
Archive creates any directories neccesary for it to function.
func Cleanup ¶
Cleanup takes 3 arguments and returns an error
args: archivePath string: The path to the archive that is being cleaned up retention uint8: The number of archives that should be retained verbose bool: whether or not the verbose flag was specified
Cleanup returns an error if something goes wrong
func ConfigExists ¶
func ConfigExists(configPath string)
ConfigExists checks if a config file exists at a specified location
If no config file is found, one is created with some default values, and the user is prompted to make any neccesary changes
Types ¶
type Config ¶
Config is a struct used to parse configuration files
func LoadConfig ¶
LoadConfig reads and unmarshals a yaml file given a path, it returns a Config struct with the data from the file