filestorage

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStorage

type FileStorage interface {
	GetBucket(id bucket.ID) (path string, unlock func(), err error)
	GetFile(bucketID bucket.ID, file string) (path string, unlock func(), err error)
	CreateBucket(id bucket.ID, trashTime time.Time) (path string, commit, abort func() error, err error)
	CreateFile(bucketID bucket.ID, file string) (path string, commit, abort func() error, err error)
	DownloadBucket(ctx context.Context, endpoint string, id bucket.ID, trashTime time.Time) error
	DownloadFile(ctx context.Context, endpoint string, bucketID bucket.ID, file string) error
	DeleteFile(bucketID bucket.ID, file string) error
	Shutdown()
}

func New

func New(log *slog.Logger, cfg config.Config, mux *chi.Mux) (FileStorage, error)

Jump to

Keyboard shortcuts

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