mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-14 04:13:43 +00:00
feat: integration torrent (#30)
This commit is contained in:
1 parent
43378c7dc8
commit
034137322f
20 files changed
+925
-139
No files matched your search
@@ -5,7 +5,8 @@ import "errors"
|
||||
type Status int
|
||||
|
||||
const (
|
||||
DownloadStatusReady Status = iota
|
||||
DownloadStatusPrepare Status = iota
|
||||
DownloadStatusReady
|
||||
DownloadStatusStart
|
||||
DownloadStatusPause
|
||||
DownloadStatusError
|
||||
|
||||
+5
-1
@@ -2,6 +2,8 @@ package base
|
||||
|
||||
// 下载请求
|
||||
type Request struct {
|
||||
// 下载链接
|
||||
Schema string
|
||||
// 下载链接
|
||||
URL string
|
||||
// 附加信息
|
||||
@@ -12,7 +14,7 @@ type Request struct {
|
||||
type Resource struct {
|
||||
Req *Request
|
||||
// 资源总大小
|
||||
TotalSize int64
|
||||
Length int64
|
||||
// 是否支持断点下载
|
||||
Range bool
|
||||
// 资源所包含的文件列表
|
||||
@@ -33,4 +35,6 @@ type Options struct {
|
||||
Path string
|
||||
// 并发连接数
|
||||
Connections int
|
||||
// 下载的文件下标列表
|
||||
SelectFiles []int
|
||||
}
|
||||
Reference in new issue
Block a user