filesystem

package
v0.0.0-...-0941746 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyIsNotValid    = errors.New("storage key is not valid")
	ErrPrefixIsNotValid = errors.New("storage prefix is not valid")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	BaseDirectory string
}

type FilesystemStorage

type FilesystemStorage struct {
	// contains filtered or unexported fields
}

func NewFilesystemStorage

func NewFilesystemStorage(config Config) *FilesystemStorage

func (*FilesystemStorage) BasePath

func (storage *FilesystemStorage) BasePath() string

func (*FilesystemStorage) CopyObject

func (storage *FilesystemStorage) CopyObject(ctx context.Context, from string, to string) (err error)

func (*FilesystemStorage) DeleteObject

func (storage *FilesystemStorage) DeleteObject(ctx context.Context, key string) (err error)

func (*FilesystemStorage) DeleteObjectsWithPrefix

func (storage *FilesystemStorage) DeleteObjectsWithPrefix(ctx context.Context, prefix string) (err error)

func (*FilesystemStorage) GetObject

func (storage *FilesystemStorage) GetObject(ctx context.Context, key string) (file io.ReadCloser, err error)

func (*FilesystemStorage) GetObjectSize

func (storage *FilesystemStorage) GetObjectSize(ctx context.Context, key string) (ret int64, err error)

func (*FilesystemStorage) PutObject

func (storage *FilesystemStorage) PutObject(ctx context.Context, key string, contentType string, size int64, object io.Reader) (err error)

Jump to

Keyboard shortcuts

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