Documentation
¶
Index ¶
- Constants
- func SetManager(mgr Manager)
- type Applicable
- type Application
- type BashFS
- type CheckError
- type Checker
- type ConfigurationCleaner
- type ConfigurationLoader
- type Configurator
- type Controller
- type Info
- type Installer
- type Logger
- type Manager
- type Required
- type Status
- type Type
- type VersionInstaller
Constants ¶
View Source
const ( StatusUnknown Status = iota StatusStarted = 10 StatusStarting = 11 StatusStopped = 20 StatusStopping = 21 )
Variables ¶
This section is empty.
Functions ¶
func SetManager ¶
func SetManager(mgr Manager)
Types ¶
type Applicable ¶
type Applicable interface {
Checker
Installer
Controller
Configurator
Logger
}
func NewApplication ¶
func NewApplication(checker Checker, installer Installer, controller Controller, configurator Configurator, logger Logger) Applicable
type Application ¶
type Application struct {
Checker
Installer
Controller
Configurator
Logger
}
type CheckError ¶
func (*CheckError) Error ¶
func (c *CheckError) Error() string
type ConfigurationCleaner ¶
type ConfigurationCleaner interface {
Clean() (err error)
}
type ConfigurationLoader ¶
type Configurator ¶
type Configurator interface {
Configure(m map[string]any) (err error)
ConfigurationLoader
ConfigurationCleaner
}
type Controller ¶
type Info ¶
type Info struct {
AppName string // Nginx 1.22.1
Name string // nginx
Version string // 1.22.1
VersionId int // 100
Pkg string // nginx@1.22.1
Icon string // base64;
Provider string // 官方
Description string // 轻量级,占有内存少,并发能力强
Workdir string // /duckcp/apps/$Name/$Version
Type Type // 分类
Tag map[string]string // Tag
Installed bool
}
type Manager ¶
type Manager interface {
Add(info *Info) (err error)
Update(info *Info) (err error)
Delete(pkg string) (err error)
AddTag(pkg string, tag string) (err error)
DeleteTag(pkg string, tag string) (err error)
Installed(pkg string) (err error)
Uninstalled(pkg string) (err error)
Required(required ...*Required) (err error)
FindAll() (apps []*Info, err error)
FindByPkg(pkg string) (info *Info, err error)
FindsByType(typ Type) (infos []*Info, err error)
FindsByName(name string) (infos []*Info, err error)
FindsByTag(tag string) (infos []*Info, err error)
}
func GetManager ¶
func GetManager() Manager
Click to show internal directories.
Click to hide internal directories.