mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 06:13:42 +00:00
重构fetcher接口
This commit is contained in:
1 parent
871185e7ea
commit
bdce3c84a3
12 files changed
+347
-397
No files matched your search
@@ -0,0 +1,30 @@
|
||||
package base
|
||||
|
||||
import "errors"
|
||||
|
||||
type Status int
|
||||
|
||||
const (
|
||||
DownloadStatusReady Status = iota
|
||||
DownloadStatusStart
|
||||
DownloadStatusPause
|
||||
DownloadStatusError
|
||||
DownloadStatusDone
|
||||
)
|
||||
|
||||
const (
|
||||
HttpCodeOK = 200
|
||||
HttpCodePartialContent = 206
|
||||
|
||||
HttpHeaderRange = "Range"
|
||||
HttpHeaderContentLength = "Content-Length"
|
||||
HttpHeaderContentRange = "Content-Range"
|
||||
HttpHeaderContentDisposition = "Content-Disposition"
|
||||
|
||||
HttpHeaderRangeFormat = "bytes=%d-%d"
|
||||
)
|
||||
|
||||
var (
|
||||
PauseErr = errors.New("pause")
|
||||
DeleteErr = errors.New("delete")
|
||||
)
|
||||
Reference in new issue
Block a user