hooks

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package hooks provides pre and post backup hook functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hooks

type Hooks struct {
	PreBackup  string `env:"PREBACKUP"  env-default:"" yaml:"prebackup"`
	PostBackup string `env:"POSTBACKUP" env-default:"" yaml:"postbackup"`
}

Hooks holds the configuration for pre and post backup hooks.

func (*Hooks) ExecutePostBackup

func (h *Hooks) ExecutePostBackup(file string) error

ExecutePostBackup executes the post backup command.

func (*Hooks) ExecutePreBackup

func (h *Hooks) ExecutePreBackup() error

ExecutePreBackup executes the pre backup command.

func (*Hooks) GeneratePostBackupCmd

func (h *Hooks) GeneratePostBackupCmd(file string) string

GeneratePostBackupCmd generates the post backup command.

func (*Hooks) GeneratePreBackupCmd

func (h *Hooks) GeneratePreBackupCmd() string

GeneratePreBackupCmd generates the pre backup command.

func (*Hooks) HasPostBackup

func (h *Hooks) HasPostBackup() bool

HasPostBackup returns true if a post backup command is defined.

func (*Hooks) HasPreBackup

func (h *Hooks) HasPreBackup() bool

HasPreBackup returns true if a pre backup command is defined.

Jump to

Keyboard shortcuts

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