backup

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	ID             int64           `json:"-"`
	Name           string          `json:"name"`
	Source         SourceInfo      `json:"source"`
	Destination    DestinationInfo `json:"destination"`
	CronExpression string          `json:"cronExpr"`
	StartedAt      time.Time       `json:"-"`
	CallbackURL    string          `json:"callbackUrl"`
	DeleteLocal    *bool           `json:"deleteLocal"`
	Job            *gocron.Job     `json:"-"`
}

func (*Backup) CreateFunc

func (b *Backup) CreateFunc() func()

type DestinationFTPInfo

type DestinationFTPInfo struct {
	Host         string  `json:"host"`
	Port         int     `json:"port"`
	User         string  `json:"user"`
	Pass         string  `json:"pass"`
	Target       string  `json:"target"`
	LimitByDate  *string `json:"limitByDate"`
	LimitByCount *int    `json:"limitByCount"`
	LimitBySize  *uint64 `json:"limitBySize"`
}

type DestinationInfo

type DestinationInfo struct {
	Type              string            `json:"type"`
	DeleteAfterUpload *bool             `json:"deleteAfterUpload"`
	Info              interface{}       `json:"info"`
	Result            DestinationResult `json:"-"`
}

type DestinationResult

type DestinationResult struct {
	TotalUploadedFiles int64 `json:"totalUploadedFiles"`
	TotalUploadedSize  int64 `json:"totalUploadedSize"`
}

type DestinationSFTPInfo

type DestinationSFTPInfo struct {
	Host           string  `json:"host"`
	Port           int     `json:"port"`
	User           string  `json:"user"`
	Pass           string  `json:"pass"`
	PrivateKeyFile string  `json:"privateKeyFile"`
	Passphrase     string  `json:"passphrase"`
	Target         string  `json:"target"`
	LimitByDate    *string `json:"limitByDate"`
	LimitByCount   *int    `json:"limitByCount"`
	LimitBySize    *int64  `json:"limitBySize"`
}

type DestinationTelegramInfo added in v0.0.9

type DestinationTelegramInfo struct {
	Token  string `json:"token"`
	ChatID string `json:"chatID"`
}

type SourceFTPInfo

type SourceFTPInfo struct {
	Host      string   `json:"host"`
	Port      int      `json:"port"`
	User      string   `json:"user"`
	Pass      string   `json:"pass"`
	Downloads []string `json:"downloads"`
}

type SourceInfo

type SourceInfo struct {
	Type string      `json:"type"`
	Info interface{} `json:"info"`
}

type SourceSFTPInfo

type SourceSFTPInfo struct {
	Host           string                  `json:"host"`
	Port           int                     `json:"port"`
	User           string                  `json:"user"`
	Pass           string                  `json:"pass"`
	Variables      *map[string]interface{} `json:"variables"`
	BeforeCommands []string                `json:"beforeCommands"`
	Downloads      []string                `json:"downloads"`
	AfterCommands  []string                `json:"afterCommands"`
	PrivateKeyFile string                  `json:"privateKeyFile"`
	Passphrase     string                  `json:"passphrase"`
}

Jump to

Keyboard shortcuts

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