Documentation ¶
Overview ¶
Package storagemem implements an in-memory storage Bucket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReadBucket ¶ added in v0.19.0
func NewReadBucket(pathToData map[string][]byte, options ...ReadBucketOption) (storage.ReadBucket, error)
NewReadBucket returns a new ReadBucket.
Types ¶
type ReadBucketBuilder ¶ added in v0.19.0
type ReadBucketBuilder interface { storage.WriteBucket // ToReadBucket returns a ReadBucket for the current data in the WriteBucket. // // No further calls can be made to the ReadBucketBuilder after this call. // This is functionally equivalent to a Close in other contexts. ToReadBucket(options ...ReadBucketOption) (storage.ReadBucket, error) }
ReadBucketBuilder builds ReadBuckets.
func NewReadBucketBuilder ¶ added in v0.19.0
func NewReadBucketBuilder() ReadBucketBuilder
NewReadBucketBuilder returns a new in-memory ReadBucketBuilder.
type ReadBucketOption ¶ added in v0.19.0
type ReadBucketOption func(*readBucketOptions)
ReadBucketOption is an option for a new ReadBucket.
func WithExternalPathResolver ¶ added in v0.19.0
func WithExternalPathResolver(externalPathResolver func(string) (string, error)) ReadBucketOption
WithExternalPathResolver uses the given resolver to resolve paths to external paths.
The default is to use the path as the external path. This ExternalPathResolver takes precedence over any explicitly set external paths.
Click to show internal directories.
Click to hide internal directories.