[🚀] downloader
This commit is contained in:
24
pkg/downloader/protocol/http/model.go
Normal file
24
pkg/downloader/protocol/http/model.go
Normal file
@ -0,0 +1,24 @@
|
||||
package http
|
||||
|
||||
import "gitea.bvbej.com/bvbej/base-golang/pkg/downloader/base"
|
||||
|
||||
type Chunk struct {
|
||||
Status base.Status
|
||||
Begin int64
|
||||
End int64
|
||||
Downloaded int64
|
||||
}
|
||||
|
||||
func NewChunk(begin int64, end int64) *Chunk {
|
||||
return &Chunk{
|
||||
Status: base.DownloadStatusReady,
|
||||
Begin: begin,
|
||||
End: end,
|
||||
}
|
||||
}
|
||||
|
||||
type Extra struct {
|
||||
Method string
|
||||
Header map[string]string
|
||||
Body string
|
||||
}
|
Reference in New Issue
Block a user