Documentation
¶
Index ¶
Constants ¶
View Source
const MAX_CONCURRENT_DOWNLOADS = 6
Variables ¶
This section is empty.
Functions ¶
func CheckResponse ¶
CheckResponse ensures the status code of an http.Response is successful, returning an HTTPStatusError if not.
func DownloadFile ¶
func DownloadFile(entry DownloadEntry) error
DownloadFile downloads the specified DownloadEntry and saves it.
All parent directories are created in order to create the file.
func StartDownloadEntries ¶
func StartDownloadEntries(entries []DownloadEntry) chan error
StartDownloadEntries runs DownloadFile on each specified DownloadEntry and returns a channel with the download results.
Types ¶
type Cache ¶ added in v1.1.0
func (Cache) FetchAndRead ¶ added in v1.1.0
FetchAndRead updates the cache with data from cache.URL, if set, and reads the contents of the cache into v.
type DownloadEntry ¶
type HTTPStatusError ¶ added in v1.1.0
func (*HTTPStatusError) Error ¶ added in v1.1.0
func (e *HTTPStatusError) Error() string
Click to show internal directories.
Click to hide internal directories.