Versions in this module Expand all Collapse all v0 v0.1.0 Sep 22, 2023 Changes in this version + const DefaultPackSize + const MaxPackSize + const MaxStreamBufferSize + const MinPackSize + const TestChunkerPol + var ErrMaxKeysReached = errors.New("maximum number of keys reached") + var ErrNoKeyFound = errors.New("wrong password or no key found") + var KDFMemory = 60 + var KDFTimeout = 500 * time.Millisecond + var Params *crypto.Params + func BenchmarkAllVersions(b *testing.B, bench VersionedBenchmark) + func Repack(ctx context.Context, repo restic.Repository, dstRepo restic.Repository, ...) (obsoletePacks restic.IDSet, err error) + func StreamPack(ctx context.Context, beLoad BackendLoadFn, key *crypto.Key, packID restic.ID, ...) error + func TestAllVersions(t *testing.T, test VersionedTest) + func TestBackend(_ testing.TB) restic.Backend + func TestOpenLocal(t testing.TB, dir string) (r restic.Repository) + func TestRepository(t testing.TB) restic.Repository + func TestRepositoryWithBackend(t testing.TB, be restic.Backend, version uint) restic.Repository + func TestRepositoryWithVersion(t testing.TB, version uint) restic.Repository + func TestUseLowSecurityKDFParameters(t logger) + func ZeroChunk() restic.ID + type BackendLoadFn func(ctx context.Context, h restic.Handle, length int, offset int64, ...) error + type CompressionMode uint + const CompressionAuto + const CompressionInvalid + const CompressionMax + const CompressionOff + func (c *CompressionMode) Set(s string) error + func (c *CompressionMode) String() string + func (c *CompressionMode) Type() string + type Key struct + Created time.Time + Data []byte + Hostname string + KDF string + N int + P int + R int + Salt []byte + Username string + func AddKey(ctx context.Context, s *Repository, password, username, hostname string, ...) (*Key, error) + func LoadKey(ctx context.Context, s *Repository, id restic.ID) (k *Key, err error) + func OpenKey(ctx context.Context, s *Repository, id restic.ID, password string) (*Key, error) + func SearchKey(ctx context.Context, s *Repository, password string, maxKeys int, ...) (k *Key, err error) + func (k *Key) String() string + func (k *Key) Valid() bool + func (k Key) ID() restic.ID + type Options struct + Compression CompressionMode + PackSize uint + type Packer struct + type Repository struct + Cache *cache.Cache + func New(be restic.Backend, opts Options) (*Repository, error) + func (r *Repository) Backend() restic.Backend + func (r *Repository) Close() error + func (r *Repository) Config() restic.Config + func (r *Repository) Connections() uint + func (r *Repository) CreateIndexFromPacks(ctx context.Context, packsize map[restic.ID]int64, p *progress.Counter) (invalid restic.IDs, err error) + func (r *Repository) Delete(ctx context.Context) error + func (r *Repository) DisableAutoIndexUpdate() + func (r *Repository) Flush(ctx context.Context) error + func (r *Repository) Index() restic.MasterIndex + func (r *Repository) Init(ctx context.Context, version uint, password string, ...) error + func (r *Repository) Key() *crypto.Key + func (r *Repository) KeyID() restic.ID + func (r *Repository) List(ctx context.Context, t restic.FileType, fn func(restic.ID, int64) error) error + func (r *Repository) ListPack(ctx context.Context, id restic.ID, size int64) ([]restic.Blob, uint32, error) + func (r *Repository) LoadBlob(ctx context.Context, t restic.BlobType, id restic.ID, buf []byte) ([]byte, error) + func (r *Repository) LoadIndex(ctx context.Context) error + func (r *Repository) LoadUnpacked(ctx context.Context, t restic.FileType, id restic.ID) ([]byte, error) + func (r *Repository) LookupBlobSize(id restic.ID, tpe restic.BlobType) (uint, bool) + func (r *Repository) PackSize() uint + func (r *Repository) SaveBlob(ctx context.Context, t restic.BlobType, buf []byte, id restic.ID, ...) (newID restic.ID, known bool, size int, err error) + func (r *Repository) SaveUnpacked(ctx context.Context, t restic.FileType, p []byte) (id restic.ID, err error) + func (r *Repository) SearchKey(ctx context.Context, password string, maxKeys int, keyHint string) error + func (r *Repository) SetDryRun() + func (r *Repository) SetIndex(i restic.MasterIndex) error + func (r *Repository) StartPackUploader(ctx context.Context, wg *errgroup.Group) + func (r *Repository) UseCache(c *cache.Cache) + type SavePacker interface + type VersionedBenchmark func(b *testing.B, version uint) + type VersionedTest func(t *testing.T, version uint)