endpoint.proto 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Copyright 2019 Google LLC.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. //
  15. syntax = "proto3";
  16. package google.api;
  17. option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "EndpointProto";
  20. option java_package = "com.google.api";
  21. option objc_class_prefix = "GAPI";
  22. // `Endpoint` describes a network endpoint that serves a set of APIs.
  23. // A service may expose any number of endpoints, and all endpoints share the
  24. // same service configuration, such as quota configuration and monitoring
  25. // configuration.
  26. //
  27. // Example service configuration:
  28. //
  29. // name: library-example.googleapis.com
  30. // endpoints:
  31. // # Below entry makes 'google.example.library.v1.Library'
  32. // # API be served from endpoint address library-example.googleapis.com.
  33. // # It also allows HTTP OPTIONS calls to be passed to the backend, for
  34. // # it to decide whether the subsequent cross-origin request is
  35. // # allowed to proceed.
  36. // - name: library-example.googleapis.com
  37. // allow_cors: true
  38. message Endpoint {
  39. // The canonical name of this endpoint.
  40. string name = 1;
  41. // DEPRECATED: This field is no longer supported. Instead of using aliases,
  42. // please specify multiple [google.api.Endpoint][google.api.Endpoint] for each of the intended
  43. // aliases.
  44. //
  45. // Additional names that this endpoint will be hosted on.
  46. repeated string aliases = 2 [deprecated = true];
  47. // The list of features enabled on this endpoint.
  48. repeated string features = 4;
  49. // The specification of an Internet routable address of API frontend that will
  50. // handle requests to this [API
  51. // Endpoint](https://cloud.google.com/apis/design/glossary). It should be
  52. // either a valid IPv4 address or a fully-qualified domain name. For example,
  53. // "8.8.8.8" or "myservice.appspot.com".
  54. string target = 101;
  55. // Allowing
  56. // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
  57. // cross-domain traffic, would allow the backends served from this endpoint to
  58. // receive and respond to HTTP OPTIONS requests. The response will be used by
  59. // the browser to determine whether the subsequent cross-origin request is
  60. // allowed to proceed.
  61. bool allow_cors = 5;
  62. }