download

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2016 License: Apache-2.0 Imports: 9 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) 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 {
	// contains filtered or unexported fields
}

func New

func New(httpClient httpClient, ranger ranger, bar bar) Client

func (Client) Get

func (c Client) Get(
	location *os.File,
	contentURL string,
	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

Jump to

Keyboard shortcuts

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