Files
gopeed/download/base/constants.go
T
2021-03-23 19:03:46 +08:00

40 lines
697 B
Go

package base
import "errors"
type Status int
const (
DownloadStatusReady Status = iota
DownloadStatusStart
DownloadStatusPause
DownloadStatusError
DownloadStatusDone
)
type EventKey string
const (
EventKeyStart = "start"
EventKeyPause = "pause"
EventKeyProgress = "progress"
EventKeyError = "error"
EventKeyDone = "done"
)
const (
HttpCodeOK = 200
HttpCodePartialContent = 206
HttpHeaderRange = "Range"
HttpHeaderContentLength = "Content-Length"
HttpHeaderContentRange = "Content-Range"
HttpHeaderContentDisposition = "Content-Disposition"
HttpHeaderRangeFormat = "bytes=%d-%d"
)
var (
DeleteErr = errors.New("delete")
)