download

package
v0.6.19 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download added in v0.6.0

func Download[T artifact.Artifact](
	ctx context.Context,
	a T,
	out string,
) (artifact.Local[T], error)

Download uses the provided mirror to download the specified artifact and returns an 'artifact.Local' wrapper pointing to it.

func ExecutableWithChecksumValidation

func ExecutableWithChecksumValidation(
	ctx context.Context,
	ex executable.Executable,
	out string,
) (artifact.Local[executable.Archive], error)

ExecutableWithChecksumValidation downloads an executable archive and validates that its checksum matches the published value.

func SourceWithChecksumValidation

func SourceWithChecksumValidation(
	ctx context.Context,
	v version.Version,
	out string,
) (artifact.Local[source.Archive], error)

SourceWithChecksumValidation downloads a source code archive and validates that its checksum matches the published value.

func WithProgress added in v0.6.0

func WithProgress[T artifact.Artifact](
	ctx context.Context,
	p *progress.Progress,
) context.Context

WithProgress creates a sub-context with an associated progress reporter. The result can be passed to download functions in this package to get updates on the download progress for that specific artifact.

Types

This section is empty.

Jump to

Keyboard shortcuts

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