endpoint.proto 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // Copyright 2015 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. syntax = "proto3";
  15. package google.api;
  16. option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
  17. option java_multiple_files = true;
  18. option java_outer_classname = "EndpointProto";
  19. option java_package = "com.google.api";
  20. option objc_class_prefix = "GAPI";
  21. // `Endpoint` describes a network endpoint of a service that serves a set of
  22. // APIs. It is commonly known as a service endpoint. A service may expose
  23. // any number of service endpoints, and all service endpoints share the same
  24. // service definition, such as quota limits and monitoring metrics.
  25. //
  26. // Example service configuration:
  27. //
  28. // name: library-example.googleapis.com
  29. // endpoints:
  30. // # Below entry makes 'google.example.library.v1.Library'
  31. // # API be served from endpoint address library-example.googleapis.com.
  32. // # It also allows HTTP OPTIONS calls to be passed to the backend, for
  33. // # it to decide whether the subsequent cross-origin request is
  34. // # allowed to proceed.
  35. // - name: library-example.googleapis.com
  36. // allow_cors: true
  37. message Endpoint {
  38. // The canonical name of this endpoint.
  39. string name = 1;
  40. // Unimplemented. Dot not use.
  41. //
  42. // DEPRECATED: This field is no longer supported. Instead of using aliases,
  43. // please specify multiple [google.api.Endpoint][google.api.Endpoint] for each of the intended
  44. // aliases.
  45. //
  46. // Additional names that this endpoint will be hosted on.
  47. repeated string aliases = 2 [deprecated = true];
  48. // The specification of an Internet routable address of API frontend that will
  49. // handle requests to this [API
  50. // Endpoint](https://cloud.google.com/apis/design/glossary). It should be
  51. // either a valid IPv4 address or a fully-qualified domain name. For example,
  52. // "8.8.8.8" or "myservice.appspot.com".
  53. string target = 101;
  54. // Allowing
  55. // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
  56. // cross-domain traffic, would allow the backends served from this endpoint to
  57. // receive and respond to HTTP OPTIONS requests. The response will be used by
  58. // the browser to determine whether the subsequent cross-origin request is
  59. // allowed to proceed.
  60. bool allow_cors = 5;
  61. }