Documentation ¶
Index ¶
- type Blobstore
- type PathLookup
- type PermissionCheckFunc
- type Tree
- func (t *Tree) CreateDir(ctx context.Context, n *node.Node) (err error)
- func (t *Tree) Delete(ctx context.Context, n *node.Node) (err error)
- func (t *Tree) DeleteBlob(node *node.Node) error
- func (t *Tree) GetMD(ctx context.Context, n *node.Node) (os.FileInfo, error)
- func (t *Tree) ListFolder(ctx context.Context, n *node.Node) ([]*node.Node, error)
- func (t *Tree) Move(ctx context.Context, oldNode *node.Node, newNode *node.Node) (err error)
- func (t *Tree) Propagate(ctx context.Context, n *node.Node) (err error)
- func (t *Tree) PurgeRecycleItemFunc(ctx context.Context, spaceid, key string, path string) (*node.Node, func() error, error)
- func (t *Tree) ReadBlob(node *node.Node) (io.ReadCloser, error)
- func (t *Tree) RestoreRecycleItemFunc(ctx context.Context, spaceid, key, trashPath string, targetNode *node.Node) (*node.Node, *node.Node, func() error, error)
- func (t *Tree) Setup() error
- func (t *Tree) TouchFile(ctx context.Context, n *node.Node) error
- func (t *Tree) WriteBlob(node *node.Node, reader io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blobstore ¶
type Blobstore interface { Upload(node *node.Node, reader io.Reader) error Download(node *node.Node) (io.ReadCloser, error) Delete(node *node.Node) error }
Blobstore defines an interface for storing blobs in a blobstore
type PathLookup ¶
type PathLookup interface { NodeFromResource(ctx context.Context, ref *provider.Reference) (*node.Node, error) NodeFromID(ctx context.Context, id *provider.ResourceId) (n *node.Node, err error) InternalRoot() string InternalPath(spaceID, nodeID string) string Path(ctx context.Context, n *node.Node) (path string, err error) }
PathLookup defines the interface for the lookup component
type PermissionCheckFunc ¶
type PermissionCheckFunc func(rp *provider.ResourcePermissions) bool
PermissionCheckFunc defined a function used to check resource permissions
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree manages a hierarchical tree
func (*Tree) DeleteBlob ¶
DeleteBlob deletes a blob from the blobstore
func (*Tree) ListFolder ¶
ListFolder lists the content of a folder node
func (*Tree) PurgeRecycleItemFunc ¶
func (t *Tree) PurgeRecycleItemFunc(ctx context.Context, spaceid, key string, path string) (*node.Node, func() error, error)
PurgeRecycleItemFunc returns a node and a function to purge it from the trash
func (*Tree) RestoreRecycleItemFunc ¶
func (t *Tree) RestoreRecycleItemFunc(ctx context.Context, spaceid, key, trashPath string, targetNode *node.Node) (*node.Node, *node.Node, func() error, error)
RestoreRecycleItemFunc returns a node and a function to restore it from the trash.
Click to show internal directories.
Click to hide internal directories.