How to use the google-proto-files.logging function in google-proto-files

To help you get started, we’ve selected a few google-proto-files examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleapis / google-cloud-node / test / logging / index.js View on Github external
it('should inherit from GrpcService', function() {
      assert(logging instanceof FakeGrpcService);

      var calledWith = logging.calledWith_[0];

      assert.strictEqual(calledWith.baseUrl, 'logging.googleapis.com');
      assert.strictEqual(calledWith.service, 'logging');
      assert.strictEqual(calledWith.apiVersion, 'v2');
      assert.deepEqual(calledWith.protoServices, {
        ConfigServiceV2:
          googleProtoFiles('logging', 'v2', 'logging_config.proto'),
        LoggingServiceV2: googleProtoFiles.logging.v2
      });
      assert.deepEqual(calledWith.scopes, [
        'https://www.googleapis.com/auth/cloud-platform'
      ]);
    });
  });
github googleapis / google-cloud-node / packages / logging / src / index.js View on Github external
function Logging(options) {
  if (!(this instanceof Logging)) {
    options = util.normalizeArguments(this, options);
    return new Logging(options);
  }

  var config = {
    baseUrl: 'logging.googleapis.com',
    service: 'logging',
    apiVersion: 'v2',
    protoServices: {
      ConfigServiceV2:
        googleProtoFiles('logging', 'v2', 'logging_config.proto'),
      LoggingServiceV2: googleProtoFiles.logging.v2
    },
    scopes: [
      'https://www.googleapis.com/auth/cloud-platform'
    ],
    userAgent: PKG.name + '/' + PKG.version
  };

  GrpcService.call(this, config, options);
}