start work on http/ws api

This commit is contained in:
Joel Wetzell
2026-03-11 20:58:53 -05:00
parent 82ba1d5d10
commit 0f57e123ce
7 changed files with 212 additions and 8 deletions

View File

@@ -8,8 +8,8 @@ type RouteIO interface {
}
type RouteIOError struct {
Index int
OutputError error
ProcessError error
InputError error
Index int `json:"index"`
OutputError error `json:"outputError"`
ProcessError error `json:"processError"`
InputError error `json:"inputError"`
}

View File

@@ -1,14 +1,18 @@
package config
type Config struct {
Api ApiConfig `json:"api"`
Modules []ModuleConfig `json:"modules"`
Routes []RouteConfig `json:"routes"`
}
type ApiConfig struct {
Port int `json:"port"`
}
type ModuleConfig struct {
Id string `json:"id"`
Type string `json:"type"`
Params Params `json:"params"`
Params Params `json:"params,omitempty"`
}
type RouteConfig struct {
@@ -18,5 +22,5 @@ type RouteConfig struct {
type ProcessorConfig struct {
Type string `json:"type"`
Params Params `json:"params"`
Params Params `json:"params,omitempty"`
}