Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
backend.proto197 linesDownload Raw Back to api
1// Copyright 2026 Google LLC2//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 at6//7//     http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// 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 and13// limitations under the License.14 15syntax = "proto3";16 17package google.api;18 19option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";20option java_multiple_files = true;21option java_outer_classname = "BackendProto";22option java_package = "com.google.api";23option objc_class_prefix = "GAPI";24 25// `Backend` defines the backend configuration for a service.26message Backend {27  // A list of API backend rules that apply to individual API methods.28  //29  // **NOTE:** All service configuration rules follow "last one wins" order.30  repeated BackendRule rules = 1;31}32 33// A backend rule provides configuration for an individual API element.34message BackendRule {35  // Path Translation specifies how to combine the backend address with the36  // request path in order to produce the appropriate forwarding URL for the37  // request.38  //39  // Path Translation is applicable only to HTTP-based backends. Backends which40  // do not accept requests over HTTP/HTTPS should leave `path_translation`41  // unspecified.42  enum PathTranslation {43    PATH_TRANSLATION_UNSPECIFIED = 0;44 45    // Use the backend address as-is, with no modification to the path. If the46    // URL pattern contains variables, the variable names and values will be47    // appended to the query string. If a query string parameter and a URL48    // pattern variable have the same name, this may result in duplicate keys in49    // the query string.50    //51    // # Examples52    //53    // Given the following operation config:54    //55    //     Method path:        /api/company/{cid}/user/{uid}56    //     Backend address:    https://example.cloudfunctions.net/getUser57    //58    // Requests to the following request paths will call the backend at the59    // translated path:60    //61    //     Request path: /api/company/widgetworks/user/johndoe62    //     Translated:63    //     https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe64    //65    //     Request path: /api/company/widgetworks/user/johndoe?timezone=EST66    //     Translated:67    //     https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe68    CONSTANT_ADDRESS = 1;69 70    // The request path will be appended to the backend address.71    //72    // # Examples73    //74    // Given the following operation config:75    //76    //     Method path:        /api/company/{cid}/user/{uid}77    //     Backend address:    https://example.appspot.com78    //79    // Requests to the following request paths will call the backend at the80    // translated path:81    //82    //     Request path: /api/company/widgetworks/user/johndoe83    //     Translated:84    //     https://example.appspot.com/api/company/widgetworks/user/johndoe85    //86    //     Request path: /api/company/widgetworks/user/johndoe?timezone=EST87    //     Translated:88    //     https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST89    APPEND_PATH_TO_ADDRESS = 2;90  }91 92  // Selects the methods to which this rule applies.93  //94  // Refer to [selector][google.api.DocumentationRule.selector] for syntax95  // details.96  string selector = 1;97 98  // The address of the API backend.99  //100  // The scheme is used to determine the backend protocol and security.101  // The following schemes are accepted:102  //103  //    SCHEME        PROTOCOL    SECURITY104  //    http://       HTTP        None105  //    https://      HTTP        TLS106  //    grpc://       gRPC        None107  //    grpcs://      gRPC        TLS108  //109  // It is recommended to explicitly include a scheme. Leaving out the scheme110  // may cause constrasting behaviors across platforms.111  //112  // If the port is unspecified, the default is:113  // - 80 for schemes without TLS114  // - 443 for schemes with TLS115  //116  // For HTTP backends, use [protocol][google.api.BackendRule.protocol]117  // to specify the protocol version.118  string address = 2;119 120  // The number of seconds to wait for a response from a request. The default121  // varies based on the request protocol and deployment environment.122  double deadline = 3;123 124  // Deprecated, do not use.125  double min_deadline = 4 [deprecated = true];126 127  // The number of seconds to wait for the completion of a long running128  // operation. The default is no deadline.129  double operation_deadline = 5;130 131  // Path translation specifies how to combine the backend address with the132  // request path in order to produce the appropriate forwarding URL for the133  // request. See [PathTranslation][google.api.BackendRule.PathTranslation] for134  // more details.135  PathTranslation path_translation = 6;136 137  // Authentication settings used by the backend.138  //139  // These are typically used to provide service management functionality to140  // a backend served on a publicly-routable URL. The `authentication`141  // details should match the authentication behavior used by the backend.142  //143  // For example, specifying `jwt_audience` implies that the backend expects144  // authentication via a JWT.145  //146  // When authentication is unspecified, the resulting behavior is the same147  // as `disable_auth` set to `true`.148  //149  // Refer to https://developers.google.com/identity/protocols/OpenIDConnect for150  // JWT ID token.151  oneof authentication {152    // The JWT audience is used when generating a JWT ID token for the backend.153    // This ID token will be added in the HTTP "authorization" header, and sent154    // to the backend.155    string jwt_audience = 7;156 157    // When disable_auth is true, a JWT ID token won't be generated and the158    // original "Authorization" HTTP header will be preserved. If the header is159    // used to carry the original token and is expected by the backend, this160    // field must be set to true to preserve the header.161    bool disable_auth = 8;162  }163 164  // The protocol used for sending a request to the backend.165  // The supported values are "http/1.1" and "h2".166  //167  // The default value is inferred from the scheme in the168  // [address][google.api.BackendRule.address] field:169  //170  //    SCHEME        PROTOCOL171  //    http://       http/1.1172  //    https://      http/1.1173  //    grpc://       h2174  //    grpcs://      h2175  //176  // For secure HTTP backends (https://) that support HTTP/2, set this field177  // to "h2" for improved performance.178  //179  // Configuring this field to non-default values is only supported for secure180  // HTTP backends. This field will be ignored for all other backends.181  //182  // See183  // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids184  // for more details on the supported values.185  string protocol = 9;186 187  // The map between request protocol and the backend address.188  map<string, BackendRule> overrides_by_request_protocol = 10;189 190  // The load balancing policy used for connection to the application backend.191  //192  // Defined as an arbitrary string to accomondate custom load balancing193  // policies supported by the underlying channel, but suggest most users use194  // one of the standard policies, such as the default, "RoundRobin".195  string load_balancing_policy = 11;196}197 
codekingpro/portable-devtools · Team Ai