Documentation ¶
Index ¶
- type AppConfig
- func (inst *AppConfig) AddComponent(info application.ComponentInfo)
- func (inst *AppConfig) GetBuilder() application.ConfigBuilder
- func (inst *AppConfig) GetComponents() []application.ComponentInfo
- func (inst *AppConfig) GetLoader() application.ContextLoader
- func (inst *AppConfig) GetResources() collection.Resources
- func (inst *AppConfig) SetResources(fs *embed.FS, prefix string)
- type ComInfo
- func (inst *ComInfo) GetAliases() []string
- func (inst *ComInfo) GetClass() string
- func (inst *ComInfo) GetClasses() []string
- func (inst *ComInfo) GetFactory() application.ComponentFactory
- func (inst *ComInfo) GetID() string
- func (inst *ComInfo) GetScope() application.ComponentScope
- func (inst *ComInfo) IsNameOf(name string) bool
- func (inst *ComInfo) IsTypeOf(name string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct {
// contains filtered or unexported fields
}
AppConfig 提供一个简易的 Configuration 实现
func (*AppConfig) AddComponent ¶
func (inst *AppConfig) AddComponent(info application.ComponentInfo)
AddComponent 注册一个组件
func (*AppConfig) GetBuilder ¶
func (inst *AppConfig) GetBuilder() application.ConfigBuilder
GetBuilder 返回构建器
func (*AppConfig) GetComponents ¶
func (inst *AppConfig) GetComponents() []application.ComponentInfo
GetComponents 返回组件的注册信息
func (*AppConfig) GetLoader ¶
func (inst *AppConfig) GetLoader() application.ContextLoader
GetLoader 返回加载器
func (*AppConfig) GetResources ¶
func (inst *AppConfig) GetResources() collection.Resources
GetResources 用于获取上下文的资源文件夹
type ComInfo ¶
type ComInfo struct { // implements ComponentInfo ID string Class string Scope application.ComponentScope Aliases []string OnNew func() lang.Object OnInit func(obj lang.Object) error OnDestroy func(obj lang.Object) error OnInject func(obj lang.Object, context application.RuntimeContext) error // contains filtered or unexported fields }
ComInfo 提供一个简易的 ComponentInfo 实现
func (*ComInfo) GetFactory ¶
func (inst *ComInfo) GetFactory() application.ComponentFactory
GetFactory 获取组件的工厂
func (*ComInfo) GetScope ¶
func (inst *ComInfo) GetScope() application.ComponentScope
GetScope 获取组件的作用域
Click to show internal directories.
Click to hide internal directories.