Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHeaderRequest = errors.New("request header error") ErrSHA256Mismatch = errors.New("sha256 mismatch") ErrCreateDir = errors.New("create dir error") ErrInvalidFilePath = errors.New("file path is a directory, not a file") ErrGetFileInfo = errors.New("get file info error") ErrCopyExistsFileData = errors.New("error copying existing file data") ErrDoRequest = errors.New("error doing request") ErrFileWriting = errors.New("error writing file") ErrNewRequest = errors.New("error creating request") ErrOpenFileExists = errors.New("error opening existing file") )
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func New ¶
func New(url, filePath, sha256Sum string, opts ...Option) *Downloader
func (*Downloader) Errors ¶
func (d *Downloader) Errors() <-chan error
func (*Downloader) FileName ¶
func (d *Downloader) FileName() string
func (*Downloader) FileType ¶
func (d *Downloader) FileType() string
func (*Downloader) Start ¶
func (d *Downloader) Start(ctx context.Context)
func (*Downloader) Stats ¶
func (d *Downloader) Stats() <-chan Stats
Click to show internal directories.
Click to hide internal directories.