backup

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePolicy added in v0.0.2

func CreatePolicy(resource Resource, retention int) (policyID uint, err error)

Types

type BackupSet added in v0.0.2

type BackupSet struct {
	ID         uint
	IsValid    bool
	Size       int64
	BackupTime time.Time
	ResourceID uint
	Retention  int
}

func GetBackupSet added in v0.0.2

func GetBackupSet(bsetID uint) (bset *BackupSet, err error)

func (*BackupSet) SetAvailability added in v0.0.2

func (s *BackupSet) SetAvailability(isValid bool) error

func (*BackupSet) SetBackupTime added in v0.0.2

func (s *BackupSet) SetBackupTime(bt time.Time) error

func (*BackupSet) SetSize added in v0.0.2

func (s *BackupSet) SetSize(size int64, scanSize int64) error

type NasResourceArgs added in v0.0.2

type NasResourceArgs struct {
	Dir string `json:"dir"`
}

type Policy added in v0.0.2

type Policy struct {
	ID         uint
	Retention  int
	Status     string
	ResourceID uint
	Resource   Resource
}

func GetPolicy added in v0.0.2

func GetPolicy(policyID uint) *Policy

func GetPolicyByResource added in v0.0.2

func GetPolicyByResource(resourceID uint) *Policy

type PolicyStatus added in v0.0.2

type PolicyStatus string
const (
	Enabled  PolicyStatus = "enabled"
	Disabled PolicyStatus = "disabled"
)

type Resource added in v0.0.2

type Resource struct {
	Name string
	Type string
	Args interface{}
}

type ResourceType added in v0.0.2

type ResourceType string
const (
	NAS      ResourceType = "nas"
	Database ResourceType = "database"
)

Jump to

Keyboard shortcuts

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