UNPKG

4.25 kBTypeScriptView Raw
1/*!
2 * Copyright 2014 Google Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16/**
17 * @namespace google.pubsub.v1
18 */
19/**
20 * @namespace google.protobuf
21 */
22/**
23 * The default export of the `@google-cloud/pubsub` package is the
24 * {@link PubSub} class.
25 *
26 * See {@link PubSub} and {@link ClientConfig} for client methods and
27 * configuration options.
28 *
29 * @module {PubSub} @google-cloud/pubsub
30 * @alias nodejs-pubsub
31 *
32 * @example <caption>Install the client library with <a href="https://www.npmjs.com/">npm</a>:</caption>
33 * npm install @google-cloud/pubsub
34 *
35 * @example <caption>Import the client library</caption>
36 * const {PubSub} = require('@google-cloud/pubsub');
37 *
38 * @example <caption>Create a client that uses <a href="https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application">Application Default Credentials (ADC)</a>:</caption>
39 * const pubsub = new PubSub();
40 *
41 * @example <caption>Create a client with <a href="https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually">explicit credentials</a>:</caption>
42 * const pubsub = new PubSub({
43 * projectId: 'your-project-id',
44 * keyFilename: '/path/to/keyfile.json'
45 * });
46 *
47 * @example <caption>include:samples/quickstart.js</caption>
48 * region_tag:pubsub_quickstart_create_topic
49 * Full quickstart example:
50 */
51/**
52 * Reference to internal generated clients, advanced use only.
53 *
54 * @name PubSub.v1
55 * @see v1.PublisherClient
56 * @see v1.SubscriberClient
57 * @type {object}
58 * @property {constructor} PublisherClient
59 * Reference to {@link v1.PublisherClient}.
60 * @property {constructor} SubscriberClient
61 * Reference to {@link v1.SubscriberClient}.
62 */
63/**
64 * Reference to internal generated clients, advanced use only.
65 *
66 * @name module:@google-cloud/pubsub.v1
67 * @see v1.PublisherClient
68 * @see v1.SubscriberClient
69 * @type {object}
70 * @property {constructor} PublisherClient
71 * Reference to {@link v1.PublisherClient}.
72 * @property {constructor} SubscriberClient
73 * Reference to {@link v1.SubscriberClient}.
74 */
75import * as v1 from './v1';
76export { v1 };
77export { ServiceError, CallOptions } from 'google-gax';
78export { Policy, GetPolicyCallback, SetPolicyCallback, SetPolicyResponse, GetPolicyResponse, IamPermissionsMap, TestIamPermissionsResponse, TestIamPermissionsCallback, IAM, } from './iam';
79export { Attributes, PublishCallback } from './publisher';
80export { PublishError } from './publisher/publish-error';
81export { PageOptions, GetSnapshotsCallback, GetSnapshotsResponse, GetSubscriptionsCallback, GetSubscriptionsResponse, GetTopicsCallback, GetTopicsResponse, EmptyCallback, EmptyResponse, ExistsCallback, ExistsResponse, PubSub, ClientConfig, } from './pubsub';
82export { CreateSnapshotCallback, CreateSnapshotResponse, SeekCallback, SeekResponse, Snapshot, } from './snapshot';
83export { Message } from './subscriber';
84export { PushConfig, SubscriptionMetadata, SubscriptionOptions, SubscriptionCloseCallback, CreateSubscriptionOptions, CreateSubscriptionCallback, CreateSubscriptionResponse, GetSubscriptionOptions, GetSubscriptionCallback, GetSubscriptionResponse, GetSubscriptionMetadataCallback, GetSubscriptionMetadataResponse, SetSubscriptionMetadataCallback, SetSubscriptionMetadataResponse, Subscription, } from './subscription';
85export { CreateTopicCallback, CreateTopicResponse, GetTopicCallback, GetTopicResponse, GetTopicOptions, GetTopicMetadataCallback, GetTopicMetadataResponse, GetTopicSubscriptionsCallback, GetTopicSubscriptionsResponse, SetTopicMetadataCallback, SetTopicMetadataResponse, Topic, TopicMetadata, } from './topic';
86import * as protos from '../protos/protos';
87export { protos };