Documentation ¶
Index ¶
- func LoadResourcesFromEmbedFS(fs *embed.FS, path string) collection.Resources
- func NewBuilder() application.ConfigBuilder
- func NewBuilderRes(res collection.Resources) application.ConfigBuilder
- 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) GetPrototype() lang.Object
- func (inst *ComInfo) GetScope() application.ComponentScope
- func (inst *ComInfo) IsNameOf(name string) bool
- func (inst *ComInfo) IsTypeOf(name string) bool
- type ComInfoBuilder
- func (inst *ComInfoBuilder) Aliases(aliases string) *ComInfoBuilder
- func (inst *ComInfoBuilder) Class(cls string) *ComInfoBuilder
- func (inst *ComInfoBuilder) Create() (*ComInfo, error)
- func (inst *ComInfoBuilder) CreateTo(cb application.ConfigBuilder) error
- func (inst *ComInfoBuilder) ID(id string) *ComInfoBuilder
- func (inst *ComInfoBuilder) OnDestroy(fn OnDestroy) *ComInfoBuilder
- func (inst *ComInfoBuilder) OnInit(fn OnInit) *ComInfoBuilder
- func (inst *ComInfoBuilder) OnInject(fn OnInject) *ComInfoBuilder
- func (inst *ComInfoBuilder) OnNew(fn OnNew) *ComInfoBuilder
- func (inst *ComInfoBuilder) Reset()
- func (inst *ComInfoBuilder) Scope(scope string) *ComInfoBuilder
- type OnDestroy
- type OnInit
- type OnInject
- type OnNew
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadResourcesFromEmbedFS ¶ added in v0.0.33
func LoadResourcesFromEmbedFS(fs *embed.FS, path string) collection.Resources
LoadResourcesFromEmbedFS 从嵌入的FS加载资源组
func NewBuilderRes ¶
func NewBuilderRes(res collection.Resources) application.ConfigBuilder
NewBuilderRes 新建配置建造器,并附带指定的资源
Types ¶
type ComInfo ¶
type ComInfo struct { // implements ComponentInfo ID string Class string Scope application.ComponentScope Aliases []string OnNew OnNew OnInject OnInject OnInit OnInit OnDestroy OnDestroy }
ComInfo 提供一个简易的 ComponentInfo 实现
func (*ComInfo) GetFactory ¶
func (inst *ComInfo) GetFactory() application.ComponentFactory
GetFactory 获取组件的工厂
func (*ComInfo) GetScope ¶
func (inst *ComInfo) GetScope() application.ComponentScope
GetScope 获取组件的作用域
type ComInfoBuilder ¶ added in v0.0.6
type ComInfoBuilder struct {
// contains filtered or unexported fields
}
func (*ComInfoBuilder) Aliases ¶ added in v0.0.6
func (inst *ComInfoBuilder) Aliases(aliases string) *ComInfoBuilder
func (*ComInfoBuilder) Class ¶ added in v0.0.6
func (inst *ComInfoBuilder) Class(cls string) *ComInfoBuilder
func (*ComInfoBuilder) Create ¶ added in v0.0.6
func (inst *ComInfoBuilder) Create() (*ComInfo, error)
func (*ComInfoBuilder) CreateTo ¶ added in v0.0.7
func (inst *ComInfoBuilder) CreateTo(cb application.ConfigBuilder) error
func (*ComInfoBuilder) ID ¶ added in v0.0.6
func (inst *ComInfoBuilder) ID(id string) *ComInfoBuilder
func (*ComInfoBuilder) OnDestroy ¶ added in v0.0.7
func (inst *ComInfoBuilder) OnDestroy(fn OnDestroy) *ComInfoBuilder
func (*ComInfoBuilder) OnInit ¶ added in v0.0.7
func (inst *ComInfoBuilder) OnInit(fn OnInit) *ComInfoBuilder
func (*ComInfoBuilder) OnInject ¶ added in v0.0.7
func (inst *ComInfoBuilder) OnInject(fn OnInject) *ComInfoBuilder
func (*ComInfoBuilder) OnNew ¶ added in v0.0.7
func (inst *ComInfoBuilder) OnNew(fn OnNew) *ComInfoBuilder
func (*ComInfoBuilder) Reset ¶ added in v0.0.7
func (inst *ComInfoBuilder) Reset()
func (*ComInfoBuilder) Scope ¶ added in v0.0.6
func (inst *ComInfoBuilder) Scope(scope string) *ComInfoBuilder
Click to show internal directories.
Click to hide internal directories.