Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HTTPClient = &http.Client{ Timeout: 45 * time.Second, } )
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
Downloader will download and cache DPL files in a temp directory.
If HTTP is nil then http.DefaultClient will be used (which has NO timeouts).
See: https://www.treasury.gov/resource-center/sanctions/SDN-List/Pages/sdn_data.aspx
func (*Downloader) GetFiles ¶
func (dl *Downloader) GetFiles(dir string, namesAndSources map[string]string) (map[string]io.ReadCloser, error)
GetFiles will initiate download of all provided files, return an io.ReadCloser to their content
initialDir is an optional filepath to look for files in before attempting to download.
Callers are expected to call the io.Closer interface method when they are done with the file
Click to show internal directories.
Click to hide internal directories.