Documentation
¶
Index ¶
- func AddPackageMapping(mapping PackageMapping) error
- func GetPackageManagerName(pmType types.PackageManagerType) string
- func GetPackageManagerType(installerInst Installer) types.PackageManagerType
- func GetPackageName(pkg string, pmType types.PackageManagerType) (string, error)
- func InstallPackage(ctx context.Context, pkg string) error
- func InstallPackages(ctx context.Context, packages []string) error
- type Installer
- type PackageMapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPackageMapping ¶
func AddPackageMapping(mapping PackageMapping) error
AddPackageMapping adds a new package mapping
func GetPackageManagerName ¶
func GetPackageManagerName(pmType types.PackageManagerType) string
GetPackageManagerName returns the display name for a package manager type
func GetPackageManagerType ¶
func GetPackageManagerType(installerInst Installer) types.PackageManagerType
GetPackageManagerType returns the PackageManagerType for a given installer
func GetPackageName ¶
func GetPackageName(pkg string, pmType types.PackageManagerType) (string, error)
GetPackageName returns the package name for a given package and package manager
func InstallPackage ¶
InstallPackage installs a package using the best available package manager
Types ¶
type Installer ¶
Installer is an alias for types.Installer for backward compatibility
func DetectPackageManager ¶
DetectPackageManager detects the best available package manager for the current system
type PackageMapping ¶
type PackageMapping struct {
Name string
Description string
Packages map[types.PackageManagerType]string
}
PackageMapping defines a mapping for a package across different package managers
func GetAllPackageMappings ¶
func GetAllPackageMappings() []PackageMapping
GetAllPackageMappings returns all package mappings
Click to show internal directories.
Click to hide internal directories.