packs

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Installer

type Installer interface {
	Accept(ic *InstallingContext) bool

	Install(ic *InstallingContext) error

	Uninstall(ic *InstallingContext) error
}

Installer 表示一个软件包安装器

type InstallerRegistration

type InstallerRegistration struct {
	Installer Installer
}

InstallerRegistration 表示一个软件包安装器注册信息

type InstallerRegistry

type InstallerRegistry interface {
	GetInstallerRegistration() *InstallerRegistration
}

InstallerRegistry 表示一个软件包安装器注册器 [inject:".packs.InstallerRegistry"]

type InstallingContext

type InstallingContext struct {
	Context context.Context

	Action       string // [install|uninstall|upgrade|re-install]
	PackType     string
	Installation dxo.InstallationID

	Root     afs.Path // 系统根文件夹,不同的系统上具体位置可能不同
	PackDir  afs.Path // 解压后的包文件夹路径
	PackFile afs.Path // 压缩包文件的路径

	Pack *dto.SoftwarePackage
}

InstallingContext 表示一个正在执行的安装任务

func (*InstallingContext) String

func (inst *InstallingContext) String() string

type Manager

type Manager interface {
	GetInstaller(ic *InstallingContext) (Installer, error)

	Install(c context.Context, pid dxo.SoftwarePackageID) error

	Uninstall(c context.Context, pid dxo.SoftwarePackageID) error
}

Manager 表示软件包管理器 [inject:"#packs.Manager"]

Jump to

Keyboard shortcuts

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