download

package
v0.0.0-...-e18b250 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Download

type Download struct {
	Filename string
	Filesize int64

	Done      chan struct{}
	StartTime time.Time
	End       time.Time

	CanResume bool
	DidResume bool
	// contains filtered or unexported fields
}

func NewDownload

func NewDownload(response *http.Response) (*Download, error)

func (*Download) BytesPerSecond

func (d *Download) BytesPerSecond() float64

func (*Download) Duration

func (d *Download) Duration() time.Duration

func (*Download) IsComplete

func (d *Download) IsComplete() bool

func (*Download) Progress

func (d *Download) Progress() float64

func (*Download) Start

func (download *Download) Start(writer io.Writer) (err error)

func (*Download) Written

func (d *Download) Written() int64

type Downloader

type Downloader struct {
	Download map[game.Game]*Download
}

func (*Downloader) Games

func (d *Downloader) Games() (keyList []game.Game)

func (*Downloader) IsDownloading

func (d *Downloader) IsDownloading(game game.Game) bool

Jump to

Keyboard shortcuts

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