Skip to content

Commit 23a238e

Browse files
authored
Clean up DLP region tags. (#26)
1 parent ae2b575 commit 23a238e

File tree

6 files changed

+34
-34
lines changed

6 files changed

+34
-34
lines changed

dlp/deid.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
'use strict';
1717

1818
function deidentifyWithMask(string, maskingCharacter, numberToMask) {
19-
// [START deidentify_masking]
19+
// [START dlp_deidentify_masking]
2020
// Imports the Google Cloud Data Loss Prevention library
2121
const DLP = require('@google-cloud/dlp');
2222

@@ -63,11 +63,11 @@ function deidentifyWithMask(string, maskingCharacter, numberToMask) {
6363
.catch(err => {
6464
console.log(`Error in deidentifyWithMask: ${err.message || err}`);
6565
});
66-
// [END deidentify_masking]
66+
// [END dlp_deidentify_masking]
6767
}
6868

6969
function deidentifyWithFpe(string, alphabet, keyName, wrappedKey) {
70-
// [START deidentify_fpe]
70+
// [START dlp_deidentify_fpe]
7171
// Imports the Google Cloud Data Loss Prevention library
7272
const DLP = require('@google-cloud/dlp');
7373

@@ -123,7 +123,7 @@ function deidentifyWithFpe(string, alphabet, keyName, wrappedKey) {
123123
.catch(err => {
124124
console.log(`Error in deidentifyWithFpe: ${err.message || err}`);
125125
});
126-
// [END deidentify_fpe]
126+
// [END dlp_deidentify_fpe]
127127
}
128128

129129
const cli = require(`yargs`)

dlp/inspect.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function inspectString(
2626
infoTypes,
2727
includeQuote
2828
) {
29-
// [START inspect_string]
29+
// [START dlp_inspect_string]
3030
// Imports the Google Cloud Data Loss Prevention library
3131
const DLP = require('@google-cloud/dlp');
3232

@@ -83,7 +83,7 @@ function inspectString(
8383
.catch(err => {
8484
console.log(`Error in inspectString: ${err.message || err}`);
8585
});
86-
// [END inspect_string]
86+
// [END dlp_inspect_string]
8787
}
8888

8989
function inspectFile(
@@ -93,7 +93,7 @@ function inspectFile(
9393
infoTypes,
9494
includeQuote
9595
) {
96-
// [START inspect_file]
96+
// [START dlp_inspect_file]
9797
// Imports the Google Cloud Data Loss Prevention library
9898
const DLP = require('@google-cloud/dlp');
9999

@@ -155,7 +155,7 @@ function inspectFile(
155155
.catch(err => {
156156
console.log(`Error in inspectFile: ${err.message || err}`);
157157
});
158-
// [END inspect_file]
158+
// [END dlp_inspect_file]
159159
}
160160

161161
function promiseInspectGCSFile(
@@ -165,7 +165,7 @@ function promiseInspectGCSFile(
165165
maxFindings,
166166
infoTypes
167167
) {
168-
// [START inspect_gcs_file_promise]
168+
// [START dlp_inspect_gcs]
169169
// Imports the Google Cloud Data Loss Prevention library
170170
const DLP = require('@google-cloud/dlp');
171171

@@ -236,7 +236,7 @@ function promiseInspectGCSFile(
236236
.catch(err => {
237237
console.log(`Error in promiseInspectGCSFile: ${err.message || err}`);
238238
});
239-
// [END inspect_gcs_file_promise]
239+
// [END dlp_inspect_gcs]
240240
}
241241

242242
function eventInspectGCSFile(
@@ -246,7 +246,7 @@ function eventInspectGCSFile(
246246
maxFindings,
247247
infoTypes
248248
) {
249-
// [START inspect_gcs_file_event]
249+
// [START dlp_inspect_gcs_event]
250250
// Imports the Google Cloud Data Loss Prevention library
251251
const DLP = require('@google-cloud/dlp');
252252

@@ -332,7 +332,7 @@ function eventInspectGCSFile(
332332
.catch(err => {
333333
console.log(`Error in eventInspectGCSFile: ${err.message || err}`);
334334
});
335-
// [END inspect_gcs_file_event]
335+
// [END dlp_inspect_gcs_event]
336336
}
337337

338338
function inspectDatastore(
@@ -344,7 +344,7 @@ function inspectDatastore(
344344
infoTypes
345345
// includeQuote
346346
) {
347-
// [START inspect_datastore]
347+
// [START dlp_inspect_datastore]
348348
// Imports the Google Cloud Data Loss Prevention library
349349
const DLP = require('@google-cloud/dlp');
350350

@@ -424,7 +424,7 @@ function inspectDatastore(
424424
.catch(err => {
425425
console.log(`Error in inspectDatastore: ${err.message || err}`);
426426
});
427-
// [END inspect_datastore]
427+
// [END dlp_inspect_datastore]
428428
}
429429

430430
function inspectBigquery(
@@ -436,7 +436,7 @@ function inspectBigquery(
436436
infoTypes
437437
// includeQuote
438438
) {
439-
// [START inspect_bigquery]
439+
// [START dlp_inspect_bigquery]
440440
// Imports the Google Cloud Data Loss Prevention library
441441
const DLP = require('@google-cloud/dlp');
442442

@@ -513,7 +513,7 @@ function inspectBigquery(
513513
.catch(err => {
514514
console.log(`Error in inspectBigquery: ${err.message || err}`);
515515
});
516-
// [END inspect_bigquery]
516+
// [END dlp_inspect_bigquery]
517517
}
518518

519519
const cli = require(`yargs`) // eslint-disable-line

dlp/metadata.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
'use strict';
1717

1818
function listInfoTypes(category, languageCode) {
19-
// [START list_info_types]
19+
// [START dlp_list_info_types]
2020
// Imports the Google Cloud Data Loss Prevention library
2121
const DLP = require('@google-cloud/dlp');
2222

@@ -44,11 +44,11 @@ function listInfoTypes(category, languageCode) {
4444
.catch(err => {
4545
console.log(`Error in listInfoTypes: ${err.message || err}`);
4646
});
47-
// [END list_info_types]
47+
// [END dlp_list_info_types]
4848
}
4949

5050
function listRootCategories(languageCode) {
51-
// [START list_categories]
51+
// [START dlp_list_categories]
5252
// Imports the Google Cloud Data Loss Prevention library
5353
const DLP = require('@google-cloud/dlp');
5454

@@ -72,7 +72,7 @@ function listRootCategories(languageCode) {
7272
.catch(err => {
7373
console.log(`Error in listRootCategories: ${err.message || err}`);
7474
});
75-
// [END list_categories]
75+
// [END dlp_list_categories]
7676
}
7777

7878
const cli = require(`yargs`)

dlp/quickstart.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
'use strict';
1717

18-
// [START quickstart]
18+
// [START dlp_quickstart]
1919
// Imports the Google Cloud Data Loss Prevention library
2020
const DLP = require('@google-cloud/dlp');
2121

@@ -72,4 +72,4 @@ dlp
7272
.catch(err => {
7373
console.error(`Error in inspectString: ${err.message || err}`);
7474
});
75-
// [END quickstart]
75+
// [END dlp_quickstart]

dlp/redact.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
'use strict';
1717

1818
function redactString(string, replaceString, minLikelihood, infoTypes) {
19-
// [START redact_string]
19+
// [START dlp_redact_string]
2020
// Imports the Google Cloud Data Loss Prevention library
2121
const DLP = require('@google-cloud/dlp');
2222

@@ -62,11 +62,11 @@ function redactString(string, replaceString, minLikelihood, infoTypes) {
6262
.catch(err => {
6363
console.log(`Error in redactString: ${err.message || err}`);
6464
});
65-
// [END redact_string]
65+
// [END dlp_redact_string]
6666
}
6767

6868
function redactImage(filepath, minLikelihood, infoTypes, outputPath) {
69-
// [START redact_image]
69+
// [START dlp_redact_image]
7070
// Imports required Node.js libraries
7171
const mime = require('mime');
7272
const fs = require('fs');
@@ -118,7 +118,7 @@ function redactImage(filepath, minLikelihood, infoTypes, outputPath) {
118118
.catch(err => {
119119
console.log(`Error in redactImage: ${err.message || err}`);
120120
});
121-
// [END redact_image]
121+
// [END dlp_redact_image]
122122
}
123123

124124
const cli = require(`yargs`)

dlp/risk.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
'use strict';
1717

1818
function numericalRiskAnalysis(projectId, datasetId, tableId, columnName) {
19-
// [START numerical_risk]
19+
// [START dlp_numerical_stats]
2020
// Imports the Google Cloud Data Loss Prevention library
2121
const DLP = require('@google-cloud/dlp');
2222

@@ -91,11 +91,11 @@ function numericalRiskAnalysis(projectId, datasetId, tableId, columnName) {
9191
.catch(err => {
9292
console.log(`Error in numericalRiskAnalysis: ${err.message || err}`);
9393
});
94-
// [END numerical_risk]
94+
// [END dlp_numerical_stats]
9595
}
9696

9797
function categoricalRiskAnalysis(projectId, datasetId, tableId, columnName) {
98-
// [START categorical_risk]
98+
// [START dlp_categorical_stats]
9999
// Imports the Google Cloud Data Loss Prevention library
100100
const DLP = require('@google-cloud/dlp');
101101

@@ -162,11 +162,11 @@ function categoricalRiskAnalysis(projectId, datasetId, tableId, columnName) {
162162
.catch(err => {
163163
console.log(`Error in categoricalRiskAnalysis: ${err.message || err}`);
164164
});
165-
// [END categorical_risk]
165+
// [END dlp_categorical_stats]
166166
}
167167

168168
function kAnonymityAnalysis(projectId, datasetId, tableId, quasiIds) {
169-
// [START k_anonymity]
169+
// [START dlp_k_anonymity]
170170
// Imports the Google Cloud Data Loss Prevention library
171171
const DLP = require('@google-cloud/dlp');
172172

@@ -230,7 +230,7 @@ function kAnonymityAnalysis(projectId, datasetId, tableId, quasiIds) {
230230
.catch(err => {
231231
console.log(`Error in kAnonymityAnalysis: ${err.message || err}`);
232232
});
233-
// [END k_anonymity]
233+
// [END dlp_k_anonymity]
234234
}
235235

236236
function lDiversityAnalysis(
@@ -240,7 +240,7 @@ function lDiversityAnalysis(
240240
sensitiveAttribute,
241241
quasiIds
242242
) {
243-
// [START l_diversity]
243+
// [START dlp_l_diversity]
244244
// Imports the Google Cloud Data Loss Prevention library
245245
const DLP = require('@google-cloud/dlp');
246246

@@ -317,7 +317,7 @@ function lDiversityAnalysis(
317317
.catch(err => {
318318
console.log(`Error in lDiversityAnalysis: ${err.message || err}`);
319319
});
320-
// [END l_diversity]
320+
// [END dlp_l_diversity]
321321
}
322322

323323
const cli = require(`yargs`) // eslint-disable-line

0 commit comments

Comments
 (0)