_123Share

package
v3.35.3-8Mi Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: AGPL-3.0 Imports: 24 Imported by: 0

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      = BApi
	FileList     = MainApi + "/share/get"
	DownloadInfo = MainApi + "/share/download/info"
)

Variables

This section is empty.

Functions

func GetApi

func GetApi(rawUrl string) string

Types

type Addition

type Addition struct {
	ShareKey string `json:"sharekey" required:"true"`
	SharePwd string `json:"sharepassword"`
	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"`
	AccessToken    string `json:"accesstoken" type:"text"`
}

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) 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

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
	// contains filtered or unexported fields
}

func (*Pan123Share) APIRateLimit

func (d *Pan123Share) APIRateLimit(api string) bool

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