Documentation ¶
Index ¶
- Variables
- func GetDefaultBinDir() string
- func GetDefaultCacheDir() string
- func GetDefaultConfDir() string
- func GetDefaultLinkDir() string
- func WithDiscard() func(*App) error
- type App
- func (a *App) CreateShimFor(dist string) error
- func (a *App) DumpConfig()
- func (a *App) Execute(args []string)
- func (a *App) GetAvailableVersionsFor(dist string) []string
- func (a *App) GetInstalledVersionsFor(dist string) []string
- func (a *App) GetMostRecent(dist string) string
- func (a *App) GetPackagesListWithPrefix(pfix string) []string
- func (a *App) GuessBestVersionFor(dist, dir, stop string, versions []string) (string, string)
- func (a *App) GuessBestVersionFor2(dist, dir string, versions []string) (string, string)
- func (a *App) Install(specs ...string) error
- func (a *App) InstallFromLock() error
- func (a *App) Local(distribution, version string) error
- func (a *App) Search(pfix string, wide bool) []string
- func (a *App) SetBinDir(d string) error
- func (a *App) SetCacheDir(d string) error
- func (a *App) SetConcurrency(c int)
- func (a *App) SetConfigDir(d string) error
- func (a *App) SetDryRun(v bool)
- func (a *App) SetFlag(name string, value bool)
- func (a *App) SetGlobal(g bool)
- func (a *App) SetLinkDir(d string) error
- func (a *App) SetLogLevel(l string) error
- func (a *App) SetVerbose(v bool)
- func (a *App) Uninstall(specs ...string) error
- func (a *App) Update(definitions, all bool, nocache bool, which ...string) error
- func (a *App) Upgrade(ignoreInstallErrors bool) error
- func (a *App) Versions(freezemode bool, specs ...string) error
- type Distributions
- type Sources
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAlreadyInstalled is returned when the requested version is already installed ErrAlreadyInstalled = errors.New("version already installed") )
Functions ¶
func GetDefaultBinDir ¶
func GetDefaultBinDir() string
GetDefaultBinDir returns the bin directory in usermode
func GetDefaultCacheDir ¶ added in v0.19.0
func GetDefaultCacheDir() string
GetDefaultCacheDir returns the cache directory in usermode
func GetDefaultConfDir ¶ added in v0.19.0
func GetDefaultConfDir() string
GetDefaultConfDir returns the config directory in usermode
func GetDefaultLinkDir ¶ added in v0.19.0
func GetDefaultLinkDir() string
GetDefaultLinkDir returns the bin directory in usermode
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App implements the core logic
func (*App) CreateShimFor ¶
CreateShimFor creates a shim for the distribution
func (*App) DumpConfig ¶ added in v0.19.0
func (a *App) DumpConfig()
DumpConfig dumps the configuration to stdout
func (*App) GetAvailableVersionsFor ¶
GetAvailableVersionsFor returns a list of versions available for distribution
func (*App) GetInstalledVersionsFor ¶
GetInstalledVersionsFor returns a sorted list of versionsfor distribution
func (*App) GetMostRecent ¶
GetMostRecent returns the most recent stable available version
func (*App) GetPackagesListWithPrefix ¶
GetPackagesListWithPrefix returns a list of packages that starts with prefix
func (*App) GuessBestVersionFor ¶
GuessBestVersionFor returns closest version requirement given a location, a distribution and a version list. If no match we return the latest version we have
func (*App) GuessBestVersionFor2 ¶ added in v0.2.16
GuessBestVersionFor2 returns closest version requirement given a location, a distribution and a version list. If no match we return the latest version we have
func (*App) InstallFromLock ¶ added in v0.2.15
InstallFromLock install distributions/versions to match the local .binenv.lock file
func (*App) Search ¶ added in v0.8.0
Search show a list returns a list of packages contains string in name or description
func (*App) SetCacheDir ¶ added in v0.19.0
SetCacheDir sets cache directory to use
func (*App) SetConcurrency ¶ added in v0.14.0
SetConcurrency sets the number of goroutines for cache update
func (*App) SetConfigDir ¶ added in v0.19.0
SetConfigDir sets config directory to use
func (*App) SetLinkDir ¶ added in v0.19.0
SetLinkDir sets link directory to use
func (*App) SetLogLevel ¶
SetLogLevel sets the log level to use
func (*App) SetVerbose ¶ added in v0.2.14
SetVerbose sets the log level to debug
type Distributions ¶
Distributions holds the liste of available software sources
type Sources ¶
type Sources struct { // Name string `yaml:"name"` Description string `yaml:"description"` URL string `yaml:"url"` Map mapping.Remapper `yaml:"map"` List list.List `yaml:"list"` Fetch fetch.Fetch `yaml:"fetch"` Install install.Install `yaml:"install"` PostInstallMessage string `yaml:"post_install_message"` SupportedPlatforms []platform.Platform `yaml:"supported_platforms"` }
Sources contains a software source definition