http

package
v0.0.0-...-f81bbf2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPStorage

type HTTPStorage struct {
	URL url.URL
}

HTTPStorage stores data on a remote HTTP server.

func (*HTTPStorage) AvailableSpace

func (backend *HTTPStorage) AvailableSpace() (uint64, error)

AvailableSpace returns the free space on this backend.

func (*HTTPStorage) Close

func (backend *HTTPStorage) Close() error

Close the backend.

func (*HTTPStorage) DeleteChunk

func (backend *HTTPStorage) DeleteChunk(shasum string, parts, totalParts uint) error

DeleteChunk deletes a single Chunk.

func (*HTTPStorage) Description

func (backend *HTTPStorage) Description() string

Description returns a user-friendly description for this backend.

func (*HTTPStorage) InitRepository

func (backend *HTTPStorage) InitRepository() error

InitRepository creates a new repository.

func (*HTTPStorage) LoadChunk

func (backend *HTTPStorage) LoadChunk(shasum string, part, totalParts uint) ([]byte, error)

LoadChunk loads a Chunk from network.

func (*HTTPStorage) LoadChunkIndex

func (backend *HTTPStorage) LoadChunkIndex() ([]byte, error)

LoadChunkIndex reads the chunk-index.

func (*HTTPStorage) LoadRepository

func (backend *HTTPStorage) LoadRepository() ([]byte, error)

LoadRepository reads the metadata for a repository.

func (*HTTPStorage) LoadSnapshot

func (backend *HTTPStorage) LoadSnapshot(id string) ([]byte, error)

LoadSnapshot loads a snapshot.

func (*HTTPStorage) Location

func (backend *HTTPStorage) Location() string

Location returns the type and location of the repository.

func (*HTTPStorage) NewBackend

func (*HTTPStorage) NewBackend(u url.URL) (knoxite.Backend, error)

NewBackend returns a HTTPStorage backend.

func (*HTTPStorage) Protocols

func (backend *HTTPStorage) Protocols() []string

Protocols returns the Protocol Schemes supported by this backend.

func (*HTTPStorage) SaveChunkIndex

func (backend *HTTPStorage) SaveChunkIndex(data []byte) error

SaveChunkIndex stores the chunk-index.

func (*HTTPStorage) SaveRepository

func (backend *HTTPStorage) SaveRepository(data []byte) error

SaveRepository stores the metadata for a repository.

func (*HTTPStorage) SaveSnapshot

func (backend *HTTPStorage) SaveSnapshot(id string, data []byte) error

SaveSnapshot stores a snapshot.

func (*HTTPStorage) StoreChunk

func (backend *HTTPStorage) StoreChunk(shasum string, part, totalParts uint, data []byte) (uint64, error)

StoreChunk stores a single Chunk on network.

Jump to

Keyboard shortcuts

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