downloader

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(host hostActions, guest guestActions, r Request) error

Download downloads file at url and saves it in the destination.

In the implementation, the file is downloaded (and cached) on the host, but copied to the desired destination for the guest. Request.Filename must be a directory on the guest that does not require root access.

Types

type Request added in v0.6.0

type Request struct {
	URL      string // request URL
	SHA      *SHA   // shasum url
	Filename string // destination file name (absolute path)
}

Request is download request

type SHA added in v0.6.0

type SHA struct {
	URL  string // url to download the shasum file
	Size int    // one of 256 or 512
}

Jump to

Keyboard shortcuts

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