Skip to content

Commit

Permalink
Add support for Cargo Registry to buf registry sdk version (#2965)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanburen committed May 10, 2024
1 parent ded6923 commit faf44b1
Show file tree
Hide file tree
Showing 4 changed files with 362 additions and 138 deletions.
14 changes: 14 additions & 0 deletions private/buf/cmd/buf/command/registry/sdk/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,20 @@ func run(
return err
}
version = pythonVersionResponse.Msg.Version
case registryv1alpha1.PluginRegistryType_PLUGIN_REGISTRY_TYPE_CARGO:
cargoVersionResponse, err := resolveServiceClient.GetCargoVersion(
ctx,
connect.NewRequest(
&registryv1alpha1.GetCargoVersionRequest{
ModuleReference: moduleReference,
PluginReference: pluginReference,
},
),
)
if err != nil {
return err
}
version = cargoVersionResponse.Msg.Version
default:
return syserror.Newf("unknown PluginRegistryType: %v", pluginRegistryType)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit faf44b1

Please sign in to comment.