Skip to content

Commit

Permalink
Clean up DLP region tags. (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored Mar 7, 2018
1 parent ae2b575 commit 23a238e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions dlp/deid.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'use strict';

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

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

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

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

const cli = require(`yargs`)
Expand Down
24 changes: 12 additions & 12 deletions dlp/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function inspectString(
infoTypes,
includeQuote
) {
// [START inspect_string]
// [START dlp_inspect_string]
// Imports the Google Cloud Data Loss Prevention library
const DLP = require('@google-cloud/dlp');

Expand Down Expand Up @@ -83,7 +83,7 @@ function inspectString(
.catch(err => {
console.log(`Error in inspectString: ${err.message || err}`);
});
// [END inspect_string]
// [END dlp_inspect_string]
}

function inspectFile(
Expand All @@ -93,7 +93,7 @@ function inspectFile(
infoTypes,
includeQuote
) {
// [START inspect_file]
// [START dlp_inspect_file]
// Imports the Google Cloud Data Loss Prevention library
const DLP = require('@google-cloud/dlp');

Expand Down Expand Up @@ -155,7 +155,7 @@ function inspectFile(
.catch(err => {
console.log(`Error in inspectFile: ${err.message || err}`);
});
// [END inspect_file]
// [END dlp_inspect_file]
}

function promiseInspectGCSFile(
Expand All @@ -165,7 +165,7 @@ function promiseInspectGCSFile(
maxFindings,
infoTypes
) {
// [START inspect_gcs_file_promise]
// [START dlp_inspect_gcs]
// Imports the Google Cloud Data Loss Prevention library
const DLP = require('@google-cloud/dlp');

Expand Down Expand Up @@ -236,7 +236,7 @@ function promiseInspectGCSFile(
.catch(err => {
console.log(`Error in promiseInspectGCSFile: ${err.message || err}`);
});
// [END inspect_gcs_file_promise]
// [END dlp_inspect_gcs]
}

function eventInspectGCSFile(
Expand All @@ -246,7 +246,7 @@ function eventInspectGCSFile(
maxFindings,
infoTypes
) {
// [START inspect_gcs_file_event]
// [START dlp_inspect_gcs_event]
// Imports the Google Cloud Data Loss Prevention library
const DLP = require('@google-cloud/dlp');

Expand Down Expand Up @@ -332,7 +332,7 @@ function eventInspectGCSFile(
.catch(err => {
console.log(`Error in eventInspectGCSFile: ${err.message || err}`);
});
// [END inspect_gcs_file_event]
// [END dlp_inspect_gcs_event]
}

function inspectDatastore(
Expand All @@ -344,7 +344,7 @@ function inspectDatastore(
infoTypes
// includeQuote
) {
// [START inspect_datastore]
// [START dlp_inspect_datastore]
// Imports the Google Cloud Data Loss Prevention library
const DLP = require('@google-cloud/dlp');

Expand Down Expand Up @@ -424,7 +424,7 @@ function inspectDatastore(
.catch(err => {
console.log(`Error in inspectDatastore: ${err.message || err}`);
});
// [END inspect_datastore]
// [END dlp_inspect_datastore]
}

function inspectBigquery(
Expand All @@ -436,7 +436,7 @@ function inspectBigquery(
infoTypes
// includeQuote
) {
// [START inspect_bigquery]
// [START dlp_inspect_bigquery]
// Imports the Google Cloud Data Loss Prevention library
const DLP = require('@google-cloud/dlp');

Expand Down Expand Up @@ -513,7 +513,7 @@ function inspectBigquery(
.catch(err => {
console.log(`Error in inspectBigquery: ${err.message || err}`);
});
// [END inspect_bigquery]
// [END dlp_inspect_bigquery]
}

const cli = require(`yargs`) // eslint-disable-line
Expand Down
8 changes: 4 additions & 4 deletions dlp/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'use strict';

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

Expand Down Expand Up @@ -44,11 +44,11 @@ function listInfoTypes(category, languageCode) {
.catch(err => {
console.log(`Error in listInfoTypes: ${err.message || err}`);
});
// [END list_info_types]
// [END dlp_list_info_types]
}

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

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

const cli = require(`yargs`)
Expand Down
4 changes: 2 additions & 2 deletions dlp/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

'use strict';

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

Expand Down Expand Up @@ -72,4 +72,4 @@ dlp
.catch(err => {
console.error(`Error in inspectString: ${err.message || err}`);
});
// [END quickstart]
// [END dlp_quickstart]
8 changes: 4 additions & 4 deletions dlp/redact.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'use strict';

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

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

function redactImage(filepath, minLikelihood, infoTypes, outputPath) {
// [START redact_image]
// [START dlp_redact_image]
// Imports required Node.js libraries
const mime = require('mime');
const fs = require('fs');
Expand Down Expand Up @@ -118,7 +118,7 @@ function redactImage(filepath, minLikelihood, infoTypes, outputPath) {
.catch(err => {
console.log(`Error in redactImage: ${err.message || err}`);
});
// [END redact_image]
// [END dlp_redact_image]
}

const cli = require(`yargs`)
Expand Down
16 changes: 8 additions & 8 deletions dlp/risk.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'use strict';

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

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

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

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

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

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

function lDiversityAnalysis(
Expand All @@ -240,7 +240,7 @@ function lDiversityAnalysis(
sensitiveAttribute,
quasiIds
) {
// [START l_diversity]
// [START dlp_l_diversity]
// Imports the Google Cloud Data Loss Prevention library
const DLP = require('@google-cloud/dlp');

Expand Down Expand Up @@ -317,7 +317,7 @@ function lDiversityAnalysis(
.catch(err => {
console.log(`Error in lDiversityAnalysis: ${err.message || err}`);
});
// [END l_diversity]
// [END dlp_l_diversity]
}

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

0 comments on commit 23a238e

Please sign in to comment.