Skip to content

Commit

Permalink
feat!: first release of client library (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe authored and JustinBeckwith committed Jun 20, 2019
1 parent 6f5552d commit 7510809
Show file tree
Hide file tree
Showing 19 changed files with 542 additions and 287 deletions.
6 changes: 3 additions & 3 deletions packages/google-cloud-datacatalog/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "datacatalog",
"name_pretty": "Google Cloud Data Catalog",
"name_pretty": "Data Catalog",
"product_documentation": "https://cloud.google.com/data-catalog/",
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/datacatalog/latest/",
"client_documentation": "https://googleapis.dev/nodejs/datacatalog/latest",
"issue_tracker": "",
"release_level": "alpha",
"release_level": "beta",
"language": "nodejs",
"repo": "googleapis/nodejs-datacatalog",
"distribution_name": "@google-cloud/datacatalog",
Expand Down
23 changes: 12 additions & 11 deletions packages/google-cloud-datacatalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
[//]: # "To regenerate it, use `python -m synthtool`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# [Google Cloud Data Catalog: Node.js Client](https://github.com/googleapis/nodejs-datacatalog)
# [Data Catalog: Node.js Client](https://github.com/googleapis/nodejs-datacatalog)

[![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/datacatalog.svg)](https://www.npmjs.org/package/@google-cloud/datacatalog)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-datacatalog/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-datacatalog)

Expand All @@ -14,8 +14,8 @@
Google Cloud Data Catalog API client for Node.js


* [Google Cloud Data Catalog Node.js Client API Reference][client-docs]
* [Google Cloud Data Catalog Documentation][product-docs]
* [Data Catalog Node.js Client API Reference][client-docs]
* [Data Catalog Documentation][product-docs]
* [github.com/googleapis/nodejs-datacatalog](https://github.com/googleapis/nodejs-datacatalog)

Read more about the client libraries for Cloud APIs, including the older
Expand All @@ -41,7 +41,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].

1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
1. [Enable the Google Cloud Data Catalog API][enable_api].
1. [Enable the Data Catalog API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
API from your local workstation.

Expand All @@ -55,7 +55,7 @@ npm install @google-cloud/datacatalog



The [Google Cloud Data Catalog Node.js Client API Reference][client-docs] documentation
The [Data Catalog Node.js Client API Reference][client-docs] documentation
also contains samples.

## Versioning
Expand All @@ -64,10 +64,11 @@ This library follows [Semantic Versioning](http://semver.org/).



This library is considered to be in **beta**. This means it is expected to be
mostly stable while we work toward a general availability release; however,
complete stability is not guaranteed. We will address issues and requests
against beta libraries with a high priority.

This library is considered to be in **alpha**. This means it is still a
work-in-progress and under active development. Any release is subject to
backwards-incompatible changes at any time.



Expand All @@ -85,8 +86,8 @@ Apache Version 2.0

See [LICENSE](https://github.com/googleapis/nodejs-datacatalog/blob/master/LICENSE)

[client-docs]: https://cloud.google.com/nodejs/docs/reference/datacatalog/latest/
[product-docs]: https://cloud.google.com/datacatalog
[client-docs]: https://googleapis.dev/nodejs/datacatalog/latest
[product-docs]: https://cloud.google.com/data-catalog/
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
Expand Down
40 changes: 19 additions & 21 deletions packages/google-cloud-datacatalog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,33 @@
"Google Cloud Data Catalog API"
],
"dependencies": {
"google-gax": "^0.25.3",
"lodash.merge": "^4.6.0"
"google-gax": "^1.1.2"
},
"devDependencies": {
"codecov": "^3.2.0",
"eslint": "^5.14.1",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-prettier": "^3.0.0",
"jsdoc": "^3.5.5",
"jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git",
"linkinator": "^1.1.6",
"mocha": "^5.2.0",
"power-assert": "^1.6.1",
"through2": "^2.0.3"
"c8": "^5.0.1",
"chai": "^4.2.0",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.2.0",
"eslint-plugin-node": "^9.0.1",
"eslint-plugin-prettier": "^3.0.1",
"jsdoc": "^3.6.2",
"jsdoc-baseline": "^0.1.0",
"linkinator": "^1.4.0",
"mocha": "^6.1.4",
"prettier": "^1.17.0"
},
"scripts": {
"docs": "jsdoc -c .jsdoc.js",
"generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
"lint": "eslint '**/*.js'",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"system-test": "mocha system-test --timeout 600000",
"test": "nyc mocha",
"fix": "eslint . --fix",
"lint": "eslint .",
"test": "c8 mocha test/*.js",
"predocs-test": "npm run docs",
"docs-test": "linkinator docs -r --skip www.googleapis.com",
"fix": "eslint --fix '**/*.js'"
"docs-test": "linkinator docs -r --skip 'www.npmjs.org/package/@google-cloud/datacatalog|googleapis.dev/nodejs/datacatalog/latest|cloud.google.com/data-catalog/docs/how-to/search-reference'",
"samples-test": "c8 mocha samples/test/*.js",
"system-test": "c8 mocha --timeout=5000 system-test/*.js"
},
"license": "Apache-2.0",
"engines": {
"node": ">=6.0.0"
"node": ">=8.10.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@ service DataCatalog {
// the complete resource, only the resource identifier and high level
// fields. Clients can subsequentally call Get methods.
//
// Note that searches do not have full recall. There may be results that match
// your query but are not returned, even in subsequent pages of results. These
// missing results may vary across repeated calls to search. Do not rely on
// this method if you need to guarantee full recall.
//
// See [Data Catalog Search
// Syntax](/data-catalog/docs/how-to/search-reference)
// Syntax](/data-catalog/docs/how-to/search-reference) for more information.
rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) {
option (google.api.http) = {
post: "/v1beta1/catalog:search"
Expand Down Expand Up @@ -294,8 +299,7 @@ message SearchCatalogRequest {
// <li> last_access_timestamp [asc|desc], defaults to descending if not
// specified, </li>
// <li> last_modified_timestamp [asc|desc], defaults to descending if not
// specified, </li>
// <li> title [asc|desc], defaults to ascending if not specified. </li>
// specified. </li>
// </ul>
string order_by = 5;
}
Expand Down Expand Up @@ -384,6 +388,8 @@ message Entry {
// [UpdateEntryRequest][google.cloud.datacatalog.v1beta1.UpdateEntryRequest].
// The Data Catalog resource name of the entry in URL format. For example,
// "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}".
// Note that this Entry and its child resources may not actually be stored in
// the location in this name.
string name = 1;

// Output only. The full name of the cloud resource the entry belongs to. See:
Expand Down Expand Up @@ -433,7 +439,9 @@ message Entry {
// [CreateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate].
message CreateTagTemplateRequest {
// Required. The name of the project and the location this template is in.
// Example: "projects/{project_id}/locations/{location}".
// Example: "projects/{project_id}/locations/{location}". Note that this
// TagTemplate and its child resources may not actually be stored in the
// location in this name.
string parent = 1;

// Required. The id of the tag template to create.
Expand Down Expand Up @@ -487,6 +495,8 @@ message CreateTagRequest {
// The name of the resource to attach this tag to. Tags can be attached to
// Entries. (example:
// "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}").
// Note that this Tag and its child resources may not actually be stored in
// the location in this name.
string parent = 1;

// Required. The tag to create.
Expand Down Expand Up @@ -518,6 +528,8 @@ message DeleteTagRequest {
message CreateTagTemplateFieldRequest {
// Required. The name of the project this template is in. Example:
// "projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}".
// Note that this TagTemplateField may not actually be stored in the location
// in this name.
string parent = 1;

// Required. The id of the tag template field to create.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ option java_multiple_files = true;
option java_package = "com.google.cloud.datacatalog";

// Tags are used to attach custom metadata to Data Catalog resources. Tags
// conform to the specifications within their Tag Template.
// conform to the specifications within their tag template.
message Tag {
// Required when used in
// [UpdateTagRequest][google.cloud.datacatalog.v1beta1.UpdateTagRequest]. The
// resource name of the tag in URL format. For example,
// projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}",
// where tag_id is a system-generated identifier.
// where tag_id is a system-generated identifier. Note that this Tag may not
// actually be stored in the location in this name.
string name = 1;

// Required. The resource name of the tag template that this tag uses. For
Expand Down Expand Up @@ -94,39 +95,34 @@ message TagField {
}
}

// Tag Templates provide the basic format of multiple fields which can be
// attached to Data Catalog resources as Tags.
//
// Tag Templates can be used as a data glossary as tag templates define the
// list of acceptable fields that can be applied within a Tag. When a Tag is
// applied to a resource, the Tag Template defines the mapping of accepted field
// names & types that can be used within the Tag.
//
// A Tag Template also allows you to make Tags using that template visible only
// to a certain group of users.
// Tag templates defines the schema of the tags used to attach to Data Catalog
// resources. It defines the mapping of accepted field names and types that can
// be used within the tag. The tag template also controls the access to the tag.
message TagTemplate {
// Required when used in
// [UpdateTagTemplateRequest][google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest].
// The resource name of the tag template in URL format. For example,
// projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}.
// Note that this TagTemplate and its child resources may not actually be
// stored in the location in this name.
string name = 1;

// Optional. The display name for this template. Default value is an empty
// string.
string display_name = 2;

// Required. Map of tag template field ids to the settings for the field.
// This map is an exhaustive list of allowed fields. This map must contain at
// least one field and at most 100 fields.
// This map is an exhaustive list of the allowed fields. This map must contain
// at least one field and at most 500 fields.
//
// The keys to this map are tag template field IDs. Field IDs can
// contain letters (both uppercase and lowercase), numbers (0-9), and
// underscores (_). Field IDs must be at least 1 character long and at most
// 64 characters long. Field IDs must start with a letter or number.
// The keys to this map are tag template field IDs. Field IDs can contain
// letters (both uppercase and lowercase), numbers (0-9) and underscores (_).
// Field IDs must be at least 1 character long and at most 64 characters long.
// Field IDs must start with a letter or underscore.
map<string, TagTemplateField> fields = 3;
}

// The template for an individual field within a TagTemplate.
// The template for an individual field within a tag template.
message TagTemplateField {
// Optional. The display name for this field. Default value is an empty
// string.
Expand Down
5 changes: 5 additions & 0 deletions packages/google-cloud-datacatalog/samples/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
rules:
no-console: off
node/no-missing-require: off
node/no-extraneous-require: off
13 changes: 13 additions & 0 deletions packages/google-cloud-datacatalog/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@
/**
* @namespace google
*/
/**
* @namespace google.iam.v1
*/
/**
* @namespace google.protobuf
*/
/**
* @namespace google.iam.v1
*/
/**
* @namespace google.type
*/

/**
* @namespace google.cloud
*/
Expand Down
Loading

0 comments on commit 7510809

Please sign in to comment.