Skip to content

Commit

Permalink
feat: support bundle request (#330)
Browse files Browse the repository at this point in the history
* init support for bundling request

* merge

* gtx fic

* add baseline test for logging - unfinished

* pick up gax change of exposing bundleDescriptor

* repeated field extraction

* local logging unit test work

* clean up

* update baseline

* update client_config.json

* feedback

* move duplicate code
  • Loading branch information
xiaozhenliu-gg5 committed Mar 18, 2020
1 parent 65ea018 commit 264fb7b
Show file tree
Hide file tree
Showing 69 changed files with 12,544 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const version = require('../../../package.json').version;
* @memberof v1beta1
*/
export class BigQueryStorageClient {
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}};
private _innerApiCalls: {[name: string]: Function};
private _pathTemplates: {[name: string]: gax.PathTemplate};
private _terminated = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const version = require('../../../package.json').version;
* @memberof v1beta1
*/
export class EchoClient {
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}};
private _innerApiCalls: {[name: string]: Function};
private _pathTemplates: {[name: string]: gax.PathTemplate};
private _terminated = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const version = require('../../../package.json').version;
* @memberof v1beta1
*/
export class IdentityClient {
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}};
private _innerApiCalls: {[name: string]: Function};
private _pathTemplates: {[name: string]: gax.PathTemplate};
private _terminated = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const version = require('../../../package.json').version;
* @memberof v1beta1
*/
export class MessagingClient {
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}};
private _innerApiCalls: {[name: string]: Function};
private _pathTemplates: {[name: string]: gax.PathTemplate};
private _terminated = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const version = require('../../../package.json').version;
* @memberof v1beta1
*/
export class TestingClient {
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}};
private _innerApiCalls: {[name: string]: Function};
private _pathTemplates: {[name: string]: gax.PathTemplate};
private _terminated = false;
Expand Down
2 changes: 1 addition & 1 deletion baselines/dlp/src/v2/dlp_service_client.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const version = require('../../../package.json').version;
* @memberof v2
*/
export class DlpServiceClient {
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}};
private _innerApiCalls: {[name: string]: Function};
private _pathTemplates: {[name: string]: gax.PathTemplate};
private _terminated = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const version = require('../../../package.json').version;
* @memberof v1
*/
export class KeyManagementServiceClient {
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}};
private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}, batching: {}};
private _innerApiCalls: {[name: string]: Function};
private _terminated = false;
private _opts: ClientOptions;
Expand Down
14 changes: 14 additions & 0 deletions baselines/logging/.gitignore.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**/*.log
**/node_modules
.coverage
coverage
.nyc_output
docs/
out/
build/
system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
package-lock.json
__pycache__
55 changes: 55 additions & 0 deletions baselines/logging/.jsdoc.js.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

'use strict';

module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/jsdoc-fresh',
recurse: true,
verbose: true,
destination: './docs/'
},
plugins: [
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'build/src',
'protos'
],
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2019 Google, LLC.',
includeDate: false,
sourceFiles: false,
systemName: 'logging',
theme: 'lumen',
default: {
outputSourceFiles: false
}
},
markdown: {
idInHeadings: true
}
};
5 changes: 5 additions & 0 deletions baselines/logging/.mocharc.json.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"enable-source-maps": true,
"throw-deprecation": true,
"timeout": 10000
}
1 change: 1 addition & 0 deletions baselines/logging/README.md.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Logging: Nodejs Client
10 changes: 10 additions & 0 deletions baselines/logging/linkinator.config.json.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recurse": true,
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io"
],
"silent": true,
"concurrency": 10
}
49 changes: 49 additions & 0 deletions baselines/logging/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "logging",
"version": "0.1.0",
"description": "Logging client for Node.js",
"repository": "googleapis/nodejs-logging",
"license": "Apache-2.0",
"author": "Google LLC",
"files": [
"build/src",
"build/protos"
],
"main": "build/src/index.js",
"scripts": {
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/",
"compile-protos": "compileProtos src",
"docs": "jsdoc -c .jsdoc.js",
"docs-test": "linkinator docs",
"fix": "gts fix",
"lint": "gts check",
"predocs-test": "npm run docs",
"prepare": "npm run compile-protos && npm run compile",
"system-test": "c8 mocha build/system-test",
"test": "c8 mocha build/test"
},
"dependencies": {
"google-gax": "^1.15.1"
},
"devDependencies": {
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.30",
"c8": "^7.1.0",
"gts": "^1.1.2",
"jsdoc": "^3.6.3",
"jsdoc-fresh": "^1.0.2",
"jsdoc-region-tag": "^1.0.4",
"linkinator": "^2.0.3",
"mocha": "^6.2.2",
"pack-n-play": "^1.0.0-2",
"null-loader": "^3.0.0",
"ts-loader": "^6.2.1",
"typescript": "~3.7.5",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11"
},
"engines": {
"node": ">=8.13.0"
}
}
1 change: 1 addition & 0 deletions baselines/logging/package.json.baseline
25 changes: 25 additions & 0 deletions baselines/logging/proto.list.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
google/protobuf/descriptor.proto
google/api/field_behavior.proto
google/api/label.proto
google/api/launch_stage.proto
google/protobuf/struct.proto
google/api/monitored_resource.proto
google/api/resource.proto
google/protobuf/duration.proto
google/api/http.proto
google/api/annotations.proto
google/logging/type/http_request.proto
google/logging/type/log_severity.proto
google/protobuf/any.proto
google/protobuf/timestamp.proto
google/rpc/status.proto
google/logging/v2/log_entry.proto
google/api/client.proto
google/protobuf/empty.proto
google/protobuf/field_mask.proto
google/logging/v2/logging_config.proto
google/logging/v2/logging.proto
google/api/distribution.proto
google/api/metric.proto
google/logging/v2/logging_metrics.proto
google/cloud/common_resources.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright 2020 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// This file contains stub messages for common resources in GCP.
// It is not intended to be directly generated, and is instead used by
// other tooling to be able to match common resource patterns.
syntax = "proto3";

package google.cloud;

import "google/api/resource.proto";


option (google.api.resource_definition) = {
type: "cloudresourcemanager.googleapis.com/Project"
pattern: "projects/{project}"
};


option (google.api.resource_definition) = {
type: "cloudresourcemanager.googleapis.com/Organization"
pattern: "organizations/{organization}"
};


option (google.api.resource_definition) = {
type: "cloudresourcemanager.googleapis.com/Folder"
pattern: "folders/{folder}"
};


option (google.api.resource_definition) = {
type: "cloudbilling.googleapis.com/BillingAccount"
pattern: "billingAccounts/{billing_account}"
};

option (google.api.resource_definition) = {
type: "locations.googleapis.com/Location"
pattern: "projects/{project}/locations/{location}"
};

0 comments on commit 264fb7b

Please sign in to comment.