virtual

package
v3.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: AGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	driver.RootPath
	NumFile     int   `json:"num_file" type:"number" default:"30" required:"true"`
	NumFolder   int   `json:"num_folder" type:"number" default:"30" required:"true"`
	MaxFileSize int64 `json:"max_file_size" type:"number" default:"1073741824" required:"true"`
	MinFileSize int64 `json:"min_file_size"  type:"number" default:"1048576" required:"true"`
}

type Virtual

type Virtual struct {
	model.Storage
	Addition
}

func (*Virtual) Config

func (d *Virtual) Config() driver.Config

func (*Virtual) Copy

func (d *Virtual) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*Virtual) Drop

func (d *Virtual) Drop(ctx context.Context) error

func (*Virtual) GetAddition

func (d *Virtual) GetAddition() driver.Additional

func (*Virtual) Init

func (d *Virtual) Init(ctx context.Context) error
func (d *Virtual) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*Virtual) List

func (d *Virtual) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*Virtual) MakeDir

func (d *Virtual) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*Virtual) Move

func (d *Virtual) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*Virtual) Put

func (d *Virtual) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*Virtual) Remove

func (d *Virtual) Remove(ctx context.Context, obj model.Obj) error

func (*Virtual) Rename

func (d *Virtual) Rename(ctx context.Context, srcObj model.Obj, newName string) error

Jump to

Keyboard shortcuts

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