Documentation ¶
Index ¶
- type Fetcher
- func (that *Fetcher) DownloadAndDecompress(localPath, dstDir string, force ...bool) error
- func (that *Fetcher) Get() (r *resty.Response)
- func (that *Fetcher) GetAndSaveFile(localPath string, force ...bool) (size int64)
- func (that *Fetcher) GetFile(localPath string, force ...bool) (size int64)
- func (that *Fetcher) GetString() (result string, statusCode int)
- func (that *Fetcher) Post() (r *resty.Response)
- func (that *Fetcher) RemoveProxy()
- func (that *Fetcher) SetCheckSum(checkSum, checkSumType string)
- func (that *Fetcher) SetProxyEnvName(name string)
- func (that *Fetcher) SetThreadNum(num int)
- func (that *Fetcher) SetUrl(url string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher struct { Url string PostBody map[string]interface{} Timeout time.Duration RetryTimes int Headers map[string]string Proxy string NoRedirect bool // contains filtered or unexported fields }
func NewFetcher ¶
func NewFetcher() *Fetcher
func (*Fetcher) DownloadAndDecompress ¶ added in v0.2.3
func (*Fetcher) GetAndSaveFile ¶
func (*Fetcher) RemoveProxy ¶
func (that *Fetcher) RemoveProxy()
func (*Fetcher) SetCheckSum ¶ added in v0.2.3
func (*Fetcher) SetProxyEnvName ¶
func (*Fetcher) SetThreadNum ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.