database

package
v0.2.10-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: ISC Imports: 11 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

	storage.RepositoryBackend
	// 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) GetBlob

func (repository *DatabaseRepository) GetBlob(checksum [32]byte) ([]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) GetIndexes

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

func (*DatabaseRepository) GetMetadata

func (repository *DatabaseRepository) GetMetadata(indexID uuid.UUID) ([]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) Open

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

func (*DatabaseRepository) Purge

func (repository *DatabaseRepository) Purge(indexID uuid.UUID) 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) PutMetadata

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

func (*DatabaseRepository) PutObject

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

func (*DatabaseRepository) Transaction

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

type DatabaseTransaction

type DatabaseTransaction struct {
	Uuid uuid.UUID

	storage.TransactionBackend
	// contains filtered or unexported fields
}

func (*DatabaseTransaction) Commit

func (transaction *DatabaseTransaction) Commit() error

func (*DatabaseTransaction) GetUuid

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

func (*DatabaseTransaction) PutChunk

func (transaction *DatabaseTransaction) PutChunk(checksum [32]byte, data []byte) error

func (*DatabaseTransaction) PutFilesystem

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

func (*DatabaseTransaction) PutIndex

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

func (*DatabaseTransaction) PutMetadata

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

func (*DatabaseTransaction) PutObject

func (transaction *DatabaseTransaction) PutObject(checksum [32]byte, data []byte) error

Jump to

Keyboard shortcuts

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