Documentation
¶
Index ¶
- Constants
- func BodyList(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(fileList []string, async int) (opts *rest.Opts, err error)
- func (b *BaiduApi) DownFileDisguiseBaiduClient(dLink string) (opts *rest.Opts, err error)
- func (b *BaiduApi) GetFileMetas(path []string, dlink bool, text bool) (opts *rest.Opts, err error)
- func (b *BaiduApi) GetLocateDownloadUrl(path string) (opts *rest.Opts, err error)
- func (b *BaiduApi) GetTemplateVariable() (opts *rest.Opts, err error)
- func (b *BaiduApi) ListDirFiles(dir string, order OrderType, desc bool, showEmpty bool, page int, num int) (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 FileManagerParam
- type FragmentVO
- type InfoResponse
- type Item
- type ListResponse
- type LocateDownloadVO
- type Operate
- type OrderType
- type PreCreateFileData
- type PreCreateVO
- type RapidOffsetData
- type TemplateInfo
- type TemplateResponse
Constants ¶
Variables ¶
This section is empty.
Functions ¶
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) GetFileMetas ¶
func (*BaiduApi) GetLocateDownloadUrl ¶
Disguise as a Baidu client.can down all file but will be limit speed.
func (*BaiduApi) GetTemplateVariable ¶
func (*BaiduApi) ListDirFiles ¶
func (b *BaiduApi) ListDirFiles(dir string, order OrderType, desc bool, showEmpty bool, page int, num int) (opts *rest.Opts, err error)
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 CreateVO ¶
type CreateVO struct { BaseBaiduResponse BaseItem }
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 { ExtentTinyint7 int `json:"extent_tinyint7"` ExtentTinyint4 int `json:"extent_tinyint4"` ExtentTinyint3 int64 `json:"extent_tinyint3"` ExtentTinyint2 int `json:"extent_tinyint2"` ExtentTinyint1 int `json:"extent_tinyint1"` Category int `json:"category"` IsDir int `json:"isdir"` Videotag int `json:"videotag"` Dlink string `json:"dlink"` OperID int64 `json:"oper_id"` PathMd5 int `json:"path_md5"` WpFile int `json:"wpfile"` LocalMtime int64 `json:"local_mtime"` FileKey string `json:"file_key"` Errno int `json:"errno"` // 本地文件创建时间 LocalCtime int64 `json:"local_ctime"` OwnerType int `json:"owner_type"` Privacy int `json:"privacy"` RealCategory string `json:"real_category"` Picdocpreview string `json:"picdocpreview"` Thumbs struct { Url3 string `json:"url3"` Url2 string `json:"url2"` Url1 string `json:"url1"` Icon string `json:"icon"` } `json:"thumbs"` Docpreview string `json:"docpreview"` // 服务器文件创建时间 ServerCtime int64 `json:"server_ctime"` Lodocpreview string `json:"lodocpreview"` OwnerID int `json:"owner_id"` TkbindID int `json:"tkbind_id"` Size int64 `json:"size"` FsID int64 `json:"fs_id"` Md5 string `json:"md5"` ExtentInt3 int64 `json:"extent_int3"` Path string `json:"path"` FromType int `json:"from_type"` ServerFilename string `json:"server_filename"` // 服务器文件修改时间,包括重命名 ServerMtime int64 `json:"server_mtime"` Pl int `json:"pl"` DirEmpty int `json:"dir_empty"` Empty int `json:"empty"` ServerAtime int `json:"server_atime"` Unlist int `json:"unlist"` }
type ListResponse ¶
type ListResponse struct { BaiduResponse List []*Item `json:"list"` }
type LocateDownloadVO ¶
type LocateDownloadVO struct { ClientIP string `json:"client_ip"` URLs []struct { URL string `json:"url"` Rank int `json:"rank"` } `json:"urls"` BakURLs string `json:"bakurls"` RankParam struct { MaxContinuousFailure int `json:"max_continuous_failure"` BakRankSliceNum int `json:"bak_rank_slice_num"` } `json:"rank_param"` FSL int `json:"fsl"` MaxTimeout int `json:"max_timeout"` MinTimeout int `json:"min_timeout"` IV int `json:"iv"` RequestID int64 `json:"request_id"` }
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时 才会有这一项 Info *BaseItem `json:"info"` //return_type为2时 才会有这一项 UploadId string `json:"uploadid"` //return_type为1时 才会有这一项 }
type RapidOffsetData ¶
type TemplateInfo ¶
type TemplateResponse ¶
type TemplateResponse struct { BaiduResponse Result *TemplateInfo `json:"result"` }
Click to show internal directories.
Click to hide internal directories.