Documentation
¶
Index ¶
- type Addition
- type GuangYaPan
- func (d *GuangYaPan) Config() driver.Config
- func (d *GuangYaPan) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *GuangYaPan) DeleteOfflineTasks(ctx context.Context, taskIDs []string) error
- func (d *GuangYaPan) Drop(ctx context.Context) error
- func (d *GuangYaPan) GetAddition() driver.Additional
- func (d *GuangYaPan) GetDetails(ctx context.Context) (*model.StorageDetails, error)
- func (d *GuangYaPan) GetRoot(ctx context.Context) (model.Obj, error)
- func (d *GuangYaPan) Init(ctx context.Context) error
- func (d *GuangYaPan) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *GuangYaPan) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *GuangYaPan) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *GuangYaPan) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *GuangYaPan) OfflineDownload(ctx context.Context, fileURL string, parentDir model.Obj, fileName string) (*OfflineTask, error)
- func (d *GuangYaPan) OfflineList(ctx context.Context, taskIDs []string, statuses []int, cursor string, ...) ([]OfflineTask, error)
- func (d *GuangYaPan) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, ...) (model.Obj, error)
- func (d *GuangYaPan) Remove(ctx context.Context, obj model.Obj) error
- func (d *GuangYaPan) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- func (d *GuangYaPan) ResolveOfflineResource(ctx context.Context, fileURL string) (*OfflineResolveData, error)
- type OfflineBTResInfo
- type OfflineResolveData
- type OfflineSubfile
- type OfflineTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct {
RootPath string `json:"root_path" help:"Full path in GuangYaPan cloud drive"`
PhoneNumber string `json:"phone_number" type:"text" help:"Phone number for SMS login, e.g. +86 13800000000"`
CaptchaToken string `json:"captcha_token" help:"Captcha token required by /v1/auth/verification"`
SendCode bool `json:"send_code" type:"bool" help:"Set true and save to send SMS code, it auto-resets to false after sending"`
VerifyCode string `json:"verify_code" type:"text" help:"SMS verification code used with phone_number; fill then save to finish login"`
VerificationID string `json:"verification_id" type:"text" help:"Auto-generated after sending SMS code; do not edit manually"`
AccessToken string `json:"access_token" help:"Bearer access token (optional if refresh_token is provided)"`
RefreshToken string `json:"refresh_token" help:"Refresh token for auto-login/auto-refresh"`
ClientID string `json:"client_id" required:"true" help:"Client ID for GuangYaPan API, must be provided"`
DeviceID string `json:"device_id" help:"Optional custom device id (32 hex chars), auto-generated when empty"`
DeviceSign string `json:"device_sign" help:"Optional custom X-Device-Sign header (generated from device_id when empty)"`
PageSize int `json:"page_size" type:"number" default:"100"`
OrderBy int `json:"order_by" type:"number" options:"0,1,2,3,4" default:"3" help:"Sort field used by the file list"`
SortType int `json:"sort_type" type:"number" options:"0,1" default:"1" help:"Sort direction used by the file list"`
}
type GuangYaPan ¶
func (*GuangYaPan) Config ¶
func (d *GuangYaPan) Config() driver.Config
func (*GuangYaPan) DeleteOfflineTasks ¶
func (d *GuangYaPan) DeleteOfflineTasks(ctx context.Context, taskIDs []string) error
func (*GuangYaPan) GetAddition ¶
func (d *GuangYaPan) GetAddition() driver.Additional
func (*GuangYaPan) GetDetails ¶
func (d *GuangYaPan) GetDetails(ctx context.Context) (*model.StorageDetails, error)
func (*GuangYaPan) OfflineDownload ¶
func (d *GuangYaPan) OfflineDownload(ctx context.Context, fileURL string, parentDir model.Obj, fileName string) (*OfflineTask, error)
func (*GuangYaPan) OfflineList ¶
func (d *GuangYaPan) OfflineList(ctx context.Context, taskIDs []string, statuses []int, cursor string, pageSize int) ([]OfflineTask, error)
func (*GuangYaPan) Put ¶
func (d *GuangYaPan) Put(ctx context.Context, dstDir model.Obj, file model.FileStreamer, up driver.UpdateProgress) (model.Obj, error)
func (*GuangYaPan) ResolveOfflineResource ¶
func (d *GuangYaPan) ResolveOfflineResource(ctx context.Context, fileURL string) (*OfflineResolveData, error)
type OfflineBTResInfo ¶
type OfflineResolveData ¶
type OfflineResolveData struct {
ResType int `json:"resType"`
BTResInfo *OfflineBTResInfo `json:"btResInfo"`
URL string `json:"url"`
}
type OfflineSubfile ¶
type OfflineTask ¶
type OfflineTask struct {
TaskID string `json:"taskId"`
FileName string `json:"fileName"`
TotalSize int64 `json:"totalSize"`
Status int `json:"status"`
CreateTime int64 `json:"createTime"`
Res string `json:"res"`
ResType int `json:"resType"`
Progress int `json:"progress"`
FileID string `json:"fileId"`
IsDir bool `json:"isDir"`
Exist bool `json:"exist"`
}
Click to show internal directories.
Click to hide internal directories.