downloader

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackDownloader

type BackDownloader struct {
	// URL is the source url of the file to download.
	URL string

	// Target is the full target path.
	Target string

	// Md5 is the expected file md5 to prevent files from being tampered with.
	Md5 string

	// TaskID a string which represents a unique task.
	TaskID string
	// contains filtered or unexported fields
}

BackDownloader downloads the file from file resource.

func NewBackDownloader

func NewBackDownloader(cfg *config.Config, result *regist.RegisterResult) *BackDownloader

NewBackDownloader create BackDownloader

func (*BackDownloader) Cleanup

func (bd *BackDownloader) Cleanup()

Cleanup clean all temporary resources generated by executing Run.

func (*BackDownloader) Run

func (bd *BackDownloader) Run() error

Run starts to download the file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL