app

package
v0.0.0-...-4d6b2f2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultBinDir

func GetDefaultBinDir() string

GetDefaultBinDir returns the bin directory

func WithBinDir

func WithBinDir(dir string) func(*App) error

WithBinDir sets the binaries directory

func WithDiscard

func WithDiscard() func(*App) error

WithDiscard sets the repository for this service

func WithLogLevel

func WithLogLevel(l string) func(*App) error

WithLogLevel sets the binaries directory

Types

type App

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

App implements the core logic

func New

func New(o ...func(*App) error) (*App, error)

New create a new app instance

func (*App) CreateShimFor

func (a *App) CreateShimFor(dist string) error

CreateShimFor creates a shim for the distribution

func (*App) Distributions

func (a *App) Distributions() error

Distributions list or update available distributions

func (*App) Execute

func (a *App) Execute(args []string)

Execute runs the shim function that executes real distributions

func (*App) GetInstalledVersionsFor

func (a *App) GetInstalledVersionsFor(dist string) []string

GetInstalledVersionsFor returns a sorted list of versionsfor distribution

func (*App) GetPackagesListWithPrefix

func (a *App) GetPackagesListWithPrefix(pfix string) []string

GetPackagesListWithPrefix returns a list of packages that starts with prefix

func (*App) GetVersionsFromCacheFor

func (a *App) GetVersionsFromCacheFor(dist string) []string

GetVersionsFromCacheFor returns a list of versions available for distribution

func (*App) GuessBestVersionFor

func (a *App) GuessBestVersionFor(dist, dir string, versions []string) string

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) Install

func (a *App) Install(dist, version string) error

Install installs or update a distribution

func (*App) Local

func (a *App) Local(distribution, version string) error

Local sets the locally used version for application

func (*App) SetBinDir

func (a *App) SetBinDir(d string) error

SetBinDir sets bin directory to use

func (*App) SetLogLevel

func (a *App) SetLogLevel(l string) error

SetLogLevel sets bin directory to use

func (*App) Uninstall

func (a *App) Uninstall(args []string) error

Uninstall removes a distribution version or the complete distribution

func (*App) Update

func (a *App) Update(which string) error

Update fetches catalog of applications and updates available versions

func (*App) Versions

func (a *App) Versions(which string) error

Versions fetches available versions for the application

type Distributions

type Distributions struct {
	Sources map[string]Sources `yaml:"sources"`
}

Distributions holds the liste of available software sources

type Sources

type Sources struct {
	// Name    string  `yaml:"name"`
	List    list.List       `yaml:"list"`
	Release release.Release `yaml:"release"`
	Install install.Install `yaml:"install"`
}

Sources contains a software source definition

Jump to

Keyboard shortcuts

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