Documentation ¶
Index ¶
- func BuildDylib(sourcePath string) (string, error)
- func Contains(array []string, target string) int
- func EndsWith(source string, target string) bool
- func GetCorrectDylibSuffix() ([]string, error)
- func GetDylibSuffix(dylib string) (string, error)
- type ExtensionLoader
- func (loader *ExtensionLoader) AddExtension(name string, extension string) (*plugin.Plugin, error)
- func (loader *ExtensionLoader) CreateExtension(name string, dylib string) (*plugin.Plugin, error)
- func (loader *ExtensionLoader) GetExtension(name string) *plugin.Plugin
- func (loader *ExtensionLoader) GetExtensions() map[string]*plugin.Plugin
- func (loader *ExtensionLoader) GetLoadedExtensions() []string
- func (loader *ExtensionLoader) GetSupportedExtensions() []string
- func (loader *ExtensionLoader) LoadDirectory(extensions map[string]*plugin.Plugin, dir string)
- func (loader *ExtensionLoader) LoadExtensions() map[string]*plugin.Plugin
- func (loader *ExtensionLoader) LoadResource(extensions map[string]*plugin.Plugin, path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCorrectDylibSuffix ¶
func GetDylibSuffix ¶
Types ¶
type ExtensionLoader ¶
type ExtensionLoader struct {
// contains filtered or unexported fields
}
func GetExtensionLoader ¶
func GetExtensionLoader(packageName string, structName string, dirs ...string) (*ExtensionLoader, error)
GetExtensionLoader 获取扩展加载器
func (*ExtensionLoader) AddExtension ¶
AddExtension 添加扩展
func (*ExtensionLoader) CreateExtension ¶
CreateExtension 加载动态链接库
func (*ExtensionLoader) GetExtension ¶
func (loader *ExtensionLoader) GetExtension(name string) *plugin.Plugin
func (*ExtensionLoader) GetExtensions ¶
func (loader *ExtensionLoader) GetExtensions() map[string]*plugin.Plugin
GetExtensions 获取所有扩展
func (*ExtensionLoader) GetLoadedExtensions ¶
func (loader *ExtensionLoader) GetLoadedExtensions() []string
func (*ExtensionLoader) GetSupportedExtensions ¶
func (loader *ExtensionLoader) GetSupportedExtensions() []string
func (*ExtensionLoader) LoadDirectory ¶
func (loader *ExtensionLoader) LoadDirectory(extensions map[string]*plugin.Plugin, dir string)
LoadDirectory 读取资源目录
func (*ExtensionLoader) LoadExtensions ¶
func (loader *ExtensionLoader) LoadExtensions() map[string]*plugin.Plugin
LoadExtensions 加载扩展
func (*ExtensionLoader) LoadResource ¶
func (loader *ExtensionLoader) LoadResource(extensions map[string]*plugin.Plugin, path string) error
LoadResource 加载配置文件,解析配置
Click to show internal directories.
Click to hide internal directories.