Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader is responsible for fetching, verifying and extracting a binary.
func NewDownloader ¶
func NewDownloader(v Verifier, f Fetcher) Downloader
NewDownloader builds a new Downloader.
func (Downloader) Get ¶
func (d Downloader) Get(uri, dst string) error
Get pulls the uri and verifies it. On success, the download gets extracted into dst.
type Fetcher ¶
type Fetcher interface { // Get gets the file and returns an stream to read the file. Get(uri string) (io.ReadCloser, error) }
Fetcher is used to get files from a URI.
func NewFileFetcher ¶
NewFileFetcher returns a local file reader.
type HTTPFetcher ¶
type HTTPFetcher struct{}
HTTPFetcher is used to get a file from a http:// or https:// schema path.
func (HTTPFetcher) Get ¶
func (HTTPFetcher) Get(uri string) (io.ReadCloser, error)
Get gets the file and returns an stream to read the file.
Click to show internal directories.
Click to hide internal directories.