database

package
v0.2.16-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabaseRepository

func NewDatabaseRepository() storage.RepositoryBackend

Types

type DatabaseRepository

type DatabaseRepository struct {
	Cache *cache.Cache

	Repository string
	// contains filtered or unexported fields
}

func (*DatabaseRepository) CheckChunk

func (repository *DatabaseRepository) CheckChunk(checksum [32]byte) (bool, error)

func (*DatabaseRepository) CheckObject

func (repository *DatabaseRepository) CheckObject(checksum [32]byte) (bool, error)

func (*DatabaseRepository) Close

func (repository *DatabaseRepository) Close() error

func (*DatabaseRepository) Configuration

func (repository *DatabaseRepository) Configuration() storage.RepositoryConfig

func (*DatabaseRepository) Create

func (repository *DatabaseRepository) Create(location string, config storage.RepositoryConfig) error

func (*DatabaseRepository) DeleteBlob

func (repository *DatabaseRepository) DeleteBlob(checksum [32]byte) error

func (*DatabaseRepository) DeleteChunk

func (repository *DatabaseRepository) DeleteChunk(checksum [32]byte) error

func (*DatabaseRepository) DeleteObject

func (repository *DatabaseRepository) DeleteObject(checksum [32]byte) error

func (*DatabaseRepository) DeleteSnapshot

func (repository *DatabaseRepository) DeleteSnapshot(indexID uuid.UUID) error

func (*DatabaseRepository) GetBlob

func (repository *DatabaseRepository) GetBlob(checksum [32]byte) ([]byte, error)

func (*DatabaseRepository) GetBlobs

func (repository *DatabaseRepository) GetBlobs() ([][32]byte, error)

func (*DatabaseRepository) GetChunk

func (repository *DatabaseRepository) GetChunk(checksum [32]byte) ([]byte, error)

func (*DatabaseRepository) GetChunks

func (repository *DatabaseRepository) GetChunks() ([][32]byte, error)

func (*DatabaseRepository) GetObject

func (repository *DatabaseRepository) GetObject(checksum [32]byte) ([]byte, error)

func (*DatabaseRepository) GetObjects

func (repository *DatabaseRepository) GetObjects() ([][32]byte, error)

func (*DatabaseRepository) GetSnapshot

func (repository *DatabaseRepository) GetSnapshot(indexID uuid.UUID) ([]byte, error)

func (*DatabaseRepository) GetSnapshots

func (repository *DatabaseRepository) GetSnapshots() ([]uuid.UUID, error)

func (*DatabaseRepository) Open

func (repository *DatabaseRepository) Open(location string) error

func (*DatabaseRepository) PutBlob

func (repository *DatabaseRepository) PutBlob(checksum [32]byte, data []byte) error

func (*DatabaseRepository) PutChunk

func (repository *DatabaseRepository) PutChunk(checksum [32]byte, data []byte) error

func (*DatabaseRepository) PutObject

func (repository *DatabaseRepository) PutObject(checksum [32]byte) error

func (*DatabaseRepository) PutSnapshot

func (repository *DatabaseRepository) PutSnapshot(indexID uuid.UUID, data []byte) error

func (*DatabaseRepository) Transaction

func (repository *DatabaseRepository) Transaction(indexID uuid.UUID) (storage.TransactionBackend, error)

type DatabaseTransaction

type DatabaseTransaction struct {
	Uuid uuid.UUID
	// contains filtered or unexported fields
}

func (*DatabaseTransaction) Commit

func (transaction *DatabaseTransaction) Commit(data []byte) error

func (*DatabaseTransaction) GetUuid

func (transaction *DatabaseTransaction) GetUuid() uuid.UUID

Jump to

Keyboard shortcuts

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