aboutsummaryrefslogtreecommitdiffstats
path: root/plugin.go
diff options
context:
space:
mode:
authorLibravatarLibravatar Simon Ser <[email protected]> 2019-12-17 15:14:15 +0100
committerLibravatarLibravatar Simon Ser <[email protected]> 2019-12-17 15:14:36 +0100
commit020e27fe459b0ed66a48b46cb2878520ed4a517b (patch)
tree9de95206d06bd9654cb5e40e81902e7b77cafedc /plugin.go
parentca3672df2ad75cbb866b08ca79320a75e30a55ce (diff)
downloadalps-020e27fe459b0ed66a48b46cb2878520ed4a517b.tar.gz
alps-020e27fe459b0ed66a48b46cb2878520ed4a517b.tar.bz2
alps-020e27fe459b0ed66a48b46cb2878520ed4a517b.zip
Add Context to Plugin.Inject
This allows to access the request metadata and the session from injectors.
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin.go b/plugin.go
index 6d5b730..77000f2 100644
--- a/plugin.go
+++ b/plugin.go
@@ -18,7 +18,7 @@ type Plugin interface {
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 RenderData) error
+ Inject(ctx *Context, name string, data RenderData) error
// Close is called when the plugin is unloaded.
Close() error
}