fetch

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 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"`
	TokenEnv string `yaml:"token_env"`
}

Fetch contains fetch configuration

func (Fetch) Factory

func (r Fetch) Factory() (Fetcher, error)

Factory returns instances that comply to Fetcher 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