MCPcopy Create free account
hub / github.com/docker/cli / LoadConfigObjs

Function LoadConfigObjs

cli/compose/loader/loader.go:632–647  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
632func 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
649func loadFileObjectConfig(name string, objType string, obj types.FileObjectConfig, details types.ConfigDetails) (types.FileObjectConfig, error) {
650 // if "external: true"

Callers 1

loadSectionsFunction · 0.85

Calls 3

TransformFunction · 0.85
loadFileObjectConfigFunction · 0.85
loadExtrasFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…