storage

package
v0.0.0-...-3c85b78 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(
	diskName string,
	directoryName string,
	fileName string,
	groupName string,
) (bytes io.ReadCloser, err error)

func FindDirectory

func FindDirectory(
	diskName string,
	directoryName string,
) *backup.Directory

func GetFilenames

func GetFilenames(
	diskName string,
	directoryName string,
	fileName string,
) []string

func InitializeConfiguration

func InitializeConfiguration()

func UpdateDiskInfo

func UpdateDiskInfo()

Types

type Client

type Client interface {
	GetDiskNames() ([]string, error)
	GetFileNames(disk string, maxDepth uint) (*fs.DirectoryInfo, error)
	Download(disk string, file *fs.FileInfo) (bytes io.ReadCloser, err error)
	Delete(disk string, file *fs.FileInfo) error
}

func NewClient

func NewClient(config *config.ClientConfiguration) Client

type DiskData

type DiskData struct {
	Name     string
	SafeName string

	Definition backup.Definition
	// contains filtered or unexported fields
}

func FindDisk

func FindDisk(diskName string) *DiskData

func GetDisks

func GetDisks() []*DiskData

func (*DiskData) MarshalJSON

func (disk *DiskData) MarshalJSON() ([]byte, error)

type FileGroup

type FileGroup []TemporalFile

func (FileGroup) Len

func (list FileGroup) Len() int

BEGIN The following Methods for FileGroup have to be implemented for sort.Interface Len is the number of elements in the collection.

func (FileGroup) Less

func (list FileGroup) Less(i int, j int) bool

Less reports whether the element with index i should sort before the element with index j.

func (FileGroup) Purge

func (list FileGroup) Purge(fileDef *backup.FileDefinition, path string, disk string, client Client) (remainder FileGroup, young uint64)

func (FileGroup) Swap

func (list FileGroup) Swap(i int, j int)

Swap swaps the elements with indexes i and j.

type FileLookup

type FileLookup map[string][]FileGroup

type TemporalFile

type TemporalFile struct {
	Time time.Time
	File *fs.FileInfo
}

Directories

Path Synopsis
fs

Jump to

Keyboard shortcuts

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