mirror of https://github.com/statping/statping
Updated Statup Plugins (markdown)
parent
d938a6f60a
commit
a79de42631
|
@ -1,4 +1,4 @@
|
||||||
Since Statup is built in Go Language we can use the go plugin feature to create dynamic plugins that run on load. Statup has an event anytime anything happens, you can create your own plugins and do any type of function. To implement your own ideas into Statup, use the plugin using the [statup/plugin](https://github.com/hunterlong/statup/blob/master/plugin/main.go) package.
|
Since Statup is built in Go Language we can use the [Go Plugin](https://golang.org/pkg/plugin/) feature to create dynamic plugins that run on load. Statup has an event anytime anything happens, you can create your own plugins and do any type of function. To implement your own ideas into Statup, use the plugin using the [statup/plugin](https://github.com/hunterlong/statup/blob/master/plugin/main.go) package.
|
||||||
```
|
```
|
||||||
go get github.com/hunterlong/statup/plugin
|
go get github.com/hunterlong/statup/plugin
|
||||||
```
|
```
|
||||||
|
@ -14,6 +14,7 @@ git clone https://github.com/hunterlong/statup_plugin
|
||||||
cd statup-plugin
|
cd statup-plugin
|
||||||
go build -buildmode=plugin -o example.so
|
go build -buildmode=plugin -o example.so
|
||||||
```
|
```
|
||||||
|
###### Insert `example.so` into the `plugins` directory and reload Statup
|
||||||
|
|
||||||
## Statup Plugin Interface
|
## Statup Plugin Interface
|
||||||
Please remember Golang plugin's are very new and Statup plugin package may change and 'could' brake your plugin.
|
Please remember Golang plugin's are very new and Statup plugin package may change and 'could' brake your plugin.
|
||||||
|
@ -75,4 +76,8 @@ func (p pkg) OnLoad(db sqlbuilder.Database) {
|
||||||
###### OnLoad is fired after plugin is loaded into the environment
|
###### OnLoad is fired after plugin is loaded into the environment
|
||||||
|
|
||||||
## Custom HTTP Routes
|
## Custom HTTP Routes
|
||||||
Plugin's can include their own HTTP route to accept GET/POST requests.
|
Plugin's can include their own HTTP route to accept GET/POST requests.
|
||||||
|
|
||||||
|
## Plugin To-Do List
|
||||||
|
- [ ] Ability to read/write to database
|
||||||
|
- [ ] Ability to includes assets like jpg, json, etc
|
Loading…
Reference in New Issue