-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DLP library (GAPIC-only) #2323
DLP library (GAPIC-only) #2323
Conversation
@lukesneeringer Do we know if the gapic-only client library is able to handle 'lint', 'unit test', 'snippet test' and 'system test'. I think these are needed in order to pass CI build. At least we need to ignore if they cannot pass. |
packages/dlp/package.json
Outdated
@@ -0,0 +1,40 @@ | |||
{ | |||
"repository": "GoogleCloudPlatform/google-cloud-node", | |||
"name": "dlp", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/package.json
Outdated
], | ||
"dependencies": { | ||
"google-proto-files": "^0.12.0", | ||
"google-gax": "^0.12.2", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/src/index.js
Outdated
@@ -0,0 +1,51 @@ | |||
/* | |||
* Copyright 2016 Google Inc. All rights reserved. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/src/index.js
Outdated
} | ||
|
||
module.exports = dlp_v2beta1; | ||
module.exports.v2beta1 = dlp_v2beta1; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/src/index.js
Outdated
* The customized config to build the call settings. See | ||
* {@link gax.constructSettings} for the format. | ||
*/ | ||
function dlp_v2beta1(opts) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/src/index.js
Outdated
* Create an dlpServiceClient with additional helpers for common | ||
* tasks. | ||
* | ||
* @param {Object=} opts - The optional parameters. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
]; | ||
|
||
/** | ||
* The DLP API is a service that allows clients |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@landrito Please review @stephenplusplus's comments so that we can add those to the auto-generated code. |
Looking! |
@lukesneeringer Confirmed that dlp proto files are already in google-proto-files package. |
Unit tests should pass. I configured the linter to ignore auto-generated files. If we are failing on the linter, we need to double-check that and make sure they are being ignored. Not sure about snippet and system tests. I am not aware of those being generated for GAPICs. |
packages/dlp/package.json
Outdated
"description": "DLP API client for Node.js", | ||
"main": "src/index.js", | ||
"files": [ | ||
"src" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/package.json
Outdated
"extend": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "3.2.0", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/package.json
Outdated
"through2": "2.0.3" | ||
}, | ||
"scripts": { | ||
"test": "mocha" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Can we generate a README for this like in #2327? |
@stephenplusplus I'll add these changes to the generator soon. |
return new DlpServiceClientBuilder(gaxGrpc); | ||
} | ||
|
||
var dlpServiceClient = require('grpc-google-privacy-dlp-v2beta1').client; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See @stephenplusplus comment here.
Regenerated with all the toolkit fixes! |
packages/dlp/package.json
Outdated
"name": "dlp", | ||
"version": "0.0.0", | ||
"name": "@google-cloud/dlp", | ||
"version": "0.7.1", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/package.json
Outdated
"author": "Google Inc", | ||
"description": "DLP API client for Node.js", | ||
"url": "https://github.com/googleapis/googleapis", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/package.json
Outdated
@@ -22,16 +26,17 @@ | |||
"DLP API" | |||
], | |||
"dependencies": { | |||
"google-proto-files": "^0.12.0", | |||
"google-gax": "^0.12.2", | |||
"google-proto-files": "^0.8.6", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/README.md
Outdated
|
||
### Installation | ||
``` | ||
$ npm install @google-cloud/dlp |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/README.md
Outdated
In order to use this library, you first need to go through the following steps: | ||
|
||
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) | ||
2. [Enable the dlp api.](https://console.cloud.google.com/apis/api/dlp) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -63,6 +63,9 @@ module.exports = { | |||
datastore: { | |||
title: 'Cloud Datastore' | |||
}, | |||
dlp: { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -239,6 +239,7 @@ Module.prototype.runSystemTests = function() { | |||
var modulesExcludedFromSystemTests = [ | |||
'common', | |||
'common-grpc', | |||
'dlp', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/test/gapic-v2beta1.js
Outdated
client.createInspectOperation(request, function(err, response) { | ||
assert.ifError(err); | ||
assert.deepStrictEqual(response, expectedResponse); | ||
done(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Some linting errors: https://ci.appveyor.com/project/GoogleCloudPlatform/google-cloud-node/build/1.0.1850/job/j9m6jw0u2wiy346o
|
I believe there is a pattern matching expression set to exclude files prefixed with "gapic-". That's what the test file was formerly called, but it is now "test-". If we switch it back, it should be good. |
Yeah, I had been renaming that manually (for the precise reason of being able to do a precise exclusion). @landrito, any chance we could change that in toolkit? |
packages/dlp/test/test-v2beta1.js
Outdated
@@ -0,0 +1,341 @@ | |||
/* |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
packages/dlp/test/gapic_v2beta1.js
Outdated
@@ -0,0 +1,341 @@ | |||
/* |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@ace-n Here is the DLP library to write samples against.
@swcloud Can you add the protos to the common protos package? Coordinate that with @stephenplusplus (who will teach you how to do it).
We also need a README. We can autogen one once googleapis/gapic-generator#1240 is merged.