github.com/auxten/ginkgo@v0.0.0-20220130172820-7d98ad59d232/download/down.go (about) 1 package download 2 3 import ( 4 "io" 5 6 "github.com/auxten/ginkgo/seed" 7 ) 8 9 type DownHttp interface { 10 DownOffset(uri string, start int64, end int64) (io.ReadCloser, error) 11 } 12 13 type DownBlock interface { 14 GetSeed(host string, uri string, blockSize int64) (*seed.Seed, error) 15 DownBlock(seed *seed.Seed, host string, blockId int64, cnt int64) (io.ReadCloser, error) 16 }