pkgmgr

package
v0.123.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HomebrewPackageManager

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

HomebrewPackageManager detects if a binary was installed via Homebrew

func (*HomebrewPackageManager) IsInstalled

func (h *HomebrewPackageManager) IsInstalled() (bool, error)

IsInstalled checks if the formula is installed via Homebrew

func (*HomebrewPackageManager) Name

func (h *HomebrewPackageManager) Name() string

Name returns the human-readable name of the package manager

func (*HomebrewPackageManager) UpgradeCommand

func (h *HomebrewPackageManager) UpgradeCommand() string

UpgradeCommand returns the command to upgrade the package

type KrewPackageManager

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

KrewPackageManager detects if a binary was installed via kubectl krew

func (*KrewPackageManager) IsInstalled

func (k *KrewPackageManager) IsInstalled() (bool, error)

IsInstalled checks if the plugin is installed via krew

func (*KrewPackageManager) Name

func (k *KrewPackageManager) Name() string

Name returns the human-readable name of the package manager

func (*KrewPackageManager) UpgradeCommand

func (k *KrewPackageManager) UpgradeCommand() string

UpgradeCommand returns the command to upgrade the plugin

type PackageManager

type PackageManager interface {
	// IsInstalled returns true if the package/formula is installed via this package manager
	IsInstalled() (bool, error)
	// UpgradeCommand returns the command the user should run to upgrade
	UpgradeCommand() string
	// Name returns the human-readable name of the package manager
	Name() string
}

PackageManager represents an external package manager that can manage the binary

func NewHomebrewPackageManager

func NewHomebrewPackageManager(formula string) PackageManager

NewHomebrewPackageManager creates a new Homebrew package manager detector

func NewKrewPackageManager

func NewKrewPackageManager(pluginName string) PackageManager

NewKrewPackageManager creates a new Krew package manager detector

Jump to

Keyboard shortcuts

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