Updated Statup Plugins (markdown)

master
Hunter Long 2018-07-04 13:05:46 -07:00
parent 85f404f370
commit 20bb5a69a8
1 changed files with 9 additions and 1 deletions

@ -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
```
<p align="center">
<img width="95%" src="https://s3-us-west-2.amazonaws.com/gitimgs/statupplugin2.png">
</p>
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.