Documentation ¶
Index ¶
Constants ¶
View Source
const ( ACCEPT_RANGE_HEADER = "Accept-Ranges" CONTENT_LENGTH_HEADER = "Content-Length" )
View Source
const ( TAGS_URL = "https://go.googlesource.com/go/+refs" BASE_DOWNLOAD_URL = "https://go.googlesource.com/go/+archive/%s.tar.gz" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpDownloader ¶
type HttpDownloader struct {
// contains filtered or unexported fields
}
Downloader structure - For downloading a file this is the structure we need to maintain
func NewDownloader ¶
func NewDownloader(url string, parts int64, skipTls bool) *HttpDownloader
Initializes a downloader structure defining a download with values and returns it
func (*HttpDownloader) ClearPreviousDownload ¶
func (d *HttpDownloader) ClearPreviousDownload() error
Clear/Remove already downloaded parts or file form downloads directory
func (*HttpDownloader) Do ¶
func (d *HttpDownloader) Do(doneChan chan bool, fileChan chan string, errorChan chan error, interruptChan chan bool)
func (*HttpDownloader) VerifyDownloadDestination ¶
func (d *HttpDownloader) VerifyDownloadDestination() error
Check if the parts and the file does not already exist in the download directory Return error if they are already present.
Click to show internal directories.
Click to hide internal directories.