mopan

package
v3.37.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: AGPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneObj

func CloneObj(o model.Obj, newID, newName string) model.Obj

Types

type Addition

type Addition struct {
	Phone    string `json:"phone" required:"true"`
	Password string `json:"password" required:"true"`
	SMSCode  string `json:"sms_code" help:"input 'send' send sms "`

	RootFolderID string `json:"root_folder_id" default:""`

	CloudID string `json:"cloud_id"`

	OrderBy        string `json:"order_by" type:"select" options:"filename,filesize,lastOpTime" default:"filename"`
	OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"`

	DeviceInfo string `json:"device_info"`

	UploadThread string `json:"upload_thread" default:"3" help:"1<=thread<=32"`
}

func (*Addition) GetRootId

func (a *Addition) GetRootId() string

type MoPan

type MoPan struct {
	model.Storage
	Addition
	// contains filtered or unexported fields
}

func (*MoPan) Config

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

func (*MoPan) Copy

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

func (*MoPan) Drop

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

func (*MoPan) GetAddition

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

func (*MoPan) Init

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

func (*MoPan) List

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

func (*MoPan) MakeDir

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

func (*MoPan) Move

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

func (*MoPan) Put

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

func (*MoPan) Remove

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

func (*MoPan) Rename

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

Jump to

Keyboard shortcuts

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