add create functionnality

This commit is contained in:
2023-07-01 00:49:45 -04:00
parent 03ddddd2e2
commit 71fe930228
9 changed files with 318 additions and 85 deletions
+11 -4
View File
@@ -12,10 +12,11 @@ type ConfigYml struct {
}
type SectionConfig struct {
Softwares map[string]SoftwareConfig `yaml:"software"`
EnvironmentsVariables map[string]string `yaml:"environments variables"`
Directory map[string]DirectoryConfig `yaml:"directory"`
Pipelines map[string]PipelineConfig `yaml:"pipelines"`
Softwares map[string]SoftwareConfig `yaml:"software"`
EnvironmentsVariables map[string]string `yaml:"environments variables"`
Directory map[string]DirectoryConfig `yaml:"directory"`
Pipelines map[string]PipelineConfig `yaml:"pipelines"`
InstallApps map[string]InstallAppsConfig `yaml:"install apps"`
}
type SoftwareConfig struct {
@@ -44,6 +45,12 @@ type PipelineConfig struct {
Lint string `yaml:"lint"`
}
type InstallAppsConfig struct {
Name string `yaml:"name"`
CmdWin string `yaml:"cmdWin"`
CmdLinux string `yaml:"cmdLinux"`
}
// function GetPathsFromCategory
func (c *ConfigYml) GetPathsFromCategory(sectionName string) ([]string, error) {
section, ok := c.Sections[sectionName]