Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoDownload ¶
type GoDownload struct { //Overwrite provides overwriting file with same name Overwrite bool //Always create new file. If file with same name exist // create "file_1" Alwaysnew bool //UserAgent provides setting user agent for http request UserAgent string //Retry provides number of attempts to download file Retry int //Authentication before downloading. Auth in the format username:password Auth string //Specify archive format for downloaded file Archive string //Path to the config file Configpath string //Directory for downloaded file Outdir string }
GoDownload provides main struct for global config and downloading items
func (*GoDownload) Download ¶
func (gd *GoDownload) Download(path string, opt *Options)
Download provides downloading of file
func (*GoDownload) DownloadMany ¶
func (gd *GoDownload) DownloadMany(items []*Options)
DownloadMany provides downloading several files
func (*GoDownload) DownloadManySimple ¶
func (gd *GoDownload) DownloadManySimple(items []string)
DownloadManySimple is identical for DownloadMany, but as arguments is slice of url
func (*GoDownload) FromFile ¶
func (gd *GoDownload) FromFile(path string)
FromFile provides getting links from file and download
type Options ¶
type Options struct { // URL parameter needs only for DownloadMany. // In the case with Download. This paremeter will be ignore URL string //Download web page instead file Page bool //Outpath sets the path of the downloaded file Outpath string //Overwrite provides overwriting file with same name Overwrite bool //Always create new file. If file with same name exist // create "file_1" Alwaysnew bool //UserAgent provides setting user agent for http request UserAgent string //Retry provides number of attempts to download file Retry int //Authentication before downloading. Auth in the format username:password Auth string //Specify archive format for downloaded file Archive string //TODO TimeLimit time.Time }
Options defines attributes for config of GoDownload
Click to show internal directories.
Click to hide internal directories.