diff options
Diffstat (limited to 'plugin.go')
-rw-r--r-- | plugin.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -8,10 +8,17 @@ import ( const pluginDir = "plugins" +// Plugin extends koushin with additional functionality. type Plugin interface { + // Name should return the plugin name. Name() string + // LoadTemplate populates t with the plugin's functions and templates. LoadTemplate(t *template.Template) error + // SetRoutes populates group with the plugin's routes. SetRoutes(group *echo.Group) + // Inject is called prior to rendering a template. It can extend the + // template data by setting new items in the Extra map. Inject(name string, data interface{}) error + // Close is called when the plugin is unloaded. Close() error } |