Documentation
¶
Index ¶
- func CreateBucketURL(bucketURL, endpoint, region string) string
- type BlobFS
- func (fs *BlobFS) DeleteFile(ctx context.Context, filepath string) (err error)
- func (fs *BlobFS) Exists(ctx context.Context, filepath string) (exists bool, err error)
- func (fs *BlobFS) OpenBucket(ctx context.Context, dir string) (bucket *blob.Bucket, err error)
- func (fs *BlobFS) ReadFile(ctx context.Context, filepath string) (bytes []byte, err error)
- func (fs *BlobFS) SignedURL(ctx context.Context, filepath string, opts *blob.SignedURLOptions) (url string, err error)
- func (fs *BlobFS) WithCACert(caCert []byte) *BlobFS
- func (fs *BlobFS) WithMetricsHook(metricsHook TelemetryHook) *BlobFS
- func (fs *BlobFS) WriteFile(ctx context.Context, filepath string, data []byte) (err error)
- type Interface
- type Operation
- type TelemetryHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBucketURL ¶ added in v0.2.1
Types ¶
type BlobFS ¶
type BlobFS struct {
CACert []byte
// contains filtered or unexported fields
}
BlobFS provides a filesystem abstraction over various blob storage backends
func (*BlobFS) DeleteFile ¶ added in v0.1.8
func (*BlobFS) OpenBucket ¶ added in v0.2.0
func (*BlobFS) WithCACert ¶ added in v0.2.3
func (*BlobFS) WithMetricsHook ¶ added in v0.2.3
func (fs *BlobFS) WithMetricsHook(metricsHook TelemetryHook) *BlobFS
WithMetricsHook adds a telemetry hook to the BlobFS instance. NOTE: Any telemetry hook must be registered right after calling New() NOT safe for concurrent use
type Interface ¶ added in v0.1.9
type Interface interface {
WriteFile(ctx context.Context, filepath string, data []byte) error
ReadFile(ctx context.Context, filepath string) ([]byte, error)
DeleteFile(ctx context.Context, filepath string) error
Exists(ctx context.Context, filepath string) (bool, error)
SignedURL(ctx context.Context, filepath string, opts *blob.SignedURLOptions) (string, error)
OpenBucket(ctx context.Context, dir string) (*blob.Bucket, error)
}
func NewInMemoryFS ¶ added in v0.1.4
func NewInMemoryFS() Interface
Click to show internal directories.
Click to hide internal directories.