MSP-4622 configuration division
This commit is contained in:
1 parent
cf9a24f424
commit
2c0562e98f
9 files changed
+164
-18
No files matched your search
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"logLevel": "debug",
|
||||
"scripts": [
|
||||
],
|
||||
"scripts": {
|
||||
"commonScripts": [],
|
||||
"customScripts": []
|
||||
},
|
||||
"sharedScript": "",
|
||||
"scriptExecutionTimeoutMs": 1000
|
||||
}
|
||||
+6
-1
@@ -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"`
|
||||
|
||||
Reference in new issue
Block a user