Documentation
¶
Index ¶
- func GetHttpByte(url string) ([]byte, error)
- func GetHttpJson(url string, model any) (interface{}, error)
- func GetHttpString(url string) (string, error)
- func SHA512sum(filename string) (string, error)
- func TMI(item interface{}) map[string]interface{}
- type Downloader
- func (d *Downloader) Download(url string, dest string, percentFunc func(float64, int64, int64), ...) error
- func (d *Downloader) SendDone(path string, total int64, duration time.Duration)
- func (d *Downloader) SendDownloadPercent(percent func(float64, int64, int64), path string, total int64)
- func (d *Downloader) SendPerc(perc float64, received int64, total int64)
- func (d *Downloader) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHttpByte ¶
func GetHttpJson ¶
func GetHttpString ¶
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func StartDownload ¶
func (*Downloader) SendDone ¶
func (d *Downloader) SendDone(path string, total int64, duration time.Duration)
func (*Downloader) SendDownloadPercent ¶
func (*Downloader) SendPerc ¶
func (d *Downloader) SendPerc(perc float64, received int64, total int64)
func (*Downloader) Wait ¶
func (d *Downloader) Wait()
Click to show internal directories.
Click to hide internal directories.