Documentation ¶
Index ¶
- Constants
- Variables
- func ExecCommand(name string, args ...string) (string, int, error)
- func ExecCommandRetry(name string, args ...string) (string, int, error)
- func ExecCommandRetryWithOpts(opts ExecCommandOpts) (string, int, error)
- func ExecCommandWithOpts(opts ExecCommandOpts) (string, int, error)
- func GenerateRandomString(n int) string
- type Config
- type ConfigBandwidth
- type ConfigCron
- type ConfigCronCleanup
- type ConfigCronCleanupKeep
- type ConfigRestic
- type ConfigSFTP
- type ConfigStanza
- type Context
- type DirectoryStanza
- type ExecCommandOpts
- type LogWriter
- type Stanza
- type ZFSDatasetStanza
- type ZFSZvolStanza
Constants ¶
View Source
const DirectoryStanzaType = "directory"
View Source
const ZFSDatasetStanzaType = "zfs-dataset"
View Source
const ZFSZvolStanzaType = "zfs-zvol"
Variables ¶
Functions ¶
func ExecCommandRetryWithOpts ¶
func ExecCommandRetryWithOpts(opts ExecCommandOpts) (string, int, error)
func ExecCommandWithOpts ¶
func ExecCommandWithOpts(opts ExecCommandOpts) (string, int, error)
func GenerateRandomString ¶
Types ¶
type Config ¶
type Config struct { Stanzas []ConfigStanza `yaml:"stanzas"` Restic ConfigRestic `yaml:"restic"` SFTP ConfigSFTP `yaml:"sftp"` Cron ConfigCron `yaml:"cron"` Bandwidth ConfigBandwidth `yaml:"bandwidth"` }
type ConfigBandwidth ¶
type ConfigCron ¶
type ConfigCron struct {
Cleanup ConfigCronCleanup `yaml:"cleanup"`
}
type ConfigCronCleanup ¶
type ConfigCronCleanup struct { Enabled bool `yaml:"enabled"` Keep ConfigCronCleanupKeep `yaml:"keep"` }
type ConfigCronCleanupKeep ¶
type ConfigRestic ¶
type ConfigRestic struct {
Password string `yaml:"password"`
}
type ConfigSFTP ¶
type ConfigStanza ¶
func (*ConfigStanza) UnmarshalYAML ¶
func (ct *ConfigStanza) UnmarshalYAML(value *yaml.Node) error
type Context ¶
type Context struct { ResticVersion string ResticBinary string SFTPIdentityFile string Config Config }
func NewContext ¶
func (*Context) ExecRestic ¶
type DirectoryStanza ¶
type DirectoryStanza struct {
From string `yaml:"from"`
}
func (*DirectoryStanza) Post ¶
func (t *DirectoryStanza) Post()
func (*DirectoryStanza) Pre ¶
func (t *DirectoryStanza) Pre() ([]string, error)
func (*DirectoryStanza) String ¶
func (t *DirectoryStanza) String() string
type ExecCommandOpts ¶
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
func NewLogWriter ¶
type ZFSDatasetStanza ¶
type ZFSDatasetStanza struct { From string `yaml:"from"` // contains filtered or unexported fields }
func (*ZFSDatasetStanza) Post ¶
func (t *ZFSDatasetStanza) Post()
func (*ZFSDatasetStanza) Pre ¶
func (t *ZFSDatasetStanza) Pre() ([]string, error)
func (*ZFSDatasetStanza) String ¶
func (t *ZFSDatasetStanza) String() string
type ZFSZvolStanza ¶
type ZFSZvolStanza struct { From string `yaml:"from"` // contains filtered or unexported fields }
func (*ZFSZvolStanza) Post ¶
func (t *ZFSZvolStanza) Post()
func (*ZFSZvolStanza) Pre ¶
func (t *ZFSZvolStanza) Pre() ([]string, error)
func (*ZFSZvolStanza) String ¶
func (t *ZFSZvolStanza) String() string
Click to show internal directories.
Click to hide internal directories.