download

package
v0.0.0-...-919b350 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNon200StatusCode is returned by Downloader.Download calls when server returns an error code different than 200.
	ErrNon200StatusCode = fmt.Errorf("server did not return status code 200")

	// ErrFileIsTooBig is returned by Downloader.Download calls when requested file size is too big.
	ErrFileIsTooBig = fmt.Errorf("file is too big")
)

Functions

This section is empty.

Types

type Downloader

type Downloader interface {
	Download(ctx context.Context, url string) (io.ReadCloser, error)
}

Downloader initiates a download of a resource specified by url parameter.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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