2017-11-22 17:00:46 -05:00
|
|
|
package core
|
|
|
|
|
2017-11-22 17:15:14 -05:00
|
|
|
// PluginMetadata contains some brief information regarding a plugin.
|
2017-11-22 17:00:46 -05:00
|
|
|
type PluginMetadata struct {
|
2017-11-22 17:15:14 -05:00
|
|
|
// Name of the plugin
|
2017-11-22 17:00:46 -05:00
|
|
|
Name string
|
|
|
|
}
|
|
|
|
|
2017-11-22 17:15:14 -05:00
|
|
|
// GetMetadataFuncName is the name of the function in the plugin to return PluginMetadata.
|
2017-11-22 17:00:46 -05:00
|
|
|
const GetMetadataFuncName = "GetPluginMetadata"
|
|
|
|
|
2017-11-22 17:15:14 -05:00
|
|
|
// GetMetadataFunc is the type of the function in the plugin to return PluginMetadata.
|
2017-11-22 17:00:46 -05:00
|
|
|
type GetMetadataFunc func() PluginMetadata
|
2017-11-22 17:15:14 -05:00
|
|
|
|
|
|
|
// LoadPlugins loads all possible plugins in the 'plugin' directory.
|
|
|
|
func LoadPlugins() error {
|
|
|
|
return loadPluginsInternal()
|
|
|
|
}
|