Documentation
¶
Overview ¶
Package getter is used to manage retrieval, storge and decompression of Edgar filings from the SEC.
Index ¶
- Constants
- type Getter
- func (getter *Getter) DownloadableFile(filename string) bool
- func (getter *Getter) ErrorHandler(e error)
- func (getter *Getter) NewGetter()
- func (getter *Getter) RetrieveSingleFile(location string, fileList chan<- string) (string, error)
- func (getter *Getter) RetrieveURIs(sourceURI string, customLimit int) []string
Constants ¶
View Source
const ( // MAXRETRIEVALSIZE the maximum number of files to retrieve at any one time MAXRETRIEVALSIZE = 5000 // MAXRETRY the maximum number of attempts to download a single resource MAXRETRY = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Getter ¶
type Getter struct { RetrieveURI string SaveLocation string ValidFileSuffixes map[string]bool // ValidFileSuffixes lists the ONLY valid suffixes allowed when downloading }
Getter provides a data structure to support this package
func (*Getter) DownloadableFile ¶
DownloadableFile checks a file against the approved file suffix list
func (*Getter) ErrorHandler ¶
ErrorHandler a simple error checker and handler which panics if an error exists.
func (*Getter) NewGetter ¶
func (getter *Getter) NewGetter()
NewGetter initializes and performs any setup necessary for the getter package to function.
Items currently Setup:
SaveLocation set to a default value of /tmp/edgar/ ValidFileSuffixes set to default values
func (*Getter) RetrieveSingleFile ¶
RetrieveSingleFile retrieves a single file/resource from the specified location. This function can be called concurrently by providing a channel.
Click to show internal directories.
Click to hide internal directories.