download

package
v0.0.48 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2017 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 Bar

type Bar struct {
	*pb.ProgressBar
}

func NewBar

func NewBar() Bar

func (Bar) Kickoff

func (b Bar) Kickoff()

func (Bar) NewProxyReader added in v0.0.39

func (b Bar) NewProxyReader(reader io.Reader) io.Reader

func (Bar) SetOutput added in v0.0.37

func (b Bar) SetOutput(output io.Writer)

func (Bar) SetTotal

func (b Bar) SetTotal(contentLength int64)

type Client

type Client struct {
	HTTPClient httpClient
	Ranger     ranger
	Bar        bar
	Logger     logger.Logger
}

func (Client) Get

func (c Client) Get(
	location *os.File,
	downloadLinkFetcher downloadLinkFetcher,
	progressWriter io.Writer,
) error

type Range

type Range struct {
	Lower      int64
	Upper      int64
	HTTPHeader http.Header
}

type Ranger

type Ranger struct {
	// contains filtered or unexported fields
}

func NewRanger

func NewRanger(hunks int) Ranger

func (Ranger) BuildRange

func (r Ranger) BuildRange(contentLength int64) ([]Range, error)

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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