MCPcopy Create free account
hub / github.com/dagger/dagger / buildInterface

Method buildInterface

sdk/typescript/src/module/executor.ts:63–78  ·  view source on GitHub ↗

* Transform a Dagger interface identifier into an implementation of this * interface serves as module call binding to reach the true implementation.

(iface: string, id: string)

Source from the content-addressed store, hash-verified

61 * interface serves as module call binding to reach the true implementation.
62 */
63 buildInterface(iface: string, id: string): any {
64 const interfaceObject = this.daggerModule.interfaces[iface]
65 if (!interfaceObject) {
66 throw new Error(`Interface ${iface} not found in the module`)
67 }
68
69 const ifaceImpl = new InterfaceWrapper(
70 this,
71 this.daggerModule,
72 `${this.daggerModule.name}${iface}`,
73 id,
74 interfaceObject.functions,
75 )
76
77 return ifaceImpl
78 }
79
80 /**
81 * Transfer a Dagger enum member name into its implemented value.

Callers 1

loadValueFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected