storageos

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 10 Imported by: 50

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() ProviderOption

ProviderWithSymlinks returns a ProviderOption that results in symlink support.

Note that ReadWriteBucketWithSymlinksEnabled 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL