Documentation ¶
Overview ¶
Package storageos implements an os-backed storage Bucket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface { // NewReadWriteBucket returns a new OS bucket. // // Only regular files are handled, that is Exists should only be called // for regular files, Get and Put only work for regular files, Put // automatically calls Mkdir, and Walk only calls f on regular files. // // The root path is expected to be normalized, however the root path // can be absolute or jump context. // // Not thread-safe. NewReadWriteBucket(rootPath string, options ...ReadWriteBucketOption) (storage.ReadWriteBucket, error) }
Provider provides new ReadWriteBuckets.
func NewProvider ¶
func NewProvider(options ...ProviderOption) Provider
NewProvider returns a new Provider.
type ProviderOption ¶
type ProviderOption func(*provider)
ProviderOption is an option for a new Provider.
func ProviderWithSymlinks ¶
func ProviderWithSymlinks() ProviderOption
ProviderWithSymlinks returns a ProviderOption that results in symlink support.
Note that ReadWriteBucketWithSymlinksIfSupported still needs to be passed for a given ReadWriteBucket to have symlinks followed.
type ReadWriteBucketOption ¶
type ReadWriteBucketOption func(*readWriteBucketOptions)
ReadWriteBucketOption is an option for a new ReadWriteBucket.
func ReadWriteBucketWithSymlinksIfSupported ¶
func ReadWriteBucketWithSymlinksIfSupported() ReadWriteBucketOption
ReadWriteBucketWithSymlinksIfSupported returns a ReadWriteBucketOption that results in symlink support being enabled for this bucket. If the Provider did not have symlink support, this is a no-op.