Documentation ¶
Overview ¶
Package api 定义百度网盘SDK的接口
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorizationer ¶
Authorizationer 获取百度网盘的授权需要实现此接口
type Downloader ¶
type Downloader interface {
Download(downDir string, path string, downloadStatuFunc func(fms response.FileMetaResp)) (err error)
}
Downloader 文件下载
type FileLister ¶
type FileLister interface { FileList(*request.FileListReq) (*response.FileListResp, error) FileListRecursion(*request.FileListRecursionReq) (*response.FileListResp, error) }
FileLister 文件列表
type FileManager ¶
type FileManager interface { CreateDir(dirname string, remotePath string) error Copy(req *request.FileManagerReq) (resp *response.FileManagerResp, err error) Rename(req *request.FileManagerReq) (resp *response.FileManagerResp, err error) Move(req *request.FileManagerReq) (resp *response.FileManagerResp, err error) Delete(req *request.FileManagerReq) (resp *response.FileManagerResp, err error) }
FileManager 文件管理,这里的文件是指网盘里的文件
type FileMetaer ¶
type FileMetaer interface {
FileMeta(*request.FileMetaReq) (*response.FileMetasResp, error)
}
FileMetaer 文件详情
type FileSearcher ¶
type FileSearcher interface {
FileSearch(req *request.FileSearchReq) (*response.FileSearchResp, error)
}
FileSearcher 文件搜索
type Sdker ¶
type Sdker interface { UserInfoer Quotaer FileLister Uploader FileSearcher FileManager FileMetaer Downloader Authorizationer HttpClient() *http.Client }
Sdker 集成所有的接口,这样在实例化实现了Sdker接口的结构体后,便能够直接调用所有的接口方法
type UserInfoer ¶
type UserInfoer interface {
UserInfo() (*response.UserInfoResp, error)
}
UserInfoer 用户信息
Click to show internal directories.
Click to hide internal directories.