Documentation ¶
Index ¶
- Constants
- Variables
- func SortModules(modules map[string]interface{}) []string
- type Instance
- func (this *Instance) GetBuiltinModule(moduleName string) (interface{}, error)
- func (this *Instance) GetBuiltinModules() map[string]interface{}
- func (this *Instance) GetModule(moduleName string) (interface{}, error)
- func (this *Instance) GetModules() map[string]interface{}
- func (this *Instance) GetSortedBuiltinModules(reverses ...bool) []interface{}
- func (this *Instance) GetSortedModules(reverses ...bool) []interface{}
- func (this *Instance) GetSortedUserModules(reverses ...bool) []interface{}
- func (this *Instance) GetUserModule(moduleName string) (interface{}, error)
- func (this *Instance) GetUserModules() map[string]interface{}
- func (this *Instance) GetValue(key string) (interface{}, error)
- func (this *Instance) GetValues() map[string]interface{}
- func (this *Instance) InjectModule() error
- func (this *Instance) InjectModuleByName(moduleNames []string) error
- func (this *Instance) InjectModuleTo(injectTargets []interface{}) error
- func (this *Instance) LoadModuleFileConfig(moduleName string, configFile string, configProviders map[string]interface{}, ...) (err error)
- func (this *Instance) LoadModuleJsonConfig(moduleName string, configData []byte, configProviders map[string]interface{}, ...) (err error)
- func (this *Instance) RegisterUserModule(ctx context.Context, moduleName string, module ModuleInterface, ...) (context.Context, error)
- func (this *Instance) RegisterValue(ctx context.Context, key string, value interface{}, forceOverwrites ...bool) (context.Context, error)
- func (this *Instance) SetSortedUserModules()
- func (this *Instance) UnregisterUserModule(ctx context.Context, moduleNames ...string) (context.Context, error)
- func (this *Instance) UnregisterValue(ctx context.Context, keys ...string) (context.Context, error)
- func (this *Instance) UseModule(ctx context.Context, moduleNames ...string) (context.Context, error)
- type Module
- type ModuleInterface
- type ModuleNode
Constants ¶
View Source
const INJECT_TAG = "inject"
Variables ¶
Functions ¶
func SortModules ¶
SortModules - Sort user modules.
Types ¶
type Instance ¶
type Instance struct { BuiltinModules map[string]interface{} SortedBuiltinModules []string UserModules map[string]interface{} SortedUserModules []string Modules map[string]interface{} SortedModules []string Values map[string]interface{} }
func (*Instance) GetBuiltinModule ¶
func (*Instance) GetBuiltinModules ¶
func (*Instance) GetModules ¶
func (*Instance) GetSortedBuiltinModules ¶
func (*Instance) GetSortedModules ¶
func (*Instance) GetSortedUserModules ¶
func (*Instance) GetUserModule ¶
func (*Instance) GetUserModules ¶
func (*Instance) InjectModule ¶
func (*Instance) InjectModuleByName ¶
func (*Instance) InjectModuleTo ¶
func (*Instance) LoadModuleFileConfig ¶
func (*Instance) LoadModuleJsonConfig ¶
func (this *Instance) LoadModuleJsonConfig(moduleName string, configData []byte, configProviders map[string]interface{}, configTag ...string) (err error)
Register As Module
func (*Instance) RegisterUserModule ¶
func (this *Instance) RegisterUserModule(ctx context.Context, moduleName string, module ModuleInterface, ignoreIfExistses ...bool) (context.Context, error)
*************** User Module *************** Register As User Module
func (*Instance) RegisterValue ¶
func (this *Instance) RegisterValue(ctx context.Context, key string, value interface{}, forceOverwrites ...bool) (context.Context, error)
Register As Value
func (*Instance) SetSortedUserModules ¶
func (this *Instance) SetSortedUserModules()
func (*Instance) UnregisterUserModule ¶
func (this *Instance) UnregisterUserModule(ctx context.Context, moduleNames ...string) (context.Context, error)
Unregister As User Module
func (*Instance) UnregisterValue ¶
Unregister As Value
type Module ¶
type Module struct { Name string Module ModuleInterface }
type ModuleInterface ¶
type ModuleNode ¶
type ModuleNode struct { Name string Nodes []ModuleNode }
ModuleNode - Module node.
func (*ModuleNode) NodesMap ¶
func (node *ModuleNode) NodesMap(modules map[string][]string)
NodesMap - Map nodes.
func (*ModuleNode) NodesWithLabel ¶
func (node *ModuleNode) NodesWithLabel(m map[int][]string, label int)
NodesWithLabel - Return nodes with lable.
Click to show internal directories.
Click to hide internal directories.