Versions in this module Expand all Collapse all v0 v0.9.2 Aug 6, 2018 v0.9.1 Jun 10, 2018 v0.9.0 May 21, 2018 Changes in this version + func TestCreateFiles(t testing.TB, target string, dir TestDir) + func TestEnsureFileContent(ctx context.Context, t testing.TB, repo restic.Repository, filename string, ...) + func TestEnsureFiles(t testing.TB, target string, dir TestDir) + func TestEnsureSnapshot(t testing.TB, repo restic.Repository, snapshotID restic.ID, dir TestDir) + func TestEnsureTree(ctx context.Context, t testing.TB, prefix string, repo restic.Repository, ...) + func TestWalkFiles(t testing.TB, target string, dir TestDir, fn TestWalkFunc) type Archiver + CompleteBlob func(filename string, bytes uint64) + CompleteItem func(item string, previous, current *restic.Node, s ItemStats, d time.Duration) + Error ErrorFunc + FS fs.FS + Options Options + Repo restic.Repository + Select SelectFunc + StartFile func(filename string) + WithAtime bool + func (arch *Archiver) SaveDir(ctx context.Context, snPath string, fi os.FileInfo, dir string, ...) (d FutureTree, err error) + func (arch *Archiver) SaveTree(ctx context.Context, snPath string, atree *Tree, previous *restic.Tree) (*restic.Tree, error) + type BlobSaver struct + func NewBlobSaver(ctx context.Context, t *tomb.Tomb, repo Saver, workers uint) *BlobSaver + func (s *BlobSaver) Save(ctx context.Context, t restic.BlobType, buf *Buffer) FutureBlob + type Buffer struct + Data []byte + Put func(*Buffer) + func (b *Buffer) Release() + type BufferPool struct + func NewBufferPool(ctx context.Context, max int, defaultSize int) *BufferPool + func (pool *BufferPool) Get() *Buffer + func (pool *BufferPool) Put(b *Buffer) + type CompleteFunc func(*restic.Node, ItemStats) + type ErrorFunc func(file string, fi os.FileInfo, err error) error + type FileSaver struct + CompleteBlob func(filename string, bytes uint64) + NodeFromFileInfo func(filename string, fi os.FileInfo) (*restic.Node, error) + func NewFileSaver(ctx context.Context, t *tomb.Tomb, fs fs.FS, save SaveBlobFn, pol chunker.Pol, ...) *FileSaver + func (s *FileSaver) Save(ctx context.Context, snPath string, file fs.File, fi os.FileInfo, start func(), ...) FutureFile + type FutureBlob struct + func (s *FutureBlob) ID() restic.ID + func (s *FutureBlob) Known() bool + func (s *FutureBlob) Length() int + func (s *FutureBlob) Wait(ctx context.Context) + type FutureFile struct + func (s *FutureFile) Err() error + func (s *FutureFile) Node() *restic.Node + func (s *FutureFile) Stats() ItemStats + func (s *FutureFile) Wait(ctx context.Context) + type FutureNode struct + type FutureTree struct + func (s *FutureTree) Node() *restic.Node + func (s *FutureTree) Stats() ItemStats + func (s *FutureTree) Wait(ctx context.Context) + type IndexUploader struct + Complete func(id restic.ID) + Start func() + func (u IndexUploader) Upload(ctx, shutdown context.Context, interval time.Duration) error + type ItemStats struct + DataBlobs int + DataSize uint64 + TreeBlobs int + TreeSize uint64 + func (s *ItemStats) Add(other ItemStats) + type Options struct + FileReadConcurrency uint + SaveBlobConcurrency uint + SaveTreeConcurrency uint + func (o Options) ApplyDefaults() Options + type SaveBlobFn func(context.Context, restic.BlobType, *Buffer) FutureBlob + type Saver interface + Index func() restic.Index + SaveBlob func(ctx context.Context, t restic.BlobType, data []byte, id restic.ID) (restic.ID, error) + type ScanStats struct + Bytes uint64 + Dirs uint + Files uint + Others uint + type Scanner struct + Error ErrorFunc + FS fs.FS + Result func(item string, s ScanStats) + Select SelectFunc + func NewScanner(fs fs.FS) *Scanner + func (s *Scanner) Scan(ctx context.Context, targets []string) error + type SelectFunc func(item string, fi os.FileInfo) bool + type SnapshotOptions struct + Excludes []string + Hostname string + ParentSnapshot restic.ID + Tags []string + Time time.Time + type TestDir map[string]interface + func (d TestDir) String() string + type TestFile struct + Content string + func (f TestFile) String() string + type TestSymlink struct + Target string + func (s TestSymlink) String() string + type TestWalkFunc func(path string, item interface{}) error + type Tree struct + FileInfoPath string + Nodes map[string]Tree + Path string + Root string + func NewTree(fs fs.FS, targets []string) (*Tree, error) + func (t *Tree) Add(fs fs.FS, path string) error + func (t Tree) String() string + type TreeSaver struct + func NewTreeSaver(ctx context.Context, t *tomb.Tomb, treeWorkers uint, ...) *TreeSaver + func (s *TreeSaver) Save(ctx context.Context, snPath string, node *restic.Node, nodes []FutureNode) FutureTree v0.8.3 Feb 26, 2018 v0.8.2 Feb 17, 2018 v0.8.1 Dec 27, 2017 Changes in this version type Archiver + WithAccessTime bool v0.8.0 Nov 26, 2017 v0.7.3 Sep 20, 2017 v0.7.2 Sep 13, 2017 Changes in this version + func Scan(dirs []string, filter pipe.SelectFunc, p *restic.Progress) (restic.Stat, error) + func TestSnapshot(t testing.TB, repo restic.Repository, path string, parent *restic.ID) *restic.Snapshot + type Archiver struct + Excludes []string + SelectFilter pipe.SelectFunc + Warn func(dir string, fi os.FileInfo, err error) + func New(repo restic.Repository) *Archiver + func (arch *Archiver) Save(ctx context.Context, t restic.BlobType, data []byte, id restic.ID) error + func (arch *Archiver) SaveFile(ctx context.Context, p *restic.Progress, node *restic.Node) (*restic.Node, error) + func (arch *Archiver) SaveTreeJSON(ctx context.Context, tree *restic.Tree) (restic.ID, error) + func (arch *Archiver) Snapshot(ctx context.Context, p *restic.Progress, paths, tags []string, hostname string, ...) (*restic.Snapshot, restic.ID, error) + type Reader struct + Hostname string + Tags []string + func (r *Reader) Archive(ctx context.Context, name string, rd io.Reader, p *restic.Progress) (*restic.Snapshot, restic.ID, error)