dryrun

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend passes reads through to an underlying layer and accepts writes, but doesn't do anything. Also removes are ignored. So in fact, this backend silently ignores all operations that would modify the repo and does normal operations else. This is used for `backup --dry-run`.

func New

func New(be restic.Backend) *Backend

func (*Backend) Close

func (be *Backend) Close() error

func (*Backend) Connections

func (be *Backend) Connections() uint

func (*Backend) Delete

func (be *Backend) Delete(_ context.Context) error

Delete removes all data in the backend.

func (*Backend) HasAtomicReplace

func (be *Backend) HasAtomicReplace() bool

func (*Backend) Hasher

func (be *Backend) Hasher() hash.Hash

func (*Backend) IsNotExist

func (be *Backend) IsNotExist(err error) bool

func (*Backend) List

func (be *Backend) List(ctx context.Context, t restic.FileType, fn func(restic.FileInfo) error) error

func (*Backend) Load

func (be *Backend) Load(ctx context.Context, h restic.Handle, length int, offset int64, fn func(io.Reader) error) error

func (*Backend) Location

func (be *Backend) Location() string

Location returns the location of the backend.

func (*Backend) Remove

func (be *Backend) Remove(_ context.Context, _ restic.Handle) error

Remove deletes a file from the backend.

func (*Backend) Save

Save adds new Data to the backend.

func (*Backend) Stat

func (be *Backend) Stat(ctx context.Context, h restic.Handle) (restic.FileInfo, error)

Jump to

Keyboard shortcuts

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