justinstall

package
v3.4.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2019 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanTempDir

func CleanTempDir() error

func CustomGet

func CustomGet(urlStr string, timeout ...time.Duration) (*http.Response, error)

func SetArchitecture

func SetArchitecture(a string) error

SetArchitecture changes the architecture of future package installations.

Types

type Registry

type Registry struct {
	Version  int
	Packages map[string]RegistryEntry
}

Registry is a list of packages that just-install knows how to install.

func LoadRegistry

func LoadRegistry(path string) Registry

LoadRegistry unmarshals the registry from a local file path.

func SmartLoadRegistry

func SmartLoadRegistry(force bool) Registry

SmartLoadRegistry tries to load a cached copy downloaded from the Internet. If neither is available, it tries to download it from the known location first.

func (*Registry) SortedPackageNames

func (r *Registry) SortedPackageNames() []string

SortedPackageNames returns the list of packages present in the registry, sorted alphabetically.

type RegistryEntry

type RegistryEntry struct {
	Version   string
	Installer installerEntry
}

RegistryEntry is a single entry in the just-install registry.

func (*RegistryEntry) CreateShims

func (e *RegistryEntry) CreateShims()

func (*RegistryEntry) DownloadInstaller

func (e *RegistryEntry) DownloadInstaller(force bool) string

DownloadInstaller downloads the installer for the current entry in the temporary directory.

func (*RegistryEntry) ExpandString

func (e *RegistryEntry) ExpandString(s string) string

func (*RegistryEntry) JustInstall

func (e *RegistryEntry) JustInstall(force bool)

JustInstall will download and install the given registry entry. Setting `force` to true will force a re-download and re-installation the package.

Jump to

Keyboard shortcuts

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