backup

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const BackupStatusFailed = "failed"
View Source
const BackupStatusStarted = "started"
View Source
const BackupStatusSuccess = "success"
View Source
const (
	EventTopicBackupRun = "roles.backup.run"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIBackupStartInput

type APIBackupStartInput struct {
	Wait bool `query:"wait" required:"true"`
}

type APIBackupStatus

type APIBackupStatus struct {
	BackupStatus
	Node string `json:"node"`
}

type APIBackupStatusOutput

type APIBackupStatusOutput struct {
	Status []APIBackupStatus `json:"status" required:"true"`
}

type APIRoleConfigInput

type APIRoleConfigInput struct {
	Config RoleConfig `json:"config" required:"true"`
}

type APIRoleConfigOutput

type APIRoleConfigOutput struct {
	Config RoleConfig `json:"config" required:"true"`
}

type BackupStatus

type BackupStatus struct {
	Status   string    `json:"status,omitempty"`
	Error    string    `json:"error,omitempty"`
	Filename string    `json:"filename,omitempty"`
	Size     int64     `json:"size,omitempty"`
	Duration int64     `json:"duration,omitempty"`
	Time     time.Time `json:"time"`
}

type Role

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

func New

func New(instance roles.Instance) *Role

func (*Role) APIBackupStart

func (r *Role) APIBackupStart() usecase.Interactor

func (*Role) APIBackupStatus

func (r *Role) APIBackupStatus() usecase.Interactor

func (*Role) APIRoleConfigGet

func (r *Role) APIRoleConfigGet() usecase.Interactor

func (*Role) APIRoleConfigPut

func (r *Role) APIRoleConfigPut() usecase.Interactor

func (*Role) GetBackupName

func (r *Role) GetBackupName() string

func (*Role) SaveSnapshot

func (r *Role) SaveSnapshot() *BackupStatus

func (*Role) Start

func (r *Role) Start(ctx context.Context, config []byte) error

func (*Role) Stop

func (r *Role) Stop()

type RoleConfig

type RoleConfig struct {
	AccessKey string `json:"accessKey"`
	SecretKey string `json:"secretKey"`
	Endpoint  string `json:"endpoint"`
	Bucket    string `json:"bucket"`
	Path      string `json:"path"`
	CronExpr  string `json:"cronExpr"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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