scripting-revamp-1 (#1630)

* First commit in this PR
Added `scripting.active` as a helm value

* added `scripting.active` to the config struct and the helm chart
this array of strings will include the active script titles

* updated the `active` filed in the script struct

* go mod tidy

* update go ver to 1.21.1
This commit is contained in:
Alon Girmonsky
2024-10-15 10:35:38 -07:00
committed by GitHub
parent cc3f8c86ff
commit 674a554767
8 changed files with 99 additions and 25 deletions

View File

@@ -10,20 +10,23 @@ import (
)
type Script struct {
Path string `json:"path"`
Title string `json:"title"`
Code string `json:"code"`
Path string `json:"path"`
Title string `json:"title"`
Code string `json:"code"`
Active bool `json:"active"`
}
type ConfigMapScript struct {
Title string `json:"title"`
Code string `json:"code"`
Title string `json:"title"`
Code string `json:"code"`
Active bool `json:"active"`
}
func (s *Script) ConfigMap() ConfigMapScript {
return ConfigMapScript{
Title: s.Title,
Code: s.Code,
Title: s.Title,
Code: s.Code,
Active: s.Active,
}
}
@@ -58,9 +61,10 @@ func ReadScriptFile(path string) (script *Script, err error) {
}
script = &Script{
Path: path,
Title: title,
Code: code,
Path: path,
Title: title,
Code: code,
Active: false,
}
return