commandstarter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package commandstarter 提供基于 cli.v2 的命令行应用启动器实现,负责命令行应用的完整生命周期管理和启动流程编排。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCoreCmdCli

NewCoreCmdCli 实例化核心命令行应用cli启动器

func NewFrameCmdApplication

NewFrameCmdApplication 创建一个命令启动器对象,实现FrameCmdStarter接口

func RunCommandStarter

func RunCommandStarter(starter fiberhouse.CommandStarter)

RunCommandStarter 运行命令启动器

Types

type CMDLineApplication

type CMDLineApplication struct {
	fiberhouse.FrameCmdStarter
	fiberhouse.CoreCmdStarter
}

CMDLineApplication 是组合命令行应用启动器,实现 fiberhouse.FrameCmdStarter 和 fiberhouse.CoreCmdStarter 接口。

type CoreCmdCli

type CoreCmdCli struct {
	Ctx fiberhouse.ICommandContext
	// contains filtered or unexported fields
}

CoreCmdCli 核心命令行应用cli启动器

func (*CoreCmdCli) AppCoreRun

func (ccc *CoreCmdCli) AppCoreRun() error

AppCoreRun 运行核心应用

func (*CoreCmdCli) GetAppContext

func (ccc *CoreCmdCli) GetAppContext() fiberhouse.ICommandContext

GetAppContext 获取全局上下文

func (*CoreCmdCli) GetCoreCmdApp

func (ccc *CoreCmdCli) GetCoreCmdApp() fiberhouse.CoreCmdStarter

GetCoreCmdApp 获取核心命令行启动器实例

func (*CoreCmdCli) InitCoreApp

func (ccc *CoreCmdCli) InitCoreApp()

InitCoreApp 初始化包装的底层核心应用

func (*CoreCmdCli) RegisterCommands

func (ccc *CoreCmdCli) RegisterCommands(fca fiberhouse.FrameCmdStarter)

RegisterCommands 注册命令列表到核心应用

func (*CoreCmdCli) RegisterCoreApp

func (ccc *CoreCmdCli) RegisterCoreApp(core interface{})

RegisterCoreApp 注册底层核心应用对象

func (*CoreCmdCli) RegisterCoreGlobalOptional

func (ccc *CoreCmdCli) RegisterCoreGlobalOptional(fca fiberhouse.FrameCmdStarter)

RegisterCoreGlobalOptional 注册应用核心的全局可选项

func (*CoreCmdCli) RegisterGlobalErrHandler

func (ccc *CoreCmdCli) RegisterGlobalErrHandler(fca fiberhouse.FrameCmdStarter)

RegisterGlobalErrHandler 核心应用全局错误处理器

type FrameCmdApplication

type FrameCmdApplication struct {
	Ctx fiberhouse.ICommandContext
	// contains filtered or unexported fields
}

FrameCmdApplication 是命令行应用启动器,实现 fiberhouse.FrameCmdStarter 接口。 负责管理命令行应用的生命周期,包括初始化、注册全局选项和动作、运行应用及错误处理。

func (*FrameCmdApplication) GetApplication

func (fca *FrameCmdApplication) GetApplication() fiberhouse.IApplication

GetApplication 获取应用接口对象

func (*FrameCmdApplication) GetContext

GetContext 获取全局上下文

func (*FrameCmdApplication) GetFrameCmdApp

func (fca *FrameCmdApplication) GetFrameCmdApp() fiberhouse.FrameCmdStarter

GetFrameCmdApp 获取框架命令行启动器实例

func (*FrameCmdApplication) RegisterApplication

func (fca *FrameCmdApplication) RegisterApplication(application fiberhouse.ApplicationCmdRegister)

RegisterApplication 注册应用命令注册器到应用启动器

func (*FrameCmdApplication) RegisterApplicationGlobals

func (fca *FrameCmdApplication) RegisterApplicationGlobals()

RegisterApplicationGlobals 注册应用全局对象初始化器和初始化部分必要对象

func (*FrameCmdApplication) RegisterLoggerWithOriginToContainer

func (fca *FrameCmdApplication) RegisterLoggerWithOriginToContainer()

RegisterLoggerWithOriginToContainer 注册配置文件预定义的不同来源(LogOrigin)的子日志器初始化器到容器

Jump to

Keyboard shortcuts

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