dryrun

package
v0.0.0-...-53483ec Latest Latest
Warning

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

Go to latest
Published: Feb 27, 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

New returns a new backend that saves all data in a map in memory.

func (*Backend) Close

func (be *Backend) Close() error

func (*Backend) Delete

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

Delete removes all data in the backend.

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(ctx context.Context, h 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)

func (*Backend) Test

func (be *Backend) Test(ctx context.Context, h restic.Handle) (bool, error)

Jump to

Keyboard shortcuts

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