Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Angey40/BaiduPCS-Go
/ functions
Functions
104 in github.com/Angey40/BaiduPCS-Go
⨍
Functions
104
◇
Types & classes
13
↓ 11 callers
Method
String
()
baidupcs/file_directory.go:121
↓ 6 callers
Method
Fetch
Fetch 实现 http/https 访问 和 GET/POST 请求, 根据给定的 method (GET, POST, HEAD, PUT 等等), urlStr (网址), post (post 数据), header (header 请求头数据), 进行网站访问。 返回值分别为 网站主体,
downloader/fetch.go:26
↓ 6 callers
Method
Save
Save 保存配置信息到配置文件, 并重载配置
config/config.go:79
↓ 6 callers
Method
addItem
(subPath, method string, param ...map[string]string)
baidupcs/baidupcs.go:33
↓ 6 callers
Method
isDone
isDone 判断线程是否完成下载任务
downloader/downloader_block.go:29
↓ 5 callers
Function
checkErr
(json *simplejson.Json)
baidupcs/util.go:8
↓ 4 callers
Method
FileList
FileList 获取目录下的文件列表
baidupcs/file_directory.go:70
↓ 4 callers
Method
Write
(bytes []byte)
util/log_colorable_prefix.go:17
↓ 3 callers
Method
CheckUIDExist
(uid uint64)
config/get_checker.go:31
↓ 3 callers
Method
FilesDirectoriesMeta
FilesDirectoriesMeta 获取单个文件/目录的元信息 可用信息: 是否是目录isdir 是否含有子目录ifhassubdir 修改时间mtime 文件大小size
baidupcs/file_directory.go:28
↓ 3 callers
Method
Remove
Remove 批量删除文件/目录
baidupcs/rm_mkdir.go:11
↓ 3 callers
Method
downloadBlockFn
downloadBlockFn 线程控制器
downloader/downloader_block.go:90
↓ 3 callers
Function
toAbsPath
(path string)
command/util.go:30
↓ 2 callers
Method
Count
Count 获取文件总数和目录总数
baidupcs/file_directory.go:152
↓ 2 callers
Method
FileDownload
FileDownload 下载网盘内文件
baidupcs/download.go:16
↓ 2 callers
Method
GetBaiduUserByUID
(uid uint64)
config/get_checker.go:11
↓ 2 callers
Method
GetStatus
GetStatus 获取下载统计信息
downloader/downloader.go:205
↓ 2 callers
Function
Md5Encrypt
Md5Encrypt 对 str 进行md5加密, 返回值为 str 加密后的密文
util/util.go:53
↓ 2 callers
Method
OnFinish
OnFinish 任务完成时触发的事件
downloader/downloader.go:215
↓ 2 callers
Method
OnStart
OnStart 任务开始时触发的事件
downloader/downloader.go:210
↓ 2 callers
Function
ReloadInfo
ReloadInfo 重载配置
command/command.go:18
↓ 2 callers
Method
Start
Start 开始下载
downloader/downloader.go:128
↓ 2 callers
Method
TotalSize
TotalSize 获取总文件大小
baidupcs/file_directory.go:143
↓ 2 callers
Function
UpdateActiveBaiduUser
UpdateActiveBaiduUser 更新 当前百度帐号
config/config.go:94
↓ 2 callers
Method
avaliableThread
avaliableThread 筛选空闲的线程, 返回值, 没有空闲的线程, bool 返回 false 找到空闲的线程, int 返回该线程的索引 index
downloader/downloader_block.go:67
↓ 2 callers
Function
closeLiner
(line *liner.State)
main.go:476
↓ 2 callers
Function
getAbsPath
getAbsPath 获取绝对路径, 忽略通配符
command/util.go:16
↓ 2 callers
Function
getAllPaths
(paths ...string)
command/util.go:23
↓ 2 callers
Function
loadConfig
()
config/config.go:53
↓ 2 callers
Function
newLiner
()
main.go:463
↓ 2 callers
Function
parsePath
parsePath 递归解析通配符
command/util.go:39
↓ 2 callers
Method
touch
用于触发事件
downloader/downloader.go:227
↓ 2 callers
Method
touchOnError
触发Error事件
downloader/downloader.go:234
↓ 1 callers
Method
AddDelta
AddDelta 在 sync.WaitGroup 的基础上, 新增线程控制功能
util/wait_group.go:23
↓ 1 callers
Function
BeijingTimeOption
* BeijingTimeOption 根据给定的 get 返回时间格式. get: 时间格式 "Refer": 2017-7-21 12:02:32.000 "printLog": 2017-7-21_12:02:32 "day": 21 "ymd":
util/time.go:25
↓ 1 callers
Method
DeleteBaiduUserByUID
(uid uint64)
config/deleter.go:7
↓ 1 callers
Method
Done
Done 在 sync.WaitGroup 的基础上, 新增线程控制功能
util/wait_group.go:32
↓ 1 callers
Method
GetAllBaiduUser
()
config/get_checker.go:20
↓ 1 callers
Function
GetSavePath
GetSavePath 根据提供的网盘文件路径 path, 返回本地储存路径
config/get_checker.go:41
↓ 1 callers
Function
GetUserNameByUID
(uid uint64)
config/check_bduss.go:79
↓ 1 callers
Method
Mkdir
Mkdir 创建目录
baidupcs/rm_mkdir.go:57
↓ 1 callers
Function
NewFileDl
NewFileDl 创建新的文件下载 如果 size <= 0 则自动获取文件大小
downloader/downloader.go:55
↓ 1 callers
Function
NewHTTPClient
NewHTTPClient 返回 HTTPClient 的指针, 预设了一些配置
downloader/http_client.go:17
↓ 1 callers
Function
NewWaitGroup
NewWaitGroup returns a pointer to a new `WaitGroup` object. parallel 为最大并发数, 0 代表无限制
util/wait_group.go:13
↓ 1 callers
Function
NewWithBDUSS
NewWithBDUSS 检测BDUSS有效性, 同时获取百度详细信息
config/check_bduss.go:20
↓ 1 callers
Method
OnError
OnError 任务出错时触发的事件 errCode为错误码,errStr为错误描述
downloader/downloader.go:222
↓ 1 callers
Method
Parallel
Parallel 返回当前正在进行的任务数量
util/wait_group.go:46
↓ 1 callers
Method
QuotaInfo
QuotaInfo 获取当前用户空间配额信息
baidupcs/quota.go:10
↓ 1 callers
Function
Reload
Reload 从配置文件重载更新 Config
config/config.go:67
↓ 1 callers
Function
RunGetMeta
RunGetMeta 执行 获取单个文件/目录的元信息
command/meta.go:8
↓ 1 callers
Method
SetBDUSS
SetBDUSS 设置百度 bduss 并保存
config/seter.go:8
↓ 1 callers
Method
SetCookiejar
SetCookiejar 设置 cookie
downloader/http_client.go:35
↓ 1 callers
Method
SetKeepAlive
SetKeepAlive 设置 Keep-Alive
downloader/http_client.go:50
↓ 1 callers
Method
SetTimeout
SetTimeout 设置 http 请求超时时间 默认30s
downloader/http_client.go:65
↓ 1 callers
Function
ToBytes
ToBytes 将 string 转换为 []byte
util/util.go:36
↓ 1 callers
Method
Wait
Wait 参照 sync.WaitGroup 的 Wait 方法
util/wait_group.go:41
↓ 1 callers
Method
blockMonitor
blockMonitor 延迟监控各线程状态, 管理空闲 (已完成下载任务) 的线程, 清除长时间无响应, 和下载速度为 0 的线程
downloader/downloader_block.go:228
↓ 1 callers
Method
download
()
downloader/downloader.go:172
↓ 1 callers
Method
downloadBlock
downloadBlock 文件块下载 根据 id 对于的 Block, 创建下载任务
downloader/downloader_block.go:123
↓ 1 callers
Function
downloadDirectory
(path string)
command/download.go:59
↓ 1 callers
Method
isAllDone
isAllDone 检查所有的线程, 是否都完成了下载任务
downloader/downloader_block.go:79
↓ 1 callers
Method
isComplete
isComplete 判断线程是否空闲, 即 线程已完成下载任务 且 线程的载入量 (running 值) 为 0
downloader/downloader_block.go:60
↓ 1 callers
Method
loadBreakPoint
loadBreakPoint 尝试从文件载入下载断点
downloader/resume_breakpoint.go:31
↓ 1 callers
Method
recordBreakPoint
recordBreakPoint 保存下载断点到文件, 用于断点续传
downloader/resume_breakpoint.go:19
↓ 1 callers
Function
recurseFDCountTotalSize
(path string)
command/util.go:80
↓ 1 callers
Method
setDone
setDone 设置线程为完成下载任务状态 (简单粗暴)
downloader/downloader_block.go:48
↓ 1 callers
Method
startGetSpeeds
()
downloader/downloader.go:189
Function
BenchmarkBytes
(b *testing.B)
util/unsafe_strconv_test.go:16
Function
BenchmarkToBytes
(b *testing.B)
util/unsafe_strconv_test.go:10
Function
CheckFileExist
CheckFileExist 检查本地文件是否与网盘的文件重名
config/get_checker.go:51
Method
ClearCookiejar
ClearCookiejar 清空 cookie
downloader/http_client.go:40
Function
ConvertFileSize
ConvertFileSize 文件大小格式化输出
util/convert.go:18
Function
DecompressGZIP
DecompressGZIP 对 io.Reader 数据, 进行 gzip 解压
util/util.go:72
Function
DoDownload
DoDownload 简单网络下载器, 使用默认下载线程, 通过调用 SetMaxThread 来修改默认下载线程
downloader/example.go:12
Function
FlagProvided
FlagProvided 检测命令行是否提供名为 name 的 flag, 支持多个name(names)
util/util.go:82
Function
FormatTime
FormatTime 讲 Unix 时间戳, 转换为字符串
util/convert.go:54
Function
GetURLCookieString
GetURLCookieString 返回cookie字串
util/util.go:41
Function
HTTPGet
HTTPGet 简单实现 http 访问 GET 请求
downloader/fetch.go:13
Function
Init
Init 初始化配置
config/config.go:30
Function
IntToBool
IntToBool int 类型转换为 bool
util/convert.go:46
Function
NewPCS
NewPCS 提供 百度BDUSS, 返回 PCSApi 指针对象
baidupcs/baidupcs.go:21
Function
PrintErrAndExit
PrintErrAndExit 简易错误处理, 如果 err 存在, 向屏幕输出 err 并退出, annotate 是加在 err 之前的注释信息。
util/error.go:16
Function
PrintErrIfExist
PrintErrIfExist 简易错误处理, 如果 err 存在, 就只向屏幕输出 err 。
util/error.go:9
Function
ReloadIfInConsole
ReloadIfInConsole 程序在 Console 模式下才回重载配置
command/command.go:24
Function
RunChangeDirectory
RunChangeDirectory 执行更改工作目录
command/cd.go:9
Function
RunDownload
RunDownload 执行下载网盘内文件
command/download.go:12
Function
RunGetQuota
RunGetQuota 执行 获取当前用户空间配额信息, 并输出
command/quota.go:9
Function
RunLs
RunLs 执行列目录
command/ls.go:11
Function
RunMkdir
RunMkdir 执行 创建目录
command/rm_mkdir.go:30
Function
RunRemove
RunRemove 执行 批量删除文件/目录
command/rm_mkdir.go:8
Function
SetCacheSize
SetCacheSize 设置缓冲大小
downloader/downloader_config.go:24
Method
SetGzip
SetGzip 是否启用Gzip
downloader/http_client.go:55
Method
SetHTTPSecure
SetHTTPSecure 是否启用 https 安全检查
downloader/http_client.go:45
Function
SetLogPrefix
SetLogPrefix 设置日志输出的时间前缀
util/log_colorable_prefix.go:22
Function
SetMaxParallel
SetMaxParallel 设置最大线程
downloader/downloader_config.go:16
Method
SetResponseHeaderTimeout
SetResponseHeaderTimeout 设置目标服务器响应超时时间
downloader/http_client.go:60
Function
TestWg
(t *testing.T)
util/wait_group_test.go:9
Function
TiebaClientRawQuerySignature
TiebaClientRawQuerySignature 给 rawQuery 进行贴吧客户端签名
util/tieba_client_signature.go:36
Function
TiebaClientSignature
TiebaClientSignature 根据给定贴吧客户端的 post (post数据指针) 进行签名, 以通过百度服务器验证。返回值为: sign 签名字符串
util/tieba_client_signature.go:10
Function
ToString
ToString 将 []byte 转换为 string
util/util.go:31
next →
1–100 of 104, ranked by callers