kodbox

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: 12 Imported by: 0

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

	Address  string `json:"address" required:"true"`
	UserName string `json:"username" required:"false"`
	Password string `json:"password" required:"false"`
}

type CommonResp

type CommonResp struct {
	Code    any    `json:"code"`
	TimeUse string `json:"timeUse"`
	TimeNow string `json:"timeNow"`
	Data    any    `json:"data"`
	Info    any    `json:"info"`
}

type FolderOrFile

type FolderOrFile struct {
	Name       string `json:"name"`
	Path       string `json:"path"`
	Type       string `json:"type"`
	Ext        string `json:"ext,omitempty"` // 文件特有字段
	Size       int64  `json:"size"`
	CreateTime int64  `json:"createTime"`
	ModifyTime int64  `json:"modifyTime"`
}

type KodBox

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

func (*KodBox) Config

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

func (*KodBox) Copy

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

func (*KodBox) Drop

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

func (*KodBox) GetAddition

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

func (*KodBox) Init

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

func (*KodBox) List

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

func (*KodBox) MakeDir

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

func (*KodBox) Move

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

func (*KodBox) Put

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

func (*KodBox) Remove

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

func (*KodBox) Rename

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

type ListPathData

type ListPathData struct {
	FolderList []FolderOrFile `json:"folderList"`
	FileList   []FolderOrFile `json:"fileList"`
}

Jump to

Keyboard shortcuts

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