packagemanager

package
v3.0.0-alpha.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 7 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 Dependency

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

Dependency represents a system package that we require

type DependencyList

type DependencyList []*Dependency

DependencyList is a list of Dependency instances

func Dependencies

func Dependencies(p PackageManager) (DependencyList, error)

Dependencies scans the system for required dependencies Returns a list of dependencies 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 Dnf

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

Dnf represents the Dnf manager

func NewDnf

func NewDnf(osid string) *Dnf

NewDnf creates a new Dnf instance

func (*Dnf) InstallCommand

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

InstallCommand returns the package manager specific command to install a package

func (*Dnf) Name

func (y *Dnf) Name() string

Name returns the name of the package manager

func (*Dnf) PackageAvailable

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

PackageAvailable tests if the given package is available for installation

func (*Dnf) PackageInstalled

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

PackageInstalled tests if the given package name is installed

func (*Dnf) Packages

func (y *Dnf) Packages() Packagemap

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

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
}

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 NixPackageDetail

type NixPackageDetail struct {
	Name    string
	Pname   string
	Version string
}

type Nixpkgs

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

Nixpkgs represents the Nixpkgs manager

func NewNixpkgs

func NewNixpkgs(osid string) *Nixpkgs

NewNixpkgs creates a new Nixpkgs instance

func (*Nixpkgs) InstallCommand

func (n *Nixpkgs) InstallCommand(pkg *Package) string

InstallCommand returns the package manager specific command to install a package

func (*Nixpkgs) Name

func (n *Nixpkgs) Name() string

Name returns the name of the package manager

func (*Nixpkgs) PackageAvailable

func (n *Nixpkgs) PackageAvailable(pkg *Package) (bool, error)

PackageAvailable tests if the given package is available for installation

func (*Nixpkgs) PackageInstalled

func (n *Nixpkgs) PackageInstalled(pkg *Package) (bool, error)

PackageInstalled tests if the given package name is installed

func (*Nixpkgs) Packages

func (n *Nixpkgs) Packages() Packagemap

Packages returns the libraries 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 string
	InstallCheck   func() bool
	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 Packagemap

type Packagemap = map[string][]*Package

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