Documentation ¶
Index ¶
- Constants
- func Backends() []string
- func Register(name string, backend func() RepositoryBackend)
- type Repository
- func (repository *Repository) CheckBlob(checksum [32]byte) (bool, error)
- func (repository *Repository) Close() error
- func (repository *Repository) Commit(indexID uuid.UUID, data []byte) error
- func (repository *Repository) Configuration() RepositoryConfig
- func (repository *Repository) DeleteBlob(checksum [32]byte) error
- func (repository *Repository) DeleteIndex(checksum [32]byte) error
- func (repository *Repository) DeleteLock(indexID uuid.UUID) error
- func (repository *Repository) DeletePackfile(checksum [32]byte) error
- func (repository *Repository) DeleteSnapshot(indexID uuid.UUID) error
- func (repository *Repository) GetBlob(checksum [32]byte) ([]byte, error)
- func (repository *Repository) GetBlobs() ([][32]byte, error)
- func (repository *Repository) GetCache() *cache.Cache
- func (repository *Repository) GetCommandLine() string
- func (repository *Repository) GetHostname() string
- func (repository *Repository) GetIndex(checksum [32]byte) ([]byte, error)
- func (repository *Repository) GetIndexes() ([][32]byte, error)
- func (repository *Repository) GetLock(indexID uuid.UUID) ([]byte, error)
- func (repository *Repository) GetLocks() ([]uuid.UUID, error)
- func (repository *Repository) GetMachineID() string
- func (repository *Repository) GetPackfile(checksum [32]byte) ([]byte, error)
- func (repository *Repository) GetPackfileSubpart(checksum [32]byte, offset uint32, length uint32) ([]byte, error)
- func (repository *Repository) GetPackfiles() ([][32]byte, error)
- func (repository *Repository) GetRBytes() uint64
- func (repository *Repository) GetRepositoryIndex() *index.Index
- func (repository *Repository) GetSecret() []byte
- func (repository *Repository) GetSnapshot(indexID uuid.UUID) ([]byte, error)
- func (repository *Repository) GetSnapshots() ([]uuid.UUID, error)
- func (repository *Repository) GetUsername() string
- func (repository *Repository) GetWBytes() uint64
- func (repository *Repository) PutBlob(checksum [32]byte, data []byte) error
- func (repository *Repository) PutIndex(checksum [32]byte, data []byte) error
- func (repository *Repository) PutLock(indexID uuid.UUID, data []byte) error
- func (repository *Repository) PutPackfile(checksum [32]byte, data []byte) error
- func (repository *Repository) PutSnapshot(indexID uuid.UUID, data []byte) 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) SetRepositoryIndex(index *index.Index)
- func (repository *Repository) SetSecret(secret []byte) error
- func (repository *Repository) SetUsername(username string) error
- type RepositoryBackend
- type RepositoryConfig
Constants ¶
View Source
const VERSION string = "0.5.0"
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, backend func() RepositoryBackend)
Types ¶
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) CheckBlob ¶
func (repository *Repository) CheckBlob(checksum [32]byte) (bool, error)
func (*Repository) Close ¶
func (repository *Repository) Close() error
func (*Repository) Commit ¶
func (repository *Repository) Commit(indexID uuid.UUID, data []byte) error
func (*Repository) Configuration ¶
func (repository *Repository) Configuration() RepositoryConfig
func (*Repository) DeleteBlob ¶
func (repository *Repository) DeleteBlob(checksum [32]byte) error
func (*Repository) DeleteIndex ¶
func (repository *Repository) DeleteIndex(checksum [32]byte) error
func (*Repository) DeleteLock ¶
func (repository *Repository) DeleteLock(indexID uuid.UUID) error
func (*Repository) DeletePackfile ¶
func (repository *Repository) DeletePackfile(checksum [32]byte) error
func (*Repository) DeleteSnapshot ¶
func (repository *Repository) DeleteSnapshot(indexID uuid.UUID) error
func (*Repository) GetBlob ¶
func (repository *Repository) GetBlob(checksum [32]byte) ([]byte, error)
func (*Repository) GetCache ¶
func (repository *Repository) GetCache() *cache.Cache
func (*Repository) GetCommandLine ¶
func (repository *Repository) GetCommandLine() string
func (*Repository) GetHostname ¶
func (repository *Repository) GetHostname() string
func (*Repository) GetIndex ¶
func (repository *Repository) GetIndex(checksum [32]byte) ([]byte, error)
func (*Repository) GetIndexes ¶
func (repository *Repository) GetIndexes() ([][32]byte, error)
Indexes
func (*Repository) GetLock ¶
func (repository *Repository) GetLock(indexID uuid.UUID) ([]byte, error)
func (*Repository) GetMachineID ¶
func (repository *Repository) GetMachineID() string
func (*Repository) GetPackfile ¶
func (repository *Repository) GetPackfile(checksum [32]byte) ([]byte, error)
func (*Repository) GetPackfileSubpart ¶
func (*Repository) GetPackfiles ¶
func (repository *Repository) GetPackfiles() ([][32]byte, error)
Packfiles
func (*Repository) GetRBytes ¶
func (repository *Repository) GetRBytes() uint64
func (*Repository) GetRepositoryIndex ¶
func (repository *Repository) GetRepositoryIndex() *index.Index
func (*Repository) GetSecret ¶
func (repository *Repository) GetSecret() []byte
func (*Repository) GetSnapshot ¶
func (repository *Repository) GetSnapshot(indexID uuid.UUID) ([]byte, error)
func (*Repository) GetSnapshots ¶
func (repository *Repository) GetSnapshots() ([]uuid.UUID, error)
snapshots
func (*Repository) GetUsername ¶
func (repository *Repository) GetUsername() string
func (*Repository) GetWBytes ¶
func (repository *Repository) GetWBytes() uint64
func (*Repository) PutBlob ¶
func (repository *Repository) PutBlob(checksum [32]byte, data []byte) error
func (*Repository) PutIndex ¶
func (repository *Repository) PutIndex(checksum [32]byte, data []byte) error
func (*Repository) PutLock ¶
func (repository *Repository) PutLock(indexID uuid.UUID, data []byte) error
func (*Repository) PutPackfile ¶
func (repository *Repository) PutPackfile(checksum [32]byte, data []byte) error
func (*Repository) PutSnapshot ¶
func (repository *Repository) PutSnapshot(indexID uuid.UUID, data []byte) 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) SetRepositoryIndex ¶
func (repository *Repository) SetRepositoryIndex(index *index.Index)
func (*Repository) SetSecret ¶
func (repository *Repository) SetSecret(secret []byte) error
func (*Repository) SetUsername ¶
func (repository *Repository) SetUsername(username string) error
type RepositoryBackend ¶
type RepositoryBackend interface { Create(repository string, configuration RepositoryConfig) error Open(repository string) error Configuration() RepositoryConfig GetSnapshots() ([]uuid.UUID, error) PutSnapshot(indexID uuid.UUID, data []byte) error GetSnapshot(indexID uuid.UUID) ([]byte, error) DeleteSnapshot(indexID uuid.UUID) error GetLocks() ([]uuid.UUID, error) PutLock(indexID uuid.UUID, data []byte) error GetLock(indexID uuid.UUID) ([]byte, error) DeleteLock(indexID uuid.UUID) error GetBlobs() ([][32]byte, error) PutBlob(checksum [32]byte, data []byte) error CheckBlob(checksum [32]byte) (bool, error) GetBlob(checksum [32]byte) ([]byte, error) DeleteBlob(checksum [32]byte) error GetIndexes() ([][32]byte, error) PutIndex(checksum [32]byte, data []byte) error GetIndex(checksum [32]byte) ([]byte, error) DeleteIndex(checksum [32]byte) error GetPackfiles() ([][32]byte, error) PutPackfile(checksum [32]byte, data []byte) error GetPackfile(checksum [32]byte) ([]byte, error) GetPackfileSubpart(checksum [32]byte, offset uint32, length uint32) ([]byte, error) DeletePackfile(checksum [32]byte) error Commit(indexID uuid.UUID, data []byte) error Close() error }
Click to show internal directories.
Click to hide internal directories.