LoadConfigObjs produces a ConfigObjConfig map from a compose file Dict the source Dict is not validated if directly used. Use Load() to enable validation
(source map[string]any, details types.ConfigDetails)
| 630 | // LoadConfigObjs produces a ConfigObjConfig map from a compose file Dict |
| 631 | // the source Dict is not validated if directly used. Use Load() to enable validation |
| 632 | func LoadConfigObjs(source map[string]any, details types.ConfigDetails) (map[string]types.ConfigObjConfig, error) { |
| 633 | configs := make(map[string]types.ConfigObjConfig) |
| 634 | if err := Transform(source, &configs); err != nil { |
| 635 | return configs, err |
| 636 | } |
| 637 | for name, config := range configs { |
| 638 | obj, err := loadFileObjectConfig(name, "config", types.FileObjectConfig(config), details) |
| 639 | if err != nil { |
| 640 | return nil, err |
| 641 | } |
| 642 | configConfig := types.ConfigObjConfig(obj) |
| 643 | configConfig.Extras = loadExtras(name, source) |
| 644 | configs[name] = configConfig |
| 645 | } |
| 646 | return configs, nil |
| 647 | } |
| 648 | |
| 649 | func loadFileObjectConfig(name string, objType string, obj types.FileObjectConfig, details types.ConfigDetails) (types.FileObjectConfig, error) { |
| 650 | // if "external: true" |
no test coverage detected
searching dependent graphs…