pkg

package
v0.0.0-...-4fcfde4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type DownloadInstaller

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

func NewDownloadInstaller

func NewDownloadInstaller(downloadUrlTemplate string, ctx context.Context) (*DownloadInstaller, error)

func (*DownloadInstaller) Available

func (d *DownloadInstaller) Available() bool

func (*DownloadInstaller) DownloadUrl

func (d *DownloadInstaller) DownloadUrl(version string) string

func (*DownloadInstaller) Install

func (d *DownloadInstaller) Install(version string, dstPath string) error

type Env

type Env struct {
	Installer
	// contains filtered or unexported fields
}

func NewEnv

func NewEnv(homeDir, name, binaryName string, installer Installer) *Env

func (*Env) BinaryName

func (env *Env) BinaryName() string

func (*Env) CurrentBinaryPath

func (env *Env) CurrentBinaryPath() (*string, error)

func (*Env) CurrentVersion

func (env *Env) CurrentVersion() (*string, error)

func (*Env) Install

func (env *Env) Install(version string) error

func (*Env) Installed

func (env *Env) Installed(version string) (bool, error)

func (*Env) ListInstalled

func (env *Env) ListInstalled() ([]string, error)

func (*Env) Name

func (env *Env) Name() string

func (*Env) Uninstall

func (env *Env) Uninstall(version string) error

func (*Env) Use

func (env *Env) Use(version string) error

type GoBuildInstaller

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

func (*GoBuildInstaller) Available

func (g *GoBuildInstaller) Available() bool

func (*GoBuildInstaller) Install

func (g *GoBuildInstaller) Install(version string, dstPath string) error

type Installer

type Installer interface {
	Install(version string, dstPath string) error
	Available() bool
}

func NewFallbackInstaller

func NewFallbackInstaller(i1 Installer, i2 Installer) Installer

func NewGoBuildInstaller

func NewGoBuildInstaller(repoUrl string, binaryName string, subPath string, ctx context.Context) Installer

type Profile

type Profile struct {
	Version *string `json:"version"`
}

Jump to

Keyboard shortcuts

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