A playground for testing go API features.
The current API allows for creating routes based on "route plugins". These "route plugins" are made up of a JSON descriptor and a code file. The coding languages that can currently be used are listed below.
All plugins are currently required to return a JSON string. It is possible that other configuration languages will be implemented in the future.
The following languages can be used to create plugins. The languages supported can be expanded by adding a route handler for the language to the main.go file.
Name | Status | Notes |
---|---|---|
Python | MVP | This type of "route plugin" will execute python /file/path.py . There is currently no way to execute python3 /file/path.py , meaning that if you need to use python3 it must be aliased to python. |
Go | MVP | This type of "route plugin" will execute go run /file/path.go . In the future, JIT compilation of the go files will be possible. |
PowerShell | MVP | This type of "route plugin" will execute pwsh -File /file/path.ps1 . Currently only PowerShell core is supported. In the future, the version of PowerShell (standard vs. core) will be selected based on the OS. |
{ "path": "/testpy/{arg}", "method": "GET", "type": "python", "main_file": "python_example_route.py", "parameters": [ "arg" ] }
import sys print("{\"test\":\"" + sys.argv[1] + "\"}")
{ "path": "/test", "method": "GET", "type": "go", "main_file": "go_example_route.go", "parameters": [] }
package main import ( "encoding/json" "fmt" ) func main() { ret, _ := json.Marshal([]string{"1111", "2222", "3333", "4444"}) fmt.Print(string(ret)) }
{ "path": "/testps/{var1}/{var2}", "method": "GET", "type": "powershell", "main_file": "testps.ps1", "parameters": [ "var1", "var2" ] }
$Arg1 = $args[0] $Arg2 = $args[1] "[{`"arg1`": `"$Arg1`"}, {`"arg2`": `"$Arg2`"}]"
- Route Plugins - Allow for custom routes in the form of JSON/code files.
- Concurrency Safe Logging - Allow for logging in a concurrently safe way.
- Testing - Add automated testing (currently uses some basic functional pester testing).
- Enable Okta Authentication - Require auth. via Okta to process calls.
- Simple DSL - Allow for the creation of a plugin driven API via a simple DSL.