downloader

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBaseVersion

func GetBaseVersion(version string) string

GetBaseVersion removes any version prefixes (ex. "v") from version numbers

Types

type DownloadResult

type DownloadResult struct {
	RenderedURL      string
	FileExists       bool
	DownloadDuration time.Duration
}

type Downloader

type Downloader interface {
	Download() (DownloadResult, error)
	SetVersion(version string)
	GetVersion() string
	GetDownloadURL() string
	GetBinPath() string
	GetBinName() string
	GetBinBaseName() string
}

Downloader represents the Downloader type (duh)

func NewBaseDownloader

func NewBaseDownloader(url, version, name, path string) Downloader

NewBaseDownloader returns a New baseDownloader url = URL template for the download version = version to download name = name of the binary file path = where the binary file should end up

func NewHelmDownloader

func NewHelmDownloader(version string, downloadPath string) Downloader

NewHelmDownloader provides a downloader for the 'helm' command line utility

func NewKubeDownloader

func NewKubeDownloader(version string, downloadPath string) Downloader

NewKubeDownloader provides a downloader for the 'kubectl' command line utility

func NewVaultDownloader

func NewVaultDownloader(version string, downloadPath string) Downloader

NewVaultDownloader provides a downloader for the 'vault' command line utility

Jump to

Keyboard shortcuts

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