Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoData = errors.New("nothing to download") ErrNoGoroutines = errors.New("MaxGoroutines should be positive") )
View Source
var DefaultOptions = &Options{
Separator: "/",
MaxAttempts: 3,
MaxGoroutines: 64,
}
Default Options
Functions ¶
This section is empty.
Types ¶
type DL ¶
DL is the downloader.
type File ¶
type File struct {
Path, Name, URL string
}
File to download. URL is where to get the data, path is where to store it.
type FileBuffer ¶
FileBuffer is a File with its data downloaded to Buffer.
type Interface ¶
type Interface interface {
URLs() []File
}
A type that satisfies download.Interface can be downloaded with download.Tar etc.
type Options ¶
type Options struct { // Separator to use between files, eg you can use "_" for a flat // file structure, or leave the default "/" to have dirs. Separator string // Max attempts trying to download a file MaxAttempts int // Concurrent mode Concurrent bool // Max number of gorountines to spawn MaxGoroutines int }
Options for the downloader.
Click to show internal directories.
Click to hide internal directories.