installation

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIsAlreadyInstalled = errors.New("can't install, the newest version is already installed")
	ErrIsNotInstalled     = errors.New("plugin is not installed")
	ErrIsAlreadyUpgraded  = errors.New("can't upgrade, the newest version is already installed")
)

Plugin Lifecycle Errors

Functions

func GetMatchingPlatform

func GetMatchingPlatform(p index.Plugin) (index.Platform, bool, error)

GetMatchingPlatform finds the platform spec in the specified plugin that matches the OS/arch of the current machine (can be overridden via KREW_OS and/or KREW_ARCH).

func Install

func Install(p environment.Paths, plugin index.Plugin, forceHEAD bool, forceDownloadFile string) error

Install will download and install a plugin. The operation tries to not get the plugin dir in a bad state if it fails during the process.

func ListInstalledPlugins

func ListInstalledPlugins(installDir, binDir string) (map[string]string, error)

ListInstalledPlugins returns a list of all name:version for all plugins.

func Remove

func Remove(p environment.Paths, name string) error

Remove will remove a plugin.

func Upgrade

func Upgrade(p environment.Paths, plugin index.Plugin) error

Upgrade will reinstall and delete the old plugin. The operation tries to not get the plugin dir in a bad state if it fails during the process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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