Documentation
¶
Index ¶
- Constants
- Variables
- func GetActivePanClient() *cloudpan.PanClient
- func GetActiveUser() *config.PanUser
- func GetAppFileInfoByPaths(familyId int64, paths ...string) (fileInfoList []*cloudpan.AppFileEntity, failedPaths []string, error error)
- func GetFamilyCloudMark(familyId int64) string
- func GetFileInfoByPaths(paths ...string) (fileInfoList []*cloudpan.FileEntity, failedPaths []string, error error)
- func IsFamilyCloud(familyId int64) bool
- func RunChangeDirectory(familyId int64, targetPath string)
- func RunCopy(paths ...string)
- func RunDownload(paths []string, options *DownloadOptions)
- func RunGetUserInfo() (userInfo *cloudpan.UserInfo, error error)
- func RunLogin(username, password string) (usernameStr, passwordStr string, webToken cloudpan.WebLoginToken, ...)
- func RunLs(familyId int64, targetPath string, lsOptions *LsOptions, ...)
- func RunMkdir(familyId int64, name string)
- func RunMove(familyId int64, paths ...string)
- func RunRecycleClear()
- func RunRecycleDelete(fidStrList ...string)
- func RunRecycleList(page int)
- func RunRecycleRestore(fidStrList ...string)
- func RunRemove(familyId int64, paths ...string)
- func RunRename(familyId int64, oldName string, newName string)
- func RunShareCancel(shareIDs []int64)
- func RunShareList(page int)
- func RunShareSave(shareUrl, savePanDirPath string)
- func RunShareSet(paths []string, expiredTime cloudpan.ShareExpiredTime)
- func RunSwitchFamilyList(targetFamilyId int64)
- func RunUpload(localPaths []string, savePath string, opt *UploadOptions)
- func RunUserSign()
- func RunXCopy(source FileSourceType, familyId int64, paths ...string)
- type DownloadOptions
- type FileSourceType
- type LocateDownloadOption
- type LsOptions
- type QuotaInfo
- type SearchOptions
- type UploadOptions
Constants ¶
View Source
const ( // DefaultUploadMaxAllParallel 默认所有文件并发上传数量,即可以同时并发上传多少个文件 DefaultUploadMaxAllParallel = 1 // DefaultUploadMaxRetry 默认上传失败最大重试次数 DefaultUploadMaxRetry = 3 )
Variables ¶
View Source
var ( // MaxDownloadRangeSize 文件片段最大值 MaxDownloadRangeSize = 55 * converter.MB // DownloadCacheSize 默认每个线程下载缓存大小 DownloadCacheSize = 64 * converter.KB )
Functions ¶
func GetActivePanClient ¶
func GetActiveUser ¶
func GetAppFileInfoByPaths ¶ added in v0.0.8
func GetAppFileInfoByPaths(familyId int64, paths ...string) (fileInfoList []*cloudpan.AppFileEntity, failedPaths []string, error error)
GetFileInfoByPaths 获取指定文件路径的文件详情信息
func GetFamilyCloudMark ¶ added in v0.0.8
func GetFileInfoByPaths ¶
func GetFileInfoByPaths(paths ...string) (fileInfoList []*cloudpan.FileEntity, failedPaths []string, error error)
GetFileInfoByPaths 获取指定文件路径的文件详情信息
func IsFamilyCloud ¶ added in v0.0.8
func RunChangeDirectory ¶
func RunGetUserInfo ¶
func RunLogin ¶
func RunLogin(username, password string) (usernameStr, passwordStr string, webToken cloudpan.WebLoginToken, appToken cloudpan.AppLoginToken, error error)
func RunRecycleDelete ¶ added in v0.0.4
func RunRecycleDelete(fidStrList ...string)
RunRecycleDelete 执行删除回收站文件或目录
func RunRecycleRestore ¶ added in v0.0.4
func RunRecycleRestore(fidStrList ...string)
RunRecycleRestore 执行还原回收站文件或目录
func RunShareSave ¶ added in v0.0.4
func RunShareSave(shareUrl, savePanDirPath string)
func RunShareSet ¶
func RunShareSet(paths []string, expiredTime cloudpan.ShareExpiredTime)
RunShareSet 执行分享
func RunSwitchFamilyList ¶ added in v0.0.8
func RunSwitchFamilyList(targetFamilyId int64)
func RunUpload ¶
func RunUpload(localPaths []string, savePath string, opt *UploadOptions)
RunUpload 执行文件上传
func RunUserSign ¶
func RunUserSign()
func RunXCopy ¶ added in v0.0.8
func RunXCopy(source FileSourceType, familyId int64, paths ...string)
RunXCopy 执行移动文件/目录
Types ¶
type DownloadOptions ¶
type DownloadOptions struct {
IsPrintStatus bool
IsExecutedPermission bool
IsOverwrite bool
SaveTo string
Parallel int
Load int
MaxRetry int
NoCheck bool
ShowProgress bool
FamilyId int64
}
DownloadOptions 下载可选参数
type FileSourceType ¶ added in v0.0.8
type FileSourceType string
const ( // 个人云文件 PersonCloud FileSourceType = "person" // 家庭云文件 FamilyCloud FileSourceType = "family" )
type LocateDownloadOption ¶
type LocateDownloadOption struct {
FromPan bool
}
LocateDownloadOption 获取下载链接可选参数
type QuotaInfo ¶
func RunGetQuotaInfo ¶
Click to show internal directories.
Click to hide internal directories.