package
1.50.0
Repository: https://github.com/bufbuild/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

AllObjectInfos walks the bucket and gets all the ObjectInfos.
AllPaths walks the bucket and gets all the paths.
Copy copies the bucket at from to the bucket at to.
CopyPath copies the fromPath from the ReadBucket to the toPath on the WriteBucket.
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.
CopyWithAtomic returns a new CopyOption that says to set PutWithAtomic when copying each file.
CopyWithExternalAndLocalPaths returns a new CopyOption that says to copy external and local 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.
DiffWithFilenames writes a diff of the ReadBuckets to the Writer and returns the names of any file paths that contained differences.
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.
FilterReadBucket filters the ReadBucket.
FilterReadBucketCloser filters the ReadBucketCloser.
ForReadObject gets a ReadObjectCloser at the given path, calls f on it, and then closes the ReadObjectCloser.
ForWriteObject gets a WriteObjectCloser at the given path, calls f on it, and then closes the WriteObjectCloser.
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.
MapReadBucketCloser maps the ReadBucketCloser.
MapReadWriteBucket maps the ReadWriteBucket.
MapReadWriteBucketCloser maps the ReadWriteBucketCloser.
MapWriteBucket maps the WriteBucket.
MapWriteBucketCloser maps the WriteBucketCloser.
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 logically-unique ReadBuckets.
NewErrExistsMultipleLocations returns a new error if a path exists in multiple locations.
NewErrNotExist returns a new error for a path not existing.
NewPutOptions returns a new PutOptions.
NopReadBucketCloser returns a ReadBucketCloser for the ReadBucket.
NopReadWriteBucketCloser returns a ReadWriteBucketCloser for the ReadWriteBucket.
NopWriteBucketCloser returns a WriteBucketCloser for the WriteBucket.
OverlayReadBucket takes the union of the ReadBuckets, overlaying earlier ReadBuckets on top of the other.
PutPath puts the data at the path.
PutWithAtomic ensures that the Put fully writes the file before making it available to readers.
PutWithSuggestedChunkSize sets the given size in bytes as a suggested chunk size to use by the Bucket implementation for this Put call.
ReadPath is analogous to os.ReadFile.
StripReadBucketExternalPaths strips the differentiated ExternalPaths from objects returned from the ReadBucket, instead replacing them with the Paths.
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.
ErrSetLocalPathUnsupported is the error returned if a bucket does not support SetLocalPath.

# Interfaces

Mapper is a path mapper.
Matcher is a path matcher.
ObjectInfo contains object info.
PutOptions are the possible options that can be passed to a Put operation.
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 is an option passed when putting an object in a bucket.