packagemanager

package
v2.0.0-alpha.40 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppVersion

func AppVersion(name string) string

AppVersion returns the version for application related to the given package

Types

type Apt

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

Apt represents the Apt manager

func NewApt

func NewApt(osid string) *Apt

NewApt creates a new Apt instance

func (*Apt) InstallCommand

func (a *Apt) InstallCommand(pkg *Package) string

InstallCommand returns the package manager specific command to install a package

func (*Apt) Name

func (a *Apt) Name() string

Name returns the name of the package manager

func (*Apt) PackageAvailable

func (a *Apt) PackageAvailable(pkg *Package) (bool, error)

PackageAvailable tests if the given package is available for installation

func (*Apt) PackageInstalled

func (a *Apt) PackageInstalled(pkg *Package) (bool, error)

PackageInstalled tests if the given package name is installed

func (*Apt) Packages

func (a *Apt) Packages() packagemap

Packages returns the libraries that we need for Wails to compile They will potentially differ on different distributions or versions

type Dependancy

type Dependancy struct {
	Name           string
	PackageName    string
	Installed      bool
	InstallCommand string
	Version        string
	Optional       bool
	External       bool
}

Dependancy represents a system package that we require

type DependencyList

type DependencyList []*Dependancy

DependencyList is a list of Dependency instances

func Dependancies

func Dependancies(p PackageManager) (DependencyList, error)

Dependancies scans the system for required dependancies Returns a list of dependancies search for, whether they were found and whether they were installed

func (DependencyList) InstallAllOptionalCommand

func (d DependencyList) InstallAllOptionalCommand() string

InstallAllOptionalCommand returns the command you need to use to install all optional dependencies

func (DependencyList) InstallAllRequiredCommand

func (d DependencyList) InstallAllRequiredCommand() string

InstallAllRequiredCommand returns the command you need to use to install all required dependencies

type Emerge

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

Emerge represents the Emerge package manager

func NewEmerge

func NewEmerge(osid string) *Emerge

NewEmerge creates a new Emerge instance

func (*Emerge) InstallCommand

func (e *Emerge) InstallCommand(pkg *Package) string

InstallCommand returns the package manager specific command to install a package

func (*Emerge) Name

func (e *Emerge) Name() string

Name returns the name of the package manager

func (*Emerge) PackageAvailable

func (e *Emerge) PackageAvailable(pkg *Package) (bool, error)

PackageAvailable tests if the given package is available for installation

func (*Emerge) PackageInstalled

func (e *Emerge) PackageInstalled(pkg *Package) (bool, error)

PackageInstalled tests if the given package name is installed

func (*Emerge) Packages

func (e *Emerge) Packages() packagemap

Packages returns the libraries that we need for Wails to compile They will potentially differ on different distributions or versions

type Eopkg

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

Eopkg represents the Eopkg manager

func NewEopkg

func NewEopkg(osid string) *Eopkg

NewEopkg creates a new Eopkg instance

func (*Eopkg) InstallCommand

func (e *Eopkg) InstallCommand(pkg *Package) string

InstallCommand returns the package manager specific command to install a package

func (*Eopkg) Name

func (e *Eopkg) Name() string

Name returns the name of the package manager

func (*Eopkg) PackageAvailable

func (e *Eopkg) PackageAvailable(pkg *Package) (bool, error)

PackageAvailable tests if the given package is available for installation

func (*Eopkg) PackageInstalled

func (e *Eopkg) PackageInstalled(pkg *Package) (bool, error)

PackageInstalled tests if the given package is installed

func (*Eopkg) Packages

func (e *Eopkg) Packages() packagemap

Packages returns the packages that we need for Wails to compile They will potentially differ on different distributions or versions

type Package

type Package struct {
	Name           string
	Version        string
	InstallCommand map[string]string
	SystemPackage  bool
	Library        bool
	Optional       bool
}

Package contains information about a system package

type PackageManager

type PackageManager interface {
	Name() string
	Packages() packagemap
	PackageInstalled(*Package) (bool, error)
	PackageAvailable(*Package) (bool, error)
	InstallCommand(*Package) string
}

PackageManager is a common interface across all package managers

func Find

func Find(osid string) PackageManager

Find will attempt to find the system package manager

type Pacman

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

Pacman represents the Pacman package manager

func NewPacman

func NewPacman(osid string) *Pacman

NewPacman creates a new Pacman instance

func (*Pacman) InstallCommand

func (p *Pacman) InstallCommand(pkg *Package) string

InstallCommand returns the package manager specific command to install a package

func (*Pacman) Name

func (p *Pacman) Name() string

Name returns the name of the package manager

func (*Pacman) PackageAvailable

func (p *Pacman) PackageAvailable(pkg *Package) (bool, error)

PackageAvailable tests if the given package is available for installation

func (*Pacman) PackageInstalled

func (p *Pacman) PackageInstalled(pkg *Package) (bool, error)

PackageInstalled tests if the given package name is installed

func (*Pacman) Packages

func (p *Pacman) Packages() packagemap

Packages returns the libraries that we need for Wails to compile They will potentially differ on different distributions or versions

type Yum

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

Yum represents the Yum manager

func NewYum

func NewYum(osid string) *Yum

NewYum creates a new Yum instance

func (*Yum) InstallCommand

func (y *Yum) InstallCommand(pkg *Package) string

InstallCommand returns the package manager specific command to install a package

func (*Yum) Name

func (y *Yum) Name() string

Name returns the name of the package manager

func (*Yum) PackageAvailable

func (y *Yum) PackageAvailable(pkg *Package) (bool, error)

PackageAvailable tests if the given package is available for installation

func (*Yum) PackageInstalled

func (y *Yum) PackageInstalled(pkg *Package) (bool, error)

PackageInstalled tests if the given package name is installed

func (*Yum) Packages

func (y *Yum) Packages() packagemap

Packages returns the libraries that we need for Wails to compile They will potentially differ on different distributions or versions

type Zypper

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

Zypper represents the Zypper package manager

func NewZypper

func NewZypper(osid string) *Zypper

NewZypper creates a new Zypper instance

func (*Zypper) InstallCommand

func (z *Zypper) InstallCommand(pkg *Package) string

InstallCommand returns the package manager specific command to install a package

func (*Zypper) Name

func (z *Zypper) Name() string

Name returns the name of the package manager

func (*Zypper) PackageAvailable

func (z *Zypper) PackageAvailable(pkg *Package) (bool, error)

PackageAvailable tests if the given package is available for installation

func (*Zypper) PackageInstalled

func (z *Zypper) PackageInstalled(pkg *Package) (bool, error)

PackageInstalled tests if the given package name is installed

func (*Zypper) Packages

func (z *Zypper) Packages() packagemap

Packages returns the libraries that we need for Wails to compile They will potentially differ on different distributions or versions

Jump to

Keyboard shortcuts

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