Files
gopeed/download/common/constants.go
T
2020-08-18 18:48:04 +08:00

31 lines
557 B
Go

package common
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")
)