feat: support RESTful api (#33)

This commit is contained in:
monkeyWie authored and GitHub committed 2022-09-09 18:31:57 +08:00
1 parent e292926697
commit c6aa83194f
22 files changed
+603 -125

No files matched your search

+6 -13
View File
@@ -1,16 +1,13 @@
package base
import "errors"
type Status int
type Status string
const (
DownloadStatusPrepare Status = iota
DownloadStatusReady
DownloadStatusStart
DownloadStatusPause
DownloadStatusError
DownloadStatusDone
DownloadStatusReady Status = "ready"
DownloadStatusRunning Status = "running"
DownloadStatusPause Status = "pause"
DownloadStatusError Status = "error"
DownloadStatusDone Status = "done"
)
const (
@@ -24,7 +21,3 @@ const (
HttpHeaderRangeFormat = "bytes=%d-%d"
)
var (
DeleteErr = errors.New("delete")
)