MCPcopy Create free account
hub / github.com/bufbuild/buf / getImageForWorkspace

Method getImageForWorkspace

private/buf/bufctl/controller.go:959–976  ·  view source on GitHub ↗
(
	ctx context.Context,
	workspace bufworkspace.Workspace,
	functionOptions *functionOptions,
)

Source from the content-addressed store, hash-verified

957}
958
959func (c *controller) getImageForWorkspace(
960 ctx context.Context,
961 workspace bufworkspace.Workspace,
962 functionOptions *functionOptions,
963) (bufimage.Image, error) {
964 image, err := c.buildImage(
965 ctx,
966 bufmodule.ModuleSetToModuleReadBucketWithOnlyProtoFiles(workspace),
967 functionOptions,
968 )
969 if err != nil {
970 return nil, err
971 }
972 if err := c.warnUnconfiguredTransitiveImports(ctx, workspace, image); err != nil {
973 return nil, err
974 }
975 return image, nil
976}
977
978func (c *controller) getWorkspaceForProtoFileRef(
979 ctx context.Context,

Callers 2

GetImageForWorkspaceMethod · 0.95
getImageForRefMethod · 0.95

Tested by

no test coverage detected