- Go (1.20+)
- Docker (for building)
- Task (Taskfile runner)
This project uses Task for automation. To build the plugin, run:
1. task gen
2. task build
Located in configs/config.toml:
[client_params]
base_url = "https://api.your-server.com"
timeout = 5
1. Download latest release
2. Move the addons folder to the server
3. Edit config
To use the http_client in your own plugins, ensure it is added as a dependency in your your_plugin.pplugin file:
"dependencies": [
{
"name": "http_client"
}
]
import (
"module_name/pkg/bindings/http_client"
"fmt"
)
func (p *Plugin) SomeMethod() error {
http_client.Get("https://jsonplaceholder.typicode.com/posts/1", func(resp string) {
fmt.Printf("Response from JSON Placeholder: %s\n", resp)
})
return nil
}