download

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT 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 {
	Downloading, Extracting *mpb.Bar
}

type Download

type Download struct {
	Name, Url     string
	ContentLength int64
	Path          *Path
	Progress      *mpb.Progress
	Bar           *Bar
}

func NewDownload

func NewDownload(
	_manager *manager.Manager,
) (*Download, error)

Returns a Download instance. The Download instance is used to download and extract the associated file.

func (*Download) DownloadAndShowProgress

func (d *Download) DownloadAndShowProgress() error

Downloads the associated file to the URL and shows progress.

func (*Download) ExtractAndShowProgress

func (d *Download) ExtractAndShowProgress() error

Extracts the zip file associated and shows progress.

func (*Download) ProgressShutdown

func (d *Download) ProgressShutdown()

Shuts down the progress bar.

func (*Download) RemoveZip

func (d *Download) RemoveZip() error

Removes the associated zip file from the filesystem.

type Path

type Path struct {
	Zip        string
	Executable string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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