Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a downloader client
type ClientImpl ¶
type ClientImpl interface { // Download downloads a file into a specific location Download(ctx context.Context, baseDir string, progress chan ProgressUpdate, url string) error // Register is used for the client, and returns what protocols / file extensions // this downloader supports Register() ClientRegister }
ClientImpl is a downloader implementation
type ClientRegister ¶
type ClientRegister struct { // Name is the name of this client, e.g. Downloade Name string // Protocols is a []string of the url.Schemes supported by this client, and will // trigger the invocation of the client.Download method. Protocols []string // FileExtensions is the list of file extensions supported by this downloader // and results in this downloader being called -- regardless of url.Scheme, however // this will only trigger on http[s] URLs FileExtensions []string }
ClientRegister is a struct used to register a downloader implementation with a given client
type ProgressUpdate ¶
ProgressUpdate is emitted when the progress of a download updates, this is sent from a ClientImpl to the client
Directories ¶
Path | Synopsis |
---|---|
Package http is a downloader implementer for downloading files from HTTP/S
|
Package http is a downloader implementer for downloading files from HTTP/S |
Package torrent is a downloader implementer for downloading torrents
|
Package torrent is a downloader implementer for downloading torrents |
Click to show internal directories.
Click to hide internal directories.