Documentation ¶
Index ¶
- Variables
- func GetDefaultBinDir() string
- func WithBinDir(dir string) func(*App) error
- func WithDiscard() func(*App) error
- func WithLogLevel(l string) func(*App) error
- type App
- func (a *App) CreateShimFor(dist string) error
- 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 string, versions []string) (string, string)
- func (a *App) Install(specs ...string) error
- func (a *App) Local(distribution, version string) error
- func (a *App) SetBinDir(d string) error
- func (a *App) SetLogLevel(l string) error
- func (a *App) Uninstall(specs ...string) error
- func (a *App) Update(definitions, all bool, which ...string) error
- func (a *App) Versions(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 WithBinDir ¶
WithBinDir sets the binaries directory
func WithDiscard ¶
WithDiscard sets the repository for this service
func WithLogLevel ¶
WithLogLevel sets the binaries directory
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) 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) SetLogLevel ¶
SetLogLevel sets bin directory to use
type Distributions ¶
Distributions holds the liste of available software sources