installer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchiveType

type ArchiveType string
const (
	ArchiveTypeRaw ArchiveType = ""
	ArchiveTypeZip ArchiveType = "zip"
)

type InstallConfig

type InstallConfig struct {
	TargetUrl        string
	TargetVersion    string
	TargetPath       string
	TargetBinaryName string
}

type InstallOption

type InstallOption struct {
}

type InstallType

type InstallType string
const (
	InstallTypeGoInstall        InstallType = "go_install"
	InstallTypeGitHubReleaseZip InstallType = "github_release_zip"
)

type Installer

type Installer interface {
	Install(ctx context.Context, options ...InstallOption) error
	SetVersion(version string)
}

func NewInstaller

func NewInstaller(installType InstallType, installConfig InstallConfig) Installer

type InstallerGithubReleaseZip

type InstallerGithubReleaseZip struct {
	InstallType   InstallType
	InstallConfig InstallConfig
	ArchMatcher   map[string]string
}

func NewInstallerGithubReleaseZip

func NewInstallerGithubReleaseZip(installType InstallType, installConfig InstallConfig, archMatcher map[string]string) *InstallerGithubReleaseZip

func (*InstallerGithubReleaseZip) Install

func (i *InstallerGithubReleaseZip) Install(ctx context.Context, options ...InstallOption) error

func (*InstallerGithubReleaseZip) SetVersion

func (i *InstallerGithubReleaseZip) SetVersion(version string)

type InstallerGoInstall

type InstallerGoInstall struct {
	InstallType   InstallType
	InstallConfig InstallConfig
}

func NewInstallerGoInstall

func NewInstallerGoInstall(installType InstallType, installConfig InstallConfig) *InstallerGoInstall

func (*InstallerGoInstall) Install

func (i *InstallerGoInstall) Install(ctx context.Context, options ...InstallOption) error

func (*InstallerGoInstall) SetVersion

func (i *InstallerGoInstall) SetVersion(version string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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