An open API service indexing awesome lists of open source software.

https://github.com/abitofhelp/bazel-go-googleapis

This is an example using the googleapis proto package from Bazel Central Registry rather than using an archive_override in the MODULE.bazel file.
https://github.com/abitofhelp/bazel-go-googleapis

bazel bzlmod gazelle go golang grpc grpc-go grpc-golang grpc-reflection protobuf protocol-buffers

Last synced: 2 months ago
JSON representation

This is an example using the googleapis proto package from Bazel Central Registry rather than using an archive_override in the MODULE.bazel file.

Awesome Lists containing this project

README

        

#bazel-go-googleapis.git

This repository contains a client/server solution implementing the classic Greet service using the following technologies:
N.B. It does not use any of Buf's technology.
* Bazel
* Gazelle
* Go
* GoogleApis (Bazel Central Registry)
* Grpc
* Grpc Reflection
* Protocol Buffers

My goal was to explore how to use the googleapis proto package from BCR rather than having to
configure the following in the MODULE.bazel file.

```
# See:
# https://bazel.build/external/migration#fetch-deps-module-extensions
# https://github.com/bazelbuild/rules_go/issues/3685

GOOGLE_APIS_VERSION = "64926d52febbf298cb82a8f472ade4a3969ba922"

bazel_dep(
name = "com_google_googleapis",
version = GOOGLE_APIS_VERSION,
repo_name = "googleapis",
)
archive_override(
module_name = "com_google_googleapis",
integrity = "sha256-nRqTDnZ8k8glOYuPhpLso/41O5qq3t+88fyiKCyF34g=",
patch_strip = 1,
patches = [
"scripts/bazel/add_bzlmod_support.patch", # https://github.com/googleapis/googleapis/pull/855
],
strip_prefix = "googleapis-" + GOOGLE_APIS_VERSION,
urls = [
"https://github.com/googleapis/googleapis/archive/%s.zip" % GOOGLE_APIS_VERSION,
],
)
```