|
|
|
@ -34,7 +34,7 @@ type (
|
|
|
|
|
func (p *Parameter) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|
|
|
|
d := new(parameter)
|
|
|
|
|
err := unmarshal(d)
|
|
|
|
|
if err == nil && d.Secret != ""{
|
|
|
|
|
if err == nil && d.Secret != "" {
|
|
|
|
|
p.Secret = d.Secret
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
@ -43,3 +43,16 @@ func (p *Parameter) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|
|
|
|
p.Value = i
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MarshalYAML implements yaml marshalling.
|
|
|
|
|
func (p *Parameter) MarshalYAML() (interface{}, error) {
|
|
|
|
|
if p.Secret != "" {
|
|
|
|
|
m := map[string]interface{}{}
|
|
|
|
|
m["from_secret"] = p.Secret
|
|
|
|
|
return m, nil
|
|
|
|
|
}
|
|
|
|
|
if p.Value != "" {
|
|
|
|
|
return p.Value, nil
|
|
|
|
|
}
|
|
|
|
|
return nil, nil
|
|
|
|
|
}
|
|
|
|
|