|
16 | 16 |
|
17 | 17 | // EnvString represents either a literal string or an environment reference
|
18 | 18 | type EnvString struct {
|
19 |
| - Value *string `json:"value,omitempty" yaml:"value,omitempty" jsonschema:"anyof_required=value"` |
20 |
| - Variable *string `json:"env,omitempty" yaml:"env,omitempty" jsonschema:"anyof_required=env"` |
| 19 | + Value *string `json:"value,omitempty" yaml:"value,omitempty" mapstructure:"value" jsonschema:"anyof_required=value"` |
| 20 | + Variable *string `json:"env,omitempty" yaml:"env,omitempty" mapstructure:"env" jsonschema:"anyof_required=env"` |
21 | 21 | }
|
22 | 22 |
|
23 | 23 | // NewEnvString creates an EnvString instance
|
@@ -101,8 +101,8 @@ func (ev EnvString) GetOrDefault(defaultValue string) (string, error) {
|
101 | 101 |
|
102 | 102 | // EnvInt represents either a literal integer or an environment reference
|
103 | 103 | type EnvInt struct {
|
104 |
| - Value *int64 `json:"value,omitempty" yaml:"value,omitempty" jsonschema:"anyof_required=value"` |
105 |
| - Variable *string `json:"env,omitempty" yaml:"env,omitempty" jsonschema:"anyof_required=env"` |
| 104 | + Value *int64 `json:"value,omitempty" yaml:"value,omitempty" mapstructure:"value" jsonschema:"anyof_required=value"` |
| 105 | + Variable *string `json:"env,omitempty" yaml:"env,omitempty" mapstructure:"env" jsonschema:"anyof_required=env"` |
106 | 106 | }
|
107 | 107 |
|
108 | 108 | // NewEnvInt creates an EnvInt instance.
|
@@ -175,8 +175,8 @@ func (ev EnvInt) GetOrDefault(defaultValue int64) (int64, error) {
|
175 | 175 |
|
176 | 176 | // EnvBool represents either a literal boolean or an environment reference
|
177 | 177 | type EnvBool struct {
|
178 |
| - Value *bool `json:"value,omitempty" yaml:"value,omitempty" jsonschema:"anyof_required=value"` |
179 |
| - Variable *string `json:"env,omitempty" yaml:"env,omitempty" jsonschema:"anyof_required=env"` |
| 178 | + Value *bool `json:"value,omitempty" yaml:"value,omitempty" mapstructure:"value" jsonschema:"anyof_required=value"` |
| 179 | + Variable *string `json:"env,omitempty" yaml:"env,omitempty" mapstructure:"env" jsonschema:"anyof_required=env"` |
180 | 180 | }
|
181 | 181 |
|
182 | 182 | // NewEnvBool creates an EnvBool instance.
|
@@ -249,8 +249,8 @@ func (ev EnvBool) GetOrDefault(defaultValue bool) (bool, error) {
|
249 | 249 |
|
250 | 250 | // EnvFloat represents either a literal floating point number or an environment reference
|
251 | 251 | type EnvFloat struct {
|
252 |
| - Value *float64 `json:"value,omitempty" yaml:"value,omitempty" jsonschema:"anyof_required=value"` |
253 |
| - Variable *string `json:"env,omitempty" yaml:"env,omitempty" jsonschema:"anyof_required=env"` |
| 252 | + Value *float64 `json:"value,omitempty" yaml:"value,omitempty" mapstructure:"value" jsonschema:"anyof_required=value"` |
| 253 | + Variable *string `json:"env,omitempty" yaml:"env,omitempty" mapstructure:"env" jsonschema:"anyof_required=env"` |
254 | 254 | }
|
255 | 255 |
|
256 | 256 | // NewEnvFloat creates an EnvFloat instance.
|
@@ -342,8 +342,8 @@ func validateEnvironmentMapValue(variable *string) error {
|
342 | 342 |
|
343 | 343 | // EnvMapString represents either a literal string map or an environment reference
|
344 | 344 | type EnvMapString struct {
|
345 |
| - Value map[string]string `json:"value,omitempty" yaml:"value,omitempty" jsonschema:"anyof_required=value"` |
346 |
| - Variable *string `json:"env,omitempty" yaml:"env,omitempty" jsonschema:"anyof_required=env"` |
| 345 | + Value map[string]string `json:"value,omitempty" yaml:"value,omitempty" mapstructure:"value" jsonschema:"anyof_required=value"` |
| 346 | + Variable *string `json:"env,omitempty" yaml:"env,omitempty" mapstructure:"env" jsonschema:"anyof_required=env"` |
347 | 347 | }
|
348 | 348 |
|
349 | 349 | // NewEnvMapString creates an EnvMapString instance.
|
@@ -399,8 +399,8 @@ func (ev EnvMapString) Get() (map[string]string, error) {
|
399 | 399 |
|
400 | 400 | // EnvMapInt represents either a literal int map or an environment reference
|
401 | 401 | type EnvMapInt struct {
|
402 |
| - Value map[string]int64 `json:"value,omitempty" yaml:"value,omitempty" jsonschema:"anyof_required=value"` |
403 |
| - Variable *string `json:"env,omitempty" yaml:"env,omitempty" jsonschema:"anyof_required=env"` |
| 402 | + Value map[string]int64 `json:"value,omitempty" yaml:"value,omitempty" mapstructure:"value" jsonschema:"anyof_required=value"` |
| 403 | + Variable *string `json:"env,omitempty" yaml:"env,omitempty" mapstructure:"env" jsonschema:"anyof_required=env"` |
404 | 404 | }
|
405 | 405 |
|
406 | 406 | // NewEnvMapInt creates an EnvMapInt instance.
|
@@ -456,8 +456,8 @@ func (ev EnvMapInt) Get() (map[string]int64, error) {
|
456 | 456 |
|
457 | 457 | // EnvMapFloat represents either a literal float map or an environment reference
|
458 | 458 | type EnvMapFloat struct {
|
459 |
| - Value map[string]float64 `json:"value,omitempty" yaml:"value,omitempty" jsonschema:"anyof_required=value"` |
460 |
| - Variable *string `json:"env,omitempty" yaml:"env,omitempty" jsonschema:"anyof_required=env"` |
| 459 | + Value map[string]float64 `json:"value,omitempty" yaml:"value,omitempty" mapstructure:"value" jsonschema:"anyof_required=value"` |
| 460 | + Variable *string `json:"env,omitempty" yaml:"env,omitempty" mapstructure:"env" jsonschema:"anyof_required=env"` |
461 | 461 | }
|
462 | 462 |
|
463 | 463 | // NewEnvMapFloat creates an EnvMapFloat instance.
|
@@ -513,8 +513,8 @@ func (ev EnvMapFloat) Get() (map[string]float64, error) {
|
513 | 513 |
|
514 | 514 | // EnvMapBool represents either a literal bool map or an environment reference
|
515 | 515 | type EnvMapBool struct {
|
516 |
| - Value map[string]bool `json:"value,omitempty" yaml:"value,omitempty" jsonschema:"anyof_required=value"` |
517 |
| - Variable *string `json:"env,omitempty" yaml:"env,omitempty" jsonschema:"anyof_required=env"` |
| 516 | + Value map[string]bool `json:"value,omitempty" yaml:"value,omitempty" mapstructure:"value" jsonschema:"anyof_required=value"` |
| 517 | + Variable *string `json:"env,omitempty" yaml:"env,omitempty" mapstructure:"env" jsonschema:"anyof_required=env"` |
518 | 518 | }
|
519 | 519 |
|
520 | 520 | // NewEnvMapBool creates an EnvMapBool instance.
|
|
0 commit comments