Documentation
¶
Index ¶
- func IsValidBinaryName(binName string) error
- func NewServiceCommandGetter(app Installable) *cobra.Command
- func PanicIf(err error)
- type Application
- func (i *Application) Boot()
- func (i *Application) Booted(callback func(application foundation.Application))
- func (i *Application) Booting(callback func(application foundation.Application))
- func (i *Application) ConsoleShell(rootCmd *cobra.Command)
- func (i *Application) Environment(s ...string) (string, bool)
- func (i *Application) GetBasePath() string
- func (i *Application) GetBootstrapPath() string
- func (i *Application) GetConfigPath() string
- func (i *Application) GetLangPath() string
- func (i *Application) GetLocale() string
- func (i *Application) GetProviders(provider interface{}) []interface{}
- func (i *Application) GetPublicPath() string
- func (i *Application) GetResourcePath() string
- func (i *Application) GetStoragePath() string
- func (i *Application) HasBeenBootstrapped() bool
- func (i *Application) Invoke(function interface{}, opts ...dig.InvokeOption) error
- func (i *Application) IsDownForMaintenance() bool
- func (i *Application) MaintenanceMode() context.Context
- func (i *Application) Provide(function interface{}, opts ...dig.ProvideOption) error
- func (i *Application) Register(providers ...any)
- func (i *Application) SetLocale(locale string)
- func (i *Application) ShowProviders()
- func (i *Application) ShowSubApps()
- func (i *Application) Terminate()
- func (i *Application) Terminating(callback interface{}) foundation.Application
- func (i *Application) Version() string
- func (i *Application) WebShell()
- type Installable
- type ServiceCommandGetter
- type SubApp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidBinaryName ¶
IsValidBinaryName 检查二进制文件名是否合法
func NewServiceCommandGetter ¶
func NewServiceCommandGetter(app Installable) *cobra.Command
Types ¶
type Application ¶
func NewApp ¶
func NewApp(apps ...SubApp) *Application
func (*Application) Boot ¶
func (i *Application) Boot()
func (*Application) Booted ¶
func (i *Application) Booted(callback func(application foundation.Application))
func (*Application) Booting ¶
func (i *Application) Booting(callback func(application foundation.Application))
func (*Application) ConsoleShell ¶
func (i *Application) ConsoleShell(rootCmd *cobra.Command)
ConsoleShell 使用命令行壳(方法调用)使用系统
func (*Application) Environment ¶
func (i *Application) Environment(s ...string) (string, bool)
func (*Application) GetBasePath ¶
func (i *Application) GetBasePath() string
func (*Application) GetBootstrapPath ¶
func (i *Application) GetBootstrapPath() string
func (*Application) GetConfigPath ¶
func (i *Application) GetConfigPath() string
func (*Application) GetLangPath ¶
func (i *Application) GetLangPath() string
func (*Application) GetLocale ¶
func (i *Application) GetLocale() string
func (*Application) GetProviders ¶
func (i *Application) GetProviders(provider interface{}) []interface{}
func (*Application) GetPublicPath ¶
func (i *Application) GetPublicPath() string
func (*Application) GetResourcePath ¶
func (i *Application) GetResourcePath() string
func (*Application) GetStoragePath ¶
func (i *Application) GetStoragePath() string
func (*Application) HasBeenBootstrapped ¶
func (i *Application) HasBeenBootstrapped() bool
func (*Application) Invoke ¶
func (i *Application) Invoke(function interface{}, opts ...dig.InvokeOption) error
func (*Application) IsDownForMaintenance ¶
func (i *Application) IsDownForMaintenance() bool
func (*Application) MaintenanceMode ¶
func (i *Application) MaintenanceMode() context.Context
func (*Application) Provide ¶
func (i *Application) Provide(function interface{}, opts ...dig.ProvideOption) error
func (*Application) Register ¶
func (i *Application) Register(providers ...any)
func (*Application) SetLocale ¶
func (i *Application) SetLocale(locale string)
func (*Application) ShowProviders ¶
func (i *Application) ShowProviders()
func (*Application) ShowSubApps ¶
func (i *Application) ShowSubApps()
func (*Application) Terminate ¶
func (i *Application) Terminate()
func (*Application) Terminating ¶
func (i *Application) Terminating(callback interface{}) foundation.Application
func (*Application) Version ¶
func (i *Application) Version() string
type Installable ¶
type ServiceCommandGetter ¶
type ServiceCommandGetter struct {
// contains filtered or unexported fields
}
func (*ServiceCommandGetter) Lang ¶
func (i *ServiceCommandGetter) Lang()
type SubApp ¶
type SubApp interface {
Name() string
RegisterRouters()
ServiceProviders() []foundation.ServiceProvider
Binds() []any
Menu() []*router.Menu
Commands() []*cobra.Command
// Bootstrap 应用启动前执行,如初始化配置,初始化数据,初始化表结构等
Bootstrap()
}
SubApp 子应用
Source Files
¶
- application.go
- service_installer.go
Directories
¶
| Path | Synopsis |
|---|---|
|
provider
|
|
|
file: url_match.go Package urlmatch 提供与 Gin 路由语义一致的 URL 匹配工具(对称匹配)
|
file: url_match.go Package urlmatch 提供与 Gin 路由语义一致的 URL 匹配工具(对称匹配) |
|
structs
Package structs contains various utilities functions to work with structs.
|
Package structs contains various utilities functions to work with structs. |
Click to show internal directories.
Click to hide internal directories.