Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS interface {
CreateDir(ctx context.Context, fn string) error
Delete(ctx context.Context, ref *storageproviderv0alphapb.Reference) error
Move(ctx context.Context, oldRef, newRef *storageproviderv0alphapb.Reference) error
GetMD(ctx context.Context, ref *storageproviderv0alphapb.Reference) (*storageproviderv0alphapb.ResourceInfo, error)
ListFolder(ctx context.Context, ref *storageproviderv0alphapb.Reference) ([]*storageproviderv0alphapb.ResourceInfo, error)
Upload(ctx context.Context, ref *storageproviderv0alphapb.Reference, r io.ReadCloser) error
Download(ctx context.Context, ref *storageproviderv0alphapb.Reference) (io.ReadCloser, error)
ListRevisions(ctx context.Context, ref *storageproviderv0alphapb.Reference) ([]*storageproviderv0alphapb.FileVersion, error)
DownloadRevision(ctx context.Context, ref *storageproviderv0alphapb.Reference, key string) (io.ReadCloser, error)
RestoreRevision(ctx context.Context, ref *storageproviderv0alphapb.Reference, key string) error
ListRecycle(ctx context.Context) ([]*storageproviderv0alphapb.RecycleItem, error)
RestoreRecycleItem(ctx context.Context, key string) error
EmptyRecycle(ctx context.Context) error
GetPathByID(ctx context.Context, id *storageproviderv0alphapb.ResourceId) (string, error)
AddGrant(ctx context.Context, ref *storageproviderv0alphapb.Reference, g *storageproviderv0alphapb.Grant) error
RemoveGrant(ctx context.Context, ref *storageproviderv0alphapb.Reference, g *storageproviderv0alphapb.Grant) error
UpdateGrant(ctx context.Context, ref *storageproviderv0alphapb.Reference, g *storageproviderv0alphapb.Grant) error
ListGrants(ctx context.Context, ref *storageproviderv0alphapb.Reference) ([]*storageproviderv0alphapb.Grant, error)
GetQuota(ctx context.Context) (int, int, error)
CreateReference(ctx context.Context, path string, targetURI *url.URL) error
Shutdown(ctx context.Context) error
SetArbitraryMetadata(ctx context.Context, ref *storageproviderv0alphapb.Reference, md *storageproviderv0alphapb.ArbitraryMetadata) error
UnsetArbitraryMetadata(ctx context.Context, ref *storageproviderv0alphapb.Reference, keys []string) error
}
FS is the interface to implement access to the storage.
type PathWrapper ¶
type PathWrapper interface {
Unwrap(ctx context.Context, rp string) (string, error)
Wrap(ctx context.Context, rp string) (string, error)
}
PathWrapper is the interface to implement for path transformations
type Registry ¶
type Registry interface {
FindProvider(ctx context.Context, ref *storageproviderv0alphapb.Reference) (*storagetypespb.ProviderInfo, error)
ListProviders(ctx context.Context) ([]*storagetypespb.ProviderInfo, error)
GetHome(ctx context.Context) (string, error)
}
Registry is the interface that storage registries implement for discovering storage providers
Click to show internal directories.
Click to hide internal directories.