Skip to content

Commit

Permalink
dlp|video-intelligence: add to google-cloud (#2354)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus authored Jun 4, 2017
1 parent e2edc34 commit fe690e9
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 8 deletions.
8 changes: 8 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@
"master"
]
},
{
"id": "dlp",
"name": "@google-cloud/dlp",
"defaultService": "dlp",
"versions": [
"0.1.0"
]
},
{
"id": "dns",
"name": "@google-cloud/dns",
Expand Down
14 changes: 6 additions & 8 deletions packages/dlp/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ var gapic = {
const VERSION = require('../package.json').version;

/**
* Create an dlpServiceClient with additional helpers for common
* tasks.
* The [Data Loss Prevention (DLP) API](https://cloud.google.com/dlp) allows
* clients to detect the presence of Personally Identifiable Information (PII)
* and other privacy-sensitive data in user-supplied, unstructured data streams,
* like text blocks or images.
*
* The DLP API is a service that allows clients
* to detect the presence of Personally Identifiable Information (PII) and other
* privacy-sensitive data in user-supplied, unstructured data streams, like text
* blocks or images.
* The service also includes methods for sensitive data redaction and
* scheduling of data scans on Google Cloud Platform based data sets.
* The service also includes methods for sensitive data redaction and scheduling
* of data scans on Google Cloud Platform based data sets.
*
* @param {object=} options - [Configuration object](#/docs).
* @param {number=} options.port - The port on which to connect to
Expand Down
24 changes: 24 additions & 0 deletions packages/google-cloud/npm-shrinkwrap.json

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

8 changes: 8 additions & 0 deletions packages/google-cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
"google cloud datastore",
"cloud datastore",
"datastore",
"google cloud dlp",
"cloud dlp",
"dlp",
"google cloud dns",
"cloud dns",
"dns",
Expand Down Expand Up @@ -95,6 +98,9 @@
"google cloud speech",
"cloud speech",
"speech",
"google cloud video intelligence",
"cloud video intelligence",
"video intelligence",
"google cloud vision",
"cloud vision",
"vision"
Expand All @@ -104,6 +110,7 @@
"@google-cloud/bigtable": "^0.10.0",
"@google-cloud/compute": "^0.7.0",
"@google-cloud/datastore": "^1.0.0",
"@google-cloud/dlp": "^0.1.0",
"@google-cloud/dns": "^0.6.0",
"@google-cloud/language": "^0.10.0",
"@google-cloud/logging": "^1.0.0",
Expand All @@ -115,6 +122,7 @@
"@google-cloud/speech": "^0.9.0",
"@google-cloud/storage": "^1.0.0",
"@google-cloud/translate": "^0.8.0",
"@google-cloud/video-intelligence": "^0.1.0",
"@google-cloud/vision": "^0.11.0",
"extend": "^3.0.0"
},
Expand Down
45 changes: 45 additions & 0 deletions packages/google-cloud/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,28 @@ var apis = {
*/
datastore: require('@google-cloud/datastore'),

/**
* The [Data Loss Prevention (DLP) API](https://cloud.google.com/dlp) allows
* clients to detect the presence of Personally Identifiable Information (PII)
* and other privacy-sensitive data in user-supplied, unstructured data
* streams, like text blocks or images.
*
* The service also includes methods for sensitive data redaction and
* scheduling of data scans on Google Cloud Platform based data sets.
*
* @type {module:dlp}
*
* @return {module:dlp}
*
* @example
* var gcloud = require('google-cloud');
* var dlp = gcloud.dlp({
* projectId: 'grape-spaceship-123',
* keyFilename: '/path/to/keyfile.json'
* });
*/
dlp: require('@google-cloud/dlp'),

/**
* [Cloud DNS](https://cloud.google.com/dns/what-is-cloud-dns) is a
* high-performance, resilient, global DNS service that provides a cost-
Expand Down Expand Up @@ -339,6 +361,29 @@ var apis = {
*/
translate: require('@google-cloud/translate'),

/**
* [Google Cloud Video Intelligence API](https://cloud.google.com/video-intelligence)
* makes videos searchable, and discoverable, by extracting metadata with an
* easy to use REST API. You can now search every moment of every video file
* in your catalog and find every occurrence as well as its significance. It
* quickly annotates videos stored in Google Cloud Storage, and helps you
* identify key nouns entities of your video, and when they occur within the
* video. Separate signal from noise, by retrieving relevant information at
* the video, shot or per frame.
*
* @type {module:video-intelligence}
*
* @return {module:video-intelligence}
*
* @example
* var gcloud = require('google-cloud');
* var video = gcloud.videoIntelligence({
* projectId: 'grape-spaceship-123',
* keyFilename: '/path/to/keyfile.json'
* });
*/
videoIntelligence: require('@google-cloud/video-intelligence'),

/**
* The [Cloud Vision API](https://cloud.google.com/vision/docs) allows easy
* integration of vision detection features, including image labeling, face
Expand Down
30 changes: 30 additions & 0 deletions packages/google-cloud/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var FakeBigQuery = createFakeApi();
var FakeBigtable = createFakeApi();
var FakeCompute = createFakeApi();
var FakeDatastore = createFakeApi();
var FakeDLP = createFakeApi();
var FakeDNS = createFakeApi();
var FakeLanguage = createFakeApi();
var FakeLogging = createFakeApi();
Expand All @@ -47,6 +48,7 @@ var FakeSpanner = createFakeApi();
var FakeSpeech = createFakeApi();
var FakeStorage = createFakeApi();
var FakeTranslate = createFakeApi();
var FakeVideoIntelligence = createFakeApi();
var FakeVision = createFakeApi();

describe('gcloud', function() {
Expand All @@ -58,6 +60,7 @@ describe('gcloud', function() {
'@google-cloud/bigtable': FakeBigtable,
'@google-cloud/compute': FakeCompute,
'@google-cloud/datastore': FakeDatastore,
'@google-cloud/dlp': FakeDLP,
'@google-cloud/dns': FakeDNS,
'@google-cloud/language': FakeLanguage,
'@google-cloud/logging': FakeLogging,
Expand All @@ -69,6 +72,7 @@ describe('gcloud', function() {
'@google-cloud/speech': FakeSpeech,
'@google-cloud/storage': FakeStorage,
'@google-cloud/translate': FakeTranslate,
'@google-cloud/video-intelligence': FakeVideoIntelligence,
'@google-cloud/vision': FakeVision
});
});
Expand All @@ -93,6 +97,10 @@ describe('gcloud', function() {
assert.strictEqual(gcloud.datastore, FakeDatastore);
});

it('should export static dlp', function() {
assert.strictEqual(gcloud.dlp, FakeDLP);
});

it('should export static dns', function() {
assert.strictEqual(gcloud.dns, FakeDNS);
});
Expand Down Expand Up @@ -137,6 +145,10 @@ describe('gcloud', function() {
assert.strictEqual(gcloud.translate, FakeTranslate);
});

it('should export static video-intelligence', function() {
assert.strictEqual(gcloud.videoIntelligence, FakeVideoIntelligence);
});

it('should export static vision', function() {
assert.strictEqual(gcloud.vision, FakeVision);
});
Expand Down Expand Up @@ -208,6 +220,15 @@ describe('gcloud', function() {
});
});

describe('dlp', function() {
it('should create a new DNS', function() {
var dlp = localGcloud.dlp(options);

assert(dlp instanceof FakeDLP);
assert.strictEqual(dlp.calledWith_[0], options);
});
});

describe('dns', function() {
it('should create a new DNS', function() {
var dns = localGcloud.dns(options);
Expand Down Expand Up @@ -298,6 +319,15 @@ describe('gcloud', function() {
});
});

describe('video intelligence', function() {
it('should create a new VideoIntelligence', function() {
var videoIntelligence = localGcloud.videoIntelligence(options);

assert(videoIntelligence instanceof FakeVideoIntelligence);
assert.strictEqual(videoIntelligence.calledWith_[0], options);
});
});

describe('vision', function() {
it('should create a new Vision', function() {
var vision = localGcloud.vision(options);
Expand Down

0 comments on commit fe690e9

Please sign in to comment.