Documentation
¶
Index ¶
- Constants
- func Download(dir string, timeout time.Duration, skip, restart bool, parallel int, ...) error
- func DownloadFromMirror(mirror string, dir string, timeout time.Duration, skip, restart bool, ...) error
- func HasUpdate(dir string) error
- func URLs(dir string, skip bool) error
- func UpdatedAt() error
- type MirrorFile
- type MirrorGroup
- type MirrorResponse
Constants ¶
View Source
const ( // DefaultChunkSize sets the size of the chunks to be downloaded using HTTP // requests by bytes range DefaultChunkSize = 1_048_576 // DefaultMaxRetries sets the maximum download attempt for each chunk DefaultMaxRetries = uint(32) // DefaultMaxParallel sets the maximum parallels downloads per server DefaultMaxParallel = 16 // DefaultTimeout sets the timeout for each HTTP request DefaultTimeout = 3 * time.Minute )
View Source
const ( // FederalRevenueUpdatedAt is a file that contains the date the data was // extracted by the Federal Revenue FederalRevenueUpdatedAt = "updated_at.txt" )
Variables ¶
This section is empty.
Functions ¶
func Download ¶
func Download(dir string, timeout time.Duration, skip, restart bool, parallel int, retries uint, chunkSize int64) error
Download all the files (might take days).
Types ¶
type MirrorFile ¶
type MirrorGroup ¶
type MirrorGroup struct { Name string `json:"name"` URLs []MirrorFile `json:"urls"` }
type MirrorResponse ¶
type MirrorResponse struct {
Data []MirrorGroup `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.