MCPcopy Index your code
hub / github.com/dagger/dagger / GetObject

Method GetObject

cmd/dagger/module_inspect.go:469–477  ·  view source on GitHub ↗

GetObject retrieves a saved object type definition from the module.

(name string)

Source from the content-addressed store, hash-verified

467
468// GetObject retrieves a saved object type definition from the module.
469func (m *moduleDef) GetObject(name string) *modObject {
470 for _, obj := range m.AsObjects() {
471 // Normalize name in case an SDK uses a different convention for object names.
472 if gqlObjectName(obj.Name) == gqlObjectName(name) {
473 return obj
474 }
475 }
476 return nil
477}
478
479func (m *moduleDef) GetObjectFunction(objectName, functionName string) (*modFunction, error) {
480 fp := m.GetFunctionProvider(objectName)

Callers 3

GetFunctionProviderMethod · 0.95
ModuleConstructorMethod · 0.95
ModuleDocMethod · 0.45

Calls 2

AsObjectsMethod · 0.95
gqlObjectNameFunction · 0.70

Tested by

no test coverage detected