( ctx context.Context, container app.EnvStdioContainer, pluginImages []bufimage.Image, pluginConfig bufconfig.GeneratePluginConfig, includeImports bool, includeWellKnownTypes bool, )
| 300 | } |
| 301 | |
| 302 | func (g *generator) execLocalPlugin( |
| 303 | ctx context.Context, |
| 304 | container app.EnvStdioContainer, |
| 305 | pluginImages []bufimage.Image, |
| 306 | pluginConfig bufconfig.GeneratePluginConfig, |
| 307 | includeImports bool, |
| 308 | includeWellKnownTypes bool, |
| 309 | ) (*pluginpb.CodeGeneratorResponse, error) { |
| 310 | requests, err := bufimage.ImagesToCodeGeneratorRequests( |
| 311 | pluginImages, |
| 312 | pluginConfig.Opt(), |
| 313 | nil, |
| 314 | includeImports, |
| 315 | includeWellKnownTypes, |
| 316 | ) |
| 317 | if err != nil { |
| 318 | return nil, err |
| 319 | } |
| 320 | response, err := g.pluginexecGenerator.Generate( |
| 321 | ctx, |
| 322 | container, |
| 323 | pluginConfig.Name(), |
| 324 | requests, |
| 325 | bufprotopluginexec.GenerateWithPluginPath(pluginConfig.Path()...), |
| 326 | bufprotopluginexec.GenerateWithProtocPath(pluginConfig.ProtocPath()...), |
| 327 | ) |
| 328 | if err != nil { |
| 329 | return nil, fmt.Errorf("plugin %s: %v", pluginConfig.Name(), err) |
| 330 | } |
| 331 | return response, nil |
| 332 | } |
| 333 | |
| 334 | func (g *generator) execRemotePluginsV2( |
| 335 | ctx context.Context, |
no test coverage detected