downloader

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory added in v0.4.0

type Factory func() Interface

Factory is a function that returns a new downloader.

type Interface

type Interface interface {
	// DownloadContext downloads the resource as specified in url, and it accepts
	// a context parameter so that it can handle timeouts correctly.
	DownloadContext(ctx context.Context, url string, header map[string][]string, name string) (string, error)
}

Interface specifies on how an plugin can download a file.

type Stream added in v1.0.1

type Stream interface {
	// DownloadContext downloads the resource as specified in url, and it accepts
	// a context parameter so that it can handle timeouts correctly.
	DownloadStreamContext(ctx context.Context, url string, header map[string][]string, name string) (io.Reader, error)
}

type StreamFactory added in v1.0.1

type StreamFactory func() Stream

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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