plugin.go 551 B

123456789101112131415161718
  1. package core
  2. // PluginMetadata contains some brief information regarding a plugin.
  3. type PluginMetadata struct {
  4. // Name of the plugin
  5. Name string
  6. }
  7. // GetMetadataFuncName is the name of the function in the plugin to return PluginMetadata.
  8. const GetMetadataFuncName = "GetPluginMetadata"
  9. // GetMetadataFunc is the type of the function in the plugin to return PluginMetadata.
  10. type GetMetadataFunc func() PluginMetadata
  11. // LoadPlugins loads all possible plugins in the 'plugin' directory.
  12. func LoadPlugins() error {
  13. return loadPluginsInternal()
  14. }