mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-27 05:15:47 +00:00
29 lines
557 B
Go
29 lines
557 B
Go
package config
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/google/jsonschema-go/jsonschema"
|
|
)
|
|
|
|
type ApiConfig struct {
|
|
Enabled bool `json:"enabled"`
|
|
Port int `json:"port"`
|
|
}
|
|
|
|
var ApiConfigSchema = jsonschema.Schema{
|
|
Type: "object",
|
|
Properties: map[string]*jsonschema.Schema{
|
|
"enabled": {
|
|
Type: "boolean",
|
|
Description: "Whether the API server is enabled",
|
|
Default: json.RawMessage(`false`),
|
|
},
|
|
"port": {
|
|
Type: "integer",
|
|
Description: "Port for the API server to listen on",
|
|
},
|
|
},
|
|
Required: []string{"port"},
|
|
}
|