package
5.2.0-alpha+incompatible
Repository: https://github.com/orion7r/br.git
Documentation: pkg.go.dev

# Functions

Create creates ExternalStorage.
DefineFlags adds flags to the flag set corresponding to all backend options.
ExtractQueryParameters moves the query parameters of the URL into the options using reflection.
FormatBackendURL obtains the raw URL which can be used the reconstruct the backend.
New creates an ExternalStorage with options.
NewBufferWriter creates a Writer that simply writes to a buffer (useful for testing).
NewLocalStorage return a LocalStorage at directory `base`.
NewS3Storage initialize a new s3 storage for metadata.
NewS3StorageForTest creates a new S3Storage for testing only.
NewUploaderWriter wraps the Writer interface over an uploader.
ParseBackend constructs a structured backend description from the storage URL.
ParseRangeInfo parses the Content-Range header and returns the offsets.
ParseRawURL parse raw url to url object.
WithCompression returns an ExternalStorage with compress option.

# Constants

Gzip will compress given bytes in gzip format.
NoCompression won't compress given bytes.

# Structs

BackendOptions further configures the storage backend not expressed by the storage URL.
BytesWriter is a Writer implementation on top of bytes.Buffer that is useful for testing.
ExternalStorageOptions are backend-independent options provided to New.
GCSBackendOptions are options for configuration the GCS storage.
LocalStorage represents local file system storage.
RangeInfo represents the an HTTP Content-Range header value of the form `bytes [Start]-[End]/[Size]`.
S3BackendOptions contains options for s3 storage.
S3Storage info for s3 storage.
S3Uploader does multi-part upload to s3.
WalkOption is the option of storage.WalkDir.

# Interfaces

ExternalFileReader represents the streaming external file reader.
ExternalFileWriter represents the streaming external file writer.
ExternalStorage represents a kind of file system storage.
ReadSeekCloser is the interface that groups the basic Read, Seek and Close methods.
Uploader upload file with chunks.
Writer is like io.Writer but with Context, create a new writer on top of Uploader with NewUploaderWriter.

# Type aliases

CompressType represents the type of compression.