Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .repo-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/binary-authorization/latest",
"api_id": "binaryauthorization.googleapis.com",
"distribution_name": "@google-cloud/binary-authorization",
"release_level": "preview",
"default_version": "v1beta1",
"release_level": "stable",
"default_version": "v1",
"language": "nodejs",
"name_pretty": "Binary Authorization",
"repo": "googleapis/nodejs-binary-authorization",
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# [Binary Authorization: Node.js Client](https://github.com/googleapis/nodejs-binary-authorization)

[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/binary-authorization.svg)](https://www.npmjs.org/package/@google-cloud/binary-authorization)


Expand Down Expand Up @@ -61,14 +61,14 @@ npm install @google-cloud/binary-authorization

// eslint-disable-next-line node/no-missing-require
const {
BinauthzManagementServiceV1Beta1Client,
BinauthzManagementServiceV1Client,
} = require('@google-cloud/binary-authorization');

// TODO(developer): replace with your prefered project ID.
// const projectId = 'my-project'

// Creates a client
const client = new BinauthzManagementServiceV1Beta1Client();
const client = new BinauthzManagementServiceV1Client();

async function listAttestors() {
const attestors = await client.listAttestors({parent});
Expand Down Expand Up @@ -120,13 +120,14 @@ This library follows [Semantic Versioning](http://semver.org/).



This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
unless absolutely necessary (e.g. because of critical security issues) or with
an extensive deprecation period. Issues and requests against **stable** libraries
are addressed with the highest priority.




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


More Information: [Google Cloud Platform Launch Stages][launch_stages]
Expand Down
4 changes: 2 additions & 2 deletions samples/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ async function main(parent) {

// eslint-disable-next-line node/no-missing-require
const {
BinauthzManagementServiceV1Beta1Client,
BinauthzManagementServiceV1Client,
} = require('@google-cloud/binary-authorization');

// TODO(developer): replace with your prefered project ID.
// const projectId = 'my-project'

// Creates a client
const client = new BinauthzManagementServiceV1Beta1Client();
const client = new BinauthzManagementServiceV1Client();

async function listAttestors() {
const attestors = await client.listAttestors({parent});
Expand Down
4 changes: 2 additions & 2 deletions samples/test/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
const cp = require('child_process');
const {before, describe, it} = require('mocha');
const {
BinauthzManagementServiceV1Beta1Client,
BinauthzManagementServiceV1Client,
} = require('@google-cloud/binary-authorization');
const {assert} = require('chai');

Expand All @@ -30,7 +30,7 @@ describe('Quickstart', () => {
let projectId;

before(async () => {
const client = new BinauthzManagementServiceV1Beta1Client();
const client = new BinauthzManagementServiceV1Client();
projectId = await client.getProjectId();
});

Expand Down
22 changes: 12 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,26 @@
import * as v1 from './v1';
import * as v1beta1 from './v1beta1';

const BinauthzManagementServiceV1Beta1Client =
v1beta1.BinauthzManagementServiceV1Beta1Client;
type BinauthzManagementServiceV1Beta1Client =
v1beta1.BinauthzManagementServiceV1Beta1Client;
const SystemPolicyV1Beta1Client = v1beta1.SystemPolicyV1Beta1Client;
type SystemPolicyV1Beta1Client = v1beta1.SystemPolicyV1Beta1Client;
const BinauthzManagementServiceV1Client = v1.BinauthzManagementServiceV1Client;
type BinauthzManagementServiceV1Client = v1.BinauthzManagementServiceV1Client;
const SystemPolicyV1Client = v1.SystemPolicyV1Client;
type SystemPolicyV1Client = v1.SystemPolicyV1Client;
const ValidationHelperV1Client = v1.ValidationHelperV1Client;
type ValidationHelperV1Client = v1.ValidationHelperV1Client;

export {
v1,
v1beta1,
BinauthzManagementServiceV1Beta1Client,
SystemPolicyV1Beta1Client,
BinauthzManagementServiceV1Client,
SystemPolicyV1Client,
ValidationHelperV1Client,
};
export default {
v1,
v1beta1,
BinauthzManagementServiceV1Beta1Client,
SystemPolicyV1Beta1Client,
BinauthzManagementServiceV1Client,
SystemPolicyV1Client,
ValidationHelperV1Client,
};
import * as protos from '../protos/protos';
export {protos};
7 changes: 3 additions & 4 deletions system-test/fixtures/sample/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
const binaryauthorization = require('@google-cloud/binary-authorization');

function main() {
const binauthzManagementServiceV1Beta1Client =
new binaryauthorization.BinauthzManagementServiceV1Beta1Client();
const systemPolicyV1Beta1Client =
new binaryauthorization.SystemPolicyV1Beta1Client();
const binauthzManagementServiceV1Client =
new binaryauthorization.BinauthzManagementServiceV1Client();
const systemPolicyV1Client = new binaryauthorization.SystemPolicyV1Client();
}

main();
20 changes: 9 additions & 11 deletions system-test/fixtures/sample/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,30 @@
// ** All changes to this file may be overwritten. **

import {
BinauthzManagementServiceV1Beta1Client,
SystemPolicyV1Beta1Client,
BinauthzManagementServiceV1Client,
SystemPolicyV1Client,
} from '@google-cloud/binary-authorization';

// check that the client class type name can be used
function doStuffWithBinauthzManagementServiceV1Beta1Client(
client: BinauthzManagementServiceV1Beta1Client
client: BinauthzManagementServiceV1Client
) {
client.close();
}
function doStuffWithSystemPolicyV1Beta1Client(
client: SystemPolicyV1Beta1Client
) {
function doStuffWithSystemPolicyV1Client(client: SystemPolicyV1Client) {
client.close();
}

function main() {
// check that the client instance can be created
const binauthzManagementServiceV1Beta1Client =
new BinauthzManagementServiceV1Beta1Client();
const binauthzManagementServiceV1Client =
new BinauthzManagementServiceV1Client();
doStuffWithBinauthzManagementServiceV1Beta1Client(
binauthzManagementServiceV1Beta1Client
binauthzManagementServiceV1Client
);
// check that the client instance can be created
const systemPolicyV1Beta1Client = new SystemPolicyV1Beta1Client();
doStuffWithSystemPolicyV1Beta1Client(systemPolicyV1Beta1Client);
const systemPolicyV1Beta1Client = new SystemPolicyV1Client();
doStuffWithSystemPolicyV1Client(systemPolicyV1Beta1Client);
}

main();