package
0.0.0-20230306131847-26f457599b8d
Repository: https://github.com/xiaoyawei/buf.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package storagearchive implements archive utilities.
Package storagemem implements an in-memory storage Bucket.
Package storageos implements an os-backed storage Bucket.
Package storagetesting implements testing utilities and integration tests for storage.
Package storageutil provides helpers for storage implementations.

# Functions

AllPaths walks the bucket and gets all the paths.
Copy copies the bucket at from to the bucket at to.
CopyReader copies the contents of the Reader into the WriteBucket at the path.
CopyReadObject copies the contents of the ReadObject into the WriteBucket at the path.
CopyWithExternalPaths returns a new CopyOption that says to copy external paths.
Diff writes a diff of the ReadBuckets to the Writer.
DiffBytes does a diff of the ReadBuckets.
DiffWithExternalPathPrefixes returns a new DiffOption that sets the external path prefixes for the buckets.
DiffWithExternalPaths returns a new DiffOption that prints diffs with external paths instead of paths.
DiffWithSuppressCommands returns a new DiffOption that suppresses printing of commands.
DiffWithSuppressCommands returns a new DiffOption that suppresses printing of timestamps.
DiffWithTransform returns a DiffOption that adds a transform function.
Exists returns true if the path exists, false otherwise.
IsEmpty returns true if the bucket is empty under the prefix.
IsExistsMultipleLocations returns true if the error is for a path existing in multiple locations.
IsNotExist returns true for a error that is for a path not existing.
IsWriteLimitReached returns true if the error is of writes exceeding the limit of the bucket.
LimitWriteBucket returns a [WriteBucket] that writes to [writeBucket] but stops with an error after [limit] bytes are written.
MapChain chains the mappers.
MapOnPrefix returns a Mapper that will map the Bucket as if it was created on the given prefix.
MapReadBucket maps the ReadBucket.
MapReadWriteBucket maps the ReadWriteBucket.
MapWriteBucket maps the WriteBucket.
MatchAnd returns an And of the Matchers.
MatchNot returns an Not of the Matcher.
MatchOr returns an Or of the Matchers.
MatchPathBase returns a Matcher for the base.
MatchPathContained returns a Matcher for the directory that matches on paths by contained by containingDir.
MatchPathEqual returns a Matcher for the path.
MatchPathEqualOrContained returns a Matcher for the path that matches on paths equal or contained by equalOrContainingPath.
MatchPathExt returns a Matcher for the extension.
MultiReadBucket takes the union of the ReadBuckets.
MultiReadBucketSkipMultipleLocations takes the union of the ReadBuckets.
NewErrExistsMultipleLocations returns a new error if a path exists in multiple locations.
NewErrNotExist returns a new error for a path not existing.
NoExternalPathReadBucket disables the external paths for the ReadBucket.
NopReadBucketCloser returns a ReadBucketCloser for the ReadBucket.
NopReadWriteBucketCloser returns a ReadWriteBucketCloser for the ReadWriteBucket.
NopWriteBucketCloser returns a WriteBucketCloser for the WriteBucket.
PutPath puts the data at the path.
PutWithChunkSize sets the passed size in bytes to `ChunkSize` and `CustomChunkSize` to true.
ReadPath is analogous to os.ReadFile.
WalkReadObjects walks the bucket and calls get on each, closing the resulting ReadObjectCloser when done.

# Variables

ErrClosed is the error returned if a bucket or object is already closed.
ErrSetExternalPathUnsupported is the error returned if a bucket does not support SetExternalPath.

# Structs

PutOptions are the possible options that can be passed to a Put operation.

# Interfaces

Mapper is a path mapper.
Matcher is a path matcher.
ObjectInfo contains object info.
ReadBucket is a simple read-only bucket.
ReadBucketCloser is a read-only bucket that must be closed.
ReadObject is an object read from a bucket.
ReadObjectCloser is a ReadObject with a closer.
ReadWriteBucket is a simple read/write bucket.
ReadWriteBucketCloser is a read/write bucket that must be closed.
WriteBucket is a write-only bucket.
WriteBucketCloser is a write-only bucket that must be closed.
WriteObject object written to a bucket.
WriteObjectCloser is a WriteObject with a closer.

# Type aliases

CopyOption is an option for Copy.
DiffOption is an option for Diff.
PutOption are options passed when putting an object in a bucket.