filestore

package
v0.0.0-...-75939a1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Uid

func Uid() string

Types

type FileStore

type FileStore struct {
	Path string
}

func New

func New(path string) FileStore

New creates a new file based storage backend. The directory specified will be used as the only storage entry. This method does not check whether the path exists, use os.MkdirAll to ensure. In addition, a locking mechanism is provided.

func (FileStore) AsConcatableUpload

func (store FileStore) AsConcatableUpload(upload handler.Upload) handler.ConcatableUpload

func (FileStore) AsLengthDeclarableUpload

func (store FileStore) AsLengthDeclarableUpload(upload handler.Upload) handler.LengthDeclarableUpload

func (FileStore) AsTerminatableUpload

func (store FileStore) AsTerminatableUpload(upload handler.Upload) handler.TerminatableUpload

func (FileStore) GetUpload

func (store FileStore) GetUpload(ctx context.Context, id string) (handler.Upload, error)

func (FileStore) NewUpload

func (store FileStore) NewUpload(ctx context.Context, info handler.FileInfo) (handler.Upload, error)

func (FileStore) UseIn

func (store FileStore) UseIn(composer *handler.StoreComposer)

UseIn sets this store as the core data store in the passed composer and adds all possible extension to it.

Jump to

Keyboard shortcuts

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