Compare commits

...

7 Commits

Author SHA1 Message Date
Joel Wetzell b7e0d879bc Merge pull request #179 from jwetzell/fix/in-out-framer
make sure to use a distinct framer for both directions of communication
2026-06-01 21:35:58 -05:00
Joel Wetzell 9b76ee8195 make sure to use a distinct framer for both directions of communication 2026-06-01 21:32:14 -05:00
Joel Wetzell d48a89d1ef reword description 2026-06-01 18:30:19 -05:00
Joel Wetzell b01bebea54 Merge pull request #178 from jwetzell/processor-params-schema-descriptions
add description information to params for processors
2026-06-01 17:56:39 -05:00
Joel Wetzell 73905e1274 add description information to params for processors 2026-06-01 17:55:30 -05:00
Joel Wetzell 56566cf666 Merge pull request #177 from jwetzell/module-params-descriptions
add description information to params for modules
2026-06-01 17:39:30 -05:00
Joel Wetzell 5d1e6622cb add description information to params for modules 2026-06-01 17:39:00 -05:00
51 changed files with 420 additions and 292 deletions
+4 -2
View File
@@ -22,8 +22,10 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"dsn": {
Type: "string",
MinLength: new(1),
Title: "Data Source Name",
Description: "the data source name (DSN) for the SQLite database",
Type: "string",
MinLength: new(1),
},
},
Required: []string{"dsn"},
+5 -4
View File
@@ -24,10 +24,11 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port for the HTTP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
},
},
Required: []string{"port"},
+3 -2
View File
@@ -22,8 +22,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"port": {
Title: "Port",
Type: "string",
Title: "Port",
Description: "the name of the MIDI port to listen to",
Type: "string",
},
},
Required: []string{"port"},
+3 -2
View File
@@ -24,8 +24,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"port": {
Title: "Port",
Type: "string",
Title: "Port",
Description: "the name of the MIDI port to send messages to",
Type: "string",
},
},
Required: []string{"port"},
+19 -14
View File
@@ -22,28 +22,33 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"broker": {
Title: "Broker URL",
Type: "string",
Title: "Broker URL",
Description: "the URL of the MQTT broker to connect to",
Type: "string",
},
"topic": {
Title: "Topic",
Type: "string",
Title: "Topic",
Description: "an MQTT topic to subscribe to",
Type: "string",
},
"clientId": {
Title: "Client ID",
Type: "string",
Title: "Client ID",
Description: "the client ID to use when connecting to the MQTT broker",
Type: "string",
},
"qos": {
Title: "QoS",
Type: "integer",
Minimum: jsonschema.Ptr[float64](0),
Maximum: jsonschema.Ptr[float64](2),
Default: json.RawMessage(`0`),
Title: "QoS",
Description: "the QoS level to use when publishing messages",
Type: "integer",
Minimum: jsonschema.Ptr[float64](0),
Maximum: jsonschema.Ptr[float64](2),
Default: json.RawMessage(`0`),
},
"retained": {
Title: "Retained",
Type: "boolean",
Default: json.RawMessage(`false`),
Title: "Retained",
Description: "whether to set the retained flag when publishing messages",
Type: "boolean",
Default: json.RawMessage(`false`),
},
},
Required: []string{"broker", "topic", "clientId"},
+6 -4
View File
@@ -20,12 +20,14 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"url": {
Title: "NATS Server URL",
Type: "string",
Title: "NATS Server URL",
Description: "the URL of the NATS server to connect to",
Type: "string",
},
"subject": {
Title: "Subject",
Type: "string",
Title: "Subject",
Description: "the subject to subscribe to",
Type: "string",
},
},
Required: []string{"url", "subject"},
+10 -8
View File
@@ -24,16 +24,18 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the NATS server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`4222`),
Title: "Port",
Description: "the port for the NATS server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`4222`),
},
},
Required: []string{},
+8 -4
View File
@@ -21,12 +21,16 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"host": {
Type: "string",
Title: "Host",
Description: "the hostname or IP address of the Redis server to connect to",
Type: "string",
},
"port": {
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port to use when connecting to the Redis server",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
},
},
Required: []string{"host", "port"},
+29 -15
View File
@@ -25,17 +25,20 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"port": {
Title: "Port",
Type: "string",
Title: "Port",
Description: "the name of the serial port to connect to",
Type: "string",
},
"baudRate": {
Title: "Baud Rate",
Type: "integer",
Title: "Baud Rate",
Description: "the baud rate to use when connecting to the serial port",
Type: "integer",
},
"framing": {
Title: "Framing Method",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
Title: "Framing Method",
Description: "the method to use for framing messages on the serial port",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
},
},
Required: []string{"port", "baudRate", "framing"},
@@ -53,12 +56,14 @@ func init() {
return nil, fmt.Errorf("serial.client framing error: %w", err)
}
framer := framer.GetFramer(framingMethodString)
inFramer := framer.GetFramer(framingMethodString)
if framer == nil {
if inFramer == nil {
return nil, fmt.Errorf("serial.client unknown framing method: %s", framingMethodString)
}
outFramer := framer.GetFramer(framingMethodString)
baudRateInt, err := params.GetInt("baudRate")
if err != nil {
return nil, fmt.Errorf("serial.client baudRate error: %w", err)
@@ -68,7 +73,7 @@ func init() {
BaudRate: baudRateInt,
}
return &SerialClient{config: config, Port: portString, Framer: framer, Mode: &mode, logger: CreateLogger(config)}, nil
return &SerialClient{config: config, Port: portString, inFramer: inFramer, outFramer: outFramer, Mode: &mode, logger: CreateLogger(config)}, nil
},
})
}
@@ -78,7 +83,8 @@ type SerialClient struct {
ctx context.Context
inputHandler common.InputHandler
Port string
Framer framer.Framer
inFramer framer.Framer
outFramer framer.Framer
Mode *serial.Mode
port serial.Port
logger *slog.Logger
@@ -139,13 +145,13 @@ func (sc *SerialClient) Start(ctx context.Context, inputHandler common.InputHand
byteCount, err := sc.port.Read(buffer)
if err != nil {
sc.Framer.Clear()
sc.inFramer.Clear()
break READ
}
if sc.Framer != nil {
if sc.inFramer != nil {
if byteCount > 0 {
messages := sc.Framer.Decode(buffer[0:byteCount])
messages := sc.inFramer.Decode(buffer[0:byteCount])
for _, message := range messages {
if sc.inputHandler != nil {
sc.inputHandler(sc.ctx, sc.Id(), message)
@@ -172,7 +178,7 @@ func (sc *SerialClient) Output(ctx context.Context, payload any) error {
return errors.New("serial.client can only output bytes")
}
_, err := sc.port.Write(sc.Framer.Encode(payloadBytes))
_, err := sc.port.Write(sc.outFramer.Encode(payloadBytes))
return err
}
@@ -185,4 +191,12 @@ func (sc *SerialClient) Stop() {
if sc.port != nil {
sc.port.Close()
}
if sc.inFramer != nil {
sc.inFramer.Clear()
}
if sc.outFramer != nil {
sc.outFramer.Clear()
}
}
+19 -15
View File
@@ -29,27 +29,31 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the SIP server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
Title: "Port",
Description: "the port for the SIP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
},
"transport": {
Title: "Transport",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
Title: "Transport",
Description: "the transport protocol to use for the SIP server",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
},
"userAgent": {
Title: "User Agent",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
Title: "User Agent",
Description: "the user agent string to use",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
},
},
Required: []string{},
+24 -19
View File
@@ -30,33 +30,38 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the SIP server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
Title: "Port",
Description: "the port for the SIP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage(`5060`),
},
"transport": {
Title: "Transport",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
Title: "Transport",
Description: "the transport protocol to use for the SIP server",
Type: "string",
Enum: []any{"udp", "tcp", "ws", "udp4", "tcp4"},
Default: json.RawMessage(`"udp"`),
},
"userAgent": {
Title: "User Agent",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
Title: "User Agent",
Description: "the user agent string to use",
Type: "string",
Default: json.RawMessage(`"showbridge"`),
},
"separator": {
Title: "DTMF Separator",
Type: "string",
MinLength: new(1),
MaxLength: new(1),
Title: "DTMF Separator",
Description: "the DTMF character to use as a separator between DTMF digit groups",
Type: "string",
MinLength: new(1),
MaxLength: new(1),
},
},
Required: []string{"separator"},
+30 -16
View File
@@ -23,19 +23,22 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"host": {
Title: "Host",
Type: "string",
Title: "Host",
Description: "the hostname or IP address of the TCP server to connect to",
Type: "string",
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port of the TCP server to connect to",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
},
"framing": {
Title: "Framing Method",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
Title: "Framing Method",
Description: "the method used to frame messages over the TCP connection",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
},
},
Required: []string{"host", "port", "framing"},
@@ -63,19 +66,22 @@ func init() {
return nil, fmt.Errorf("net.tcp.client framing error: %w", err)
}
framer := framer.GetFramer(framingMethodString)
inFramer := framer.GetFramer(framingMethodString)
if framer == nil {
if inFramer == nil {
return nil, fmt.Errorf("net.tcp.client unknown framing method: %s", framingMethodString)
}
return &TCPClient{framer: framer, Addr: addr, config: config, logger: CreateLogger(config)}, nil
outFramer := framer.GetFramer(framingMethodString)
return &TCPClient{inFramer: inFramer, outFramer: outFramer, Addr: addr, config: config, logger: CreateLogger(config)}, nil
},
})
}
type TCPClient struct {
config config.ModuleConfig
framer framer.Framer
inFramer framer.Framer
outFramer framer.Framer
conn *net.TCPConn
ctx context.Context
inputHandler common.InputHandler
@@ -132,9 +138,9 @@ CONNECT_RETRY:
break READ
}
if tc.framer != nil {
if tc.inFramer != nil {
if byteCount > 0 {
messages := tc.framer.Decode(buffer[0:byteCount])
messages := tc.inFramer.Decode(buffer[0:byteCount])
for _, message := range messages {
if tc.inputHandler != nil {
tc.inputHandler(tc.ctx, tc.Id(), message)
@@ -169,7 +175,7 @@ func (tc *TCPClient) Output(ctx context.Context, payload any) error {
if !ok {
return errors.New("net.tcp.client is only able to output bytes")
}
_, err := tc.conn.Write(tc.framer.Encode(payloadBytes))
_, err := tc.conn.Write(tc.inFramer.Encode(payloadBytes))
return err
}
@@ -182,4 +188,12 @@ func (tc *TCPClient) Stop() {
if tc.conn != nil {
tc.conn.Close()
}
if tc.inFramer != nil {
tc.inFramer.Clear()
}
if tc.outFramer != nil {
tc.outFramer.Clear()
}
}
+20 -17
View File
@@ -26,20 +26,23 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the TCP server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port for the TCP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
},
"framing": {
Title: "Framing Method",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
Title: "Framing Method",
Description: "the method used to frame messages over the TCP connection",
Type: "string",
Enum: []any{"LF", "CR", "CRLF", "SLIP", "RAW"},
},
},
Required: []string{"port", "framing"},
@@ -78,7 +81,7 @@ func init() {
if err != nil {
return nil, err
}
return &TCPServer{InFramer: inFramer, OutFramer: outFramer, framerType: framingMethodString, Addr: addr, config: moduleConfig, logger: CreateLogger(moduleConfig)}, nil
return &TCPServer{inFramer: inFramer, outFramer: outFramer, framerType: framingMethodString, Addr: addr, config: moduleConfig, logger: CreateLogger(moduleConfig)}, nil
},
})
}
@@ -91,8 +94,8 @@ type tcpConnection struct {
type TCPServer struct {
config config.ModuleConfig
Addr *net.TCPAddr
InFramer framer.Framer
OutFramer framer.Framer
inFramer framer.Framer
outFramer framer.Framer
framerType string
ctx context.Context
inputHandler common.InputHandler
@@ -146,9 +149,9 @@ func (ts *TCPServer) handleClient(client *net.TCPConn) {
}
break
}
if ts.InFramer != nil {
if ts.inFramer != nil {
if byteCount > 0 {
messages := ts.InFramer.Decode(buffer[0:byteCount])
messages := ts.inFramer.Decode(buffer[0:byteCount])
for _, message := range messages {
if ts.inputHandler != nil {
ts.inputHandler(ts.ctx, ts.Id(), message)
@@ -216,11 +219,11 @@ func (ts *TCPServer) Output(ctx context.Context, payload any) error {
defer ts.connectionsMu.Unlock()
var errorString strings.Builder
if ts.OutFramer == nil {
if ts.outFramer == nil {
return errors.New("no output framer configured")
}
outputBytes := ts.OutFramer.Encode(payloadBytes)
outputBytes := ts.outFramer.Encode(payloadBytes)
for _, connection := range ts.connections {
_, err := connection.conn.Write(outputBytes)
+1 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{
"duration": {
Title: "Duration",
Description: "time in milliseconds between emitted events",
Type: "integer",
Description: "Interval duration in milliseconds",
},
},
Required: []string{"duration"},
+1 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{
"duration": {
Title: "Duration",
Description: "time in milliseconds before the timer fires",
Type: "integer",
Description: "Interval duration in milliseconds",
},
},
Required: []string{"duration"},
+8 -6
View File
@@ -21,14 +21,16 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"host": {
Title: "Host",
Type: "string",
Title: "Host",
Description: "the hostname or IP address of the UDP server to connect to",
Type: "string",
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port of the UDP server to connect to",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
},
},
Required: []string{"host", "port"},
+8 -6
View File
@@ -22,14 +22,16 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Title: "IP",
Description: "the multicast address to listen on",
Type: "string",
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
},
},
Required: []string{"ip", "port"},
+15 -12
View File
@@ -23,22 +23,25 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"ip": {
Title: "IP",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
Title: "IP",
Description: "the IP address to bind the UDP server to",
Type: "string",
Default: json.RawMessage(`"0.0.0.0"`),
},
"port": {
Title: "Port",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
Title: "Port",
Description: "the port for the UDP server to listen on",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1024),
Maximum: jsonschema.Ptr[float64](65535),
},
"bufferSize": {
Title: "Buffer Size",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage("2048"),
Title: "Buffer Size",
Description: "the size of the buffer for incoming UDP messages",
Type: "integer",
Minimum: jsonschema.Ptr[float64](1),
Maximum: jsonschema.Ptr[float64](65535),
Default: json.RawMessage("2048"),
},
},
Required: []string{"port"},
+3 -2
View File
@@ -23,8 +23,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"url": {
Title: "URL",
Type: "string",
Title: "URL",
Description: "the URL of the WebSocket server to connect",
Type: "string",
},
},
Required: []string{"url"},
+2 -2
View File
@@ -22,13 +22,13 @@ func init() {
Properties: map[string]*jsonschema.Schema{
"module": {
Title: "Module ID",
Type: "string",
Description: "ID of the database module to query",
Type: "string",
},
"query": {
Title: "Query",
Type: "string",
Description: "SQL query to execute",
Type: "string",
},
},
Required: []string{"module", "query"},
+3 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"expression": {
Title: "Expression",
Type: "string",
Title: "Expression",
Description: "Expr expression to evaluate, must return a boolean",
Type: "string",
},
},
Required: []string{"expression"},
+2 -2
View File
@@ -18,9 +18,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"rate": {
Type: "integer",
Title: "Rate",
Description: "The number of events to allow per second.",
Description: "number of events to allow per second",
Type: "integer",
},
},
Required: []string{"rate"},
+3 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"pattern": {
Title: "Pattern",
Type: "string",
Title: "Pattern",
Description: "regex pattern to match against",
Type: "string",
},
},
Required: []string{"pattern"},
+5 -4
View File
@@ -20,10 +20,11 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"bitSize": {
Title: "Bit Size",
Type: "integer",
Enum: []any{32, 64},
Default: json.RawMessage("64"),
Title: "Bit Size",
Description: "bit size of the resulting float",
Type: "integer",
Enum: []any{32, 64},
Default: json.RawMessage("64"),
},
},
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
+11 -8
View File
@@ -20,18 +20,21 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"bitSize": {
Title: "Bit Size",
Type: "integer",
Enum: []any{32, 64},
Default: json.RawMessage("32"),
Title: "Bit Size",
Description: "bit size of the resulting float",
Type: "integer",
Enum: []any{32, 64},
Default: json.RawMessage("32"),
},
"min": {
Title: "Minimum",
Type: "number",
Title: "Minimum",
Description: "inclusive minimum value of the random float",
Type: "number",
},
"max": {
Title: "Maximum",
Type: "number",
Title: "Maximum",
Description: "exclusive maximum value of the random float",
Type: "number",
},
},
Required: []string{"min", "max"},
+27 -18
View File
@@ -21,40 +21,49 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"id": {
Title: "Camera ID",
Type: "string",
Title: "Camera ID",
Description: "ID of the camera this FreeD position corresponds to",
Type: "string",
},
"pan": {
Title: "Pan",
Type: "string",
Title: "Pan",
Description: "pan angle of the camera",
Type: "string",
},
"tilt": {
Title: "Tilt",
Type: "string",
Title: "Tilt",
Description: "tilt angle of the camera",
Type: "string",
},
"roll": {
Title: "Roll",
Type: "string",
Title: "Roll",
Description: "roll angle of the camera",
Type: "string",
},
"posX": {
Title: "Position X",
Type: "string",
Title: "Position X",
Description: "X coordinate of the camera's position",
Type: "string",
},
"posY": {
Title: "Position Y",
Type: "string",
Title: "Position Y",
Description: "Y coordinate of the camera's position",
Type: "string",
},
"posZ": {
Title: "Position Z",
Type: "string",
Title: "Position Z",
Description: "Z coordinate of the camera's position",
Type: "string",
},
"zoom": {
Title: "Zoom",
Type: "string",
Title: "Zoom",
Description: "zoom level of the camera",
Type: "string",
},
"focus": {
Title: "Focus",
Type: "string",
Title: "Focus",
Description: "focus level of the camera",
Type: "string",
},
},
Required: []string{
+7 -5
View File
@@ -22,13 +22,15 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"method": {
Title: "HTTP Method",
Type: "string",
Enum: []any{"GET", "POST", "PUT", "PATCH", "DELETE"},
Title: "HTTP Method",
Description: "method to use for the HTTP request",
Type: "string",
Enum: []any{"GET", "POST", "PUT", "PATCH", "DELETE"},
},
"url": {
Title: "URL",
Type: "string",
Title: "URL",
Description: "URL to send the HTTP request to",
Type: "string",
},
},
Required: []string{"method", "url"},
+6 -4
View File
@@ -19,12 +19,14 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"status": {
Title: "Status Code",
Type: "integer",
Title: "Status Code",
Description: "status code to set on the response",
Type: "integer",
},
"bodyTemplate": {
Title: "Body Template",
Type: "string",
Title: "Body Template",
Description: "template for the response body",
Type: "string",
},
},
Required: []string{"status", "bodyTemplate"},
+10 -8
View File
@@ -20,16 +20,18 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"base": {
Title: "Base",
Type: "integer",
Enum: []any{0, 2, 8, 10, 16},
Default: json.RawMessage("10"),
Title: "Base",
Description: "numerical base to use for parsing the integer",
Type: "integer",
Enum: []any{0, 2, 8, 10, 16},
Default: json.RawMessage("10"),
},
"bitSize": {
Title: "Bit Size",
Type: "integer",
Enum: []any{0, 8, 16, 32, 64},
Default: json.RawMessage("64"),
Title: "Bit Size",
Description: "bit size of the resulting integer",
Type: "integer",
Enum: []any{0, 8, 16, 32, 64},
Default: json.RawMessage("64"),
},
},
AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}},
+6 -4
View File
@@ -19,12 +19,14 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"min": {
Title: "Minimum",
Type: "integer",
Title: "Minimum",
Description: "inclusive minimum value of the random integer",
Type: "integer",
},
"max": {
Title: "Maximum",
Type: "integer",
Title: "Maximum",
Description: "inclusive maximum value of the random integer",
Type: "integer",
},
},
Required: []string{"min", "max"},
+12 -8
View File
@@ -18,20 +18,24 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"inMin": {
Title: "Input Minimum",
Type: "integer",
Title: "Input Minimum",
Description: "minimum value of the input integer",
Type: "integer",
},
"inMax": {
Title: "Input Maximum",
Type: "integer",
Title: "Input Maximum",
Description: "maximum value of the input integer",
Type: "integer",
},
"outMin": {
Title: "Output Minimum",
Type: "integer",
Title: "Output Minimum",
Description: "minimum value of the output integer",
Type: "integer",
},
"outMax": {
Title: "Output Maximum",
Type: "integer",
Title: "Output Maximum",
Description: "maximum value of the output integer",
Type: "integer",
},
},
Required: []string{"inMin", "inMax", "outMin", "outMax"},
+6 -4
View File
@@ -19,12 +19,14 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"module": {
Title: "Module ID",
Type: "string",
Title: "Module ID",
Description: "ID of the key-value module to get the value from",
Type: "string",
},
"key": {
Title: "Key",
Type: "string",
Title: "Key",
Description: "key to retrieve from the key-value module",
Type: "string",
},
},
Required: []string{"module", "key"},
+6 -4
View File
@@ -19,12 +19,14 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"module": {
Title: "Module ID",
Type: "string",
Title: "Module ID",
Description: "ID of the key-value module to set the value in",
Type: "string",
},
"key": {
Title: "Key",
Type: "string",
Title: "Key",
Description: "key to set in the key-value module",
Type: "string",
},
},
Required: []string{"module", "key"},
@@ -23,16 +23,19 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"channel": {
Title: "Channel",
Type: "string",
Title: "Channel",
Description: "channel number for the control change message",
Type: "string",
},
"control": {
Title: "Control",
Type: "string",
Title: "Control",
Description: "control number for the control change message",
Type: "string",
},
"value": {
Title: "Value",
Type: "string",
Title: "Value",
Description: "value for the control change message",
Type: "string",
},
},
Required: []string{"channel", "control", "value"},
+9 -6
View File
@@ -23,16 +23,19 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"channel": {
Title: "Channel",
Type: "string",
Title: "Channel",
Description: "channel number for the note off message",
Type: "string",
},
"note": {
Title: "Note",
Type: "string",
Title: "Note",
Description: "note number for the note off message",
Type: "string",
},
"velocity": {
Title: "Velocity",
Type: "string",
Title: "Velocity",
Description: "velocity for the note off message",
Type: "string",
},
},
Required: []string{"channel", "note", "velocity"},
+9 -6
View File
@@ -23,16 +23,19 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"channel": {
Title: "Channel",
Type: "string",
Title: "Channel",
Description: "channel number for the note on message",
Type: "string",
},
"note": {
Title: "Note",
Type: "string",
Title: "Note",
Description: "note number for the note on message",
Type: "string",
},
"velocity": {
Title: "Velocity",
Type: "string",
Title: "Velocity",
Description: "velocity for the note on message",
Type: "string",
},
},
Required: []string{"channel", "note", "velocity"},
@@ -23,12 +23,14 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"channel": {
Title: "Channel",
Type: "string",
Title: "Channel",
Description: "channel number for the program change message",
Type: "string",
},
"program": {
Title: "Program",
Type: "string",
Title: "Program",
Description: "program number for the program change message",
Type: "string",
},
},
Required: []string{"type", "channel", "program"},
+1 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{
"module": {
Title: "Module ID",
Type: "string",
Description: "ID of module to send output to",
Type: "string",
},
},
Required: []string{"module"},
+9 -6
View File
@@ -23,19 +23,22 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"address": {
Title: "Address",
Type: "string",
Title: "Address",
Description: "OSC address for the message",
Type: "string",
},
"args": {
Title: "Arguments",
Type: "array",
Title: "Arguments",
Description: "arguments for the OSC message",
Type: "array",
Items: &jsonschema.Schema{
Type: "string",
},
},
"types": {
Title: "Argument Types",
Type: "string",
Title: "Argument Types",
Description: "string of OSC types corresponding to the arguments in args",
Type: "string",
},
},
Required: []string{"address"},
+2 -2
View File
@@ -22,13 +22,13 @@ func init() {
Properties: map[string]*jsonschema.Schema{
"module": {
Title: "Module ID",
Type: "string",
Description: "ID of the module to publish to",
Type: "string",
},
"topic": {
Title: "Topic",
Description: "topic to publish to",
Type: "string",
Description: "Topic to publish to",
},
},
Required: []string{"module", "topic"},
+1 -1
View File
@@ -20,8 +20,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{
"source": {
Title: "Source",
Type: "string",
Description: "source to report as to the router",
Type: "string",
},
},
Required: []string{"source"},
+3 -2
View File
@@ -25,8 +25,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"expression": {
Title: "Expression",
Type: "string",
Title: "Expression",
Description: "Expr expression to evaluate",
Type: "string",
},
},
Required: []string{"expression"},
+3 -2
View File
@@ -18,8 +18,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"program": {
Title: "Program",
Type: "string",
Title: "Program",
Description: "JavaScript program to run",
Type: "string",
},
},
Required: []string{"program"},
+11 -8
View File
@@ -20,18 +20,21 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"path": {
Title: "Path",
Type: "string",
Title: "Path",
Description: "path to the WASM plugin to load",
Type: "string",
},
"function": {
Title: "Function",
Type: "string",
Default: json.RawMessage(`"process"`),
Title: "Function",
Description: "exported function to call on the WASM plugin",
Type: "string",
Default: json.RawMessage(`"process"`),
},
"enableWasi": {
Title: "Enable WASI",
Type: "boolean",
Default: json.RawMessage("false"),
Title: "Enable WASI",
Description: "whether to enable WASI when running the WASM plugin",
Type: "boolean",
Default: json.RawMessage("false"),
},
},
Required: []string{"path"},
@@ -19,15 +19,19 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"preWait": {
Title: "Pre Wait (ms)",
Type: "integer",
},
"postWait": {
Title: "Post Wait (ms)",
Type: "integer",
Title: "Pre Wait (ms)",
Description: "number of milliseconds to wait before playing the audio",
Type: "integer",
},
"audioFile": {
Type: "string",
Title: "Audio File",
Description: "path to the audio file to play",
Type: "string",
},
"postWait": {
Title: "Post Wait (ms)",
Description: "number of milliseconds to wait after playing the audio",
Type: "integer",
},
},
Required: []string{"preWait", "postWait", "audioFile"},
+11 -7
View File
@@ -21,15 +21,19 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"preWait": {
Title: "Pre Wait (ms)",
Type: "integer",
},
"postWait": {
Title: "Post Wait (ms)",
Type: "integer",
Title: "Pre Wait (ms)",
Description: "number of milliseconds to wait before sending the DTMF tones",
Type: "integer",
},
"digits": {
Type: "string",
Title: "Digits",
Description: "DTMF digits to send",
Type: "string",
},
"postWait": {
Title: "Post Wait (ms)",
Description: "number of milliseconds to wait after sending the DTMF tones",
Type: "integer",
},
},
Required: []string{"preWait", "postWait", "digits"},
+3 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"template": {
Title: "Template",
Type: "string",
Title: "Template",
Description: "template to evaluate",
Type: "string",
},
},
Required: []string{"template"},
+3 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"separator": {
Title: "Separator",
Type: "string",
Title: "Separator",
Description: "separator to split the string on",
Type: "string",
},
},
Required: []string{"separator"},
+3 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"name": {
Title: "Field Name",
Type: "string",
Title: "Field Name",
Description: "name of the struct field to extract",
Type: "string",
},
},
Required: []string{"name"},
+3 -2
View File
@@ -19,8 +19,9 @@ func init() {
Type: "object",
Properties: map[string]*jsonschema.Schema{
"name": {
Title: "Method Name",
Type: "string",
Title: "Method Name",
Description: "name of the struct method to extract and call (with no arguments)",
Type: "string",
},
},
Required: []string{"name"},
+1 -1
View File
@@ -19,8 +19,8 @@ func init() {
Properties: map[string]*jsonschema.Schema{
"duration": {
Title: "Duration",
Description: "time to sleep in milliseconds",
Type: "integer",
Description: "Duration to sleep in milliseconds",
},
},
Required: []string{"duration"},