_123Share

package
v3.26.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: AGPL-3.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Api          = "https://www.123pan.com/api"
	AApi         = "https://www.123pan.com/a/api"
	BApi         = "https://www.123pan.com/b/api"
	MainApi      = Api
	FileList     = MainApi + "/share/get"
	DownloadInfo = MainApi + "/share/download/info"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	ShareKey string `json:"sharekey" required:"true"`
	SharePwd string `json:"sharepassword" required:"true"`
	driver.RootID
	OrderBy        string `json:"order_by" type:"select" options:"file_name,size,update_at" default:"file_name"`
	OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"`
}

type File

type File struct {
	FileName    string    `json:"FileName"`
	Size        int64     `json:"Size"`
	UpdateAt    time.Time `json:"UpdateAt"`
	FileId      int64     `json:"FileId"`
	Type        int       `json:"Type"`
	Etag        string    `json:"Etag"`
	S3KeyFlag   string    `json:"S3KeyFlag"`
	DownloadUrl string    `json:"DownloadUrl"`
}

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

type Files

type Files struct {
	//BaseResp
	Data struct {
		InfoList []File `json:"InfoList"`
		Next     string `json:"Next"`
	} `json:"data"`
}

type Pan123Share

type Pan123Share struct {
	model.Storage
	Addition
}

func (*Pan123Share) Config

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

func (*Pan123Share) Copy

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

func (*Pan123Share) Drop

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

func (*Pan123Share) GetAddition

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

func (*Pan123Share) Init

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

func (*Pan123Share) List

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

func (*Pan123Share) MakeDir

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

func (*Pan123Share) Move

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

func (*Pan123Share) Put

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

func (*Pan123Share) Remove

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

func (*Pan123Share) Rename

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