repository

package
v0.4.27-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: ISC Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPackfileNotFound = errors.New("packfile not found")
	ErrBlobNotFound     = errors.New("blob not found")
)
View Source
var ErrStoreReadOnly = errors.New("read only store")

Functions

This section is empty.

Types

type Repository

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

func Inexistant

func Inexistant(ctx *appcontext.AppContext, repositoryPath string) (*Repository, error)

func New

func New(ctx *appcontext.AppContext, store storage.Store, config []byte) (*Repository, error)

func NewNoRebuild

func NewNoRebuild(ctx *appcontext.AppContext, store storage.Store, config []byte) (*Repository, error)

func (*Repository) AppContext

func (r *Repository) AppContext() *appcontext.AppContext

func (*Repository) BlobExists

func (r *Repository) BlobExists(Type resources.Type, mac objects.MAC) bool

func (*Repository) Chunker

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

func (*Repository) Close

func (r *Repository) Close() error

func (*Repository) ComputeMAC

func (r *Repository) ComputeMAC(data []byte) objects.MAC

func (*Repository) Configuration

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

func (*Repository) Decode

func (r *Repository) Decode(input io.Reader) (io.Reader, error)

func (*Repository) DecodeBuffer

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

func (*Repository) DeletePackfile

func (r *Repository) DeletePackfile(mac objects.MAC) error

func (*Repository) DeleteSnapshot

func (r *Repository) DeleteSnapshot(snapshotID objects.MAC) error

func (*Repository) DeleteState

func (r *Repository) DeleteState(mac objects.MAC) error

func (*Repository) Encode

func (r *Repository) Encode(input io.Reader) (io.Reader, error)

func (*Repository) EncodeBuffer

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

func (*Repository) GetBlob

func (r *Repository) GetBlob(Type resources.Type, mac objects.MAC) (io.ReadSeeker, error)

func (*Repository) GetMACHasher

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

func (*Repository) GetPackfile

func (r *Repository) GetPackfile(mac objects.MAC) (*packfile.PackFile, error)

func (*Repository) GetPackfileBlob

func (r *Repository) GetPackfileBlob(mac objects.MAC, offset uint64, length uint32) (io.ReadSeeker, error)

func (*Repository) GetPackfiles

func (r *Repository) GetPackfiles() ([]objects.MAC, error)

func (*Repository) GetSnapshots

func (r *Repository) GetSnapshots() ([]objects.MAC, error)

func (*Repository) GetState

func (r *Repository) GetState(mac objects.MAC) (versioning.Version, io.Reader, error)

func (*Repository) GetStates

func (r *Repository) GetStates() ([]objects.MAC, error)

func (*Repository) ListSnapshots

func (r *Repository) ListSnapshots() iter.Seq[objects.MAC]

func (*Repository) Location

func (r *Repository) Location() string

func (*Repository) Logger

func (r *Repository) Logger() *logging.Logger

func (*Repository) NewStateDelta

func (r *Repository) NewStateDelta(cache *caching.ScanCache) *state.LocalState

func (*Repository) PutPackfile

func (r *Repository) PutPackfile(mac objects.MAC, rd io.Reader) error

func (*Repository) PutState

func (r *Repository) PutState(mac objects.MAC, rd io.Reader) error

func (*Repository) RebuildState

func (r *Repository) RebuildState() error

func (*Repository) Store

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

type RepositoryStore

type RepositoryStore[K, V any] struct {
	// contains filtered or unexported fields
}

func NewRepositoryStore

func NewRepositoryStore[K, V any](repo *Repository, blobtype resources.Type) *RepositoryStore[K, V]

func (*RepositoryStore[K, V]) Get

func (rs *RepositoryStore[K, V]) Get(sum objects.MAC) (*btree.Node[K, objects.MAC, V], error)

func (*RepositoryStore[K, V]) Put

func (rs *RepositoryStore[K, V]) Put(node *btree.Node[K, objects.MAC, V]) (csum objects.MAC, err error)

func (*RepositoryStore[K, V]) Update

func (rs *RepositoryStore[K, V]) Update(sum objects.MAC, node *btree.Node[K, objects.MAC, V]) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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