trashbin

package
v2.26.6 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trashbin

type Trashbin struct {
	// contains filtered or unexported fields
}

func New

func New(o *options.Options, lu *lookup.Lookup, log *zerolog.Logger) (*Trashbin, error)

New returns a new Trashbin

func (*Trashbin) EmptyRecycle

func (tb *Trashbin) EmptyRecycle(ctx context.Context, ref *provider.Reference) error

EmptyRecycle empties the trash

func (*Trashbin) ListRecycle

func (tb *Trashbin) ListRecycle(ctx context.Context, ref *provider.Reference, key, relativePath string) ([]*provider.RecycleItem, error)

ListRecycle returns the list of available recycle items ref -> the space (= resourceid), key -> deleted node id, relativePath = relative to key

func (*Trashbin) MoveToTrash

func (tb *Trashbin) MoveToTrash(ctx context.Context, n *node.Node, path string) error

func (*Trashbin) PurgeRecycleItem

func (tb *Trashbin) PurgeRecycleItem(ctx context.Context, ref *provider.Reference, key, relativePath string) error

PurgeRecycleItem purges the specified item, all its children and all their revisions

func (*Trashbin) RestoreRecycleItem

func (tb *Trashbin) RestoreRecycleItem(ctx context.Context, ref *provider.Reference, key, relativePath string, restoreRef *provider.Reference) error

RestoreRecycleItem restores the specified item

func (*Trashbin) Setup

func (tb *Trashbin) Setup(fs storage.FS) error

Setup the trashbin

Jump to

Keyboard shortcuts

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