Documentation ¶
Index ¶
- type FS
- func (f *FS) AddGrant(ctx context.Context, ref *provider.Reference, g *provider.Grant) error
- func (f *FS) AsConcatableUpload(up tusd.Upload) tusd.ConcatableUpload
- func (f *FS) AsLengthDeclarableUpload(up tusd.Upload) tusd.LengthDeclarableUpload
- func (f *FS) AsTerminatableUpload(up tusd.Upload) tusd.TerminatableUpload
- func (f *FS) CreateDir(ctx context.Context, ref *provider.Reference) error
- func (f *FS) CreateHome(ctx context.Context) error
- func (f *FS) CreateReference(ctx context.Context, path string, targetURI *url.URL) error
- func (f *FS) CreateStorageSpace(ctx context.Context, req *provider.CreateStorageSpaceRequest) (*provider.CreateStorageSpaceResponse, error)
- func (f *FS) Delete(ctx context.Context, ref *provider.Reference) error
- func (f *FS) DeleteStorageSpace(ctx context.Context, req *provider.DeleteStorageSpaceRequest) error
- func (f *FS) DenyGrant(ctx context.Context, ref *provider.Reference, g *provider.Grantee) error
- func (f *FS) Download(ctx context.Context, ref *provider.Reference) (io.ReadCloser, error)
- func (f *FS) DownloadRevision(ctx context.Context, ref *provider.Reference, key string) (io.ReadCloser, error)
- func (f *FS) EmptyRecycle(ctx context.Context, ref *provider.Reference) error
- func (f *FS) GetHome(ctx context.Context) (string, error)
- func (f *FS) GetLock(ctx context.Context, ref *provider.Reference) (*provider.Lock, error)
- func (f *FS) GetMD(ctx context.Context, ref *provider.Reference, mdKeys, fieldMask []string) (*provider.ResourceInfo, error)
- func (f *FS) GetPathByID(ctx context.Context, id *provider.ResourceId) (string, error)
- func (f *FS) GetQuota(ctx context.Context, ref *provider.Reference) (uint64, uint64, uint64, error)
- func (f *FS) GetUpload(ctx context.Context, id string) (upload tusd.Upload, err error)
- func (f *FS) InitiateUpload(ctx context.Context, ref *provider.Reference, uploadLength int64, ...) (map[string]string, error)
- func (f *FS) ListFolder(ctx context.Context, ref *provider.Reference, mdKeys, fieldMask []string) ([]*provider.ResourceInfo, error)
- func (f *FS) ListGrants(ctx context.Context, ref *provider.Reference) ([]*provider.Grant, error)
- func (f *FS) ListRecycle(ctx context.Context, ref *provider.Reference, key, relativePath string) ([]*provider.RecycleItem, error)
- func (f *FS) ListRevisions(ctx context.Context, ref *provider.Reference) ([]*provider.FileVersion, error)
- func (f *FS) ListStorageSpaces(ctx context.Context, filter []*provider.ListStorageSpacesRequest_Filter, ...) ([]*provider.StorageSpace, error)
- func (f *FS) ListUploadSessions(ctx context.Context, filter storage.UploadSessionFilter) ([]storage.UploadSession, error)
- func (f *FS) Move(ctx context.Context, oldRef, newRef *provider.Reference) error
- func (f *FS) NewUpload(ctx context.Context, info tusd.FileInfo) (upload tusd.Upload, err error)
- func (f *FS) PurgeRecycleItem(ctx context.Context, ref *provider.Reference, key, relativePath string) error
- func (f *FS) RefreshLock(ctx context.Context, ref *provider.Reference, lock *provider.Lock, ...) error
- func (f *FS) RemoveGrant(ctx context.Context, ref *provider.Reference, g *provider.Grant) error
- func (f *FS) RestoreRecycleItem(ctx context.Context, ref *provider.Reference, key, relativePath string, ...) error
- func (f *FS) RestoreRevision(ctx context.Context, ref *provider.Reference, key string) error
- func (f *FS) SetArbitraryMetadata(ctx context.Context, ref *provider.Reference, md *provider.ArbitraryMetadata) error
- func (f *FS) SetLock(ctx context.Context, ref *provider.Reference, lock *provider.Lock) error
- func (f *FS) Shutdown(ctx context.Context) error
- func (f *FS) TouchFile(ctx context.Context, ref *provider.Reference, markprocessing bool, ...) error
- func (f *FS) Unlock(ctx context.Context, ref *provider.Reference, lock *provider.Lock) error
- func (f *FS) UnsetArbitraryMetadata(ctx context.Context, ref *provider.Reference, keys []string) error
- func (f *FS) UpdateGrant(ctx context.Context, ref *provider.Reference, g *provider.Grant) error
- func (f *FS) UpdateStorageSpace(ctx context.Context, req *provider.UpdateStorageSpaceRequest) (*provider.UpdateStorageSpaceResponse, error)
- func (f *FS) Upload(ctx context.Context, req storage.UploadRequest, ...) (*provider.ResourceInfo, error)
- func (f *FS) UseIn(composer *tusd.StoreComposer)
- type Hook
- type UnHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS is a storage.FS implementation that wraps another storage.FS and calls hooks before and after each method.
func (*FS) AsConcatableUpload ¶
func (f *FS) AsConcatableUpload(up tusd.Upload) tusd.ConcatableUpload
AsConcatableUpload returns a ConcatableUpload To implement the concatenation extension as specified in https://tus.io/protocols/resumable-upload.html#concatenation the storage needs to implement AsConcatableUpload
func (*FS) AsLengthDeclarableUpload ¶
func (f *FS) AsLengthDeclarableUpload(up tusd.Upload) tusd.LengthDeclarableUpload
AsLengthDeclarableUpload returns a LengthDeclarableUpload To implement the creation-defer-length extension as specified in https://tus.io/protocols/resumable-upload.html#creation the storage needs to implement AsLengthDeclarableUpload
func (*FS) AsTerminatableUpload ¶
func (f *FS) AsTerminatableUpload(up tusd.Upload) tusd.TerminatableUpload
AsTerminatableUpload returns a TerminatableUpload To implement the termination extension as specified in https://tus.io/protocols/resumable-upload.html#termination the storage needs to implement AsTerminatableUpload
func (*FS) CreateReference ¶
func (*FS) CreateStorageSpace ¶
func (f *FS) CreateStorageSpace(ctx context.Context, req *provider.CreateStorageSpaceRequest) (*provider.CreateStorageSpaceResponse, error)
func (*FS) DeleteStorageSpace ¶
func (*FS) DownloadRevision ¶
func (*FS) EmptyRecycle ¶
func (*FS) GetPathByID ¶
func (*FS) InitiateUpload ¶
func (*FS) ListFolder ¶
func (*FS) ListGrants ¶
func (*FS) ListRecycle ¶
func (*FS) ListRevisions ¶
func (*FS) ListStorageSpaces ¶
func (f *FS) ListStorageSpaces(ctx context.Context, filter []*provider.ListStorageSpacesRequest_Filter, unrestricted bool) ([]*provider.StorageSpace, error)
func (*FS) ListUploadSessions ¶
func (f *FS) ListUploadSessions(ctx context.Context, filter storage.UploadSessionFilter) ([]storage.UploadSession, error)
ListUploadSessions returns the upload sessions matching the given filter
func (*FS) PurgeRecycleItem ¶
func (*FS) RefreshLock ¶
func (*FS) RemoveGrant ¶
func (*FS) RestoreRecycleItem ¶
func (*FS) RestoreRevision ¶
func (*FS) SetArbitraryMetadata ¶
func (*FS) UnsetArbitraryMetadata ¶
func (*FS) UpdateGrant ¶
func (*FS) UpdateStorageSpace ¶
func (f *FS) UpdateStorageSpace(ctx context.Context, req *provider.UpdateStorageSpaceRequest) (*provider.UpdateStorageSpaceResponse, error)
func (*FS) Upload ¶
func (f *FS) Upload(ctx context.Context, req storage.UploadRequest, uploadFunc storage.UploadFinishedFunc) (*provider.ResourceInfo, error)
func (*FS) UseIn ¶
func (f *FS) UseIn(composer *tusd.StoreComposer)
UseIn tells the tus upload middleware which extensions it supports.