feat(blogo,plugins): convention for plugin with embedded plugins
This commit is contained in:
@@ -30,7 +30,7 @@ const multiRendererPluginName = "blogo-multirenderer-renderer"
|
||||
|
||||
type MultiRenderer interface {
|
||||
RendererPlugin
|
||||
Use(Plugin)
|
||||
PluginWithPlugins
|
||||
}
|
||||
|
||||
type multiRenderer struct {
|
||||
|
||||
@@ -27,7 +27,7 @@ const multiSourcerPluginName = "blogo-multisourcer-sourcer"
|
||||
|
||||
type MultiSourcer interface {
|
||||
SourcerPlugin
|
||||
Use(Plugin)
|
||||
PluginWithPlugins
|
||||
}
|
||||
|
||||
type multiSourcer struct {
|
||||
|
||||
@@ -29,7 +29,7 @@ const prefixedSourcerPluginName = "blogo-prefixedsourcer-sourcer"
|
||||
|
||||
type PrefixedSourcer interface {
|
||||
SourcerPlugin
|
||||
Use(Plugin)
|
||||
PluginWithPlugins
|
||||
UseNamed(string, Plugin)
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,11 @@ type PluginGroup interface {
|
||||
Plugins() []Plugin
|
||||
}
|
||||
|
||||
type PluginWithPlugins interface {
|
||||
Plugin
|
||||
Use(Plugin)
|
||||
}
|
||||
|
||||
type RendererPlugin interface {
|
||||
Plugin
|
||||
Render(src fs.File, out io.Writer) error
|
||||
|
||||
Reference in New Issue
Block a user