model.go 392 B

123456789101112131415161718192021222324
  1. package http
  2. import "git.bvbej.com/bvbej/base-golang/pkg/downloader/base"
  3. type Chunk struct {
  4. Status base.Status
  5. Begin int64
  6. End int64
  7. Downloaded int64
  8. }
  9. func NewChunk(begin int64, end int64) *Chunk {
  10. return &Chunk{
  11. Status: base.DownloadStatusReady,
  12. Begin: begin,
  13. End: end,
  14. }
  15. }
  16. type Extra struct {
  17. Method string
  18. Header map[string]string
  19. Body string
  20. }