Documentation ¶
Index ¶
- Variables
- func AskConfirmation(s string) bool
- func CopyFile(src, dst string) error
- func CopyToUserTemp(path string) (string, error)
- func CreateApxTable(writer io.Writer) *tablewriter.Table
- func ExitIfOverlayTypeFS()
- func IsOverlayTypeFS() bool
- func NewDbox() (*dbox, error)
- func PkgManagerExists(name string) bool
- func RootCheck(display bool) bool
- func StackExists(name string) bool
- type Apx
- type PkgManager
- type Stack
- type SubSystem
- func (s *SubSystem) Create() error
- func (s *SubSystem) Enter() error
- func (s *SubSystem) Exec(captureOutput, detachedMode bool, args ...string) (string, error)
- func (s *SubSystem) ExportBin(binary string, exportPath string) error
- func (s *SubSystem) ExportDesktopEntries(args ...string) (int, error)
- func (s *SubSystem) ExportDesktopEntry(appName string) error
- func (s *SubSystem) Remove() error
- func (s *SubSystem) Reset() error
- func (s *SubSystem) Start() error
- func (s *SubSystem) Stop() error
- func (s *SubSystem) UnexportBin(binary string, exportPath string) error
- func (s *SubSystem) UnexportDesktopEntries(args ...string) (int, error)
- func (s *SubSystem) UnexportDesktopEntry(appName string) error
Constants ¶
This section is empty.
Variables ¶
var ProcessPath string
Functions ¶
func AskConfirmation ¶
func CopyToUserTemp ¶
func CreateApxTable ¶
func CreateApxTable(writer io.Writer) *tablewriter.Table
func ExitIfOverlayTypeFS ¶
func ExitIfOverlayTypeFS()
func IsOverlayTypeFS ¶
func IsOverlayTypeFS() bool
func PkgManagerExists ¶
PkgManagerExists checks if the package manager exists.
Types ¶
type Apx ¶
func NewStandardApx ¶
func NewStandardApx() *Apx
func (*Apx) CheckAndCreateApxStorageDirectory ¶
func (*Apx) CheckAndCreateApxUserPkgManagersDirectory ¶
func (*Apx) CheckAndCreateUserStacksDirectory ¶
func (*Apx) CheckContainerTools ¶
func (*Apx) EssentialChecks ¶
type PkgManager ¶
type PkgManager struct { // Model values: // 1: name will be used as the main command; // 2: each command is the whole command // Default: 2 // DEPRECATION WARNING: Model 1 will be removed in the future, please // update your configuration files to use model 2. Model int Name string NeedSudo bool CmdAutoRemove string CmdClean string CmdInstall string CmdList string CmdPurge string CmdRemove string CmdSearch string CmdShow string CmdUpdate string CmdUpgrade string // BuiltIn: // If true, the package manager is built-in (stored in // /usr/share/apx/pkg-managers) and cannot be removed by the user BuiltIn bool }
PkgManager represents a package manager in Apx, a set of instructions to handle a package manager.
func ListPkgManagers ¶
func ListPkgManagers() []*PkgManager
ListPkgManagers lists all the package managers.
func LoadPkgManager ¶
func LoadPkgManager(name string) (*PkgManager, error)
LoadPkgManager loads a package manager from the specified path.
func LoadPkgManagerFromPath ¶ added in v2.1.2
func LoadPkgManagerFromPath(path string) (*PkgManager, error)
LoadPkgManagerFromPath loads a package manager from the specified path.
func NewPkgManager ¶
func NewPkgManager(name string, needSudo bool, autoRemove, clean, install, list, purge, remove, search, show, update, upgrade string, builtIn bool) *PkgManager
NewPkgManager creates a new PkgManager instance.
func (*PkgManager) Export ¶ added in v2.1.2
func (pkgManager *PkgManager) Export(path string) error
Export exports the package manager to the specified path.
func (*PkgManager) GenCmd ¶
func (pkgManager *PkgManager) GenCmd(cmd string, args ...string) []string
GenCmd generates the command to run inside the container.
func (*PkgManager) Remove ¶
func (pkgManager *PkgManager) Remove() error
Remove removes the package manager from the specified path.
func (*PkgManager) Save ¶
func (pkgManager *PkgManager) Save() error
Save saves the package manager to the specified path.
type Stack ¶
type Stack struct { Name string Base string Packages []string PkgManager string BuiltIn bool // If true, the stack is built-in (stored in /usr/share/apx/stacks) and cannot be removed by the user }
Stack represents a stack in Apx, a set of instructions to build a container.
func ListStackForPkgManager ¶
ListStackForPkgManager returns a list of stacks for the specified package manager.
func LoadStackFromPath ¶
LoadStackFromPath loads a stack from the specified path.
func (*Stack) GetPkgManager ¶
func (stack *Stack) GetPkgManager() (*PkgManager, error)
GetPkgManager returns the package manager of the stack.
type SubSystem ¶
type SubSystem struct { InternalName string Name string Stack *Stack Home string Status string ExportedPrograms map[string]map[string]string HasInit bool IsManaged bool IsRootfull bool HasNvidiaIntegration bool }