repository

package
v0.4.22-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: ISC Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

func New

func New(store *storage.Store, secret []byte) (*Repository, error)

func (*Repository) Checksum

func (r *Repository) Checksum(data []byte) [32]byte

func (*Repository) ChunkExists

func (r *Repository) ChunkExists(checksum [32]byte) bool

func (*Repository) Chunker

func (r *Repository) Chunker(rd io.ReadCloser) (*chunkers.Chunker, error)

func (*Repository) Close

func (r *Repository) Close() error

func (*Repository) Configuration

func (r *Repository) Configuration() storage.Configuration

func (*Repository) Context

func (r *Repository) Context() *context.Context

func (*Repository) DataExists

func (r *Repository) DataExists(checksum [32]byte) bool

func (*Repository) Decode

func (r *Repository) Decode(buffer []byte) ([]byte, error)

func (*Repository) DeletePackfile

func (r *Repository) DeletePackfile(checksum [32]byte) error

func (*Repository) DeleteSnapshot

func (r *Repository) DeleteSnapshot(snapshotID [32]byte) error

func (*Repository) DeleteState

func (r *Repository) DeleteState(checksum [32]byte) error

func (*Repository) DirectoryExists

func (r *Repository) DirectoryExists(checksum [32]byte) bool

func (*Repository) Encode

func (r *Repository) Encode(buffer []byte) ([]byte, error)

func (*Repository) FileExists

func (r *Repository) FileExists(checksum [32]byte) bool

func (*Repository) GetChunk

func (r *Repository) GetChunk(checksum [32]byte) (io.Reader, uint64, error)

func (*Repository) GetData

func (r *Repository) GetData(checksum [32]byte) (io.Reader, uint64, error)

func (*Repository) GetDirectory

func (r *Repository) GetDirectory(checksum [32]byte) (io.Reader, uint64, error)

func (*Repository) GetFile

func (r *Repository) GetFile(checksum [32]byte) (io.Reader, uint64, error)

func (*Repository) GetObject

func (r *Repository) GetObject(checksum [32]byte) (io.Reader, uint64, error)

func (*Repository) GetPackfile

func (r *Repository) GetPackfile(checksum [32]byte) (io.Reader, uint64, error)

func (*Repository) GetPackfileBlob

func (r *Repository) GetPackfileBlob(checksum [32]byte, offset uint32, length uint32) (io.Reader, int64, error)

func (*Repository) GetPackfiles

func (r *Repository) GetPackfiles() ([][32]byte, error)

func (*Repository) GetSnapshot

func (r *Repository) GetSnapshot(snapshotID [32]byte) (io.Reader, uint64, error)

func (*Repository) GetSnapshots

func (r *Repository) GetSnapshots() ([][32]byte, error)

func (*Repository) GetState

func (r *Repository) GetState(checksum [32]byte) ([]byte, int64, error)

func (*Repository) GetStates

func (r *Repository) GetStates() ([][32]byte, error)

func (*Repository) Hasher

func (r *Repository) Hasher() hash.Hash

func (*Repository) ListSnapshots

func (r *Repository) ListSnapshots() <-chan [32]byte

func (*Repository) Location

func (r *Repository) Location() string

func (*Repository) NewStateDelta

func (r *Repository) NewStateDelta() *state.State

func (*Repository) ObjectExists

func (r *Repository) ObjectExists(checksum [32]byte) bool

func (*Repository) PutPackfile

func (r *Repository) PutPackfile(checksum [32]byte, rd io.Reader, size uint64) error

func (*Repository) PutState

func (r *Repository) PutState(checksum [32]byte, rd io.Reader, size int64) (int, error)

func (*Repository) SetPackfileForChunk

func (r *Repository) SetPackfileForChunk(packfileChecksum [32]byte, chunkChecksum [32]byte, offset uint32, length uint32)

func (*Repository) SetPackfileForData

func (r *Repository) SetPackfileForData(packfileChecksum [32]byte, dataChecksum [32]byte, offset uint32, length uint32)

func (*Repository) SetPackfileForDirectory

func (r *Repository) SetPackfileForDirectory(packfileChecksum [32]byte, directoryChecksum [32]byte, offset uint32, length uint32)

func (*Repository) SetPackfileForFile

func (r *Repository) SetPackfileForFile(packfileChecksum [32]byte, fileChecksum [32]byte, offset uint32, length uint32)

func (*Repository) SetPackfileForObject

func (r *Repository) SetPackfileForObject(packfileChecksum [32]byte, objectChecksum [32]byte, offset uint32, length uint32)

func (*Repository) SetPackfileForSnapshot

func (r *Repository) SetPackfileForSnapshot(packfileChecksum [32]byte, snapshotID [32]byte, offset uint32, length uint32)

func (*Repository) Store

func (r *Repository) Store() *storage.Store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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