Skip to content

Commit

Permalink
chore: start generating new libs (#4172)
Browse files Browse the repository at this point in the history
Changes:

feat(privatecatalog): start generating apiv1beta1

feat(shell): start generating apiv1

feat(vpcaccess): start generating apiv1

chore(internal): fix language config pathing

chore(internal): support generating multiple apis locally
  • Loading branch information
codyoss committed Jun 1, 2021
1 parent 8a28ff6 commit 500c1a6
Show file tree
Hide file tree
Showing 15 changed files with 2,653 additions and 3 deletions.
29 changes: 28 additions & 1 deletion internal/.repo-metadata-full.json
Expand Up @@ -622,7 +622,7 @@
},
"cloud.google.com/go/language/apiv1beta2": {
"distribution_name": "cloud.google.com/go/language/apiv1beta2",
"description": "Cloud Natural Language API",
"description": "Google Cloud Natural Language API",
"language": "Go",
"client_library_type": "generated",
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/language/apiv1beta2",
Expand Down Expand Up @@ -845,6 +845,15 @@
"release_level": "ga",
"library_type": ""
},
"cloud.google.com/go/privatecatalog/apiv1beta1": {
"distribution_name": "cloud.google.com/go/privatecatalog/apiv1beta1",
"description": "Cloud Private Catalog API",
"language": "Go",
"client_library_type": "generated",
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/privatecatalog/apiv1beta1",
"release_level": "beta",
"library_type": ""
},
"cloud.google.com/go/profiler": {
"distribution_name": "cloud.google.com/go/profiler",
"description": "Cloud Profiler",
Expand Down Expand Up @@ -1124,6 +1133,15 @@
"release_level": "beta",
"library_type": ""
},
"cloud.google.com/go/shell/apiv1": {
"distribution_name": "cloud.google.com/go/shell/apiv1",
"description": "Cloud Shell API",
"language": "Go",
"client_library_type": "generated",
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/shell/apiv1",
"release_level": "beta",
"library_type": ""
},
"cloud.google.com/go/spanner": {
"distribution_name": "cloud.google.com/go/spanner",
"description": "Cloud Spanner",
Expand Down Expand Up @@ -1286,6 +1304,15 @@
"release_level": "beta",
"library_type": ""
},
"cloud.google.com/go/vpcaccess/apiv1": {
"distribution_name": "cloud.google.com/go/vpcaccess/apiv1",
"description": "Serverless VPC Access API",
"language": "Go",
"client_library_type": "generated",
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/vpcaccess/apiv1",
"release_level": "beta",
"library_type": ""
},
"cloud.google.com/go/webrisk/apiv1": {
"distribution_name": "cloud.google.com/go/webrisk/apiv1",
"description": "Web Risk API",
Expand Down
28 changes: 27 additions & 1 deletion internal/gapicgen/generator/config.go
Expand Up @@ -79,7 +79,7 @@ var microgenGapicConfigs = []*microgenConfig{
pkg: "language",
importPath: "cloud.google.com/go/language/apiv1",
gRPCServiceConfigPath: "google/cloud/language/v1/language_grpc_service_config.json",
apiServiceConfigPath: "google/cloud/language/language_v1.yaml",
apiServiceConfigPath: "google/cloud/language/v1/language_v1.yaml",
releaseLevel: "ga",
},
{
Expand Down Expand Up @@ -1099,6 +1099,32 @@ var microgenGapicConfigs = []*microgenConfig{
// GA after 2021/06/18
releaseLevel: "beta",
},
{
inputDirectoryPath: "google/cloud/shell/v1",
pkg: "shell",
importPath: "cloud.google.com/go/shell/apiv1",
gRPCServiceConfigPath: "google/cloud/shell/v1/cloudshell_grpc_service_config.json",
apiServiceConfigPath: "google/cloud/shell/v1/cloudshell_v1.yaml",
// GA after 2021/06/26
releaseLevel: "beta",
},
{
inputDirectoryPath: "google/cloud/vpcaccess/v1",
pkg: "vpcaccess",
importPath: "cloud.google.com/go/vpcaccess/apiv1",
gRPCServiceConfigPath: "google/cloud/vpcaccess/v1/vpcaccess_grpc_service_config.json",
apiServiceConfigPath: "google/cloud/vpcaccess/v1/vpcaccess_v1.yaml",
// GA after 2021/06/26
releaseLevel: "beta",
},
{
inputDirectoryPath: "google/cloud/privatecatalog/v1beta1",
pkg: "privatecatalog",
importPath: "cloud.google.com/go/privatecatalog/apiv1beta1",
gRPCServiceConfigPath: "google/cloud/privatecatalog/v1beta1/cloudprivatecatalog_grpc_service_config.json",
apiServiceConfigPath: "google/cloud/privatecatalog/v1beta1/cloudprivatecatalog_v1beta1.yaml",
releaseLevel: "beta",
},

// Non-Cloud APIs
{
Expand Down
2 changes: 1 addition & 1 deletion internal/gapicgen/generator/gapics.go
Expand Up @@ -64,7 +64,7 @@ func (g *GapicGenerator) Regen(ctx context.Context) error {
// config has a block on it. Or if generating a single gapic and it does
// not match the specified import path.
if (c.stopGeneration && g.gapicToGenerate == "") ||
(g.gapicToGenerate != "" && g.gapicToGenerate != c.importPath) {
(g.gapicToGenerate != "" && !strings.Contains(g.gapicToGenerate, c.importPath)) {
continue
}
if err := g.microgen(c); err != nil {
Expand Down
119 changes: 119 additions & 0 deletions privatecatalog/apiv1beta1/doc.go

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

33 changes: 33 additions & 0 deletions privatecatalog/apiv1beta1/gapic_metadata.json
@@ -0,0 +1,33 @@
{
"schema": "1.0",
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods.",
"language": "go",
"protoPackage": "google.cloud.privatecatalog.v1beta1",
"libraryPackage": "cloud.google.com/go/privatecatalog/apiv1beta1",
"services": {
"PrivateCatalog": {
"clients": {
"grpc": {
"libraryClient": "Client",
"rpcs": {
"SearchCatalogs": {
"methods": [
"SearchCatalogs"
]
},
"SearchProducts": {
"methods": [
"SearchProducts"
]
},
"SearchVersions": {
"methods": [
"SearchVersions"
]
}
}
}
}
}
}
}

0 comments on commit 500c1a6

Please sign in to comment.