Documentation
¶
Index ¶
- type CommandInfo
- type ModuleInfo
- type ModuleInterface
- type ModuleLoader
- type ModuleManager
- func (m *ModuleManager) ExecuteCommand(moduleName, commandName string, args []string) (interface{}, error)
- func (m *ModuleManager) GetModule(name string) (ModuleInterface, error)
- func (m *ModuleManager) GetModuleInfo(name string) (*ModuleInfo, error)
- func (m *ModuleManager) ListModules() []string
- func (m *ModuleManager) LoadModule(name string) (ModuleInterface, error)
- type ModuleRegistry
- type ModuleSystem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandInfo ¶
type ModuleInfo ¶
type ModuleInterface ¶
type ModuleInterface interface {
GetInfo() *ModuleInfo
Initialize() error
ExecuteCommand(command string, args []string) (interface{}, error)
}
type ModuleLoader ¶
type ModuleLoader struct {
Manager *ModuleManager
}
func NewModuleLoader ¶
func NewModuleLoader(manager *ModuleManager) *ModuleLoader
func (*ModuleLoader) LoadModuleFromFile ¶
func (l *ModuleLoader) LoadModuleFromFile(path string) (string, error)
type ModuleManager ¶
type ModuleManager struct {
Registry *ModuleRegistry
// contains filtered or unexported fields
}
func NewModuleManager ¶
func NewModuleManager(registry *ModuleRegistry) *ModuleManager
func (*ModuleManager) ExecuteCommand ¶
func (m *ModuleManager) ExecuteCommand(moduleName, commandName string, args []string) (interface{}, error)
func (*ModuleManager) GetModule ¶
func (m *ModuleManager) GetModule(name string) (ModuleInterface, error)
func (*ModuleManager) GetModuleInfo ¶
func (m *ModuleManager) GetModuleInfo(name string) (*ModuleInfo, error)
func (*ModuleManager) ListModules ¶
func (m *ModuleManager) ListModules() []string
func (*ModuleManager) LoadModule ¶
func (m *ModuleManager) LoadModule(name string) (ModuleInterface, error)
type ModuleRegistry ¶
type ModuleRegistry struct {
// contains filtered or unexported fields
}
func NewModuleRegistry ¶
func NewModuleRegistry() *ModuleRegistry
func (*ModuleRegistry) GetModule ¶
func (r *ModuleRegistry) GetModule(name string) (func() ModuleInterface, error)
func (*ModuleRegistry) ListModules ¶
func (r *ModuleRegistry) ListModules() []string
func (*ModuleRegistry) RegisterModule ¶
func (r *ModuleRegistry) RegisterModule(name string, factory func() ModuleInterface)
type ModuleSystem ¶
type ModuleSystem struct {
Registry *ModuleRegistry
Manager *ModuleManager
Loader *ModuleLoader
}
func NewModuleSystem ¶
func NewModuleSystem() *ModuleSystem
Click to show internal directories.
Click to hide internal directories.