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

Function invoke

sdk/java/runtime/dagger.gen.go:204–306  ·  view source on GitHub ↗
(ctx context.Context, parentJSON []byte, parentName string, fnName string, inputArgs map[string][]byte)

Source from the content-addressed store, hash-verified

202 return nil
203}
204func invoke(ctx context.Context, parentJSON []byte, parentName string, fnName string, inputArgs map[string][]byte) (_ any, err error) {
205 _ = inputArgs
206 switch parentName {
207 case "JavaSdk":
208 switch fnName {
209 case "Codegen":
210 var parent JavaSdk
211 err = json.Unmarshal(parentJSON, &parent)
212 if err != nil {
213 panic(fmt.Errorf("%s: %w", "failed to unmarshal parent object", err))
214 }
215 var modSource *dagger.ModuleSource
216 if inputArgs["modSource"] != nil {
217 err = json.Unmarshal([]byte(inputArgs["modSource"]), &modSource)
218 if err != nil {
219 panic(fmt.Errorf("%s: %w", "failed to unmarshal input arg modSource", err))
220 }
221 }
222 var introspectionJson *dagger.File
223 if inputArgs["introspectionJSON"] != nil {
224 err = json.Unmarshal([]byte(inputArgs["introspectionJSON"]), &introspectionJson)
225 if err != nil {
226 panic(fmt.Errorf("%s: %w", "failed to unmarshal input arg introspectionJSON", err))
227 }
228 }
229 return (*JavaSdk).Codegen(&parent, ctx, modSource, introspectionJson)
230 case "JavaImage":
231 var parent JavaSdk
232 err = json.Unmarshal(parentJSON, &parent)
233 if err != nil {
234 panic(fmt.Errorf("%s: %w", "failed to unmarshal parent object", err))
235 }
236 return (*JavaSdk).JavaImage(&parent), nil
237 case "MavenImage":
238 var parent JavaSdk
239 err = json.Unmarshal(parentJSON, &parent)
240 if err != nil {
241 panic(fmt.Errorf("%s: %w", "failed to unmarshal parent object", err))
242 }
243 return (*JavaSdk).MavenImage(&parent), nil
244 case "ModuleRuntime":
245 var parent JavaSdk
246 err = json.Unmarshal(parentJSON, &parent)
247 if err != nil {
248 panic(fmt.Errorf("%s: %w", "failed to unmarshal parent object", err))
249 }
250 var modSource *dagger.ModuleSource
251 if inputArgs["modSource"] != nil {
252 err = json.Unmarshal([]byte(inputArgs["modSource"]), &modSource)
253 if err != nil {
254 panic(fmt.Errorf("%s: %w", "failed to unmarshal input arg modSource", err))
255 }
256 }
257 var introspectionJson *dagger.File
258 if inputArgs["introspectionJSON"] != nil {
259 err = json.Unmarshal([]byte(inputArgs["introspectionJSON"]), &introspectionJson)
260 if err != nil {
261 panic(fmt.Errorf("%s: %w", "failed to unmarshal input arg introspectionJSON", err))

Callers 1

dispatchFunction · 0.70

Calls 7

JavaImageMethod · 0.80
MavenImageMethod · 0.80
WithConfigMethod · 0.80
NewFunction · 0.70
UnmarshalMethod · 0.65
CodegenMethod · 0.65
ModuleRuntimeMethod · 0.45

Tested by

no test coverage detected