backups

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrigLidarrCorrupt   common.TriggerName = "Checking Lidarr for database backup corruption."
	TrigProwlarrCorrupt common.TriggerName = "Checking Prowlarr for database backup corruption."
	TrigRadarrCorrupt   common.TriggerName = "Checking Radarr for database backup corruption."
	TrigReadarrCorrupt  common.TriggerName = "Checking Readarr for database backup corruption."
	TrigSonarrCorrupt   common.TriggerName = "Checking Sonarr for database backup corruption."
	TrigLidarrBackup    common.TriggerName = "Sending Lidarr Backup File List to Notifiarr."
	TrigProwlarrBackup  common.TriggerName = "Sending Prowlarr Backup File List to Notifiarr."
	TrigRadarrBackup    common.TriggerName = "Sending Radarr Backup File List to Notifiarr."
	TrigReadarrBackup   common.TriggerName = "Sending Readarr Backup File List to Notifiarr."
	TrigSonarrBackup    common.TriggerName = "Sending Sonarr Backup File List to Notifiarr."
)

Trigger Types.

Variables

View Source
var (
	ErrNoDBInBackup = fmt.Errorf("no database file found in backup")
)

Errors returned by this package.

Functions

This section is empty.

Types

type Action

type Action struct {
	// contains filtered or unexported fields
}

Action is the data needed by the backups package to perform backup ad corruption checks.

func New

func New(config *common.Config) *Action

New configures the library.

func (*Action) Backup

func (a *Action) Backup(input *common.ActionInput, app starr.App) error

Backup initializes a backup check for all instances of the provided app.

func (*Action) Corruption

func (a *Action) Corruption(input *common.ActionInput, app starr.App) error

Corruption initializes a corruption check for all instances of the provided app.

func (*Action) Create

func (a *Action) Create()

Create sets up all the triggers.

type Info

type Info struct {
	App    starr.App `json:"app"`
	Int    int       `json:"instance"`
	Name   string    `json:"name"`
	File   string    `json:"file,omitempty"`
	Ver    string    `json:"version,omitempty"`
	Integ  string    `json:"integrity,omitempty"`
	Quick  string    `json:"quick,omitempty"`
	Rows   int       `json:"rows,omitempty"`
	Size   int64     `json:"bytes,omitempty"`
	Tables int64     `json:"tables,omitempty"`
	Date   time.Time `json:"date,omitempty"`
}

Info contains a pile of information about a Starr database (backup). This is the data sent to notifiarr.com.

type Payload

type Payload struct {
	App   starr.App           `json:"app"`
	Int   int                 `json:"instance"`
	Name  string              `json:"name"`
	Files []*starr.BackupFile `json:"backups"`
}

Payload is the backups and corruption data we send to notifiarr.

Jump to

Keyboard shortcuts

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