Documentation ¶
Index ¶
- Constants
- func Backends() []string
- func Register(name string, backend func() RepositoryBackend)
- type Reader
- type Repository
- func (repository *Repository) CheckChunk(checksum [32]byte) (bool, error)
- func (repository *Repository) CheckObject(checksum [32]byte) (bool, error)
- func (repository *Repository) Close() error
- func (repository *Repository) Configuration() RepositoryConfig
- func (repository *Repository) DeleteChunk(checksum [32]byte) error
- func (repository *Repository) DeleteObject(checksum [32]byte) error
- func (repository *Repository) GetCache() *cache.Cache
- func (repository *Repository) GetChunk(checksum [32]byte) ([]byte, error)
- func (repository *Repository) GetChunks() ([][32]byte, error)
- func (repository *Repository) GetCommandLine() string
- func (repository *Repository) GetFilesystem(indexID uuid.UUID) ([]byte, error)
- func (repository *Repository) GetHostname() string
- func (repository *Repository) GetIndex(indexID uuid.UUID) ([]byte, error)
- func (repository *Repository) GetIndexes() ([]uuid.UUID, error)
- func (repository *Repository) GetMachineID() string
- func (repository *Repository) GetMetadata(indexID uuid.UUID) ([]byte, error)
- func (repository *Repository) GetObject(checksum [32]byte) ([]byte, error)
- func (repository *Repository) GetObjects() ([][32]byte, error)
- func (repository *Repository) GetSecret() []byte
- func (repository *Repository) GetUsername() string
- func (repository *Repository) NewReader(rdIndex *index.Index, pathname string) (*Reader, error)
- func (repository *Repository) Purge(indexID uuid.UUID) error
- func (repository *Repository) PutChunk(checksum [32]byte, data []byte) (int, error)
- func (repository *Repository) PutFilesystem(indexID uuid.UUID, data []byte) (int, error)
- func (repository *Repository) PutIndex(indexID uuid.UUID, data []byte) (int, error)
- func (repository *Repository) PutMetadata(indexID uuid.UUID, data []byte) (int, error)
- func (repository *Repository) PutObject(checksum [32]byte, data []byte) (int, error)
- func (repository *Repository) SetCache(localCache *cache.Cache) error
- func (repository *Repository) SetCommandLine(commandLine string) error
- func (repository *Repository) SetHostname(hostname string) error
- func (repository *Repository) SetMachineID(machineID string) error
- func (repository *Repository) SetSecret(secret []byte) error
- func (repository *Repository) SetUsername(username string) error
- func (repository *Repository) Transaction(indexID uuid.UUID) (*Transaction, error)
- type RepositoryBackend
- type RepositoryConfig
- type Transaction
- func (transaction *Transaction) Commit() error
- func (transaction *Transaction) GetUuid() uuid.UUID
- func (transaction *Transaction) PutFilesystem(data []byte) (int, error)
- func (transaction *Transaction) PutIndex(data []byte) (int, error)
- func (transaction *Transaction) PutMetadata(data []byte) (int, error)
- type TransactionBackend
Constants ¶
View Source
const VERSION string = "0.2.1"
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, backend func() RepositoryBackend)
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) GetContentType ¶
type Repository ¶
type Repository struct { Location string Username string Hostname string CommandLine string MachineID string Cache *cache.Cache Key []byte // contains filtered or unexported fields }
func Create ¶
func Create(location string, configuration RepositoryConfig) (*Repository, error)
func New ¶
func New(location string) (*Repository, error)
func Open ¶
func Open(location string) (*Repository, error)
func (*Repository) CheckChunk ¶
func (repository *Repository) CheckChunk(checksum [32]byte) (bool, error)
func (*Repository) CheckObject ¶
func (repository *Repository) CheckObject(checksum [32]byte) (bool, error)
func (*Repository) Close ¶
func (repository *Repository) Close() error
func (*Repository) Configuration ¶
func (repository *Repository) Configuration() RepositoryConfig
func (*Repository) DeleteChunk ¶
func (repository *Repository) DeleteChunk(checksum [32]byte) error
func (*Repository) DeleteObject ¶
func (repository *Repository) DeleteObject(checksum [32]byte) error
func (*Repository) GetCache ¶
func (repository *Repository) GetCache() *cache.Cache
func (*Repository) GetChunk ¶
func (repository *Repository) GetChunk(checksum [32]byte) ([]byte, error)
func (*Repository) GetChunks ¶
func (repository *Repository) GetChunks() ([][32]byte, error)
func (*Repository) GetCommandLine ¶
func (repository *Repository) GetCommandLine() string
func (*Repository) GetFilesystem ¶
func (repository *Repository) GetFilesystem(indexID uuid.UUID) ([]byte, error)
func (*Repository) GetHostname ¶
func (repository *Repository) GetHostname() string
func (*Repository) GetIndex ¶
func (repository *Repository) GetIndex(indexID uuid.UUID) ([]byte, error)
func (*Repository) GetIndexes ¶
func (repository *Repository) GetIndexes() ([]uuid.UUID, error)
func (*Repository) GetMachineID ¶
func (repository *Repository) GetMachineID() string
func (*Repository) GetMetadata ¶
func (repository *Repository) GetMetadata(indexID uuid.UUID) ([]byte, error)
func (*Repository) GetObject ¶
func (repository *Repository) GetObject(checksum [32]byte) ([]byte, error)
func (*Repository) GetObjects ¶
func (repository *Repository) GetObjects() ([][32]byte, error)
func (*Repository) GetSecret ¶
func (repository *Repository) GetSecret() []byte
func (*Repository) GetUsername ¶
func (repository *Repository) GetUsername() string
func (*Repository) PutChunk ¶
func (repository *Repository) PutChunk(checksum [32]byte, data []byte) (int, error)
func (*Repository) PutFilesystem ¶
func (*Repository) PutMetadata ¶
func (*Repository) PutObject ¶
func (repository *Repository) PutObject(checksum [32]byte, data []byte) (int, error)
func (*Repository) SetCommandLine ¶
func (repository *Repository) SetCommandLine(commandLine string) error
func (*Repository) SetHostname ¶
func (repository *Repository) SetHostname(hostname string) error
func (*Repository) SetMachineID ¶
func (repository *Repository) SetMachineID(machineID string) error
func (*Repository) SetSecret ¶
func (repository *Repository) SetSecret(secret []byte) error
func (*Repository) SetUsername ¶
func (repository *Repository) SetUsername(username string) error
func (*Repository) Transaction ¶
func (repository *Repository) Transaction(indexID uuid.UUID) (*Transaction, error)
type RepositoryBackend ¶
type RepositoryBackend interface { Create(repository string, configuration RepositoryConfig) error Open(repository string) error Configuration() RepositoryConfig Transaction(indexID uuid.UUID) (TransactionBackend, error) GetIndexes() ([]uuid.UUID, error) GetMetadata(indexID uuid.UUID) ([]byte, error) PutMetadata(indexID uuid.UUID, data []byte) error GetIndex(indexID uuid.UUID) ([]byte, error) PutIndex(indexID uuid.UUID, data []byte) error GetFilesystem(indexID uuid.UUID) ([]byte, error) PutFilesystem(indexID uuid.UUID, data []byte) error GetObjects() ([][32]byte, error) GetObject(checksum [32]byte) ([]byte, error) CheckObject(checksum [32]byte) (bool, error) PutObject(checksum [32]byte, data []byte) error DeleteObject(checksum [32]byte) error GetChunks() ([][32]byte, error) GetChunk(checksum [32]byte) ([]byte, error) CheckChunk(checksum [32]byte) (bool, error) PutChunk(checksum [32]byte, data []byte) error DeleteChunk(checksum [32]byte) error Purge(indexID uuid.UUID) error Close() error }
type RepositoryConfig ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Commit ¶
func (transaction *Transaction) Commit() error
func (*Transaction) GetUuid ¶
func (transaction *Transaction) GetUuid() uuid.UUID
func (*Transaction) PutFilesystem ¶
func (transaction *Transaction) PutFilesystem(data []byte) (int, error)
func (*Transaction) PutMetadata ¶
func (transaction *Transaction) PutMetadata(data []byte) (int, error)
Click to show internal directories.
Click to hide internal directories.