Documentation
¶
Index ¶
- func AsyncURL(url string, destFn string, opt *Params) error
- func AsyncURL2(url string, destFn string, opt *Params) error
- func AsyncURL3(url string, destFn string, opt *Params) (err error)
- func Axel(url string, destFn string, opt *Params) (err error)
- func Curl(url string, destFn string, opt *Params) (err error)
- func Egafetch(ega string, fileID string, outDir string, opt *Params) (err error)
- func FormatURLfileName(url string, remoteName bool, timeout int, proxy string) (fname string)
- func GdcClient(fileID string, manifest string, outDir string, opt *Params) (err error)
- func Git(url string, destFn string, opt *Params) (err error)
- func HTTPGetURL(url string, destFn string, opt *Params) error
- func HTTPGetURLs(urls []string, destDir []string, opt *Params) (destFns []string)
- func Hg(url string, destFn string, opt *Params) (err error)
- func NewHTTPClient(timeout int, proxy string) *http.Client
- func ParseOutfnFromHeader(outfn string, resp *http.Response, useRemoteName bool) string
- func Prefetch(srr string, krt string, outDir string, opt *Params) (err error)
- func RandProxy(proxy string) (*neturl.URL, string)
- func RetriesClient(client *http.Client, req *http.Request, opt *Params) (resp *http.Response, err error)
- func RetriesTask(taskName string, cmd *exec.Cmd, logPath string, opt *Params) (err error)
- func RetriesURL(url string, cmd *exec.Cmd, logPath string, opt *Params) (err error)
- func Rsync(url string, destFn string, opt *Params) (err error)
- func SetCmdProxyEnv(cmd *exec.Cmd, proxy, url string)
- func SetCollyProxy(c *colly.Collector, pry string, timeout int)
- func SetDefaultReqHeader(req *http.Request)
- func SetQueryFromEnd(from int, size int, total int) (int, int)
- func Wget(url string, destFn string, opt *Params) (err error)
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsyncURL ¶
AsyncURL can access URL via using external commandline tools including wget, curl, axel, git and rsync
func AsyncURL2 ¶
AsyncURL2 can access URL via using golang http library (with mbp progress bar) and external commandline tools including wget, curl, axel, git and rsync
func AsyncURL3 ¶
AsyncURL3 can access URL via using golang http library (with mbp progress bar) and external commandline tools including wget, curl, axel, git and rsync
func Egafetch ¶
Egafetch use pyega3 fetch EGA Archive files https://ega-archive.org/download/downloader-quickguide-v3#defineCredentials
func FormatURLfileName ¶
func HTTPGetURL ¶
HTTPGetURL can use golang http.Get to query URL with progress bar
func HTTPGetURLs ¶
HTTPGetURLs can use golang http.Get and external commandline tools including wget, curl, axel, git and rsync to query URL with progress bar
func NewHTTPClient ¶
NewHTTPClient create http.Client with timeout, proxy, and gCurCookieJar
func ParseOutfnFromHeader ¶
ParseOutfnFromHeader get filename from response header
func RetriesClient ¶
func RetriesClient(client *http.Client, req *http.Request, opt *Params) (resp *http.Response, err error)
RetriesClient http.Client and requenst with retries
func RetriesTask ¶
RetriesTask task with retries
func RetriesURL ¶
RetriesURL access URL with retries
func SetCmdProxyEnv ¶
SetCmdProxyEnv set downloader (shell tools) env
func SetCollyProxy ¶
SetCollyProxy set colly.Collector with proxy
func SetDefaultReqHeader ¶
SetDefaultReqHeader set default keep-alive and User-Agent header
func SetQueryFromEnd ¶
SetQueryFromEnd get from and end according to the from, size and total
Types ¶
type Params ¶
type Params struct { // go-http, wget, curl, axel, Engine string Token string EgaCredentials string Mirror string Thread int ThreadQuery int ExtraArgs string Proxy string TaskID string Quiet bool Overwrite bool Ignore bool LogDir string SaveLog bool Retries int Timeout int RetSleepTime int RemoteName bool Pbar *mpb.Progress }
Params is the type object to run bioctl net function