blobfs

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: Apache-2.0 Imports: 19 Imported by: 19

README

PkgGoDev

blobfs

Like ioutil but for various cloud object stores like AWS S3, GCS, etc. using GoCloud.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBucketURL added in v0.2.1

func CreateBucketURL(bucketURL, endpoint, region string) string

Types

type BlobFS

type BlobFS struct {
	CACert []byte
	// contains filtered or unexported fields
}

func New

func New(storageURL string, prefix ...string) *BlobFS

func (*BlobFS) DeleteFile added in v0.1.8

func (fs *BlobFS) DeleteFile(ctx context.Context, filepath string) error

func (*BlobFS) Exists

func (fs *BlobFS) Exists(ctx context.Context, filepath string) (bool, error)

func (*BlobFS) OpenBucket added in v0.2.0

func (fs *BlobFS) OpenBucket(ctx context.Context, dir string) (*blob.Bucket, error)

func (*BlobFS) ReadFile

func (fs *BlobFS) ReadFile(ctx context.Context, filepath string) ([]byte, error)

func (*BlobFS) SignedURL

func (fs *BlobFS) SignedURL(ctx context.Context, filepath string, opts *blob.SignedURLOptions) (string, error)

func (*BlobFS) WriteFile

func (fs *BlobFS) WriteFile(ctx context.Context, filepath string, data []byte) error

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)
}

func NewInMemoryFS added in v0.1.4

func NewInMemoryFS() Interface

func NewOsFs added in v0.1.7

func NewOsFs() Interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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