os

package
v0.0.97 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package os provides a generic installer for all platforms. See the different native packages in the sub-packages, such as: apt, apk, brew etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenericInstallerRegistry added in v0.0.63

func GenericInstallerRegistry(configFile string, registry core.InstallerRegistry) (err error)

GenericInstallerRegistry registries a generic installer

func GetInstallers

func GetInstallers(name string) (installers []core.Installer, ok bool)

GetInstallers returns all the installers belong to a package

func HasPackage

func HasPackage(name string) bool

HasPackage finds if the target package installer exist

func InstallWithProxy added in v0.0.71

func InstallWithProxy(name string, proxy map[string]string) (err error)

InstallWithProxy installs a package with name

func SearchPackages added in v0.0.82

func SearchPackages(keyword string) (pkgs []string)

SearchPackages searches the packages by keyword

func Uninstall

func Uninstall(name string) (err error)

Uninstall uninstalls a package with name

Types

type CmdWithArgs added in v0.0.63

type CmdWithArgs struct {
	Cmd        string   `yaml:"cmd"`
	Args       []string `yaml:"args"`
	SystemCall bool     `yaml:"systemCall"`
	WriteTo    *WriteTo `yaml:"writeTo"`
}

CmdWithArgs is a command with arguments

type DefaultInstallerRegistry

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

DefaultInstallerRegistry is the default installer registry

func (*DefaultInstallerRegistry) Registry

func (r *DefaultInstallerRegistry) Registry(name string, installer core.Installer)

Registry registries a DockerInstaller

type WriteTo added in v0.0.77

type WriteTo struct {
	File    string
	Mod     string
	Content string
	When    string
	// contains filtered or unexported fields
}

WriteTo represents the task to write content to file

func (*WriteTo) Should added in v0.0.80

func (w *WriteTo) Should() (ok bool, err error)

Should eval the "when" expr, then return bool value. Return true if the "when" expr is empty. See also https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md

func (*WriteTo) Write added in v0.0.77

func (w *WriteTo) Write() (err error)

Write writes content to file

Directories

Path Synopsis
Package apk provides the common functions to install a package via apk.
Package apk provides the common functions to install a package via apk.
Package apt provides the common functions to install a package via apt.
Package apt provides the common functions to install a package via apt.
Package brew provides the common functions to install a package via brew.
Package brew provides the common functions to install a package via brew.
Package core provides the core structs about the os-related package manager.
Package core provides the core structs about the os-related package manager.
Package dnf provides the common function of dnf package manager.
Package dnf provides the common function of dnf package manager.
Package docker provides the way to install a package via docker CLI.
Package docker provides the way to install a package via docker CLI.
Package fake provides functions for unit test.
Package fake provides functions for unit test.
Package generic provides the generic packge installation.
Package generic provides the generic packge installation.
Package npm provides the common usage of npm.
Package npm provides the common usage of npm.
Package scoop implements the scoop integration
Package scoop implements the scoop integration
Package snap provides the common usage of snap package manager.
Package snap provides the common usage of snap package manager.
Package winget implements the winget integration
Package winget implements the winget integration
Package yum provides the common usage of yum package manager.
Package yum provides the common usage of yum package manager.

Jump to

Keyboard shortcuts

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