download

package
v0.0.0-...-76d3d19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 17 Imported by: 1

Documentation

Index

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 Check

func Check(dir string, del bool) error

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 hours).

func URLs

func URLs(dir string, skip bool) error

URLs shows the URLs to be downloaded.

Types

This section is empty.