move well-known types (#372)

This is step 3 of 6 in a multi-stage migration
to move the well-known types
from the google.golang.org/genproto module
to the google.golang.org/protobuf module.

The generated Go packages for field_mask.proto, api.proto,
type.proto, and source_context.proto are being moved over
to this module alongside all the other well-known types.

In order to move these types between two modules,
there needs to be a sequence of changes submitted in
decently rapid succession. It is impossible to atomically
make these changes, so a brief breakage is inevitable.
The steps are as follows:

Step 1: Submit a change to cloud.google.com/go/internal/gapicgen
to avoid generating the well-known types. Otherwise, the tool
will undo the changes made in step 3.
See https://code-review.googlesource.com/c/gocloud/+/56810

Step 2: Submit a change to google.golang.org/protobuf that
adds the generated well-known types being migrated to that module.
In order to prevent the situation where a user links in
too old a version of the genproto module such that
duplicate registration occurs for the well-known types,
the registry is specially modified to provide an error
message that instructs users to upgrade the genproto module.
See https://golang.org/cl/234937

Step 3: Submit a change to google.golang.org/genproto that
switches all generated well-known types to be aliases to the
ones declared in google.golang.org/protobuf from the previous step.
This will cause the genproto module to incur an dependency
on an unreleased version of the protobuf module.
See https://github.com/googleapis/go-genproto/pull/372

Step 4: Submit a change to google.golang.org/protobuf that
adds a weak module depdency on the genproto module at the
revision from the previous step.

Step 5: Release google.golang.org/protobuf@v1.24.0.

Step 6: Submit a change to google.golang.org/genproto that
updates the protobuf module dependency to v1.24.0.
10 files changed
tree: 3ab4cc0addde242db788346c7201a6db29d4f17c
  1. googleapis/
  2. internal/
  3. protobuf/
  4. CONTRIBUTING.md
  5. go.mod
  6. go.sum
  7. LICENSE
  8. README.md
  9. RELEASING.md
  10. tools.go
README.md

Go generated proto packages

GoDoc

go get google.golang.org/genproto/...

IMPORTANT This repository is currently experimental. The structure of the contained packages is subject to change. Please see the original source repositories (listed below) to find out the status of the each protocol buffer's associated service.

This repository contains the generated Go packages for common protocol buffer types, and the generated gRPC code necessary for interacting with Google's gRPC APIs.

There are two sources for the proto files used in this repository:

  1. google/protobuf: the code in the protobuf and ptypes subdirectories is derived from this repo. The messages in protobuf are used to describe protocol buffer messages themselves. The messages under ptypes define the common well-known types.
  2. googleapis/googleapis: the code in the googleapis is derived from this repo. The packages here contain types specifically for interacting with Google APIs.