Documentation ¶
Index ¶
- Constants
- func GetApi(rawUrl string) string
- type Addition
- type File
- type Files
- type Pan123
- func (d *Pan123) APIRateLimit(ctx context.Context, api string) error
- func (d *Pan123) Config() driver.Config
- func (d *Pan123) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Pan123) Drop(ctx context.Context) error
- func (d *Pan123) GetAddition() driver.Additional
- func (d *Pan123) Init(ctx context.Context) error
- func (d *Pan123) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *Pan123) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *Pan123) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *Pan123) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Pan123) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *Pan123) Remove(ctx context.Context, obj model.Obj) error
- func (d *Pan123) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- type S3PreSignedURLs
- type UploadResp
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 SignIn = MainApi + "/user/sign_in" Logout = MainApi + "/user/logout" UserInfo = MainApi + "/user/info" FileList = MainApi + "/file/list/new" DownloadInfo = MainApi + "/file/download_info" Mkdir = MainApi + "/file/upload_request" Move = MainApi + "/file/mod_pid" Rename = MainApi + "/file/rename" Trash = MainApi + "/file/trash" UploadRequest = MainApi + "/file/upload_request" UploadComplete = MainApi + "/file/upload_complete" S3PreSignedUrls = MainApi + "/file/s3_repare_upload_parts_batch" S3Auth = MainApi + "/file/s3_upload_object/auth" UploadCompleteV2 = MainApi + "/file/upload_complete/v2" S3Complete = MainApi + "/file/s3_complete_multipart_upload" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Addition ¶
type Addition struct { Username string `json:"username" required:"true"` Password string `json:"password" required:"true"` driver.RootID //OrderBy string `json:"order_by" type:"select" options:"file_id,file_name,size,update_at" default:"file_name"` //OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"` AccessToken string }
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 ¶ added in v3.27.0
type Pan123 ¶
func (*Pan123) APIRateLimit ¶ added in v3.31.0
func (*Pan123) GetAddition ¶
func (d *Pan123) GetAddition() driver.Additional
type S3PreSignedURLs ¶ added in v3.16.0
type UploadResp ¶
type UploadResp struct { //BaseResp Data struct { AccessKeyId string `json:"AccessKeyId"` Bucket string `json:"Bucket"` Key string `json:"Key"` SecretAccessKey string `json:"SecretAccessKey"` SessionToken string `json:"SessionToken"` FileId int64 `json:"FileId"` Reuse bool `json:"Reuse"` EndPoint string `json:"EndPoint"` StorageNode string `json:"StorageNode"` UploadId string `json:"UploadId"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.