Documentation
¶
Index ¶
- Constants
- func BodyList(slice []string) string
- func BodyNumList(slice []string) string
- func BoolToInt(b bool) int
- func BoolToStr(b bool) string
- func EncryptMd5(e string) string
- func FixToBaiduPath(rclonePath string) string
- func FixToBaiduPathList(rclonePath []string) []string
- type BaiduApi
- func (b *BaiduApi) Create(path string, preCreateFileData *PreCreateFileData, uploadId string) (opts *rest.Opts, err error)
- func (b *BaiduApi) CreateDir(path string, isdir bool) (opts *rest.Opts, err error)
- func (b *BaiduApi) DeleteDirsOrFiles(fileIdList []string) (opts *rest.Opts, err error)
- func (b *BaiduApi) DownFileDisguiseBaiduClient(dLink string) (opts *rest.Opts, err error)
- func (b *BaiduApi) GetDownloadUrl(fsid string) (opts *rest.Opts, err error)
- func (b *BaiduApi) GetFileMetas(path []string, dlink bool, text bool) (opts *rest.Opts, err error)
- func (b *BaiduApi) GetQuotaInfo() (opts *rest.Opts, err error)
- func (b *BaiduApi) GetUserInfo() (opts *rest.Opts, err error)
- func (b *BaiduApi) ListDirFiles(cursor string) (opts *rest.Opts, err error)
- func (b *BaiduApi) MoveOrCopyDirsOrFiles(fileList []FileManagerParam, async int, operate Operate) (opts *rest.Opts, err error)
- func (b *BaiduApi) Precreate(path string, rapidOffsetData *RapidOffsetData, ...) (opts *rest.Opts, err error)
- func (b *BaiduApi) RenameDirsOrFiles(fileList []FileManagerParam, async int) (opts *rest.Opts, err error)
- func (b *BaiduApi) Superfile2(path string, uploadId string, partseq int, realChunkSize int64, ...) (opts *rest.Opts, err error)
- type BaiduResponse
- type BaseBaiduResponse
- type BaseItem
- type CreateVO
- type DownloadVO
- type FileManagerParam
- type FragmentVO
- type InfoResponse
- type Item
- type ListResponse
- type Operate
- type OrderType
- type PreCreateFileData
- type PreCreateVO
- type QuotaInfoResponse
- type RapidOffsetData
- type UserInfo
- type UserInfoResponse
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func BodyNumList ¶
func EncryptMd5 ¶
func FixToBaiduPath ¶
fixToBaiduPath baidu path need to begin with "/" and use "/" to split
func FixToBaiduPathList ¶
Types ¶
type BaiduApi ¶
type BaiduApi struct { }
func (*BaiduApi) Create ¶
func (b *BaiduApi) Create(path string, preCreateFileData *PreCreateFileData, uploadId string) (opts *rest.Opts, err error)
上传
func (*BaiduApi) DeleteDirsOrFiles ¶
func (*BaiduApi) DownFileDisguiseBaiduClient ¶
Disguise as a Baidu client.can down all file but will be limit speed.
func (*BaiduApi) GetDownloadUrl ¶
Disguise as a Baidu client.can down all file but will be limit speed.
func (*BaiduApi) GetFileMetas ¶
func (*BaiduApi) ListDirFiles ¶
ListDirFiles order default time , desc default true ,showEmpty default false ,page begin from 1,num default 100
func (*BaiduApi) MoveOrCopyDirsOrFiles ¶
func (b *BaiduApi) MoveOrCopyDirsOrFiles(fileList []FileManagerParam, async int, operate Operate) (opts *rest.Opts, err error)
MoveOrCopyDirsOrFiles Moving does not modify the fsid while copying generates a new fsid
func (*BaiduApi) Precreate ¶
func (b *BaiduApi) Precreate(path string, rapidOffsetData *RapidOffsetData, preCreateFileData *PreCreateFileData) (opts *rest.Opts, err error)
上传
func (*BaiduApi) RenameDirsOrFiles ¶
type BaiduResponse ¶
type BaiduResponse struct { BaseBaiduResponse GuidInf string `json:"guid_inf"` Guid int64 `json:"guid"` }
type BaseBaiduResponse ¶
func (BaseBaiduResponse) GetErrno ¶
func (b BaseBaiduResponse) GetErrno() int
type BaseItem ¶
type BaseItem struct { FsID int64 `json:"fs_id"` Path string `json:"path"` Md5 string `json:"md5"` FromType int32 `json:"from_type"` ServerMd5 string `json:"server_md5"` Size int64 `json:"size"` Category int `json:"category"` ShootTime int64 `json:"shoot_time"` Ctime int64 `json:"ctime"` Mtime int64 `json:"mtime"` Errno int32 `json:"errno"` IsDir int32 `json:"isdir"` ServerFilename string `json:"server_filename"` }
type CreateVO ¶
type CreateVO struct { BaseBaiduResponse ReturnType int `json:"return_type"` //不可靠,可能没有这个字段 Data *BaseItem `json:"data"` }
type DownloadVO ¶
type DownloadVO struct { BaseBaiduResponse Dlink string `json:"dlink"` }
type FileManagerParam ¶
type FragmentVO ¶
type FragmentVO struct { Md5 string `json:"md5"` Partseq string `json:"partseq"` RequestId int64 `json:"request_id"` UploadId int32 `json:"uploadid"` }
func (FragmentVO) GetErrno ¶
func (b FragmentVO) GetErrno() int
type InfoResponse ¶
type InfoResponse struct { BaiduResponse Info []*Item `json:"info"` }
type Item ¶
type Item struct { FsID int64 `json:"fsid"` Path string `json:"path"` Md5 string `json:"md5"` ServerMd5 string `json:"server_md5"` Size int64 `json:"size"` Category int `json:"category"` Status int `json:"status"` ShootTime int64 `json:"shoot_time"` TaskStatus int `json:"task_status"` Ctime int64 `json:"ctime"` Mtime int64 `json:"mtime"` ExtStatus int `json:"ext_status"` Flag int `json:"flag"` CollectStatus int `json:"collect_status"` ThumburlList []*string `json:"thumburl"` ThumburlStr string `json:"thumburl1"` Errno int `json:"errno"` }
type ListResponse ¶
type ListResponse struct { BaseBaiduResponse HasMore int32 `json:"has_more"` Cursor string `json:"cursor"` List []*Item `json:"list"` }
type PreCreateFileData ¶
type PreCreateVO ¶
type PreCreateVO struct { BaseBaiduResponse Path string `json:"path"` //return_type为1时 才会有这一项 ReturnType int `json:"return_type"` BlockList []fs.StringValue `json:"block_list"` //return_type为1时 才会有这一项 Data *BaseItem `json:"data"` //return_type为2时 才会有这一项 UploadId string `json:"uploadid"` //return_type为1时 才会有这一项 }
type QuotaInfoResponse ¶
type QuotaInfoResponse struct { BaseBaiduResponse Quota int64 `json:"quota"` Used int64 `json:"used"` IsUnlimit int `json:"is_unlimit"` }
type RapidOffsetData ¶
type UserInfo ¶
type UserInfo struct { YouaId string `json:"youa_id"` Nickname string `json:"nickname"` Photo string `json:"photo"` Ctime int64 `json:"ctime"` SetNickname int32 `json:"set_nickname"` IsAdmin int32 `json:"is_admin"` PrivateStatus int32 `json:"private_status"` SupportRaw int32 `json:"support_raw"` UsedInfiniteCode string `json:"used_infinite_code"` IsDefNickname int32 `json:"is_def_nickname"` IsNew int32 `json:"is_new"` IsNewOfCurApp int32 `json:"is_new_of_cur_app"` BdUn string `json:"bd_un"` UserAuthState int32 `json:"user_auth_state"` }
type UserInfoResponse ¶
type UserInfoResponse struct { BaseBaiduResponse *UserInfo }
Click to show internal directories.
Click to hide internal directories.