MSP-4622 configuration division

This commit is contained in:
Парусов Павел Андреевич committed 2025-01-16 14:11:58 +03:00
1 parent cf9a24f424
commit 2c0562e98f
9 files changed
+164 -18

No files matched your search

+4 -2
View File
@@ -1,7 +1,9 @@
{
"logLevel": "debug",
"scripts": [
],
"scripts": {
"commonScripts": [],
"customScripts": []
},
"sharedScript": "",
"scriptExecutionTimeoutMs": 1000
}
+6 -1
View File
@@ -18,11 +18,16 @@ func init() {
type Remote struct {
LogLevel log.Level `schemaGen:"logLevel" schema:"Уровень логирования"`
Scripts []ScriptDefinition
Scripts AllScripts
SharedScript string
ScriptExecutionTimeoutMs int `validate:"required"`
}
type AllScripts struct {
CommonScripts []ScriptDefinition
CustomScripts []ScriptDefinition
}
type ScriptDefinition struct {
Id string `validate:"required"`
Script string `validate:"required"`