backup

package
v1.3.3-beta10 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backuper

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

func NewBackuper

func NewBackuper(dir string) (*Backuper, error)

func NewDefaultBackuper

func NewDefaultBackuper() (*Backuper, error)

func (*Backuper) Backup

func (b *Backuper) Backup(ctx context.Context, path string) error

func (*Backuper) GetAllItems

func (b *Backuper) GetAllItems() []Item

func (*Backuper) GetItemById

func (b *Backuper) GetItemById(id string) (*Item, error)

func (*Backuper) Recover

func (b *Backuper) Recover(ctx context.Context, id string) error

type Config

type Config struct {
	Path  string
	Items []Item
}

func (*Config) Save

func (c *Config) Save(item Item) error

type Item

type Item struct {
	Id             string    `json:"id"`
	Time           time.Time `json:"time"`
	BackupFilePath string    `json:"file_path"`
	Name           string    `json:"name"`
	OriginPath     string    `json:"origin_path"`
	IsDir          bool      `json:"is_dir"`
}

Jump to

Keyboard shortcuts

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