Skip to content

Commit

Permalink
chore(storage): generate GAPIC under internal subdir (#4018)
Browse files Browse the repository at this point in the history
Add a gRPC Go GAPIC for the Storage API under an internal subdirectory of the submodule to ensure no one can import it. 

This GAPIC is being added for proof of concept development and should not be used in production or by any other client library.

Generated with the following:

```bash
$ cd google-cloud-go
$ export GOOGLE_CLOUD_GO=$(pwd)
$ cd internal/gapicgen
$ go run cloud.google.com/go/internal/gapicgen/cmd/genbot \
  -local \
  -regen-only \
  -only-gapics \
  -gapic=cloud.google.com/go/storage/internal/apiv1 \
  -gocloud-dir=$GOOGLE_CLOUD_GO
```
  • Loading branch information
noahdietz committed Jun 29, 2021
1 parent a89d341 commit 63fdb2e
Show file tree
Hide file tree
Showing 6 changed files with 3,863 additions and 2 deletions.
8 changes: 8 additions & 0 deletions internal/gapicgen/generator/config.go
Expand Up @@ -1222,4 +1222,12 @@ var microgenGapicConfigs = []*microgenConfig{
// GA after 2021/06/10
releaseLevel: "beta",
},
{
inputDirectoryPath: "google/storage/v1",
pkg: "storage",
importPath: "cloud.google.com/go/storage/internal/apiv1",
gRPCServiceConfigPath: "google/storage/v1/storage_grpc_service_config.json",
apiServiceConfigPath: "google/storage/v1/storage_v1.yaml",
releaseLevel: "alpha",
},
}
5 changes: 3 additions & 2 deletions internal/gapicgen/generator/config_test.go
Expand Up @@ -33,8 +33,9 @@ var apivExceptions = map[string]bool{
}

var packagePathExceptions = map[string]bool{
"cloud.google.com/go/longrunning/autogen": true,
"cloud.google.com/go/firestore/apiv1/admin": true,
"cloud.google.com/go/longrunning/autogen": true,
"cloud.google.com/go/firestore/apiv1/admin": true,
"cloud.google.com/go/storage/internal/apiv1": true,
}

// TestMicrogenConfigs validates config entries.
Expand Down
120 changes: 120 additions & 0 deletions storage/internal/apiv1/doc.go

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

0 comments on commit 63fdb2e

Please sign in to comment.