Versions in this module Expand all Collapse all v0 v0.2.0 May 3, 2020 Changes in this version type Splitter + func (s *Splitter) Resume() error v0.1.2 May 3, 2020 Changes in this version + var ErrOutOfRange = errors.New("ErrOutOfRange") + type DownloadRange struct + End int + Start int + func (dr *DownloadRange) BuildRangeHeader() string + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + Get func(url string) (resp *http.Response, err error) + type PathInfo struct + Dest *os.File + Source *Source + type PathResolver struct + Dest string + Source string + func NewPathResolver(source string, dest string, client HTTPClient) *PathResolver + func (pr *PathResolver) PathInfo() (*PathInfo, error) + type PathResolverError struct + func (pr *PathResolverError) Error() string + type RangeBuilder struct + func NewRangeBuilder(length int, chunkCount int) *RangeBuilder + func (rb *RangeBuilder) NextRange() (DownloadRange, error) + type Source struct + Ext string + Path *url.URL + Size int + func NewSource(source *url.URL, client HTTPClient) (*Source, error) + type SourceError struct + func (pr *SourceError) Error() string + type Splitter struct + ChunkCnt int + Ctx context.Context + PI *PathInfo + func NewSplitter(ctx context.Context, pi *PathInfo, chunkCnt int, c HTTPClient) *Splitter + func (s *Splitter) Download() error