This repository has been archived by the owner on Nov 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
YamlConfig.go
72 lines (56 loc) · 1.88 KB
/
YamlConfig.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package models
type YamlConfig struct {
Env map[string]string `yaml:"env" json:"env,omitempty"`
BeforeInstall []string `yaml:"before_install" json:"before_install,omitempty"`
Install []string `yaml:"install" json:"install,omitempty"`
AfterInstall []string `yaml:"after_install" json:"after_install,omitempty"`
BeforeScript []string `yaml:"before_script" json:"before_script,omitempty"`
Script []string `yaml:"script" json:"script,omitempty"`
AfterScript []string `yaml:"after_script" json:"after_script,omitempty"`
}
func NewYamlConfig() *YamlConfig {
config := &YamlConfig{}
return config
}
func (config *YamlConfig) GetEnv() map[string]string {
return config.Env
}
func (config *YamlConfig) SetEnv(env map[string]string) {
config.Env = env
}
func (config *YamlConfig) GetBeforeInstall() []string {
return config.BeforeInstall
}
func (config *YamlConfig) SetBeforeInstall(beforeInstall []string) {
config.BeforeInstall = beforeInstall
}
func (config *YamlConfig) GetInstall() []string {
return config.Install
}
func (config *YamlConfig) SetInstall(install []string) {
config.Install = install
}
func (config *YamlConfig) GetAfterInstall() []string {
return config.AfterInstall
}
func (config *YamlConfig) SetAfterInstall(afterInstall []string) {
config.AfterInstall = afterInstall
}
func (config *YamlConfig) GetBeforeScript() []string {
return config.BeforeScript
}
func (config *YamlConfig) SetBeforeScript(beforeScript []string) {
config.BeforeScript = beforeScript
}
func (config *YamlConfig) GetScript() []string {
return config.Script
}
func (config *YamlConfig) SetScript(script []string) {
config.Script = script
}
func (config *YamlConfig) GetAfterScript() []string {
return config.AfterScript
}
func (config *YamlConfig) SetAfterScript(afterScript []string) {
config.AfterScript = afterScript
}