diff options
Diffstat (limited to 'plugin/hooks.go')
-rw-r--r-- | plugin/hooks.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/hooks.go b/plugin/hooks.go new file mode 100644 index 000000000..28a762a1a --- /dev/null +++ b/plugin/hooks.go @@ -0,0 +1,10 @@ +package plugin + +type Hooks interface { + // OnActivate is invoked when the plugin is activated. + OnActivate(API) error + + // OnDeactivate is invoked when the plugin is deactivated. This is the plugin's last chance to + // use the API, and the plugin will be terminated shortly after this invocation. + OnDeactivate() error +} |