LenovoNasShare

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 13 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
	ShareId  string `json:"share_id" required:"true" help:"The part after the last / in the shared link"`
	SharePwd string `json:"share_pwd" required:"true" help:"The password of the shared link"`
	Host     string `json:"host" required:"true" default:"https://siot-share.lenovo.com.cn" help:"You can change it to your local area network"`
}

type File

type File struct {
	FileName string    `json:"name"`
	Size     int64     `json:"size"`
	CreateAt time.Time `json:"time"`
	UpdateAt time.Time `json:"chtime"`
	Path     string    `json:"path"`
	Type     string    `json:"type"`
}

func (File) CreateTime

func (f File) CreateTime() time.Time

func (File) GetHash

func (f File) GetHash() utils.HashInfo

func (File) GetID

func (f File) GetID() string

func (File) GetName

func (f File) GetName() string

func (File) GetPath

func (f File) GetPath() string

func (File) GetSize

func (f File) GetSize() int64

func (File) IsDir

func (f File) IsDir() bool

func (File) ModTime

func (f File) ModTime() time.Time

func (File) Thumb

func (f File) Thumb() string

func (*File) UnmarshalJSON

func (f *File) UnmarshalJSON(data []byte) error

type Files

type Files struct {
	Data struct {
		List    []File `json:"list"`
		HasMore bool   `json:"has_more"`
	} `json:"data"`
}

type LenovoNasShare

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

func (*LenovoNasShare) Config

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

func (*LenovoNasShare) Copy

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

func (*LenovoNasShare) Drop

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

func (*LenovoNasShare) GetAddition

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

func (*LenovoNasShare) Init

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

func (*LenovoNasShare) List

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

func (*LenovoNasShare) MakeDir

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

func (*LenovoNasShare) Move

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

func (*LenovoNasShare) Put

func (*LenovoNasShare) Remove

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

func (*LenovoNasShare) Rename

func (d *LenovoNasShare) 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