fetch

package
v0.19.7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Download

type Download struct {
	// contains filtered or unexported fields
}

Download handles direct binary releases

func (Download) Fetch

func (d Download) Fetch(ctx context.Context, dist, v string, mapper mapping.Mapper) (string, error)

Fetch gets the package and returns location of downloaded file

type Fetch

type Fetch struct {
	Type string `yaml:"type"`
	URL  string `yaml:"url"`
}

Fetch contains fetch configuration

func (Fetch) Factory

func (r Fetch) Factory() Fetcher

Factory returns instances that comply to Fecther interface

type Fetcher

type Fetcher interface {
	Fetch(ctx context.Context, dist, version string, mapper mapping.Mapper) (string, error)
}

Fetcher should implement fetching a release from a version and return a path where the release has been downloaded

Jump to

Keyboard shortcuts

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