From 20bb5a69a8804d953b0d5a59decfc43556fafe34 Mon Sep 17 00:00:00 2001 From: Hunter Long Date: Wed, 4 Jul 2018 13:05:46 -0700 Subject: [PATCH] Updated Statup Plugins (markdown) --- Statup-Plugins.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Statup-Plugins.md b/Statup-Plugins.md index a672717..9b5c4e6 100644 --- a/Statup-Plugins.md +++ b/Statup-Plugins.md @@ -21,7 +21,15 @@ go build -buildmode=plugin -o example.so ###### Insert `example.so` into the `plugins` directory and reload Statup ## Testing Statup Plugins -Statup includes a couple tools to help you on your Plugin journey, you can use `statup test plugins` command to test all plugins you're including in your `/plugins` folder. This test will attempt to parse your plugin details, and then it will send events for your plugin to be fired. +Statup includes a couple tools to help you on your Plugin journey, you can use `statup test plugins` command to test all plugins in your `/plugins` folder. This test will attempt to parse your plugin details, and then it will send events for your plugin to be fired. +``` +statup test plugins +``` +

+ +

+ +Your plugin should be able to parse and receive events before distributing it. The test tools creates a temporary database (SQLite) that your plugin can interact with. Statup uses [upper.io/db.v3](https://upper.io/db.v3) for database interactions. The database is passed to your plugin `OnLoad(db sqlbuilder.Database)`, so you can use the `db` variable passed here. ## Statup Plugin Interface Please remember Golang plugin's are very new and Statup plugin package may change and 'could' brake your plugin.