Documentation ¶
Overview ¶
电脑手机客户端API,例如MAC客户端
WEB端API
Index ¶
- Constants
- type AlbumAddFileParam
- type AlbumCreateParam
- type AlbumDeleteFileParam
- type AlbumDeleteParam
- type AlbumEditParam
- type AlbumEntity
- type AlbumGetParam
- type AlbumList
- type AlbumListFileParam
- type AlbumListParam
- type AlbumListResult
- type AlbumOrderBy
- type AlbumOrderDirection
- type AlbumShareCreateParam
- type AlbumShareCreateResult
- type AppConfig
- type AppLoginToken
- type AsyncTaskGetResult
- type AsyncTaskQueryStatusParam
- type AsyncTaskQueryStatusResult
- type BatchRequest
- type BatchRequestList
- type BatchRequestParam
- type BatchResponse
- type BatchResponseList
- type BatchResponseResult
- type CreateSessionParam
- type CreateSessionResult
- type DeviceLogoutResult
- type FastShareCreateParam
- type FastShareCreateResult
- type FastShareFileItem
- type FileCrossCopyParam
- type FileCrossCopyResult
- type FileSaveParam
- type FileSaveResult
- type GetShareByAnonymous
- type GetShareTokenResult
- type ListByShareItem
- type ListByShareResult
- type RecycleBinFileClearParam
- type RecycleBinFileClearResult
- type RecycleBinFileListParam
- type SessionConfig
- type ShareCancelResult
- type ShareCreateParam
- type ShareEntity
- type ShareListParam
- type ShareListResult
- type WebLoginToken
- type WebPanClient
- func (p *WebPanClient) AddSignatureHeader(headers map[string]string) map[string]string
- func (p *WebPanClient) AlbumAddFile(param *AlbumAddFileParam) (*aliyunpan.FileList, *apierror.ApiError)
- func (p *WebPanClient) AlbumCreate(param *AlbumCreateParam) (*AlbumEntity, *apierror.ApiError)
- func (p *WebPanClient) AlbumDelete(param *AlbumDeleteParam) (bool, *apierror.ApiError)
- func (p *WebPanClient) AlbumDeleteFile(param *AlbumDeleteFileParam) (bool, *apierror.ApiError)
- func (p *WebPanClient) AlbumEdit(param *AlbumEditParam) (*AlbumEntity, *apierror.ApiError)
- func (p *WebPanClient) AlbumGet(param *AlbumGetParam) (*AlbumEntity, *apierror.ApiError)
- func (p *WebPanClient) AlbumList(param *AlbumListParam) (*AlbumListResult, *apierror.ApiError)
- func (p *WebPanClient) AlbumListFile(param *AlbumListFileParam) (*aliyunpan.FileListResult, *apierror.ApiError)
- func (p *WebPanClient) AlbumListFileGetAll(param *AlbumListFileParam) (aliyunpan.FileList, *apierror.ApiError)
- func (p *WebPanClient) AlbumListGetAll(param *AlbumListParam) (AlbumList, *apierror.ApiError)
- func (p *WebPanClient) AlbumShareCreate(param *AlbumShareCreateParam) (*AlbumShareCreateResult, *apierror.ApiError)
- func (p *WebPanClient) AsyncTaskGet(shareToken string, asyncTaskIds []string) ([]*AsyncTaskGetResult, *apierror.ApiError)
- func (p *WebPanClient) AsyncTaskQueryStatus(param *AsyncTaskQueryStatusParam) (*AsyncTaskQueryStatusResult, *apierror.ApiError)
- func (p *WebPanClient) BatchTask(url string, param *BatchRequestParam, headers ...[2]string) (*BatchResponseResult, *apierror.ApiError)
- func (p *WebPanClient) ClearCache()
- func (p *WebPanClient) CompleteUploadFile(param *aliyunpan.CompleteUploadFileParam) (*aliyunpan.CompleteUploadFileResult, *apierror.ApiError)
- func (p *WebPanClient) CreateSession(param *CreateSessionParam) (*CreateSessionResult, *apierror.ApiError)
- func (p *WebPanClient) CreateUploadFile(param *aliyunpan.CreateFileUploadParam) (*aliyunpan.CreateFileUploadResult, *apierror.ApiError)
- func (p *WebPanClient) DeviceLogout() (*DeviceLogoutResult, *apierror.ApiError)
- func (p *WebPanClient) DisableCache()
- func (p *WebPanClient) DownloadFileData(downloadFileUrl string, fileRange aliyunpan.FileDownloadRange, ...) *apierror.ApiError
- func (p *WebPanClient) DownloadFileDataAndSave(downloadFileUrl string, fileRange aliyunpan.FileDownloadRange, ...) *apierror.ApiError
- func (p *WebPanClient) EnableCache()
- func (p *WebPanClient) FastShareLinkCreate(param FastShareCreateParam) (*FastShareCreateResult, *apierror.ApiError)
- func (p *WebPanClient) FileCopy(shareToken string, param []*FileSaveParam) ([]*FileSaveResult, *apierror.ApiError)
- func (p *WebPanClient) FileCrossDriveCopy(param *FileCrossCopyParam) ([]*FileCrossCopyResult, *apierror.ApiError)
- func (p *WebPanClient) FileCrossDriveMove(param *FileCrossCopyParam) ([]*FileCrossCopyResult, *apierror.ApiError)
- func (p *WebPanClient) FileDelete(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
- func (p *WebPanClient) FileGetPath(driveId, fileId string) (*aliyunpan.FileGetPathResult, *apierror.ApiError)
- func (p *WebPanClient) FileInfoById(driveId, fileId string) (*aliyunpan.FileEntity, *apierror.ApiError)
- func (p *WebPanClient) FileInfoByPath(driveId string, pathStr string) (fileInfo *aliyunpan.FileEntity, error *apierror.ApiError)
- func (p *WebPanClient) FileList(param *aliyunpan.FileListParam) (*aliyunpan.FileListResult, *apierror.ApiError)
- func (p *WebPanClient) FileListGetAll(param *aliyunpan.FileListParam, delayMilliseconds int) (aliyunpan.FileList, *apierror.ApiError)
- func (p *WebPanClient) FileMove(param []*aliyunpan.FileMoveParam) ([]*aliyunpan.FileMoveResult, *apierror.ApiError)
- func (p *WebPanClient) FileRename(driveId, renameFileId, newName string) (bool, *apierror.ApiError)
- func (p *WebPanClient) FileStarred(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
- func (p *WebPanClient) FileUnstarred(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
- func (p *WebPanClient) FilesDirectoriesRecurseList(driveId string, path string, ...) aliyunpan.FileList
- func (p *WebPanClient) GetAccessToken() string
- func (p *WebPanClient) GetFileDownloadUrl(param *aliyunpan.GetFileDownloadUrlParam) (*aliyunpan.GetFileDownloadUrlResult, *apierror.ApiError)
- func (p *WebPanClient) GetListByShare(shareToken, shareID, marker string) (*ListByShareResult, *apierror.ApiError)
- func (p *WebPanClient) GetShareInfo(shareID string) (*GetShareByAnonymous, *apierror.ApiError)
- func (p *WebPanClient) GetShareLinkListReq(param ShareListParam) (*ShareListResult, *apierror.ApiError)
- func (p *WebPanClient) GetShareToken(shareID, sharePwd string) (*GetShareTokenResult, *apierror.ApiError)
- func (p *WebPanClient) GetUploadUrl(param *aliyunpan.GetUploadUrlParam) (*aliyunpan.GetUploadUrlResult, *apierror.ApiError)
- func (p *WebPanClient) GetUserInfo() (*aliyunpan.UserInfo, *apierror.ApiError)
- func (p *WebPanClient) MatchPathByShellPattern(driveId string, pattern string) (resultList *aliyunpan.FileList, error *apierror.ApiError)
- func (p *WebPanClient) Mkdir(driveId, parentFileId, dirName string) (*aliyunpan.MkdirResult, *apierror.ApiError)
- func (p *WebPanClient) MkdirByFullPath(driveId, fullPath string) (*aliyunpan.MkdirResult, *apierror.ApiError)
- func (p *WebPanClient) MkdirRecursive(driveId, parentFileId string, fullPath string, index int, pathSlice []string) (*aliyunpan.MkdirResult, *apierror.ApiError)
- func (p *WebPanClient) RecycleBinFileClear(param *RecycleBinFileClearParam) (*RecycleBinFileClearResult, *apierror.ApiError)
- func (p *WebPanClient) RecycleBinFileDelete(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
- func (p *WebPanClient) RecycleBinFileList(param *RecycleBinFileListParam) (*aliyunpan.FileListResult, *apierror.ApiError)
- func (p *WebPanClient) RecycleBinFileListGetAll(param *RecycleBinFileListParam) (aliyunpan.FileList, *apierror.ApiError)
- func (p *WebPanClient) RecycleBinFileRestore(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
- func (p *WebPanClient) SetTimeout(t time.Duration)
- func (p *WebPanClient) ShareLinkCancel(shareIdList []string) ([]*ShareCancelResult, *apierror.ApiError)
- func (p *WebPanClient) ShareLinkCreate(param ShareCreateParam) (*ShareEntity, *apierror.ApiError)
- func (p *WebPanClient) ShareLinkList(userId string) ([]*ShareEntity, *apierror.ApiError)
- func (p *WebPanClient) UpdateAppConfig(appConfig AppConfig)
- func (p *WebPanClient) UpdateSessionConfig(sessionConfig SessionConfig)
- func (p *WebPanClient) UpdateToken(webToken WebLoginToken)
- func (p *WebPanClient) UpdateUserId(userId string)
- func (p *WebPanClient) UploadDataChunk(url string, data *aliyunpan.FileUploadChunkData) *apierror.ApiError
- func (p *WebPanClient) UploadFileData(uploadUrl string, uploadFunc aliyunpan.UploadFunc) *apierror.ApiError
- func (p *WebPanClient) VideoGetPreviewPlayInfo(param *aliyunpan.VideoGetPreviewPlayInfoParam) (*aliyunpan.VideoGetPreviewPlayInfoResult, error)
Constants ¶
const ( WEB_URL string = "https://www.aliyundrive.com" AUTH_URL string = "https://auth.aliyundrive.com" API_URL string = "https://api.aliyundrive.com" USER_URL string = "https://user.aliyundrive.com" )
const ( AlbumOrderByCreatedAt AlbumOrderBy = "created_at" AlbumOrderByUpdatedAt AlbumOrderBy = "updated_at" AlbumOrderByFileCount AlbumOrderBy = "file_count" // AlbumOrderDirectionDesc 降序 AlbumOrderDirectionDesc AlbumOrderDirection = "DESC" // AlbumOrderDirectionAsc 升序 AlbumOrderDirectionAsc AlbumOrderDirection = "ASC" )
const ( NONCE_MIN = int32(0) NONCE_MAX = int32(2147483647) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumAddFileParam ¶
type AlbumAddFileParam struct { AlbumId string `json:"album_id"` DriveFileList []aliyunpan.FileBatchActionParam `json:"drive_file_list"` }
AlbumAddFileParam 相簿增加文件参数
func (*AlbumAddFileParam) AddFileItem ¶
func (a *AlbumAddFileParam) AddFileItem(driveId, fileId string)
type AlbumCreateParam ¶
AlbumCreateParam 相簿创建参数
type AlbumDeleteFileParam ¶
type AlbumDeleteFileParam struct { AlbumId string `json:"album_id"` DriveFileList []aliyunpan.FileBatchActionParam `json:"drive_file_list"` }
AlbumDeleteFileParam 相簿删除文件参数
func (*AlbumDeleteFileParam) AddFileItem ¶
func (a *AlbumDeleteFileParam) AddFileItem(driveId, fileId string)
type AlbumDeleteParam ¶
type AlbumDeleteParam struct {
AlbumId string `json:"albumId"`
}
AlbumDeleteParam 相簿删除参数
type AlbumEditParam ¶
type AlbumEditParam struct { AlbumId string `json:"albumId"` Description string `json:"description"` Name string `json:"name"` }
AlbumEditParam 相簿编辑参数
type AlbumEntity ¶
type AlbumEntity struct { Owner string `json:"owner"` Name string `json:"name"` Description string `json:"description"` AlbumId string `json:"album_id"` FileCount int `json:"file_count"` ImageCount int `json:"image_count"` VideoCount int `json:"video_count"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` IsSharing bool `json:"is_sharing"` }
AlbumEntity 相薄实体
func (*AlbumEntity) CreatedAtStr ¶
func (a *AlbumEntity) CreatedAtStr() string
func (*AlbumEntity) UpdatedAtStr ¶
func (a *AlbumEntity) UpdatedAtStr() string
type AlbumGetParam ¶
type AlbumGetParam struct {
AlbumId string `json:"albumId"`
}
AlbumGetParam 相簿查询参数
type AlbumList ¶
type AlbumList []*AlbumEntity
type AlbumListFileParam ¶
type AlbumListFileParam struct { AlbumId string `json:"albumId"` Limit int `json:"limit"` // Marker 下一页参数 Marker string `json:"marker"` }
AlbumListFileParam 相簿查询包含的文件列表
type AlbumListParam ¶
type AlbumListParam struct { OrderBy AlbumOrderBy `json:"order_by"` OrderDirection AlbumOrderDirection `json:"order_direction"` Limit int `json:"limit"` // Marker 下一页参数 Marker string `json:"marker"` }
AlbumListParam 相册列表参数
type AlbumListResult ¶
type AlbumOrderBy ¶
type AlbumOrderBy string
type AlbumOrderDirection ¶
type AlbumOrderDirection string
type AlbumShareCreateParam ¶
type AlbumShareCreateParam struct { string `json:"share_pwd"` Expiration string `json:"expiration"` }SharePwd
AlbumShareCreateParam 创建相簿分享
type AlbumShareCreateResult ¶
type AlbumShareCreateResult struct {}
AlbumShareCreateResult 创建相簿分享返回值
type AppConfig ¶
type AppConfig struct { AppId string `json:"appId"` // DeviceId标识登录客户端,阿里限制:为了保障你的数据隐私安全,阿里云盘最多只允许你同时登录 10 台设备。你已超出最大设备数量,请先选择一台设备下线,才可以继续使用 DeviceId string `json:"deviceId"` UserId string `json:"userId"` Nonce int32 `json:"nonce"` PublicKey string `json:"publicKey"` SignatureData string `json:"signatureData"` PrivKey *secp256k1.PrivKey `json:"-"` PubKey *crypto.PubKey `json:"-"` }
AppConfig 存储客户端相关配置参数,目前主要是签名需要用的参数
type AppLoginToken ¶
type AsyncTaskGetResult ¶
type AsyncTaskQueryStatusParam ¶
type AsyncTaskQueryStatusParam struct {
AsyncTaskId string `json:"async_task_id"`
}
type AsyncTaskQueryStatusResult ¶
type AsyncTaskQueryStatusResult struct { AsyncTaskId string `json:"async_task_id"` State string `json:"state"` Status string `json:"status"` TotalProcess int `json:"total_process"` ConsumedProcess int `json:"consumed_process"` SkippedProcess int `json:"skipped_process"` FailedProcess int `json:"failed_process"` PunishedFileCount int `json:"punished_file_count"` }
type BatchRequest ¶
type BatchRequest struct { Id string `json:"id"` Method string `json:"method"` Url string `json:"url"` Headers map[string]string `json:"headers"` Body map[string]interface{} `json:"body"` }
请求参数
type BatchRequestList ¶
type BatchRequestList []*BatchRequest
type BatchRequestParam ¶
type BatchRequestParam struct { Requests BatchRequestList `json:"requests"` Resource string `json:"resource"` }
type BatchResponse ¶
type BatchResponse struct { Id string `json:"id"` Status int `json:"status"` Body map[string]interface{} `json:"body"` }
响应结果
type BatchResponseList ¶
type BatchResponseList []*BatchResponse
type BatchResponseResult ¶
type BatchResponseResult struct {
Responses BatchResponseList `json:"responses"`
}
type CreateSessionParam ¶
type CreateSessionResult ¶
type DeviceLogoutResult ¶
type FastShareCreateResult ¶
type FastShareCreateResult struct {}
type FastShareFileItem ¶
type FastShareFileItem struct {}
type FileCrossCopyParam ¶
type FileCrossCopyParam struct { // FromDriveId 源网盘ID FromDriveId string `json:"from_drive_id"` // FromFileIds 源网盘文件列表ID FromFileIds []string `json:"from_file_ids"` // ToDriveId 目标网盘ID。必须和源网盘ID不一样,否则会报错 ToDriveId string `json:"to_drive_id"` // ToParentFileId 目标网盘目录ID ToParentFileId string `json:"to_parent_fileId"` }
type FileCrossCopyResult ¶
type FileSaveParam ¶
type FileSaveResult ¶
type GetShareByAnonymous ¶
type GetShareTokenResult ¶
type GetShareTokenResult struct {}
type ListByShareItem ¶
type ListByShareResult ¶
type ListByShareResult struct {}
type RecycleBinFileClearParam ¶
type RecycleBinFileClearParam struct {
DriveId string `json:"drive_id"`
}
type RecycleBinFileListParam ¶
type SessionConfig ¶
type ShareCancelResult ¶
type ShareCreateParam ¶
type ShareCreateParam struct { string `json:"share_pwd"` // 过期时间,为空代表永不过期。时间格式必须是这种:2021-07-23 09:22:19 }SharePwd
ShareCreateParam 创建分享
type ShareEntity ¶
type ShareEntity struct { // SharePwd 密码,为空代表没有密码 // Expiration 过期时间,为空代表永不过期 // forbidden-已违规,enabled-正常 }
type ShareListParam ¶
type ShareListParam struct {}
type ShareListResult ¶
type ShareListResult struct {}
type WebLoginToken ¶
type WebLoginToken struct { AccessTokenType string `json:"accessTokenType"` AccessToken string `json:"accessToken"` RefreshToken string `json:"refreshToken"` ExpiresIn int `json:"expiresIn"` ExpireTime string `json:"expireTime"` }
func GetAccessTokenFromRefreshToken ¶
func GetAccessTokenFromRefreshToken(refreshToken string) (*WebLoginToken, *apierror.ApiError)
func (*WebLoginToken) GetAuthorizationStr ¶
func (w *WebLoginToken) GetAuthorizationStr() string
func (*WebLoginToken) IsAccessTokenExpired ¶
func (w *WebLoginToken) IsAccessTokenExpired() bool
type WebPanClient ¶
type WebPanClient struct {
// contains filtered or unexported fields
}
func NewWebPanClient ¶
func NewWebPanClient(webToken WebLoginToken, appToken AppLoginToken, appConfig AppConfig, sessionConfig SessionConfig) *WebPanClient
NewWebPanClient 创建WebPanClient
func (*WebPanClient) AddSignatureHeader ¶
func (p *WebPanClient) AddSignatureHeader(headers map[string]string) map[string]string
AddSignatureHeader 增加接口签名header
func (*WebPanClient) AlbumAddFile ¶
func (p *WebPanClient) AlbumAddFile(param *AlbumAddFileParam) (*aliyunpan.FileList, *apierror.ApiError)
AlbumAddFile 相簿增加文件列表
func (*WebPanClient) AlbumCreate ¶
func (p *WebPanClient) AlbumCreate(param *AlbumCreateParam) (*AlbumEntity, *apierror.ApiError)
AlbumEdit 相簿编辑
func (*WebPanClient) AlbumDelete ¶
func (p *WebPanClient) AlbumDelete(param *AlbumDeleteParam) (bool, *apierror.ApiError)
AlbumDelete 相簿删除
func (*WebPanClient) AlbumDeleteFile ¶
func (p *WebPanClient) AlbumDeleteFile(param *AlbumDeleteFileParam) (bool, *apierror.ApiError)
AlbumDeleteFile 相簿删除文件列表
func (*WebPanClient) AlbumEdit ¶
func (p *WebPanClient) AlbumEdit(param *AlbumEditParam) (*AlbumEntity, *apierror.ApiError)
AlbumEdit 相簿编辑
func (*WebPanClient) AlbumGet ¶
func (p *WebPanClient) AlbumGet(param *AlbumGetParam) (*AlbumEntity, *apierror.ApiError)
AlbumGet 获取相簿信息
func (*WebPanClient) AlbumList ¶
func (p *WebPanClient) AlbumList(param *AlbumListParam) (*AlbumListResult, *apierror.ApiError)
AlbumList 获取相册列表
func (*WebPanClient) AlbumListFile ¶
func (p *WebPanClient) AlbumListFile(param *AlbumListFileParam) (*aliyunpan.FileListResult, *apierror.ApiError)
AlbumListFile 获取相簿下的文件列表
func (*WebPanClient) AlbumListFileGetAll ¶
func (p *WebPanClient) AlbumListFileGetAll(param *AlbumListFileParam) (aliyunpan.FileList, *apierror.ApiError)
AlbumListFileGetAll 获取指定相簿下的所有文件列表
func (*WebPanClient) AlbumListGetAll ¶
func (p *WebPanClient) AlbumListGetAll(param *AlbumListParam) (AlbumList, *apierror.ApiError)
AlbumListGetAll 获取所有相册列表
func (*WebPanClient) AlbumShareCreate ¶
func (p *WebPanClient) AlbumShareCreate(param *AlbumShareCreateParam) (*AlbumShareCreateResult, *apierror.ApiError)
AlbumShareCreate 相簿创建分享链接
func (*WebPanClient) AsyncTaskGet ¶
func (p *WebPanClient) AsyncTaskGet(shareToken string, asyncTaskIds []string) ([]*AsyncTaskGetResult, *apierror.ApiError)
func (*WebPanClient) AsyncTaskQueryStatus ¶
func (p *WebPanClient) AsyncTaskQueryStatus(param *AsyncTaskQueryStatusParam) (*AsyncTaskQueryStatusResult, *apierror.ApiError)
AsyncTaskQueryStatus 查询异步任务进度和状态
func (*WebPanClient) BatchTask ¶
func (p *WebPanClient) BatchTask(url string, param *BatchRequestParam, headers ...[2]string) (*BatchResponseResult, *apierror.ApiError)
BatchTask 批量请求任务。多选操作基本都是批量任务
func (*WebPanClient) CompleteUploadFile ¶
func (p *WebPanClient) CompleteUploadFile(param *aliyunpan.CompleteUploadFileParam) (*aliyunpan.CompleteUploadFileResult, *apierror.ApiError)
CompleteUploadFile 完成文件上传确认。完成文件数据上传后,需要调用该接口文件才会显示再网盘中
func (*WebPanClient) CreateSession ¶
func (p *WebPanClient) CreateSession(param *CreateSessionParam) (*CreateSessionResult, *apierror.ApiError)
CreateSession 上传会话签名秘钥给服务器
func (*WebPanClient) CreateUploadFile ¶
func (p *WebPanClient) CreateUploadFile(param *aliyunpan.CreateFileUploadParam) (*aliyunpan.CreateFileUploadResult, *apierror.ApiError)
CreateUploadFile 创建上传文件,如果文件已经上传过则会直接秒传
func (*WebPanClient) DeviceLogout ¶
func (p *WebPanClient) DeviceLogout() (*DeviceLogoutResult, *apierror.ApiError)
DeviceLogout 退出登录,登录的设备会同步注销
func (*WebPanClient) DownloadFileData ¶
func (p *WebPanClient) DownloadFileData(downloadFileUrl string, fileRange aliyunpan.FileDownloadRange, downloadFunc aliyunpan.DownloadFuncCallback) *apierror.ApiError
DownloadFileData 下载文件内容
func (*WebPanClient) DownloadFileDataAndSave ¶
func (p *WebPanClient) DownloadFileDataAndSave(downloadFileUrl string, fileRange aliyunpan.FileDownloadRange, writerAt io.WriterAt) *apierror.ApiError
DownloadFileDataAndSave 下载文件并存储到指定IO设备里面。该方法是同步阻塞的
func (*WebPanClient) FastShareLinkCreate ¶
func (p *WebPanClient) FastShareLinkCreate(param FastShareCreateParam) (*FastShareCreateResult, *apierror.ApiError)
FastShareLinkCreate 创建快传分享
func (*WebPanClient) FileCopy ¶
func (p *WebPanClient) FileCopy(shareToken string, param []*FileSaveParam) ([]*FileSaveResult, *apierror.ApiError)
func (*WebPanClient) FileCrossDriveCopy ¶
func (p *WebPanClient) FileCrossDriveCopy(param *FileCrossCopyParam) ([]*FileCrossCopyResult, *apierror.ApiError)
FileCrossDriveCopy 跨网盘复制文件,支持资源库和备份盘之间复制文件
func (*WebPanClient) FileCrossDriveMove ¶
func (p *WebPanClient) FileCrossDriveMove(param *FileCrossCopyParam) ([]*FileCrossCopyResult, *apierror.ApiError)
FileCrossDriveMove 跨网盘移动文件,只支持从资源库移动到备份盘
func (*WebPanClient) FileDelete ¶
func (p *WebPanClient) FileDelete(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
FileDelete 删除文件到回收站
func (*WebPanClient) FileGetPath ¶
func (p *WebPanClient) FileGetPath(driveId, fileId string) (*aliyunpan.FileGetPathResult, *apierror.ApiError)
FileGetPath 通过fileId获取对应的目录层级信息
func (*WebPanClient) FileInfoById ¶
func (p *WebPanClient) FileInfoById(driveId, fileId string) (*aliyunpan.FileEntity, *apierror.ApiError)
FileInfoById 通过FileId获取文件信息
func (*WebPanClient) FileInfoByPath ¶
func (p *WebPanClient) FileInfoByPath(driveId string, pathStr string) (fileInfo *aliyunpan.FileEntity, error *apierror.ApiError)
FileInfoByPath 通过路径获取文件详情,pathStr是绝对路径
func (*WebPanClient) FileList ¶
func (p *WebPanClient) FileList(param *aliyunpan.FileListParam) (*aliyunpan.FileListResult, *apierror.ApiError)
FileList 获取文件列表
func (*WebPanClient) FileListGetAll ¶
func (p *WebPanClient) FileListGetAll(param *aliyunpan.FileListParam, delayMilliseconds int) (aliyunpan.FileList, *apierror.ApiError)
FileListGetAll 获取指定目录下的所有文件列表
func (*WebPanClient) FileMove ¶
func (p *WebPanClient) FileMove(param []*aliyunpan.FileMoveParam) ([]*aliyunpan.FileMoveResult, *apierror.ApiError)
FileMove 移动文件
func (*WebPanClient) FileRename ¶
func (p *WebPanClient) FileRename(driveId, renameFileId, newName string) (bool, *apierror.ApiError)
FileRename 重命名文件
func (*WebPanClient) FileStarred ¶
func (p *WebPanClient) FileStarred(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
FileStarred 收藏文件
func (*WebPanClient) FileUnstarred ¶
func (p *WebPanClient) FileUnstarred(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
FileUnstarred 取消收藏文件
func (*WebPanClient) FilesDirectoriesRecurseList ¶
func (p *WebPanClient) FilesDirectoriesRecurseList(driveId string, path string, handleFileDirectoryFunc aliyunpan.HandleFileDirectoryFunc) aliyunpan.FileList
FilesDirectoriesRecurseList 递归获取目录下的文件和目录列表
func (*WebPanClient) GetAccessToken ¶
func (p *WebPanClient) GetAccessToken() string
func (*WebPanClient) GetFileDownloadUrl ¶
func (p *WebPanClient) GetFileDownloadUrl(param *aliyunpan.GetFileDownloadUrlParam) (*aliyunpan.GetFileDownloadUrlResult, *apierror.ApiError)
GetFileDownloadUrl 获取文件下载URL路径
func (*WebPanClient) GetListByShare ¶
func (p *WebPanClient) GetListByShare(shareToken, shareID, marker string) (*ListByShareResult, *apierror.ApiError)
func (*WebPanClient) GetShareInfo ¶
func (p *WebPanClient) GetShareInfo(shareID string) (*GetShareByAnonymous, *apierror.ApiError)
func (*WebPanClient) GetShareLinkListReq ¶
func (p *WebPanClient) GetShareLinkListReq(param ShareListParam) (*ShareListResult, *apierror.ApiError)
func (*WebPanClient) GetShareToken ¶
func (p *WebPanClient) GetShareToken(shareID, sharePwd string) (*GetShareTokenResult, *apierror.ApiError)
func (*WebPanClient) GetUploadUrl ¶
func (p *WebPanClient) GetUploadUrl(param *aliyunpan.GetUploadUrlParam) (*aliyunpan.GetUploadUrlResult, *apierror.ApiError)
GetUploadUrl 获取上传数据链接参数 因为有些文件过大,或者暂定上传后,然后过段时间再继续上传,这时候之前的上传链接可能已经失效了,所以需要重新获取上传数据的链接 如果该文件已经上传完毕,则该接口返回错误
func (*WebPanClient) GetUserInfo ¶
func (p *WebPanClient) GetUserInfo() (*aliyunpan.UserInfo, *apierror.ApiError)
GetUserInfo 获取用户信息
func (*WebPanClient) MatchPathByShellPattern ¶
func (p *WebPanClient) MatchPathByShellPattern(driveId string, pattern string) (resultList *aliyunpan.FileList, error *apierror.ApiError)
MatchPathByShellPattern 通配符匹配文件路径, pattern为绝对路径,符合的路径文件存放在resultList中
func (*WebPanClient) Mkdir ¶
func (p *WebPanClient) Mkdir(driveId, parentFileId, dirName string) (*aliyunpan.MkdirResult, *apierror.ApiError)
Mkdir 创建文件夹
func (*WebPanClient) MkdirByFullPath ¶
func (p *WebPanClient) MkdirByFullPath(driveId, fullPath string) (*aliyunpan.MkdirResult, *apierror.ApiError)
func (*WebPanClient) MkdirRecursive ¶
func (p *WebPanClient) MkdirRecursive(driveId, parentFileId string, fullPath string, index int, pathSlice []string) (*aliyunpan.MkdirResult, *apierror.ApiError)
func (*WebPanClient) RecycleBinFileClear ¶
func (p *WebPanClient) RecycleBinFileClear(param *RecycleBinFileClearParam) (*RecycleBinFileClearResult, *apierror.ApiError)
RecycleBinFileClear 清空回收站
func (*WebPanClient) RecycleBinFileDelete ¶
func (p *WebPanClient) RecycleBinFileDelete(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
RecycleBinFileDelete 回收站彻底删除文件
func (*WebPanClient) RecycleBinFileList ¶
func (p *WebPanClient) RecycleBinFileList(param *RecycleBinFileListParam) (*aliyunpan.FileListResult, *apierror.ApiError)
RecycleBinFileList 获取回收站文件列表
func (*WebPanClient) RecycleBinFileListGetAll ¶
func (p *WebPanClient) RecycleBinFileListGetAll(param *RecycleBinFileListParam) (aliyunpan.FileList, *apierror.ApiError)
RecycleBinFileListGetAll 获取所有列表文件
func (*WebPanClient) RecycleBinFileRestore ¶
func (p *WebPanClient) RecycleBinFileRestore(param []*aliyunpan.FileBatchActionParam) ([]*aliyunpan.FileBatchActionResult, *apierror.ApiError)
RecycleBinFileRestore 回收站还原文件。还原的文件会存放会原来的地方
func (*WebPanClient) SetTimeout ¶
func (p *WebPanClient) SetTimeout(t time.Duration)
SetTimeout 设置 http 请求超时时间
func (*WebPanClient) ShareLinkCancel ¶
func (p *WebPanClient) ShareLinkCancel(shareIdList []string) ([]*ShareCancelResult, *apierror.ApiError)
ShareLinkCancel 取消分享链接
func (*WebPanClient) ShareLinkCreate ¶
func (p *WebPanClient) ShareLinkCreate(param ShareCreateParam) (*ShareEntity, *apierror.ApiError)
ShareLinkCreate 创建分享
func (*WebPanClient) ShareLinkList ¶
func (p *WebPanClient) ShareLinkList(userId string) ([]*ShareEntity, *apierror.ApiError)
ShareLinkList 获取所有分享链接列表
func (*WebPanClient) UpdateAppConfig ¶
func (p *WebPanClient) UpdateAppConfig(appConfig AppConfig)
func (*WebPanClient) UpdateSessionConfig ¶
func (p *WebPanClient) UpdateSessionConfig(sessionConfig SessionConfig)
func (*WebPanClient) UpdateToken ¶
func (p *WebPanClient) UpdateToken(webToken WebLoginToken)
func (*WebPanClient) UpdateUserId ¶
func (p *WebPanClient) UpdateUserId(userId string)
UpdateUserId 更新用户ID
func (*WebPanClient) UploadDataChunk ¶
func (p *WebPanClient) UploadDataChunk(url string, data *aliyunpan.FileUploadChunkData) *apierror.ApiError
UploadDataChunk 上传数据。该方法是同步阻塞的
func (*WebPanClient) UploadFileData ¶
func (p *WebPanClient) UploadFileData(uploadUrl string, uploadFunc aliyunpan.UploadFunc) *apierror.ApiError
UploadFileData 上传文件数据
func (*WebPanClient) VideoGetPreviewPlayInfo ¶
func (p *WebPanClient) VideoGetPreviewPlayInfo(param *aliyunpan.VideoGetPreviewPlayInfoParam) (*aliyunpan.VideoGetPreviewPlayInfoResult, error)
VideoGetPreviewPlayInfo 获取视频预览信息,调用该接口会触发视频云端转码
Source Files ¶
- api_constant.go
- app_login.go
- async_task.go
- batch_task.go
- file_album.go
- file_copy.go
- file_delete.go
- file_directory.go
- file_download.go
- file_move.go
- file_recycle.go
- file_rename.go
- file_save.go
- file_share.go
- file_starred.go
- file_upload.go
- file_video.go
- login.go
- logout.go
- mkdir.go
- signature.go
- user_info.go
- util.go
- web_pan_client.go