├── .github └── SECURITY.md ├── .gitignore ├── CODEOWNERS ├── LICENSE ├── Makefile ├── README.md ├── bin ├── create-buildtools-and-update.sh └── update-build-image.sh ├── common-protos ├── google │ ├── api │ │ ├── annotations.proto │ │ ├── auth.proto │ │ ├── backend.proto │ │ ├── billing.proto │ │ ├── client.proto │ │ ├── config_change.proto │ │ ├── consumer.proto │ │ ├── context.proto │ │ ├── control.proto │ │ ├── distribution.proto │ │ ├── documentation.proto │ │ ├── endpoint.proto │ │ ├── expr │ │ │ ├── v1alpha1 │ │ │ │ ├── cel_service.proto │ │ │ │ ├── checked.proto │ │ │ │ ├── conformance_service.proto │ │ │ │ ├── eval.proto │ │ │ │ ├── explain.proto │ │ │ │ ├── syntax.proto │ │ │ │ └── value.proto │ │ │ └── v1beta1 │ │ │ │ ├── decl.proto │ │ │ │ ├── eval.proto │ │ │ │ ├── expr.proto │ │ │ │ ├── source.proto │ │ │ │ └── value.proto │ │ ├── field_behavior.proto │ │ ├── http.proto │ │ ├── httpbody.proto │ │ ├── label.proto │ │ ├── launch_stage.proto │ │ ├── log.proto │ │ ├── logging.proto │ │ ├── metric.proto │ │ ├── monitored_resource.proto │ │ ├── monitoring.proto │ │ ├── quota.proto │ │ ├── resource.proto │ │ ├── service.proto │ │ ├── servicecontrol │ │ │ └── v1 │ │ │ │ ├── check_error.proto │ │ │ │ ├── distribution.proto │ │ │ │ ├── log_entry.proto │ │ │ │ ├── metric_value.proto │ │ │ │ ├── operation.proto │ │ │ │ ├── quota_controller.proto │ │ │ │ └── service_controller.proto │ │ ├── servicemanagement │ │ │ └── v1 │ │ │ │ ├── resources.proto │ │ │ │ └── servicemanager.proto │ │ ├── source_info.proto │ │ ├── system_parameter.proto │ │ └── usage.proto │ ├── protobuf │ │ ├── any.proto │ │ ├── api.proto │ │ ├── compiler │ │ │ └── plugin.proto │ │ ├── descriptor.proto │ │ ├── duration.proto │ │ ├── empty.proto │ │ ├── field_mask.proto │ │ ├── source_context.proto │ │ ├── struct.proto │ │ ├── timestamp.proto │ │ ├── type.proto │ │ ├── util │ │ │ ├── json_format.proto │ │ │ └── json_format_proto3.proto │ │ └── wrappers.proto │ ├── rpc │ │ ├── code.proto │ │ ├── error_details.proto │ │ └── status.proto │ └── type │ │ ├── calendar_period.proto │ │ ├── color.proto │ │ ├── date.proto │ │ ├── dayofweek.proto │ │ ├── expr.proto │ │ ├── fraction.proto │ │ ├── latlng.proto │ │ ├── money.proto │ │ ├── postal_address.proto │ │ ├── quaternion.proto │ │ └── timeofday.proto ├── istio.io │ └── extensions │ │ └── field_rules.proto └── k8s.io │ ├── api │ ├── admission │ │ ├── v1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── admissionregistration │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v1alpha1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── apidiscovery │ │ └── v2beta1 │ │ │ └── generated.proto │ ├── apiserverinternal │ │ └── v1alpha1 │ │ │ └── generated.proto │ ├── apps │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v1beta1 │ │ │ └── generated.proto │ │ └── v1beta2 │ │ │ └── generated.proto │ ├── authentication │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v1alpha1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── authorization │ │ ├── v1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── autoscaling │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v2 │ │ │ └── generated.proto │ │ ├── v2beta1 │ │ │ └── generated.proto │ │ └── v2beta2 │ │ │ └── generated.proto │ ├── batch │ │ ├── v1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── certificates │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v1alpha1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── coordination │ │ ├── v1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── core │ │ └── v1 │ │ │ └── generated.proto │ ├── discovery │ │ ├── v1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── events │ │ ├── v1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── extensions │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── flowcontrol │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v1beta1 │ │ │ └── generated.proto │ │ ├── v1beta2 │ │ │ └── generated.proto │ │ └── v1beta3 │ │ │ └── generated.proto │ ├── imagepolicy │ │ └── v1alpha1 │ │ │ └── generated.proto │ ├── networking │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v1alpha1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── node │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v1alpha1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── policy │ │ ├── v1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── rbac │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v1alpha1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ ├── resource │ │ └── v1alpha2 │ │ │ └── generated.proto │ ├── scheduling │ │ ├── v1 │ │ │ └── generated.proto │ │ ├── v1alpha1 │ │ │ └── generated.proto │ │ └── v1beta1 │ │ │ └── generated.proto │ └── storage │ │ ├── v1 │ │ └── generated.proto │ │ ├── v1alpha1 │ │ └── generated.proto │ │ └── v1beta1 │ │ └── generated.proto │ └── apimachinery │ └── pkg │ ├── api │ └── resource │ │ └── generated.proto │ ├── apis │ └── meta │ │ ├── v1 │ │ └── generated.proto │ │ └── v1beta1 │ │ └── generated.proto │ ├── runtime │ ├── generated.proto │ └── schema │ │ └── generated.proto │ └── util │ └── intstr │ └── generated.proto ├── files ├── .devcontainer │ └── devcontainer.json ├── .gitattributes ├── BUGS-AND-FEATURE-REQUESTS.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── SUPPORT.md └── common │ ├── Makefile.common.mk │ ├── config │ ├── .golangci.yml │ ├── .hadolint.yml │ ├── .yamllint.yml │ ├── license-lint.yml │ ├── mdl.rb │ ├── sass-lint.yml │ └── tslint.json │ └── scripts │ ├── check_clean_repo.sh │ ├── copyright-banner-go.txt │ ├── fix_copyright_banner.sh │ ├── format_go.sh │ ├── gobuild.sh │ ├── kind_provisioner.sh │ ├── lint_copyright_banner.sh │ ├── lint_go.sh │ ├── metallb-native.yaml │ ├── report_build_info.sh │ ├── run.sh │ ├── setup_env.sh │ └── tracing.sh ├── get_protos.sh └── protos └── istio.io └── extensions └── field_rules.proto /.github/SECURITY.md: -------------------------------------------------------------------------------- 1 | Refer to [Istio Security Overview](https://github.com/istio/istio/blob/master/.github/SECURITY.md) for more details. 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .project 3 | 4 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @istio/wg-test-and-release-maintainers 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright Istio Authors 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 | update-protos: 16 | @./get_protos.sh 17 | 18 | lint: 19 | @cp files/common/Makefile.common.mk files/Makefile.core.mk 20 | @echo >files/Makefile.overrides.mk "BUILD_WITH_CONTAINER ?= 1" 21 | @cd files && make -f Makefile lint-all 22 | @rm files/Makefile.core.mk files/Makefile.overrides.mk 23 | 24 | update-build-image: 25 | @bin/update_build_image.sh 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Common Files 2 | 3 | This repository contains build-related files used by several Istio repos. 4 | 5 | Within repos that use files from this repo, just run `make update-common` or 6 | `make update-common-protos` to grab the latest versions of the files from the 7 | `files/common` or `common-protos` directories, respectively. In addition to 8 | copying the latest versions of the files from this repo, the make commands 9 | will also update the `.commonfiles.sha` file within their respective 10 | directories to contain the SHA representing the exact set of common files 11 | copied into the repo. 12 | 13 | ### Makefile Tab Completion 14 | 15 | The default bash-completion for `make` does not look for files called anything 16 | other than `Makefile`. Add the following to your bash profile to see all make 17 | targets provided by this repo and the repos that use it. 18 | 19 | complete -W "\`find . -iname \"?akefil*\" | xargs -I {} grep -hoE '^[a-zA-Z0-9_.-]+:([^=]|$)' {} | sed 's/[^a-zA-Z0-9_.-]*$//' | sort -u\`" make 20 | -------------------------------------------------------------------------------- /bin/create-buildtools-and-update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright Istio Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | set -euxo pipefail 17 | 18 | # This script needs two istio repositories, tools and common-files, expecting 19 | # both will be cloned into a common parent directory. This script will 20 | # traverse to the tools repository to build new build-tools images and then 21 | # return. 22 | ROOT="$(cd -P "$(dirname -- "$0")" && pwd -P)" 23 | 24 | # pushd to the tools repo and build the images. Use tee so we can see 25 | # the build output as well as saving it to get the IMAGE_VERSION. 26 | pushd ${ROOT}/../../tools 27 | make containers 2>&1 | tee make.out 28 | IMAGE_VERSION=$(grep "+ VERSION" make.out | sed -e 's/.*=//') 29 | popd 30 | 31 | # Update the common files with the image version. As noted above, the expectation is 32 | # that common-files and tools are both in a parent directory. In the case of the build 33 | # pipeline this is true (both are under ~/prow/go/srd/istio.io). However, the pipeline 34 | # has cloned a copy of the common-files repository to /tmp/./src/istio.io/common-files 35 | # to watch for changes. 36 | # In the case of the pipeline, we want to run the bin/update_build_image.sh from the 37 | # automator cloned directory ($AUTOMATOR_REPO_DIR). 38 | if [ -n "$AUTOMATOR_REPO_DIR" ]; then ROOT=${AUTOMATOR_REPO_DIR}/bin; fi 39 | ${ROOT}/update-build-image.sh --image $IMAGE_VERSION 40 | -------------------------------------------------------------------------------- /bin/update-build-image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright Istio Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | set -e 17 | 18 | ROOT="$(cd -P "$(dirname -- "$0")" && pwd -P)" 19 | 20 | TOOLS_REGISTRY_PROVIDER=${TOOLS_REGISTRY_PROVIDER:-gcr.io} 21 | PROJECT_ID=${PROJECT_ID:-istio-testing} 22 | TOOLS_REGISTRY_REPO=${TOOLS_REGISTRY_REPO:-build-tools} 23 | 24 | # Allow passing in the new IMAGE_VERSION using that as an environment variable 25 | # or using --image . The parameter has a higher priority. 26 | # Did not use getopts to parse parameters and yield errors since this script 27 | # should run on Macs as there is no build container used in this repo. 28 | newBuildImage=$IMAGE_VERSION 29 | if [[ "$1" == "--image" ]]; then 30 | newBuildImage=$2 31 | fi 32 | 33 | # If IMAGE_VERSION isn't specified, get the latest tag for the currently used release in 34 | # ../files/common/scripts/setup_env.sh 35 | if [ -z "$newBuildImage" ] ; then 36 | imageRelease=$(grep IMAGE_VERSION= ${ROOT}/../files/common/scripts/setup_env.sh | sed -e 's/^.*=//' | cut -f1,2 -d'-') 37 | 38 | # If this isn't a release- branch, cut after the first - 39 | if [[ "$imageRelease" != "release-"* ]]; then 40 | imageRelease=$(echo "$imageRelease" | cut -f1 -d'-') 41 | fi 42 | 43 | # Get the latest build-tools image for the given release 44 | newBuildImage=$(curl -sL "https://${TOOLS_REGISTRY_PROVIDER}/v2/${PROJECT_ID}/${TOOLS_REGISTRY_REPO}/tags/list" | jq '."manifest"[]["tag"]' | awk '/'$imageRelease'/ && !/latest/' | sort -r | sed -e 's/^[[:space:]]*"//' -e 's/".*//' | head -n 1) 45 | 46 | # If no IMAGE_VERSION is specified and one is not found, output an error 47 | if [ -z "$newBuildImage" ] ; then 48 | echo No valid IMAGE_VERSION found to replace the current value 49 | exit 1 50 | fi 51 | fi 52 | 53 | # Update the setup_env script with the new image name 54 | # Since common-files doesn't use a build image, make this sed work on both Mac and Ubuntu 55 | echo Updating IMAGE_VERSION to "$newBuildImage" 56 | sed -i.bak -e "s/IMAGE_VERSION=.*/IMAGE_VERSION=$newBuildImage/" ${ROOT}/../files/common/scripts/setup_env.sh && rm ${ROOT}/../files/common/scripts/setup_env.sh.bak 57 | fullBuildImage=${TOOLS_REGISTRY_PROVIDER}/${PROJECT_ID}/${TOOLS_REGISTRY_REPO}:${newBuildImage} 58 | cat <<< $(jq --arg fullBuildImage "$fullBuildImage" '.image = $fullBuildImage' ${ROOT}/../files/.devcontainer/devcontainer.json) > ${ROOT}/../files/.devcontainer/devcontainer.json 59 | -------------------------------------------------------------------------------- /common-protos/google/api/annotations.proto: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Google Inc. 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 | 17 | package google.api; 18 | 19 | import "google/api/http.proto"; 20 | import "google/protobuf/descriptor.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "AnnotationsProto"; 25 | option java_package = "com.google.api"; 26 | option objc_class_prefix = "GAPI"; 27 | 28 | extend google.protobuf.MethodOptions { 29 | // See `HttpRule`. 30 | HttpRule http = 72295728; 31 | } 32 | -------------------------------------------------------------------------------- /common-protos/google/api/billing.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | import "google/api/metric.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "BillingProto"; 25 | option java_package = "com.google.api"; 26 | option objc_class_prefix = "GAPI"; 27 | 28 | // Billing related configuration of the service. 29 | // 30 | // The following example shows how to configure monitored resources and metrics 31 | // for billing: 32 | // 33 | // monitored_resources: 34 | // - type: library.googleapis.com/branch 35 | // labels: 36 | // - key: /city 37 | // description: The city where the library branch is located in. 38 | // - key: /name 39 | // description: The name of the branch. 40 | // metrics: 41 | // - name: library.googleapis.com/book/borrowed_count 42 | // metric_kind: DELTA 43 | // value_type: INT64 44 | // billing: 45 | // consumer_destinations: 46 | // - monitored_resource: library.googleapis.com/branch 47 | // metrics: 48 | // - library.googleapis.com/book/borrowed_count 49 | message Billing { 50 | // Configuration of a specific billing destination (Currently only support 51 | // bill against consumer project). 52 | message BillingDestination { 53 | // The monitored resource type. The type must be defined in 54 | // [Service.monitored_resources][google.api.Service.monitored_resources] section. 55 | string monitored_resource = 1; 56 | 57 | // Names of the metrics to report to this billing destination. 58 | // Each name must be defined in [Service.metrics][google.api.Service.metrics] section. 59 | repeated string metrics = 2; 60 | } 61 | 62 | // Billing configurations for sending metrics to the consumer project. 63 | // There can be multiple consumer destinations per service, each one must have 64 | // a different monitored resource type. A metric can be used in at most 65 | // one consumer destination. 66 | repeated BillingDestination consumer_destinations = 8; 67 | } 68 | -------------------------------------------------------------------------------- /common-protos/google/api/client.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | import "google/protobuf/descriptor.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "ClientProto"; 25 | option java_package = "com.google.api"; 26 | option objc_class_prefix = "GAPI"; 27 | 28 | extend google.protobuf.MethodOptions { 29 | // A definition of a client library method signature. 30 | // 31 | // In client libraries, each proto RPC corresponds to one or more methods 32 | // which the end user is able to call, and calls the underlying RPC. 33 | // Normally, this method receives a single argument (a struct or instance 34 | // corresponding to the RPC request object). Defining this field will 35 | // add one or more overloads providing flattened or simpler method signatures 36 | // in some languages. 37 | // 38 | // The fields on the method signature are provided as a comma-separated 39 | // string. 40 | // 41 | // For example, the proto RPC and annotation: 42 | // 43 | // rpc CreateSubscription(CreateSubscriptionRequest) 44 | // returns (Subscription) { 45 | // option (google.api.method_signature) = "name,topic"; 46 | // } 47 | // 48 | // Would add the following Java overload (in addition to the method accepting 49 | // the request object): 50 | // 51 | // public final Subscription createSubscription(String name, String topic) 52 | // 53 | // The following backwards-compatibility guidelines apply: 54 | // 55 | // * Adding this annotation to an unannotated method is backwards 56 | // compatible. 57 | // * Adding this annotation to a method which already has existing 58 | // method signature annotations is backwards compatible if and only if 59 | // the new method signature annotation is last in the sequence. 60 | // * Modifying or removing an existing method signature annotation is 61 | // a breaking change. 62 | // * Re-ordering existing method signature annotations is a breaking 63 | // change. 64 | repeated string method_signature = 1051; 65 | } 66 | 67 | extend google.protobuf.ServiceOptions { 68 | // The hostname for this service. 69 | // This should be specified with no prefix or protocol. 70 | // 71 | // Example: 72 | // 73 | // service Foo { 74 | // option (google.api.default_host) = "foo.googleapi.com"; 75 | // ... 76 | // } 77 | string default_host = 1049; 78 | 79 | // OAuth scopes needed for the client. 80 | // 81 | // Example: 82 | // 83 | // service Foo { 84 | // option (google.api.oauth_scopes) = \ 85 | // "https://www.googleapis.com/auth/cloud-platform"; 86 | // ... 87 | // } 88 | // 89 | // If there is more than one scope, use a comma-separated string: 90 | // 91 | // Example: 92 | // 93 | // service Foo { 94 | // option (google.api.oauth_scopes) = \ 95 | // "https://www.googleapis.com/auth/cloud-platform," 96 | // "https://www.googleapis.com/auth/monitoring"; 97 | // ... 98 | // } 99 | string oauth_scopes = 1050; 100 | } 101 | -------------------------------------------------------------------------------- /common-protos/google/api/config_change.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/api/configchange;configchange"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "ConfigChangeProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | // Output generated from semantically comparing two versions of a service 27 | // configuration. 28 | // 29 | // Includes detailed information about a field that have changed with 30 | // applicable advice about potential consequences for the change, such as 31 | // backwards-incompatibility. 32 | message ConfigChange { 33 | // Object hierarchy path to the change, with levels separated by a '.' 34 | // character. For repeated fields, an applicable unique identifier field is 35 | // used for the index (usually selector, name, or id). For maps, the term 36 | // 'key' is used. If the field has no unique identifier, the numeric index 37 | // is used. 38 | // Examples: 39 | // - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction 40 | // - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value 41 | // - logging.producer_destinations[0] 42 | string element = 1; 43 | 44 | // Value of the changed object in the old Service configuration, 45 | // in JSON format. This field will not be populated if ChangeType == ADDED. 46 | string old_value = 2; 47 | 48 | // Value of the changed object in the new Service configuration, 49 | // in JSON format. This field will not be populated if ChangeType == REMOVED. 50 | string new_value = 3; 51 | 52 | // The type for this change, either ADDED, REMOVED, or MODIFIED. 53 | ChangeType change_type = 4; 54 | 55 | // Collection of advice provided for this change, useful for determining the 56 | // possible impact of this change. 57 | repeated Advice advices = 5; 58 | } 59 | 60 | // Generated advice about this change, used for providing more 61 | // information about how a change will affect the existing service. 62 | message Advice { 63 | // Useful description for why this advice was applied and what actions should 64 | // be taken to mitigate any implied risks. 65 | string description = 2; 66 | } 67 | 68 | // Classifies set of possible modifications to an object in the service 69 | // configuration. 70 | enum ChangeType { 71 | // No value was provided. 72 | CHANGE_TYPE_UNSPECIFIED = 0; 73 | 74 | // The changed object exists in the 'new' service configuration, but not 75 | // in the 'old' service configuration. 76 | ADDED = 1; 77 | 78 | // The changed object exists in the 'old' service configuration, but not 79 | // in the 'new' service configuration. 80 | REMOVED = 2; 81 | 82 | // The changed object exists in both service configurations, but its value 83 | // is different. 84 | MODIFIED = 3; 85 | } 86 | -------------------------------------------------------------------------------- /common-protos/google/api/consumer.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. 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 | 17 | package google.api; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "ConsumerProto"; 22 | option java_package = "com.google.api"; 23 | 24 | // A descriptor for defining project properties for a service. One service may 25 | // have many consumer projects, and the service may want to behave differently 26 | // depending on some properties on the project. For example, a project may be 27 | // associated with a school, or a business, or a government agency, a business 28 | // type property on the project may affect how a service responds to the client. 29 | // This descriptor defines which properties are allowed to be set on a project. 30 | // 31 | // Example: 32 | // 33 | // project_properties: 34 | // properties: 35 | // - name: NO_WATERMARK 36 | // type: BOOL 37 | // description: Allows usage of the API without watermarks. 38 | // - name: EXTENDED_TILE_CACHE_PERIOD 39 | // type: INT64 40 | message ProjectProperties { 41 | // List of per consumer project-specific properties. 42 | repeated Property properties = 1; 43 | } 44 | 45 | // Defines project properties. 46 | // 47 | // API services can define properties that can be assigned to consumer projects 48 | // so that backends can perform response customization without having to make 49 | // additional calls or maintain additional storage. For example, Maps API 50 | // defines properties that controls map tile cache period, or whether to embed a 51 | // watermark in a result. 52 | // 53 | // These values can be set via API producer console. Only API providers can 54 | // define and set these properties. 55 | message Property { 56 | // Supported data type of the property values 57 | enum PropertyType { 58 | // The type is unspecified, and will result in an error. 59 | UNSPECIFIED = 0; 60 | 61 | // The type is `int64`. 62 | INT64 = 1; 63 | 64 | // The type is `bool`. 65 | BOOL = 2; 66 | 67 | // The type is `string`. 68 | STRING = 3; 69 | 70 | // The type is 'double'. 71 | DOUBLE = 4; 72 | } 73 | 74 | // The name of the property (a.k.a key). 75 | string name = 1; 76 | 77 | // The type of this property. 78 | PropertyType type = 2; 79 | 80 | // The description of the property 81 | string description = 3; 82 | } 83 | -------------------------------------------------------------------------------- /common-protos/google/api/context.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "ContextProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | // `Context` defines which contexts an API requests. 27 | // 28 | // Example: 29 | // 30 | // context: 31 | // rules: 32 | // - selector: "*" 33 | // requested: 34 | // - google.rpc.context.ProjectContext 35 | // - google.rpc.context.OriginContext 36 | // 37 | // The above specifies that all methods in the API request 38 | // `google.rpc.context.ProjectContext` and 39 | // `google.rpc.context.OriginContext`. 40 | // 41 | // Available context types are defined in package 42 | // `google.rpc.context`. 43 | // 44 | // This also provides mechanism to whitelist any protobuf message extension that 45 | // can be sent in grpc metadata using “x-goog-ext--bin” and 46 | // “x-goog-ext--jspb” format. For example, list any service 47 | // specific protobuf types that can appear in grpc metadata as follows in your 48 | // yaml file: 49 | // 50 | // Example: 51 | // 52 | // context: 53 | // rules: 54 | // - selector: "google.example.library.v1.LibraryService.CreateBook" 55 | // allowed_request_extensions: 56 | // - google.foo.v1.NewExtension 57 | // allowed_response_extensions: 58 | // - google.foo.v1.NewExtension 59 | // 60 | // You can also specify extension ID instead of fully qualified extension name 61 | // here. 62 | message Context { 63 | // A list of RPC context rules that apply to individual API methods. 64 | // 65 | // **NOTE:** All service configuration rules follow "last one wins" order. 66 | repeated ContextRule rules = 1; 67 | } 68 | 69 | // A context rule provides information about the context for an individual API 70 | // element. 71 | message ContextRule { 72 | // Selects the methods to which this rule applies. 73 | // 74 | // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. 75 | string selector = 1; 76 | 77 | // A list of full type names of requested contexts. 78 | repeated string requested = 2; 79 | 80 | // A list of full type names of provided contexts. 81 | repeated string provided = 3; 82 | 83 | // A list of full type names or extension IDs of extensions allowed in grpc 84 | // side channel from client to backend. 85 | repeated string allowed_request_extensions = 4; 86 | 87 | // A list of full type names or extension IDs of extensions allowed in grpc 88 | // side channel from backend to client. 89 | repeated string allowed_response_extensions = 5; 90 | } 91 | -------------------------------------------------------------------------------- /common-protos/google/api/control.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "ControlProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | // Selects and configures the service controller used by the service. The 27 | // service controller handles features like abuse, quota, billing, logging, 28 | // monitoring, etc. 29 | message Control { 30 | // The service control environment to use. If empty, no control plane 31 | // feature (like quota and billing) will be enabled. 32 | string environment = 1; 33 | } 34 | -------------------------------------------------------------------------------- /common-protos/google/api/endpoint.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "EndpointProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | // `Endpoint` describes a network endpoint that serves a set of APIs. 27 | // A service may expose any number of endpoints, and all endpoints share the 28 | // same service configuration, such as quota configuration and monitoring 29 | // configuration. 30 | // 31 | // Example service configuration: 32 | // 33 | // name: library-example.googleapis.com 34 | // endpoints: 35 | // # Below entry makes 'google.example.library.v1.Library' 36 | // # API be served from endpoint address library-example.googleapis.com. 37 | // # It also allows HTTP OPTIONS calls to be passed to the backend, for 38 | // # it to decide whether the subsequent cross-origin request is 39 | // # allowed to proceed. 40 | // - name: library-example.googleapis.com 41 | // allow_cors: true 42 | message Endpoint { 43 | // The canonical name of this endpoint. 44 | string name = 1; 45 | 46 | // DEPRECATED: This field is no longer supported. Instead of using aliases, 47 | // please specify multiple [google.api.Endpoint][google.api.Endpoint] for each of the intended 48 | // aliases. 49 | // 50 | // Additional names that this endpoint will be hosted on. 51 | repeated string aliases = 2 [deprecated = true]; 52 | 53 | // The list of features enabled on this endpoint. 54 | repeated string features = 4; 55 | 56 | // The specification of an Internet routable address of API frontend that will 57 | // handle requests to this [API 58 | // Endpoint](https://cloud.google.com/apis/design/glossary). It should be 59 | // either a valid IPv4 address or a fully-qualified domain name. For example, 60 | // "8.8.8.8" or "myservice.appspot.com". 61 | string target = 101; 62 | 63 | // Allowing 64 | // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka 65 | // cross-domain traffic, would allow the backends served from this endpoint to 66 | // receive and respond to HTTP OPTIONS requests. The response will be used by 67 | // the browser to determine whether the subsequent cross-origin request is 68 | // allowed to proceed. 69 | bool allow_cors = 5; 70 | } 71 | -------------------------------------------------------------------------------- /common-protos/google/api/expr/v1alpha1/cel_service.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api.expr.v1alpha1; 19 | 20 | import "google/api/expr/v1alpha1/conformance_service.proto"; 21 | 22 | option cc_enable_arenas = true; 23 | option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "CelServiceProto"; 26 | option java_package = "com.google.api.expr.v1alpha1"; 27 | 28 | // Access a CEL implementation from another process or machine. 29 | // A CEL implementation is decomposed as a parser, a static checker, 30 | // and an evaluator. Every CEL implementation is expected to provide 31 | // a server for this API. The API will be used for conformance testing, 32 | // utilities, and execution as a service. 33 | service CelService { 34 | // Transforms CEL source text into a parsed representation. 35 | rpc Parse(ParseRequest) returns (ParseResponse) {} 36 | 37 | // Runs static checks on a parsed CEL representation and return 38 | // an annotated representation, or a set of issues. 39 | rpc Check(CheckRequest) returns (CheckResponse) {} 40 | 41 | // Evaluates a parsed or annotation CEL representation given 42 | // values of external bindings. 43 | rpc Eval(EvalRequest) returns (EvalResponse) {} 44 | } 45 | -------------------------------------------------------------------------------- /common-protos/google/api/expr/v1alpha1/eval.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api.expr.v1alpha1; 19 | 20 | import "google/api/expr/v1alpha1/value.proto"; 21 | import "google/rpc/status.proto"; 22 | 23 | option cc_enable_arenas = true; 24 | option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr"; 25 | option java_multiple_files = true; 26 | option java_outer_classname = "EvalProto"; 27 | option java_package = "com.google.api.expr.v1alpha1"; 28 | 29 | // The state of an evaluation. 30 | // 31 | // Can represent an inital, partial, or completed state of evaluation. 32 | message EvalState { 33 | // A single evalution result. 34 | message Result { 35 | // The id of the expression this result if for. 36 | int64 expr = 1; 37 | 38 | // The index in `values` of the resulting value. 39 | int64 value = 2; 40 | } 41 | 42 | // The unique values referenced in this message. 43 | repeated ExprValue values = 1; 44 | 45 | // An ordered list of results. 46 | // 47 | // Tracks the flow of evaluation through the expression. 48 | // May be sparse. 49 | repeated Result results = 3; 50 | } 51 | 52 | // The value of an evaluated expression. 53 | message ExprValue { 54 | // An expression can resolve to a value, error or unknown. 55 | oneof kind { 56 | // A concrete value. 57 | Value value = 1; 58 | 59 | // The set of errors in the critical path of evalution. 60 | // 61 | // Only errors in the critical path are included. For example, 62 | // `( || true) && ` will only result in ``, 63 | // while ` || ` will result in both `` and 64 | // ``. 65 | // 66 | // Errors cause by the presence of other errors are not included in the 67 | // set. For example `.foo`, `foo()`, and ` + 1` will 68 | // only result in ``. 69 | // 70 | // Multiple errors *might* be included when evaluation could result 71 | // in different errors. For example ` + ` and 72 | // `foo(, )` may result in ``, `` or both. 73 | // The exact subset of errors included for this case is unspecified and 74 | // depends on the implementation details of the evaluator. 75 | ErrorSet error = 2; 76 | 77 | // The set of unknowns in the critical path of evaluation. 78 | // 79 | // Unknown behaves identically to Error with regards to propagation. 80 | // Specifically, only unknowns in the critical path are included, unknowns 81 | // caused by the presence of other unknowns are not included, and multiple 82 | // unknowns *might* be included included when evaluation could result in 83 | // different unknowns. For example: 84 | // 85 | // ( || true) && -> 86 | // || -> 87 | // .foo -> 88 | // foo() -> 89 | // + -> or 90 | // 91 | // Unknown takes precidence over Error in cases where a `Value` can short 92 | // circuit the result: 93 | // 94 | // || -> 95 | // && -> 96 | // 97 | // Errors take precidence in all other cases: 98 | // 99 | // + -> 100 | // foo(, ) -> 101 | UnknownSet unknown = 3; 102 | } 103 | } 104 | 105 | // A set of errors. 106 | // 107 | // The errors included depend on the context. See `ExprValue.error`. 108 | message ErrorSet { 109 | // The errors in the set. 110 | repeated google.rpc.Status errors = 1; 111 | } 112 | 113 | // A set of expressions for which the value is unknown. 114 | // 115 | // The unknowns included depend on the context. See `ExprValue.unknown`. 116 | message UnknownSet { 117 | // The ids of the expressions with unknown values. 118 | repeated int64 exprs = 1; 119 | } 120 | -------------------------------------------------------------------------------- /common-protos/google/api/expr/v1alpha1/explain.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api.expr.v1alpha1; 19 | 20 | import "google/api/expr/v1alpha1/value.proto"; 21 | 22 | option cc_enable_arenas = true; 23 | option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "ExplainProto"; 26 | option java_package = "com.google.api.expr.v1alpha1"; 27 | 28 | // Values of intermediate expressions produced when evaluating expression. 29 | // Deprecated, use `EvalState` instead. 30 | message Explain { 31 | option deprecated = true; 32 | 33 | // ID and value index of one step. 34 | message ExprStep { 35 | // ID of corresponding Expr node. 36 | int64 id = 1; 37 | 38 | // Index of the value in the values list. 39 | int32 value_index = 2; 40 | } 41 | 42 | // All of the observed values. 43 | // 44 | // The field value_index is an index in the values list. 45 | // Separating values from steps is needed to remove redundant values. 46 | repeated Value values = 1; 47 | 48 | // List of steps. 49 | // 50 | // Repeated evaluations of the same expression generate new ExprStep 51 | // instances. The order of such ExprStep instances matches the order of 52 | // elements returned by Comprehension.iter_range. 53 | repeated ExprStep expr_steps = 2; 54 | } 55 | -------------------------------------------------------------------------------- /common-protos/google/api/expr/v1alpha1/value.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api.expr.v1alpha1; 19 | 20 | import "google/protobuf/any.proto"; 21 | import "google/protobuf/struct.proto"; 22 | 23 | option cc_enable_arenas = true; 24 | option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr"; 25 | option java_multiple_files = true; 26 | option java_outer_classname = "ValueProto"; 27 | option java_package = "com.google.api.expr.v1alpha1"; 28 | 29 | // Contains representations for CEL runtime values. 30 | 31 | // Represents a CEL value. 32 | // 33 | // This is similar to `google.protobuf.Value`, but can represent CEL's full 34 | // range of values. 35 | message Value { 36 | // Required. The valid kinds of values. 37 | oneof kind { 38 | // Null value. 39 | google.protobuf.NullValue null_value = 1; 40 | 41 | // Boolean value. 42 | bool bool_value = 2; 43 | 44 | // Signed integer value. 45 | int64 int64_value = 3; 46 | 47 | // Unsigned integer value. 48 | uint64 uint64_value = 4; 49 | 50 | // Floating point value. 51 | double double_value = 5; 52 | 53 | // UTF-8 string value. 54 | string string_value = 6; 55 | 56 | // Byte string value. 57 | bytes bytes_value = 7; 58 | 59 | // An enum value. 60 | EnumValue enum_value = 9; 61 | 62 | // The proto message backing an object value. 63 | google.protobuf.Any object_value = 10; 64 | 65 | // Map value. 66 | MapValue map_value = 11; 67 | 68 | // List value. 69 | ListValue list_value = 12; 70 | 71 | // Type value. 72 | string type_value = 15; 73 | } 74 | } 75 | 76 | // An enum value. 77 | message EnumValue { 78 | // The fully qualified name of the enum type. 79 | string type = 1; 80 | 81 | // The value of the enum. 82 | int32 value = 2; 83 | } 84 | 85 | // A list. 86 | // 87 | // Wrapped in a message so 'not set' and empty can be differentiated, which is 88 | // required for use in a 'oneof'. 89 | message ListValue { 90 | // The ordered values in the list. 91 | repeated Value values = 1; 92 | } 93 | 94 | // A map. 95 | // 96 | // Wrapped in a message so 'not set' and empty can be differentiated, which is 97 | // required for use in a 'oneof'. 98 | message MapValue { 99 | // An entry in the map. 100 | message Entry { 101 | // The key. 102 | // 103 | // Must be unique with in the map. 104 | // Currently only boolean, int, uint, and string values can be keys. 105 | Value key = 1; 106 | 107 | // The value. 108 | Value value = 2; 109 | } 110 | 111 | // The set of map entries. 112 | // 113 | // CEL has fewer restrictions on keys, so a protobuf map represenation 114 | // cannot be used. 115 | repeated Entry entries = 1; 116 | } 117 | -------------------------------------------------------------------------------- /common-protos/google/api/expr/v1beta1/decl.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api.expr.v1beta1; 19 | 20 | import "google/api/expr/v1beta1/expr.proto"; 21 | 22 | option cc_enable_arenas = true; 23 | option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "DeclProto"; 26 | option java_package = "com.google.api.expr.v1beta1"; 27 | 28 | // A declaration. 29 | message Decl { 30 | // The id of the declaration. 31 | int32 id = 1; 32 | 33 | // The name of the declaration. 34 | string name = 2; 35 | 36 | // The documentation string for the declaration. 37 | string doc = 3; 38 | 39 | // The kind of declaration. 40 | oneof kind { 41 | // An identifier declaration. 42 | IdentDecl ident = 4; 43 | 44 | // A function declaration. 45 | FunctionDecl function = 5; 46 | } 47 | } 48 | 49 | // The declared type of a variable. 50 | // 51 | // Extends runtime type values with extra information used for type checking 52 | // and dispatching. 53 | message DeclType { 54 | // The expression id of the declared type, if applicable. 55 | int32 id = 1; 56 | 57 | // The type name, e.g. 'int', 'my.type.Type' or 'T' 58 | string type = 2; 59 | 60 | // An ordered list of type parameters, e.g. ``. 61 | // Only applies to a subset of types, e.g. `map`, `list`. 62 | repeated DeclType type_params = 4; 63 | } 64 | 65 | // An identifier declaration. 66 | message IdentDecl { 67 | // Optional type of the identifier. 68 | DeclType type = 3; 69 | 70 | // Optional value of the identifier. 71 | Expr value = 4; 72 | } 73 | 74 | // A function declaration. 75 | message FunctionDecl { 76 | // The function arguments. 77 | repeated IdentDecl args = 1; 78 | 79 | // Optional declared return type. 80 | DeclType return_type = 2; 81 | 82 | // If the first argument of the function is the receiver. 83 | bool receiver_function = 3; 84 | } 85 | -------------------------------------------------------------------------------- /common-protos/google/api/expr/v1beta1/eval.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api.expr.v1beta1; 19 | 20 | import "google/api/expr/v1beta1/value.proto"; 21 | import "google/rpc/status.proto"; 22 | 23 | option cc_enable_arenas = true; 24 | option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr"; 25 | option java_multiple_files = true; 26 | option java_outer_classname = "EvalProto"; 27 | option java_package = "com.google.api.expr.v1beta1"; 28 | 29 | // The state of an evaluation. 30 | // 31 | // Can represent an initial, partial, or completed state of evaluation. 32 | message EvalState { 33 | // A single evaluation result. 34 | message Result { 35 | // The expression this result is for. 36 | IdRef expr = 1; 37 | 38 | // The index in `values` of the resulting value. 39 | int32 value = 2; 40 | } 41 | 42 | // The unique values referenced in this message. 43 | repeated ExprValue values = 1; 44 | 45 | // An ordered list of results. 46 | // 47 | // Tracks the flow of evaluation through the expression. 48 | // May be sparse. 49 | repeated Result results = 3; 50 | } 51 | 52 | // The value of an evaluated expression. 53 | message ExprValue { 54 | // An expression can resolve to a value, error or unknown. 55 | oneof kind { 56 | // A concrete value. 57 | Value value = 1; 58 | 59 | // The set of errors in the critical path of evalution. 60 | // 61 | // Only errors in the critical path are included. For example, 62 | // `( || true) && ` will only result in ``, 63 | // while ` || ` will result in both `` and 64 | // ``. 65 | // 66 | // Errors cause by the presence of other errors are not included in the 67 | // set. For example `.foo`, `foo()`, and ` + 1` will 68 | // only result in ``. 69 | // 70 | // Multiple errors *might* be included when evaluation could result 71 | // in different errors. For example ` + ` and 72 | // `foo(, )` may result in ``, `` or both. 73 | // The exact subset of errors included for this case is unspecified and 74 | // depends on the implementation details of the evaluator. 75 | ErrorSet error = 2; 76 | 77 | // The set of unknowns in the critical path of evaluation. 78 | // 79 | // Unknown behaves identically to Error with regards to propagation. 80 | // Specifically, only unknowns in the critical path are included, unknowns 81 | // caused by the presence of other unknowns are not included, and multiple 82 | // unknowns *might* be included included when evaluation could result in 83 | // different unknowns. For example: 84 | // 85 | // ( || true) && -> 86 | // || -> 87 | // .foo -> 88 | // foo() -> 89 | // + -> or 90 | // 91 | // Unknown takes precidence over Error in cases where a `Value` can short 92 | // circuit the result: 93 | // 94 | // || -> 95 | // && -> 96 | // 97 | // Errors take precidence in all other cases: 98 | // 99 | // + -> 100 | // foo(, ) -> 101 | UnknownSet unknown = 3; 102 | } 103 | } 104 | 105 | // A set of errors. 106 | // 107 | // The errors included depend on the context. See `ExprValue.error`. 108 | message ErrorSet { 109 | // The errors in the set. 110 | repeated google.rpc.Status errors = 1; 111 | } 112 | 113 | // A set of expressions for which the value is unknown. 114 | // 115 | // The unknowns included depend on the context. See `ExprValue.unknown`. 116 | message UnknownSet { 117 | // The ids of the expressions with unknown values. 118 | repeated IdRef exprs = 1; 119 | } 120 | 121 | // A reference to an expression id. 122 | message IdRef { 123 | // The expression id. 124 | int32 id = 1; 125 | } 126 | -------------------------------------------------------------------------------- /common-protos/google/api/expr/v1beta1/source.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api.expr.v1beta1; 19 | 20 | option cc_enable_arenas = true; 21 | option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "SourceProto"; 24 | option java_package = "com.google.api.expr.v1beta1"; 25 | 26 | // Source information collected at parse time. 27 | message SourceInfo { 28 | // The location name. All position information attached to an expression is 29 | // relative to this location. 30 | // 31 | // The location could be a file, UI element, or similar. For example, 32 | // `acme/app/AnvilPolicy.cel`. 33 | string location = 2; 34 | 35 | // Monotonically increasing list of character offsets where newlines appear. 36 | // 37 | // The line number of a given position is the index `i` where for a given 38 | // `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The 39 | // column may be derivd from `id_positions[id] - line_offsets[i]`. 40 | repeated int32 line_offsets = 3; 41 | 42 | // A map from the parse node id (e.g. `Expr.id`) to the character offset 43 | // within source. 44 | map positions = 4; 45 | } 46 | 47 | // A specific position in source. 48 | message SourcePosition { 49 | // The soucre location name (e.g. file name). 50 | string location = 1; 51 | 52 | // The character offset. 53 | int32 offset = 2; 54 | 55 | // The 1-based index of the starting line in the source text 56 | // where the issue occurs, or 0 if unknown. 57 | int32 line = 3; 58 | 59 | // The 0-based index of the starting position within the line of source text 60 | // where the issue occurs. Only meaningful if line is nonzer.. 61 | int32 column = 4; 62 | } 63 | -------------------------------------------------------------------------------- /common-protos/google/api/expr/v1beta1/value.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2018 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api.expr.v1beta1; 19 | 20 | import "google/protobuf/any.proto"; 21 | import "google/protobuf/struct.proto"; 22 | 23 | option cc_enable_arenas = true; 24 | option go_package = "google.golang.org/genproto/googleapis/api/expr/v1beta1;expr"; 25 | option java_multiple_files = true; 26 | option java_outer_classname = "ValueProto"; 27 | option java_package = "com.google.api.expr.v1beta1"; 28 | 29 | // Represents a CEL value. 30 | // 31 | // This is similar to `google.protobuf.Value`, but can represent CEL's full 32 | // range of values. 33 | message Value { 34 | // Required. The valid kinds of values. 35 | oneof kind { 36 | // Null value. 37 | google.protobuf.NullValue null_value = 1; 38 | 39 | // Boolean value. 40 | bool bool_value = 2; 41 | 42 | // Signed integer value. 43 | int64 int64_value = 3; 44 | 45 | // Unsigned integer value. 46 | uint64 uint64_value = 4; 47 | 48 | // Floating point value. 49 | double double_value = 5; 50 | 51 | // UTF-8 string value. 52 | string string_value = 6; 53 | 54 | // Byte string value. 55 | bytes bytes_value = 7; 56 | 57 | // An enum value. 58 | EnumValue enum_value = 9; 59 | 60 | // The proto message backing an object value. 61 | google.protobuf.Any object_value = 10; 62 | 63 | // Map value. 64 | MapValue map_value = 11; 65 | 66 | // List value. 67 | ListValue list_value = 12; 68 | 69 | // A Type value represented by the fully qualified name of the type. 70 | string type_value = 15; 71 | } 72 | } 73 | 74 | // An enum value. 75 | message EnumValue { 76 | // The fully qualified name of the enum type. 77 | string type = 1; 78 | 79 | // The value of the enum. 80 | int32 value = 2; 81 | } 82 | 83 | // A list. 84 | // 85 | // Wrapped in a message so 'not set' and empty can be differentiated, which is 86 | // required for use in a 'oneof'. 87 | message ListValue { 88 | // The ordered values in the list. 89 | repeated Value values = 1; 90 | } 91 | 92 | // A map. 93 | // 94 | // Wrapped in a message so 'not set' and empty can be differentiated, which is 95 | // required for use in a 'oneof'. 96 | message MapValue { 97 | // An entry in the map. 98 | message Entry { 99 | // The key. 100 | // 101 | // Must be unique with in the map. 102 | // Currently only boolean, int, uint, and string values can be keys. 103 | Value key = 1; 104 | 105 | // The value. 106 | Value value = 2; 107 | } 108 | 109 | // The set of map entries. 110 | // 111 | // CEL has fewer restrictions on keys, so a protobuf map represenation 112 | // cannot be used. 113 | repeated Entry entries = 1; 114 | } 115 | -------------------------------------------------------------------------------- /common-protos/google/api/field_behavior.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | import "google/protobuf/descriptor.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "FieldBehaviorProto"; 25 | option java_package = "com.google.api"; 26 | option objc_class_prefix = "GAPI"; 27 | 28 | extend google.protobuf.FieldOptions { 29 | // A designation of a specific field behavior (required, output only, etc.) 30 | // in protobuf messages. 31 | // 32 | // Examples: 33 | // 34 | // string name = 1 [(google.api.field_behavior) = REQUIRED]; 35 | // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 36 | // google.protobuf.Duration ttl = 1 37 | // [(google.api.field_behavior) = INPUT_ONLY]; 38 | // google.protobuf.Timestamp expire_time = 1 39 | // [(google.api.field_behavior) = OUTPUT_ONLY, 40 | // (google.api.field_behavior) = IMMUTABLE]; 41 | repeated google.api.FieldBehavior field_behavior = 1052; 42 | } 43 | 44 | // An indicator of the behavior of a given field (for example, that a field 45 | // is required in requests, or given as output but ignored as input). 46 | // This **does not** change the behavior in protocol buffers itself; it only 47 | // denotes the behavior and may affect how API tooling handles the field. 48 | // 49 | // Note: This enum **may** receive new values in the future. 50 | enum FieldBehavior { 51 | // Conventional default for enums. Do not use this. 52 | FIELD_BEHAVIOR_UNSPECIFIED = 0; 53 | 54 | // Specifically denotes a field as optional. 55 | // While all fields in protocol buffers are optional, this may be specified 56 | // for emphasis if appropriate. 57 | OPTIONAL = 1; 58 | 59 | // Denotes a field as required. 60 | // This indicates that the field **must** be provided as part of the request, 61 | // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). 62 | REQUIRED = 2; 63 | 64 | // Denotes a field as output only. 65 | // This indicates that the field is provided in responses, but including the 66 | // field in a request does nothing (the server *must* ignore it and 67 | // *must not* throw an error as a result of the field's presence). 68 | OUTPUT_ONLY = 3; 69 | 70 | // Denotes a field as input only. 71 | // This indicates that the field is provided in requests, and the 72 | // corresponding field is not included in output. 73 | INPUT_ONLY = 4; 74 | 75 | // Denotes a field as immutable. 76 | // This indicates that the field may be set once in a request to create a 77 | // resource, but may not be changed thereafter. 78 | IMMUTABLE = 5; 79 | } 80 | -------------------------------------------------------------------------------- /common-protos/google/api/httpbody.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | import "google/protobuf/any.proto"; 21 | 22 | option cc_enable_arenas = true; 23 | option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "HttpBodyProto"; 26 | option java_package = "com.google.api"; 27 | option objc_class_prefix = "GAPI"; 28 | 29 | // Message that represents an arbitrary HTTP body. It should only be used for 30 | // payload formats that can't be represented as JSON, such as raw binary or 31 | // an HTML page. 32 | // 33 | // 34 | // This message can be used both in streaming and non-streaming API methods in 35 | // the request as well as the response. 36 | // 37 | // It can be used as a top-level request field, which is convenient if one 38 | // wants to extract parameters from either the URL or HTTP template into the 39 | // request fields and also want access to the raw HTTP body. 40 | // 41 | // Example: 42 | // 43 | // message GetResourceRequest { 44 | // // A unique request id. 45 | // string request_id = 1; 46 | // 47 | // // The raw HTTP body is bound to this field. 48 | // google.api.HttpBody http_body = 2; 49 | // } 50 | // 51 | // service ResourceService { 52 | // rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); 53 | // rpc UpdateResource(google.api.HttpBody) returns 54 | // (google.protobuf.Empty); 55 | // } 56 | // 57 | // Example with streaming methods: 58 | // 59 | // service CaldavService { 60 | // rpc GetCalendar(stream google.api.HttpBody) 61 | // returns (stream google.api.HttpBody); 62 | // rpc UpdateCalendar(stream google.api.HttpBody) 63 | // returns (stream google.api.HttpBody); 64 | // } 65 | // 66 | // Use of this type only changes how the request and response bodies are 67 | // handled, all other features will continue to work unchanged. 68 | message HttpBody { 69 | // The HTTP Content-Type header value specifying the content type of the body. 70 | string content_type = 1; 71 | 72 | // The HTTP request/response body as raw binary. 73 | bytes data = 2; 74 | 75 | // Application specific response metadata. Must be set in the first response 76 | // for streaming APIs. 77 | repeated google.protobuf.Any extensions = 3; 78 | } 79 | -------------------------------------------------------------------------------- /common-protos/google/api/label.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option cc_enable_arenas = true; 21 | option go_package = "google.golang.org/genproto/googleapis/api/label;label"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "LabelProto"; 24 | option java_package = "com.google.api"; 25 | option objc_class_prefix = "GAPI"; 26 | 27 | // A description of a label. 28 | message LabelDescriptor { 29 | // Value types that can be used as label values. 30 | enum ValueType { 31 | // A variable-length string. This is the default. 32 | STRING = 0; 33 | 34 | // Boolean; true or false. 35 | BOOL = 1; 36 | 37 | // A 64-bit signed integer. 38 | INT64 = 2; 39 | } 40 | 41 | // The label key. 42 | string key = 1; 43 | 44 | // The type of data that can be assigned to the label. 45 | ValueType value_type = 2; 46 | 47 | // A human-readable description for the label. 48 | string description = 3; 49 | } 50 | -------------------------------------------------------------------------------- /common-protos/google/api/launch_stage.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/api;api"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "LaunchStageProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | // The launch stage as defined by [Google Cloud Platform 27 | // Launch Stages](http://cloud.google.com/terms/launch-stages). 28 | enum LaunchStage { 29 | // Do not use this default value. 30 | LAUNCH_STAGE_UNSPECIFIED = 0; 31 | 32 | // Early Access features are limited to a closed group of testers. To use 33 | // these features, you must sign up in advance and sign a Trusted Tester 34 | // agreement (which includes confidentiality provisions). These features may 35 | // be unstable, changed in backward-incompatible ways, and are not 36 | // guaranteed to be released. 37 | EARLY_ACCESS = 1; 38 | 39 | // Alpha is a limited availability test for releases before they are cleared 40 | // for widespread use. By Alpha, all significant design issues are resolved 41 | // and we are in the process of verifying functionality. Alpha customers 42 | // need to apply for access, agree to applicable terms, and have their 43 | // projects whitelisted. Alpha releases don’t have to be feature complete, 44 | // no SLAs are provided, and there are no technical support obligations, but 45 | // they will be far enough along that customers can actually use them in 46 | // test environments or for limited-use tests -- just like they would in 47 | // normal production cases. 48 | ALPHA = 2; 49 | 50 | // Beta is the point at which we are ready to open a release for any 51 | // customer to use. There are no SLA or technical support obligations in a 52 | // Beta release. Products will be complete from a feature perspective, but 53 | // may have some open outstanding issues. Beta releases are suitable for 54 | // limited production use cases. 55 | BETA = 3; 56 | 57 | // GA features are open to all developers and are considered stable and 58 | // fully qualified for production use. 59 | GA = 4; 60 | 61 | // Deprecated features are scheduled to be shut down and removed. For more 62 | // information, see the “Deprecation Policy” section of our [Terms of 63 | // Service](https://cloud.google.com/terms/) 64 | // and the [Google Cloud Platform Subject to the Deprecation 65 | // Policy](https://cloud.google.com/terms/deprecation) documentation. 66 | DEPRECATED = 5; 67 | } 68 | -------------------------------------------------------------------------------- /common-protos/google/api/log.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | import "google/api/label.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "LogProto"; 25 | option java_package = "com.google.api"; 26 | option objc_class_prefix = "GAPI"; 27 | 28 | // A description of a log type. Example in YAML format: 29 | // 30 | // - name: library.googleapis.com/activity_history 31 | // description: The history of borrowing and returning library items. 32 | // display_name: Activity 33 | // labels: 34 | // - key: /customer_id 35 | // description: Identifier of a library customer 36 | message LogDescriptor { 37 | // The name of the log. It must be less than 512 characters long and can 38 | // include the following characters: upper- and lower-case alphanumeric 39 | // characters [A-Za-z0-9], and punctuation characters including 40 | // slash, underscore, hyphen, period [/_-.]. 41 | string name = 1; 42 | 43 | // The set of labels that are available to describe a specific log entry. 44 | // Runtime requests that contain labels not specified here are 45 | // considered invalid. 46 | repeated LabelDescriptor labels = 2; 47 | 48 | // A human-readable description of this log. This information appears in 49 | // the documentation and can contain details. 50 | string description = 3; 51 | 52 | // The human-readable name for this log. This information appears on 53 | // the user interface and should be concise. 54 | string display_name = 4; 55 | } 56 | -------------------------------------------------------------------------------- /common-protos/google/api/logging.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "LoggingProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | // Logging configuration of the service. 27 | // 28 | // The following example shows how to configure logs to be sent to the 29 | // producer and consumer projects. In the example, the `activity_history` 30 | // log is sent to both the producer and consumer projects, whereas the 31 | // `purchase_history` log is only sent to the producer project. 32 | // 33 | // monitored_resources: 34 | // - type: library.googleapis.com/branch 35 | // labels: 36 | // - key: /city 37 | // description: The city where the library branch is located in. 38 | // - key: /name 39 | // description: The name of the branch. 40 | // logs: 41 | // - name: activity_history 42 | // labels: 43 | // - key: /customer_id 44 | // - name: purchase_history 45 | // logging: 46 | // producer_destinations: 47 | // - monitored_resource: library.googleapis.com/branch 48 | // logs: 49 | // - activity_history 50 | // - purchase_history 51 | // consumer_destinations: 52 | // - monitored_resource: library.googleapis.com/branch 53 | // logs: 54 | // - activity_history 55 | message Logging { 56 | // Configuration of a specific logging destination (the producer project 57 | // or the consumer project). 58 | message LoggingDestination { 59 | // The monitored resource type. The type must be defined in the 60 | // [Service.monitored_resources][google.api.Service.monitored_resources] section. 61 | string monitored_resource = 3; 62 | 63 | // Names of the logs to be sent to this destination. Each name must 64 | // be defined in the [Service.logs][google.api.Service.logs] section. If the log name is 65 | // not a domain scoped name, it will be automatically prefixed with 66 | // the service name followed by "/". 67 | repeated string logs = 1; 68 | } 69 | 70 | // Logging configurations for sending logs to the producer project. 71 | // There can be multiple producer destinations, each one must have a 72 | // different monitored resource type. A log can be used in at most 73 | // one producer destination. 74 | repeated LoggingDestination producer_destinations = 1; 75 | 76 | // Logging configurations for sending logs to the consumer project. 77 | // There can be multiple consumer destinations, each one must have a 78 | // different monitored resource type. A log can be used in at most 79 | // one consumer destination. 80 | repeated LoggingDestination consumer_destinations = 2; 81 | } 82 | -------------------------------------------------------------------------------- /common-protos/google/api/monitoring.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "MonitoringProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | // Monitoring configuration of the service. 27 | // 28 | // The example below shows how to configure monitored resources and metrics 29 | // for monitoring. In the example, a monitored resource and two metrics are 30 | // defined. The `library.googleapis.com/book/returned_count` metric is sent 31 | // to both producer and consumer projects, whereas the 32 | // `library.googleapis.com/book/overdue_count` metric is only sent to the 33 | // consumer project. 34 | // 35 | // monitored_resources: 36 | // - type: library.googleapis.com/branch 37 | // labels: 38 | // - key: /city 39 | // description: The city where the library branch is located in. 40 | // - key: /name 41 | // description: The name of the branch. 42 | // metrics: 43 | // - name: library.googleapis.com/book/returned_count 44 | // metric_kind: DELTA 45 | // value_type: INT64 46 | // labels: 47 | // - key: /customer_id 48 | // - name: library.googleapis.com/book/overdue_count 49 | // metric_kind: GAUGE 50 | // value_type: INT64 51 | // labels: 52 | // - key: /customer_id 53 | // monitoring: 54 | // producer_destinations: 55 | // - monitored_resource: library.googleapis.com/branch 56 | // metrics: 57 | // - library.googleapis.com/book/returned_count 58 | // consumer_destinations: 59 | // - monitored_resource: library.googleapis.com/branch 60 | // metrics: 61 | // - library.googleapis.com/book/returned_count 62 | // - library.googleapis.com/book/overdue_count 63 | message Monitoring { 64 | // Configuration of a specific monitoring destination (the producer project 65 | // or the consumer project). 66 | message MonitoringDestination { 67 | // The monitored resource type. The type must be defined in 68 | // [Service.monitored_resources][google.api.Service.monitored_resources] section. 69 | string monitored_resource = 1; 70 | 71 | // Types of the metrics to report to this monitoring destination. 72 | // Each type must be defined in [Service.metrics][google.api.Service.metrics] section. 73 | repeated string metrics = 2; 74 | } 75 | 76 | // Monitoring configurations for sending metrics to the producer project. 77 | // There can be multiple producer destinations. A monitored resouce type may 78 | // appear in multiple monitoring destinations if different aggregations are 79 | // needed for different sets of metrics associated with that monitored 80 | // resource type. A monitored resource and metric pair may only be used once 81 | // in the Monitoring configuration. 82 | repeated MonitoringDestination producer_destinations = 1; 83 | 84 | // Monitoring configurations for sending metrics to the consumer project. 85 | // There can be multiple consumer destinations. A monitored resouce type may 86 | // appear in multiple monitoring destinations if different aggregations are 87 | // needed for different sets of metrics associated with that monitored 88 | // resource type. A monitored resource and metric pair may only be used once 89 | // in the Monitoring configuration. 90 | repeated MonitoringDestination consumer_destinations = 2; 91 | } 92 | -------------------------------------------------------------------------------- /common-protos/google/api/servicecontrol/v1/check_error.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. 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 | 17 | package google.api.servicecontrol.v1; 18 | 19 | import "google/api/annotations.proto"; 20 | 21 | option cc_enable_arenas = true; 22 | option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "CheckErrorProto"; 25 | option java_package = "com.google.api.servicecontrol.v1"; 26 | 27 | // Defines the errors to be returned in 28 | // [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors]. 29 | message CheckError { 30 | // Error codes for Check responses. 31 | enum Code { 32 | // This is never used in `CheckResponse`. 33 | ERROR_CODE_UNSPECIFIED = 0; 34 | 35 | // The consumer's project id was not found. 36 | // Same as [google.rpc.Code.NOT_FOUND][]. 37 | NOT_FOUND = 5; 38 | 39 | // The consumer doesn't have access to the specified resource. 40 | // Same as [google.rpc.Code.PERMISSION_DENIED][]. 41 | PERMISSION_DENIED = 7; 42 | 43 | // Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][]. 44 | RESOURCE_EXHAUSTED = 8; 45 | 46 | // The consumer hasn't activated the service. 47 | SERVICE_NOT_ACTIVATED = 104; 48 | 49 | // The consumer cannot access the service because billing is disabled. 50 | BILLING_DISABLED = 107; 51 | 52 | // The consumer's project has been marked as deleted (soft deletion). 53 | PROJECT_DELETED = 108; 54 | 55 | // The consumer's project number or id does not represent a valid project. 56 | PROJECT_INVALID = 114; 57 | 58 | // The IP address of the consumer is invalid for the specific consumer 59 | // project. 60 | IP_ADDRESS_BLOCKED = 109; 61 | 62 | // The referer address of the consumer request is invalid for the specific 63 | // consumer project. 64 | REFERER_BLOCKED = 110; 65 | 66 | // The client application of the consumer request is invalid for the 67 | // specific consumer project. 68 | CLIENT_APP_BLOCKED = 111; 69 | 70 | // The API targeted by this request is invalid for the specified consumer 71 | // project. 72 | API_TARGET_BLOCKED = 122; 73 | 74 | // The consumer's API key is invalid. 75 | API_KEY_INVALID = 105; 76 | 77 | // The consumer's API Key has expired. 78 | API_KEY_EXPIRED = 112; 79 | 80 | // The consumer's API Key was not found in config record. 81 | API_KEY_NOT_FOUND = 113; 82 | 83 | // The backend server for looking up project id/number is unavailable. 84 | NAMESPACE_LOOKUP_UNAVAILABLE = 300; 85 | 86 | // The backend server for checking service status is unavailable. 87 | SERVICE_STATUS_UNAVAILABLE = 301; 88 | 89 | // The backend server for checking billing status is unavailable. 90 | BILLING_STATUS_UNAVAILABLE = 302; 91 | } 92 | 93 | // The error code. 94 | Code code = 1; 95 | 96 | // Free-form text providing details on the error cause of the error. 97 | string detail = 2; 98 | } 99 | -------------------------------------------------------------------------------- /common-protos/google/api/servicecontrol/v1/log_entry.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. 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 | 17 | package google.api.servicecontrol.v1; 18 | 19 | import "google/api/annotations.proto"; 20 | import "google/logging/type/log_severity.proto"; 21 | import "google/protobuf/any.proto"; 22 | import "google/protobuf/struct.proto"; 23 | import "google/protobuf/timestamp.proto"; 24 | 25 | option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol"; 26 | option java_multiple_files = true; 27 | option java_outer_classname = "LogEntryProto"; 28 | option java_package = "com.google.api.servicecontrol.v1"; 29 | 30 | // An individual log entry. 31 | message LogEntry { 32 | // Required. The log to which this log entry belongs. Examples: `"syslog"`, 33 | // `"book_log"`. 34 | string name = 10; 35 | 36 | // The time the event described by the log entry occurred. If 37 | // omitted, defaults to operation start time. 38 | google.protobuf.Timestamp timestamp = 11; 39 | 40 | // The severity of the log entry. The default value is 41 | // `LogSeverity.DEFAULT`. 42 | google.logging.type.LogSeverity severity = 12; 43 | 44 | // A unique ID for the log entry used for deduplication. If omitted, 45 | // the implementation will generate one based on operation_id. 46 | string insert_id = 4; 47 | 48 | // A set of user-defined (key, value) data that provides additional 49 | // information about the log entry. 50 | map labels = 13; 51 | 52 | // The log entry payload, which can be one of multiple types. 53 | oneof payload { 54 | // The log entry payload, represented as a protocol buffer that is 55 | // expressed as a JSON object. The only accepted type currently is 56 | // [AuditLog][google.cloud.audit.AuditLog]. 57 | google.protobuf.Any proto_payload = 2; 58 | 59 | // The log entry payload, represented as a Unicode string (UTF-8). 60 | string text_payload = 3; 61 | 62 | // The log entry payload, represented as a structure that 63 | // is expressed as a JSON object. 64 | google.protobuf.Struct struct_payload = 6; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /common-protos/google/api/servicecontrol/v1/metric_value.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. 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 | 17 | package google.api.servicecontrol.v1; 18 | 19 | import "google/api/annotations.proto"; 20 | import "google/api/servicecontrol/v1/distribution.proto"; 21 | import "google/protobuf/timestamp.proto"; 22 | import "google/type/money.proto"; 23 | 24 | option cc_enable_arenas = true; 25 | option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol"; 26 | option java_multiple_files = true; 27 | option java_outer_classname = "MetricValueSetProto"; 28 | option java_package = "com.google.api.servicecontrol.v1"; 29 | 30 | // Represents a single metric value. 31 | message MetricValue { 32 | // The labels describing the metric value. 33 | // See comments on 34 | // [google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels] 35 | // for the overriding relationship. 36 | map labels = 1; 37 | 38 | // The start of the time period over which this metric value's measurement 39 | // applies. The time period has different semantics for different metric 40 | // types (cumulative, delta, and gauge). See the metric definition 41 | // documentation in the service configuration for details. 42 | google.protobuf.Timestamp start_time = 2; 43 | 44 | // The end of the time period over which this metric value's measurement 45 | // applies. 46 | google.protobuf.Timestamp end_time = 3; 47 | 48 | // The value. The type of value used in the request must 49 | // agree with the metric definition in the service configuration, otherwise 50 | // the MetricValue is rejected. 51 | oneof value { 52 | // A boolean value. 53 | bool bool_value = 4; 54 | 55 | // A signed 64-bit integer value. 56 | int64 int64_value = 5; 57 | 58 | // A double precision floating point value. 59 | double double_value = 6; 60 | 61 | // A text string value. 62 | string string_value = 7; 63 | 64 | // A distribution value. 65 | Distribution distribution_value = 8; 66 | } 67 | } 68 | 69 | // Represents a set of metric values in the same metric. 70 | // Each metric value in the set should have a unique combination of start time, 71 | // end time, and label values. 72 | message MetricValueSet { 73 | // The metric name defined in the service configuration. 74 | string metric_name = 1; 75 | 76 | // The values in this metric. 77 | repeated MetricValue metric_values = 2; 78 | } 79 | -------------------------------------------------------------------------------- /common-protos/google/api/source_info.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | import "google/protobuf/any.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "SourceInfoProto"; 25 | option java_package = "com.google.api"; 26 | option objc_class_prefix = "GAPI"; 27 | 28 | // Source information used to create a Service Config 29 | message SourceInfo { 30 | // All files used during config generation. 31 | repeated google.protobuf.Any source_files = 1; 32 | } 33 | -------------------------------------------------------------------------------- /common-protos/google/api/system_parameter.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "SystemParameterProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | // ### System parameter configuration 27 | // 28 | // A system parameter is a special kind of parameter defined by the API 29 | // system, not by an individual API. It is typically mapped to an HTTP header 30 | // and/or a URL query parameter. This configuration specifies which methods 31 | // change the names of the system parameters. 32 | message SystemParameters { 33 | // Define system parameters. 34 | // 35 | // The parameters defined here will override the default parameters 36 | // implemented by the system. If this field is missing from the service 37 | // config, default system parameters will be used. Default system parameters 38 | // and names is implementation-dependent. 39 | // 40 | // Example: define api key for all methods 41 | // 42 | // system_parameters 43 | // rules: 44 | // - selector: "*" 45 | // parameters: 46 | // - name: api_key 47 | // url_query_parameter: api_key 48 | // 49 | // 50 | // Example: define 2 api key names for a specific method. 51 | // 52 | // system_parameters 53 | // rules: 54 | // - selector: "/ListShelves" 55 | // parameters: 56 | // - name: api_key 57 | // http_header: Api-Key1 58 | // - name: api_key 59 | // http_header: Api-Key2 60 | // 61 | // **NOTE:** All service configuration rules follow "last one wins" order. 62 | repeated SystemParameterRule rules = 1; 63 | } 64 | 65 | // Define a system parameter rule mapping system parameter definitions to 66 | // methods. 67 | message SystemParameterRule { 68 | // Selects the methods to which this rule applies. Use '*' to indicate all 69 | // methods in all APIs. 70 | // 71 | // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. 72 | string selector = 1; 73 | 74 | // Define parameters. Multiple names may be defined for a parameter. 75 | // For a given method call, only one of them should be used. If multiple 76 | // names are used the behavior is implementation-dependent. 77 | // If none of the specified names are present the behavior is 78 | // parameter-dependent. 79 | repeated SystemParameter parameters = 2; 80 | } 81 | 82 | // Define a parameter's name and location. The parameter may be passed as either 83 | // an HTTP header or a URL query parameter, and if both are passed the behavior 84 | // is implementation-dependent. 85 | message SystemParameter { 86 | // Define the name of the parameter, such as "api_key" . It is case sensitive. 87 | string name = 1; 88 | 89 | // Define the HTTP header name to use for the parameter. It is case 90 | // insensitive. 91 | string http_header = 2; 92 | 93 | // Define the URL query parameter name to use for the parameter. It is case 94 | // sensitive. 95 | string url_query_parameter = 3; 96 | } 97 | -------------------------------------------------------------------------------- /common-protos/google/api/usage.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.api; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "UsageProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | // Configuration controlling usage of a service. 27 | message Usage { 28 | // Requirements that must be satisfied before a consumer project can use the 29 | // service. Each requirement is of the form /; 30 | // for example 'serviceusage.googleapis.com/billing-enabled'. 31 | repeated string requirements = 1; 32 | 33 | // A list of usage rules that apply to individual API methods. 34 | // 35 | // **NOTE:** All service configuration rules follow "last one wins" order. 36 | repeated UsageRule rules = 6; 37 | 38 | // The full resource name of a channel used for sending notifications to the 39 | // service producer. 40 | // 41 | // Google Service Management currently only supports 42 | // [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification 43 | // channel. To use Google Cloud Pub/Sub as the channel, this must be the name 44 | // of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format 45 | // documented in https://cloud.google.com/pubsub/docs/overview. 46 | string producer_notification_channel = 7; 47 | } 48 | 49 | // Usage configuration rules for the service. 50 | // 51 | // NOTE: Under development. 52 | // 53 | // 54 | // Use this rule to configure unregistered calls for the service. Unregistered 55 | // calls are calls that do not contain consumer project identity. 56 | // (Example: calls that do not contain an API key). 57 | // By default, API methods do not allow unregistered calls, and each method call 58 | // must be identified by a consumer project identity. Use this rule to 59 | // allow/disallow unregistered calls. 60 | // 61 | // Example of an API that wants to allow unregistered calls for entire service. 62 | // 63 | // usage: 64 | // rules: 65 | // - selector: "*" 66 | // allow_unregistered_calls: true 67 | // 68 | // Example of a method that wants to allow unregistered calls. 69 | // 70 | // usage: 71 | // rules: 72 | // - selector: "google.example.library.v1.LibraryService.CreateBook" 73 | // allow_unregistered_calls: true 74 | message UsageRule { 75 | // Selects the methods to which this rule applies. Use '*' to indicate all 76 | // methods in all APIs. 77 | // 78 | // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. 79 | string selector = 1; 80 | 81 | // If true, the selected method allows unregistered calls, e.g. calls 82 | // that don't identify any user or application. 83 | bool allow_unregistered_calls = 2; 84 | 85 | // If true, the selected method should skip service control and the control 86 | // plane features, such as quota and billing, will not be available. 87 | // This flag is used by Google Cloud Endpoints to bypass checks for internal 88 | // methods, such as service health check methods. 89 | bool skip_service_control = 3; 90 | } 91 | -------------------------------------------------------------------------------- /common-protos/google/protobuf/empty.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option go_package = "github.com/golang/protobuf/ptypes/empty"; 37 | option java_package = "com.google.protobuf"; 38 | option java_outer_classname = "EmptyProto"; 39 | option java_multiple_files = true; 40 | option objc_class_prefix = "GPB"; 41 | option cc_enable_arenas = true; 42 | 43 | // A generic empty message that you can re-use to avoid defining duplicated 44 | // empty messages in your APIs. A typical example is to use it as the request 45 | // or the response type of an API method. For instance: 46 | // 47 | // service Foo { 48 | // rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 49 | // } 50 | // 51 | // The JSON representation for `Empty` is empty JSON object `{}`. 52 | message Empty {} 53 | -------------------------------------------------------------------------------- /common-protos/google/protobuf/source_context.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option java_package = "com.google.protobuf"; 37 | option java_outer_classname = "SourceContextProto"; 38 | option java_multiple_files = true; 39 | option objc_class_prefix = "GPB"; 40 | option go_package = "google.golang.org/genproto/protobuf/source_context;source_context"; 41 | 42 | // `SourceContext` represents information about the source of a 43 | // protobuf element, like the file in which it is defined. 44 | message SourceContext { 45 | // The path-qualified name of the .proto file that contained the associated 46 | // protobuf element. For example: `"google/protobuf/source_context.proto"`. 47 | string file_name = 1; 48 | } 49 | -------------------------------------------------------------------------------- /common-protos/google/protobuf/struct.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option cc_enable_arenas = true; 37 | option go_package = "github.com/golang/protobuf/ptypes/struct;structpb"; 38 | option java_package = "com.google.protobuf"; 39 | option java_outer_classname = "StructProto"; 40 | option java_multiple_files = true; 41 | option objc_class_prefix = "GPB"; 42 | 43 | // `Struct` represents a structured data value, consisting of fields 44 | // which map to dynamically typed values. In some languages, `Struct` 45 | // might be supported by a native representation. For example, in 46 | // scripting languages like JS a struct is represented as an 47 | // object. The details of that representation are described together 48 | // with the proto support for the language. 49 | // 50 | // The JSON representation for `Struct` is JSON object. 51 | message Struct { 52 | // Unordered map of dynamically typed values. 53 | map fields = 1; 54 | } 55 | 56 | // `Value` represents a dynamically typed value which can be either 57 | // null, a number, a string, a boolean, a recursive struct value, or a 58 | // list of values. A producer of value is expected to set one of that 59 | // variants, absence of any variant indicates an error. 60 | // 61 | // The JSON representation for `Value` is JSON value. 62 | message Value { 63 | // The kind of value. 64 | oneof kind { 65 | // Represents a null value. 66 | NullValue null_value = 1; 67 | // Represents a double value. 68 | double number_value = 2; 69 | // Represents a string value. 70 | string string_value = 3; 71 | // Represents a boolean value. 72 | bool bool_value = 4; 73 | // Represents a structured value. 74 | Struct struct_value = 5; 75 | // Represents a repeated `Value`. 76 | ListValue list_value = 6; 77 | } 78 | } 79 | 80 | // `NullValue` is a singleton enumeration to represent the null value for the 81 | // `Value` type union. 82 | // 83 | // The JSON representation for `NullValue` is JSON `null`. 84 | enum NullValue { 85 | // Null value. 86 | NULL_VALUE = 0; 87 | } 88 | 89 | // `ListValue` is a wrapper around a repeated field of values. 90 | // 91 | // The JSON representation for `ListValue` is JSON array. 92 | message ListValue { 93 | // Repeated field of dynamically typed values. 94 | repeated Value values = 1; 95 | } 96 | -------------------------------------------------------------------------------- /common-protos/google/protobuf/util/json_format.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // A proto file we will use for unit testing. 36 | 37 | syntax = "proto2"; 38 | 39 | package protobuf_unittest; 40 | 41 | message TestFlagsAndStrings { 42 | required int32 A = 1; 43 | repeated group RepeatedGroup = 2 { 44 | required string f = 3; 45 | } 46 | } 47 | 48 | message TestBase64ByteArrays { 49 | required bytes a = 1; 50 | } 51 | 52 | message TestJavaScriptJSON { 53 | optional int32 a = 1; 54 | optional float final = 2; 55 | optional string in = 3; 56 | optional string Var = 4; 57 | } 58 | 59 | message TestJavaScriptOrderJSON1 { 60 | optional int32 d = 1; 61 | optional int32 c = 2; 62 | optional bool x = 3; 63 | optional int32 b = 4; 64 | optional int32 a = 5; 65 | } 66 | 67 | message TestJavaScriptOrderJSON2 { 68 | optional int32 d = 1; 69 | optional int32 c = 2; 70 | optional bool x = 3; 71 | optional int32 b = 4; 72 | optional int32 a = 5; 73 | repeated TestJavaScriptOrderJSON1 z = 6; 74 | } 75 | 76 | message TestLargeInt { 77 | required int64 a = 1; 78 | required uint64 b = 2; 79 | } 80 | 81 | message TestNumbers { 82 | enum MyType { 83 | OK = 0; 84 | WARNING = 1; 85 | ERROR = 2; 86 | } 87 | optional MyType a = 1; 88 | optional int32 b = 2; 89 | optional float c = 3; 90 | optional bool d = 4; 91 | optional double e = 5; 92 | optional uint32 f = 6; 93 | } 94 | 95 | 96 | message TestCamelCase { 97 | optional string normal_field = 1; 98 | optional int32 CAPITAL_FIELD = 2; 99 | optional int32 CamelCaseField = 3; 100 | } 101 | 102 | message TestBoolMap { 103 | map bool_map = 1; 104 | } 105 | 106 | message TestRecursion { 107 | optional int32 value = 1; 108 | optional TestRecursion child = 2; 109 | } 110 | 111 | message TestStringMap { 112 | map string_map = 1; 113 | } 114 | 115 | message TestStringSerializer { 116 | optional string scalar_string = 1; 117 | repeated string repeated_string = 2; 118 | map string_map = 3; 119 | } 120 | 121 | message TestMessageWithExtension { 122 | extensions 100 to max; 123 | } 124 | 125 | message TestExtension { 126 | extend TestMessageWithExtension { 127 | optional TestExtension ext = 100; 128 | } 129 | optional string value = 1; 130 | } 131 | -------------------------------------------------------------------------------- /common-protos/google/protobuf/wrappers.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Wrappers for primitive (non-message) types. These types are useful 32 | // for embedding primitives in the `google.protobuf.Any` type and for places 33 | // where we need to distinguish between the absence of a primitive 34 | // typed field and its default value. 35 | // 36 | // These wrappers have no meaningful use within repeated fields as they lack 37 | // the ability to detect presence on individual elements. 38 | // These wrappers have no meaningful use within a map or a oneof since 39 | // individual entries of a map or fields of a oneof can already detect presence. 40 | 41 | syntax = "proto3"; 42 | 43 | package google.protobuf; 44 | 45 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 46 | option cc_enable_arenas = true; 47 | option go_package = "github.com/golang/protobuf/ptypes/wrappers"; 48 | option java_package = "com.google.protobuf"; 49 | option java_outer_classname = "WrappersProto"; 50 | option java_multiple_files = true; 51 | option objc_class_prefix = "GPB"; 52 | 53 | // Wrapper message for `double`. 54 | // 55 | // The JSON representation for `DoubleValue` is JSON number. 56 | message DoubleValue { 57 | // The double value. 58 | double value = 1; 59 | } 60 | 61 | // Wrapper message for `float`. 62 | // 63 | // The JSON representation for `FloatValue` is JSON number. 64 | message FloatValue { 65 | // The float value. 66 | float value = 1; 67 | } 68 | 69 | // Wrapper message for `int64`. 70 | // 71 | // The JSON representation for `Int64Value` is JSON string. 72 | message Int64Value { 73 | // The int64 value. 74 | int64 value = 1; 75 | } 76 | 77 | // Wrapper message for `uint64`. 78 | // 79 | // The JSON representation for `UInt64Value` is JSON string. 80 | message UInt64Value { 81 | // The uint64 value. 82 | uint64 value = 1; 83 | } 84 | 85 | // Wrapper message for `int32`. 86 | // 87 | // The JSON representation for `Int32Value` is JSON number. 88 | message Int32Value { 89 | // The int32 value. 90 | int32 value = 1; 91 | } 92 | 93 | // Wrapper message for `uint32`. 94 | // 95 | // The JSON representation for `UInt32Value` is JSON number. 96 | message UInt32Value { 97 | // The uint32 value. 98 | uint32 value = 1; 99 | } 100 | 101 | // Wrapper message for `bool`. 102 | // 103 | // The JSON representation for `BoolValue` is JSON `true` and `false`. 104 | message BoolValue { 105 | // The bool value. 106 | bool value = 1; 107 | } 108 | 109 | // Wrapper message for `string`. 110 | // 111 | // The JSON representation for `StringValue` is JSON string. 112 | message StringValue { 113 | // The string value. 114 | string value = 1; 115 | } 116 | 117 | // Wrapper message for `bytes`. 118 | // 119 | // The JSON representation for `BytesValue` is JSON string. 120 | message BytesValue { 121 | // The bytes value. 122 | bytes value = 1; 123 | } 124 | -------------------------------------------------------------------------------- /common-protos/google/rpc/status.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. 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 | 17 | package google.rpc; 18 | 19 | import "google/protobuf/any.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "StatusProto"; 24 | option java_package = "com.google.rpc"; 25 | option objc_class_prefix = "RPC"; 26 | 27 | // The `Status` type defines a logical error model that is suitable for 28 | // different programming environments, including REST APIs and RPC APIs. It is 29 | // used by [gRPC](https://github.com/grpc). The error model is designed to be: 30 | // 31 | // - Simple to use and understand for most users 32 | // - Flexible enough to meet unexpected needs 33 | // 34 | // # Overview 35 | // 36 | // The `Status` message contains three pieces of data: error code, error 37 | // message, and error details. The error code should be an enum value of 38 | // [google.rpc.Code][google.rpc.Code], but it may accept additional error codes 39 | // if needed. The error message should be a developer-facing English message 40 | // that helps developers *understand* and *resolve* the error. If a localized 41 | // user-facing error message is needed, put the localized message in the error 42 | // details or localize it in the client. The optional error details may contain 43 | // arbitrary information about the error. There is a predefined set of error 44 | // detail types in the package `google.rpc` that can be used for common error 45 | // conditions. 46 | // 47 | // # Language mapping 48 | // 49 | // The `Status` message is the logical representation of the error model, but it 50 | // is not necessarily the actual wire format. When the `Status` message is 51 | // exposed in different client libraries and different wire protocols, it can be 52 | // mapped differently. For example, it will likely be mapped to some exceptions 53 | // in Java, but more likely mapped to some error codes in C. 54 | // 55 | // # Other uses 56 | // 57 | // The error model and the `Status` message can be used in a variety of 58 | // environments, either with or without APIs, to provide a 59 | // consistent developer experience across different environments. 60 | // 61 | // Example uses of this error model include: 62 | // 63 | // - Partial errors. If a service needs to return partial errors to the client, 64 | // it may embed the `Status` in the normal response to indicate the partial 65 | // errors. 66 | // 67 | // - Workflow errors. A typical workflow has multiple steps. Each step may 68 | // have a `Status` message for error reporting. 69 | // 70 | // - Batch operations. If a client uses batch request and batch response, the 71 | // `Status` message should be used directly inside batch response, one for 72 | // each error sub-response. 73 | // 74 | // - Asynchronous operations. If an API call embeds asynchronous operation 75 | // results in its response, the status of those operations should be 76 | // represented directly using the `Status` message. 77 | // 78 | // - Logging. If some API errors are stored in logs, the message `Status` could 79 | // be used directly after any stripping needed for security/privacy reasons. 80 | message Status { 81 | // The status code, which should be an enum value of 82 | // [google.rpc.Code][google.rpc.Code]. 83 | int32 code = 1; 84 | 85 | // A developer-facing error message, which should be in English. Any 86 | // user-facing error message should be localized and sent in the 87 | // [google.rpc.Status.details][google.rpc.Status.details] field, or localized 88 | // by the client. 89 | string message = 2; 90 | 91 | // A list of messages that carry the error details. There is a common set of 92 | // message types for APIs to use. 93 | repeated google.protobuf.Any details = 3; 94 | } 95 | -------------------------------------------------------------------------------- /common-protos/google/type/calendar_period.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.type; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "CalendarPeriodProto"; 23 | option java_package = "com.google.type"; 24 | option objc_class_prefix = "GTP"; 25 | 26 | 27 | // A `CalendarPeriod` represents the abstract concept of a time period that has 28 | // a canonical start. Grammatically, "the start of the current 29 | // `CalendarPeriod`." All calendar times begin at midnight UTC. 30 | enum CalendarPeriod { 31 | // Undefined period, raises an error. 32 | CALENDAR_PERIOD_UNSPECIFIED = 0; 33 | 34 | // A day. 35 | DAY = 1; 36 | 37 | // A week. Weeks begin on Monday, following 38 | // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date). 39 | WEEK = 2; 40 | 41 | // A fortnight. The first calendar fortnight of the year begins at the start 42 | // of week 1 according to 43 | // [ISO 8601](https://en.wikipedia.org/wiki/ISO_week_date). 44 | FORTNIGHT = 3; 45 | 46 | // A month. 47 | MONTH = 4; 48 | 49 | // A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each 50 | // year. 51 | QUARTER = 5; 52 | 53 | // A half-year. Half-years start on dates 1-Jan and 1-Jul. 54 | HALF = 6; 55 | 56 | // A year. 57 | YEAR = 7; 58 | } 59 | -------------------------------------------------------------------------------- /common-protos/google/type/date.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.type; 19 | 20 | option cc_enable_arenas = true; 21 | option go_package = "google.golang.org/genproto/googleapis/type/date;date"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "DateProto"; 24 | option java_package = "com.google.type"; 25 | option objc_class_prefix = "GTP"; 26 | 27 | 28 | // Represents a whole or partial calendar date, e.g. a birthday. The time of day 29 | // and time zone are either specified elsewhere or are not significant. The date 30 | // is relative to the Proleptic Gregorian Calendar. This can represent: 31 | // 32 | // * A full date, with non-zero year, month and day values 33 | // * A month and day value, with a zero year, e.g. an anniversary 34 | // * A year on its own, with zero month and day values 35 | // * A year and month value, with a zero day, e.g. a credit card expiration date 36 | // 37 | // Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`. 38 | message Date { 39 | // Year of date. Must be from 1 to 9999, or 0 if specifying a date without 40 | // a year. 41 | int32 year = 1; 42 | 43 | // Month of year. Must be from 1 to 12, or 0 if specifying a year without a 44 | // month and day. 45 | int32 month = 2; 46 | 47 | // Day of month. Must be from 1 to 31 and valid for the year and month, or 0 48 | // if specifying a year by itself or a year and month where the day is not 49 | // significant. 50 | int32 day = 3; 51 | } 52 | -------------------------------------------------------------------------------- /common-protos/google/type/dayofweek.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.type; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/type/dayofweek;dayofweek"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "DayOfWeekProto"; 23 | option java_package = "com.google.type"; 24 | option objc_class_prefix = "GTP"; 25 | 26 | 27 | // Represents a day of week. 28 | enum DayOfWeek { 29 | // The unspecified day-of-week. 30 | DAY_OF_WEEK_UNSPECIFIED = 0; 31 | 32 | // The day-of-week of Monday. 33 | MONDAY = 1; 34 | 35 | // The day-of-week of Tuesday. 36 | TUESDAY = 2; 37 | 38 | // The day-of-week of Wednesday. 39 | WEDNESDAY = 3; 40 | 41 | // The day-of-week of Thursday. 42 | THURSDAY = 4; 43 | 44 | // The day-of-week of Friday. 45 | FRIDAY = 5; 46 | 47 | // The day-of-week of Saturday. 48 | SATURDAY = 6; 49 | 50 | // The day-of-week of Sunday. 51 | SUNDAY = 7; 52 | } 53 | -------------------------------------------------------------------------------- /common-protos/google/type/expr.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.type; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/type/expr;expr"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "ExprProto"; 23 | option java_package = "com.google.type"; 24 | option objc_class_prefix = "GTP"; 25 | 26 | 27 | // Represents an expression text. Example: 28 | // 29 | // title: "User account presence" 30 | // description: "Determines whether the request has a user account" 31 | // expression: "size(request.user) > 0" 32 | message Expr { 33 | // Textual representation of an expression in 34 | // Common Expression Language syntax. 35 | // 36 | // The application context of the containing message determines which 37 | // well-known feature set of CEL is supported. 38 | string expression = 1; 39 | 40 | // An optional title for the expression, i.e. a short string describing 41 | // its purpose. This can be used e.g. in UIs which allow to enter the 42 | // expression. 43 | string title = 2; 44 | 45 | // An optional description of the expression. This is a longer text which 46 | // describes the expression, e.g. when hovered over it in a UI. 47 | string description = 3; 48 | 49 | // An optional string indicating the location of the expression for error 50 | // reporting, e.g. a file name and a position in the file. 51 | string location = 4; 52 | } 53 | -------------------------------------------------------------------------------- /common-protos/google/type/fraction.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.type; 19 | 20 | option go_package = "google.golang.org/genproto/googleapis/type/fraction;fraction"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "FractionProto"; 23 | option java_package = "com.google.type"; 24 | option objc_class_prefix = "GTP"; 25 | 26 | 27 | // Represents a fraction in terms of a numerator divided by a denominator. 28 | message Fraction { 29 | // The portion of the denominator in the faction, e.g. 2 in 2/3. 30 | int64 numerator = 1; 31 | 32 | // The value by which the numerator is divided, e.g. 3 in 2/3. Must be 33 | // positive. 34 | int64 denominator = 2; 35 | } 36 | -------------------------------------------------------------------------------- /common-protos/google/type/latlng.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.type; 19 | 20 | option cc_enable_arenas = true; 21 | option go_package = "google.golang.org/genproto/googleapis/type/latlng;latlng"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "LatLngProto"; 24 | option java_package = "com.google.type"; 25 | option objc_class_prefix = "GTP"; 26 | 27 | 28 | // An object representing a latitude/longitude pair. This is expressed as a pair 29 | // of doubles representing degrees latitude and degrees longitude. Unless 30 | // specified otherwise, this must conform to the 31 | // WGS84 32 | // standard. Values must be within normalized ranges. 33 | message LatLng { 34 | // The latitude in degrees. It must be in the range [-90.0, +90.0]. 35 | double latitude = 1; 36 | 37 | // The longitude in degrees. It must be in the range [-180.0, +180.0]. 38 | double longitude = 2; 39 | } 40 | -------------------------------------------------------------------------------- /common-protos/google/type/money.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.type; 19 | 20 | option cc_enable_arenas = true; 21 | option go_package = "google.golang.org/genproto/googleapis/type/money;money"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "MoneyProto"; 24 | option java_package = "com.google.type"; 25 | option objc_class_prefix = "GTP"; 26 | 27 | 28 | // Represents an amount of money with its currency type. 29 | message Money { 30 | // The 3-letter currency code defined in ISO 4217. 31 | string currency_code = 1; 32 | 33 | // The whole units of the amount. 34 | // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. 35 | int64 units = 2; 36 | 37 | // Number of nano (10^-9) units of the amount. 38 | // The value must be between -999,999,999 and +999,999,999 inclusive. 39 | // If `units` is positive, `nanos` must be positive or zero. 40 | // If `units` is zero, `nanos` can be positive, zero, or negative. 41 | // If `units` is negative, `nanos` must be negative or zero. 42 | // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. 43 | int32 nanos = 3; 44 | } 45 | -------------------------------------------------------------------------------- /common-protos/google/type/quaternion.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.type; 19 | 20 | option cc_enable_arenas = true; 21 | option go_package = "google.golang.org/genproto/googleapis/type/quaternion;quaternion"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "QuaternionProto"; 24 | option java_package = "com.google.type"; 25 | option objc_class_prefix = "GTP"; 26 | 27 | 28 | // A quaternion is defined as the quotient of two directed lines in a 29 | // three-dimensional space or equivalently as the quotient of two Euclidean 30 | // vectors (https://en.wikipedia.org/wiki/Quaternion). 31 | // 32 | // Quaternions are often used in calculations involving three-dimensional 33 | // rotations (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation), 34 | // as they provide greater mathematical robustness by avoiding the gimbal lock 35 | // problems that can be encountered when using Euler angles 36 | // (https://en.wikipedia.org/wiki/Gimbal_lock). 37 | // 38 | // Quaternions are generally represented in this form: 39 | // 40 | // w + xi + yj + zk 41 | // 42 | // where x, y, z, and w are real numbers, and i, j, and k are three imaginary 43 | // numbers. 44 | // 45 | // Our naming choice (x, y, z, w) comes from the desire to avoid confusion for 46 | // those interested in the geometric properties of the quaternion in the 3D 47 | // Cartesian space. Other texts often use alternative names or subscripts, such 48 | // as (a, b, c, d), (1, i, j, k), or (0, 1, 2, 3), which are perhaps better 49 | // suited for mathematical interpretations. 50 | // 51 | // To avoid any confusion, as well as to maintain compatibility with a large 52 | // number of software libraries, the quaternions represented using the protocol 53 | // buffer below *must* follow the Hamilton convention, which defines ij = k 54 | // (i.e. a right-handed algebra), and therefore: 55 | // 56 | // i^2 = j^2 = k^2 = ijk = −1 57 | // ij = −ji = k 58 | // jk = −kj = i 59 | // ki = −ik = j 60 | // 61 | // Please DO NOT use this to represent quaternions that follow the JPL 62 | // convention, or any of the other quaternion flavors out there. 63 | // 64 | // Definitions: 65 | // 66 | // - Quaternion norm (or magnitude): sqrt(x^2 + y^2 + z^2 + w^2). 67 | // - Unit (or normalized) quaternion: a quaternion whose norm is 1. 68 | // - Pure quaternion: a quaternion whose scalar component (w) is 0. 69 | // - Rotation quaternion: a unit quaternion used to represent rotation. 70 | // - Orientation quaternion: a unit quaternion used to represent orientation. 71 | // 72 | // A quaternion can be normalized by dividing it by its norm. The resulting 73 | // quaternion maintains the same direction, but has a norm of 1, i.e. it moves 74 | // on the unit sphere. This is generally necessary for rotation and orientation 75 | // quaternions, to avoid rounding errors: 76 | // https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions 77 | // 78 | // Note that (x, y, z, w) and (-x, -y, -z, -w) represent the same rotation, but 79 | // normalization would be even more useful, e.g. for comparison purposes, if it 80 | // would produce a unique representation. It is thus recommended that w be kept 81 | // positive, which can be achieved by changing all the signs when w is negative. 82 | // 83 | // 84 | // Next available tag: 5 85 | message Quaternion { 86 | // The x component. 87 | double x = 1; 88 | 89 | // The y component. 90 | double y = 2; 91 | 92 | // The z component. 93 | double z = 3; 94 | 95 | // The scalar component. 96 | double w = 4; 97 | } 98 | -------------------------------------------------------------------------------- /common-protos/google/type/timeofday.proto: -------------------------------------------------------------------------------- 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 | 16 | syntax = "proto3"; 17 | 18 | package google.type; 19 | 20 | option cc_enable_arenas = true; 21 | option go_package = "google.golang.org/genproto/googleapis/type/timeofday;timeofday"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "TimeOfDayProto"; 24 | option java_package = "com.google.type"; 25 | option objc_class_prefix = "GTP"; 26 | 27 | 28 | // Represents a time of day. The date and time zone are either not significant 29 | // or are specified elsewhere. An API may choose to allow leap seconds. Related 30 | // types are [google.type.Date][google.type.Date] and `google.protobuf.Timestamp`. 31 | message TimeOfDay { 32 | // Hours of day in 24 hour format. Should be from 0 to 23. An API may choose 33 | // to allow the value "24:00:00" for scenarios like business closing time. 34 | int32 hours = 1; 35 | 36 | // Minutes of hour of day. Must be from 0 to 59. 37 | int32 minutes = 2; 38 | 39 | // Seconds of minutes of the time. Must normally be from 0 to 59. An API may 40 | // allow the value 60 if it allows leap-seconds. 41 | int32 seconds = 3; 42 | 43 | // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. 44 | int32 nanos = 4; 45 | } 46 | -------------------------------------------------------------------------------- /common-protos/istio.io/extensions/field_rules.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 Istio Authors 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 | 17 | package istio.extensions; 18 | 19 | option go_package="istio.io/api/extensions"; 20 | 21 | import "google/protobuf/descriptor.proto"; 22 | 23 | // Values applied at the field level. 24 | extend google.protobuf.FieldOptions { 25 | FieldRules rules = 1200; 26 | } 27 | 28 | // Field rules for a particular type. 29 | // Currently only primitive types of OpenAPI schemas are included. (https://swagger.io/docs/specification/data-models/data-types) 30 | message FieldRules { 31 | oneof type { 32 | FloatRules float = 1; 33 | DoubleRules double = 2; 34 | StringRules string = 3; 35 | BoolRules bool = 4; 36 | Int32Rules int32 = 5; 37 | Int64Rules int64 = 6; 38 | } 39 | } 40 | 41 | // FloatRules describe the rules for the float type. 42 | message FloatRules { 43 | float default = 1; 44 | } 45 | 46 | // DoubleRules describe the rules for the double type. 47 | message DoubleRules { 48 | double default = 1; 49 | } 50 | 51 | // StringRules describe the rules for the string type. 52 | message StringRules { 53 | string default = 1; 54 | // The regular expression the field must match against (RE2 syntax). 55 | string pattern = 2; 56 | } 57 | 58 | // BoolRules describe the rules for the bool type. 59 | message BoolRules { 60 | bool default = 1; 61 | } 62 | 63 | // Int32Rules describe the rules for the int32 type. 64 | message Int32Rules { 65 | int32 default = 1; 66 | } 67 | 68 | // Int64Rules describe the rules for the int64 type. 69 | message Int64Rules { 70 | int64 default = 1; 71 | } -------------------------------------------------------------------------------- /common-protos/k8s.io/api/authentication/v1alpha1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.api.authentication.v1alpha1; 23 | 24 | import "k8s.io/api/authentication/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 26 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 27 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 28 | 29 | // Package-wide variables from generator "generated". 30 | option go_package = "k8s.io/api/authentication/v1alpha1"; 31 | 32 | // SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. 33 | // When using impersonation, users will receive the user info of the user being impersonated. If impersonation or 34 | // request header authentication is used, any extra keys will have their case ignored and returned as lowercase. 35 | message SelfSubjectReview { 36 | // Standard object's metadata. 37 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 38 | // +optional 39 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 40 | 41 | // Status is filled in by the server with the user attributes. 42 | optional SelfSubjectReviewStatus status = 2; 43 | } 44 | 45 | // SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. 46 | message SelfSubjectReviewStatus { 47 | // User attributes of the user making this request. 48 | // +optional 49 | optional k8s.io.api.authentication.v1.UserInfo userInfo = 1; 50 | } 51 | 52 | -------------------------------------------------------------------------------- /common-protos/k8s.io/api/certificates/v1alpha1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.api.certificates.v1alpha1; 23 | 24 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 26 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 27 | 28 | // Package-wide variables from generator "generated". 29 | option go_package = "k8s.io/api/certificates/v1alpha1"; 30 | 31 | // ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors 32 | // (root certificates). 33 | // 34 | // ClusterTrustBundle objects are considered to be readable by any authenticated 35 | // user in the cluster, because they can be mounted by pods using the 36 | // `clusterTrustBundle` projection. All service accounts have read access to 37 | // ClusterTrustBundles by default. Users who only have namespace-level access 38 | // to a cluster can read ClusterTrustBundles by impersonating a serviceaccount 39 | // that they have access to. 40 | // 41 | // It can be optionally associated with a particular assigner, in which case it 42 | // contains one valid set of trust anchors for that signer. Signers may have 43 | // multiple associated ClusterTrustBundles; each is an independent set of trust 44 | // anchors for that signer. Admission control is used to enforce that only users 45 | // with permissions on the signer can create or modify the corresponding bundle. 46 | message ClusterTrustBundle { 47 | // metadata contains the object metadata. 48 | // +optional 49 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 50 | 51 | // spec contains the signer (if any) and trust anchors. 52 | optional ClusterTrustBundleSpec spec = 2; 53 | } 54 | 55 | // ClusterTrustBundleList is a collection of ClusterTrustBundle objects 56 | message ClusterTrustBundleList { 57 | // metadata contains the list metadata. 58 | // 59 | // +optional 60 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 61 | 62 | // items is a collection of ClusterTrustBundle objects 63 | repeated ClusterTrustBundle items = 2; 64 | } 65 | 66 | // ClusterTrustBundleSpec contains the signer and trust anchors. 67 | message ClusterTrustBundleSpec { 68 | // signerName indicates the associated signer, if any. 69 | // 70 | // In order to create or update a ClusterTrustBundle that sets signerName, 71 | // you must have the following cluster-scoped permission: 72 | // group=certificates.k8s.io resource=signers resourceName= 73 | // verb=attest. 74 | // 75 | // If signerName is not empty, then the ClusterTrustBundle object must be 76 | // named with the signer name as a prefix (translating slashes to colons). 77 | // For example, for the signer name `example.com/foo`, valid 78 | // ClusterTrustBundle object names include `example.com:foo:abc` and 79 | // `example.com:foo:v1`. 80 | // 81 | // If signerName is empty, then the ClusterTrustBundle object's name must 82 | // not have such a prefix. 83 | // 84 | // List/watch requests for ClusterTrustBundles can filter on this field 85 | // using a `spec.signerName=NAME` field selector. 86 | // 87 | // +optional 88 | optional string signerName = 1; 89 | 90 | // trustBundle contains the individual X.509 trust anchors for this 91 | // bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates. 92 | // 93 | // The data must consist only of PEM certificate blocks that parse as valid 94 | // X.509 certificates. Each certificate must include a basic constraints 95 | // extension with the CA bit set. The API server will reject objects that 96 | // contain duplicate certificates, or that use PEM block headers. 97 | // 98 | // Users of ClusterTrustBundles, including Kubelet, are free to reorder and 99 | // deduplicate certificate blocks in this file according to their own logic, 100 | // as well as to drop PEM block headers and inter-block data. 101 | optional string trustBundle = 2; 102 | } 103 | 104 | -------------------------------------------------------------------------------- /common-protos/k8s.io/api/coordination/v1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.api.coordination.v1; 23 | 24 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 26 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 27 | 28 | // Package-wide variables from generator "generated". 29 | option go_package = "k8s.io/api/coordination/v1"; 30 | 31 | // Lease defines a lease concept. 32 | message Lease { 33 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 34 | // +optional 35 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 36 | 37 | // spec contains the specification of the Lease. 38 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 39 | // +optional 40 | optional LeaseSpec spec = 2; 41 | } 42 | 43 | // LeaseList is a list of Lease objects. 44 | message LeaseList { 45 | // Standard list metadata. 46 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 47 | // +optional 48 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 49 | 50 | // items is a list of schema objects. 51 | repeated Lease items = 2; 52 | } 53 | 54 | // LeaseSpec is a specification of a Lease. 55 | message LeaseSpec { 56 | // holderIdentity contains the identity of the holder of a current lease. 57 | // +optional 58 | optional string holderIdentity = 1; 59 | 60 | // leaseDurationSeconds is a duration that candidates for a lease need 61 | // to wait to force acquire it. This is measure against time of last 62 | // observed renewTime. 63 | // +optional 64 | optional int32 leaseDurationSeconds = 2; 65 | 66 | // acquireTime is a time when the current lease was acquired. 67 | // +optional 68 | optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime acquireTime = 3; 69 | 70 | // renewTime is a time when the current holder of a lease has last 71 | // updated the lease. 72 | // +optional 73 | optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime renewTime = 4; 74 | 75 | // leaseTransitions is the number of transitions of a lease between 76 | // holders. 77 | // +optional 78 | optional int32 leaseTransitions = 5; 79 | } 80 | 81 | -------------------------------------------------------------------------------- /common-protos/k8s.io/api/coordination/v1beta1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.api.coordination.v1beta1; 23 | 24 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 26 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 27 | 28 | // Package-wide variables from generator "generated". 29 | option go_package = "k8s.io/api/coordination/v1beta1"; 30 | 31 | // Lease defines a lease concept. 32 | message Lease { 33 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 34 | // +optional 35 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 36 | 37 | // spec contains the specification of the Lease. 38 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 39 | // +optional 40 | optional LeaseSpec spec = 2; 41 | } 42 | 43 | // LeaseList is a list of Lease objects. 44 | message LeaseList { 45 | // Standard list metadata. 46 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 47 | // +optional 48 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 49 | 50 | // items is a list of schema objects. 51 | repeated Lease items = 2; 52 | } 53 | 54 | // LeaseSpec is a specification of a Lease. 55 | message LeaseSpec { 56 | // holderIdentity contains the identity of the holder of a current lease. 57 | // +optional 58 | optional string holderIdentity = 1; 59 | 60 | // leaseDurationSeconds is a duration that candidates for a lease need 61 | // to wait to force acquire it. This is measure against time of last 62 | // observed renewTime. 63 | // +optional 64 | optional int32 leaseDurationSeconds = 2; 65 | 66 | // acquireTime is a time when the current lease was acquired. 67 | // +optional 68 | optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime acquireTime = 3; 69 | 70 | // renewTime is a time when the current holder of a lease has last 71 | // updated the lease. 72 | // +optional 73 | optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime renewTime = 4; 74 | 75 | // leaseTransitions is the number of transitions of a lease between 76 | // holders. 77 | // +optional 78 | optional int32 leaseTransitions = 5; 79 | } 80 | 81 | -------------------------------------------------------------------------------- /common-protos/k8s.io/api/imagepolicy/v1alpha1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.api.imagepolicy.v1alpha1; 23 | 24 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 26 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 27 | 28 | // Package-wide variables from generator "generated". 29 | option go_package = "k8s.io/api/imagepolicy/v1alpha1"; 30 | 31 | // ImageReview checks if the set of images in a pod are allowed. 32 | message ImageReview { 33 | // Standard object's metadata. 34 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 35 | // +optional 36 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 37 | 38 | // Spec holds information about the pod being evaluated 39 | optional ImageReviewSpec spec = 2; 40 | 41 | // Status is filled in by the backend and indicates whether the pod should be allowed. 42 | // +optional 43 | optional ImageReviewStatus status = 3; 44 | } 45 | 46 | // ImageReviewContainerSpec is a description of a container within the pod creation request. 47 | message ImageReviewContainerSpec { 48 | // This can be in the form image:tag or image@SHA:012345679abcdef. 49 | // +optional 50 | optional string image = 1; 51 | } 52 | 53 | // ImageReviewSpec is a description of the pod creation request. 54 | message ImageReviewSpec { 55 | // Containers is a list of a subset of the information in each container of the Pod being created. 56 | // +optional 57 | repeated ImageReviewContainerSpec containers = 1; 58 | 59 | // Annotations is a list of key-value pairs extracted from the Pod's annotations. 60 | // It only includes keys which match the pattern `*.image-policy.k8s.io/*`. 61 | // It is up to each webhook backend to determine how to interpret these annotations, if at all. 62 | // +optional 63 | map annotations = 2; 64 | 65 | // Namespace is the namespace the pod is being created in. 66 | // +optional 67 | optional string namespace = 3; 68 | } 69 | 70 | // ImageReviewStatus is the result of the review for the pod creation request. 71 | message ImageReviewStatus { 72 | // Allowed indicates that all images were allowed to be run. 73 | optional bool allowed = 1; 74 | 75 | // Reason should be empty unless Allowed is false in which case it 76 | // may contain a short description of what is wrong. Kubernetes 77 | // may truncate excessively long errors when displaying to the user. 78 | // +optional 79 | optional string reason = 2; 80 | 81 | // AuditAnnotations will be added to the attributes object of the 82 | // admission controller request using 'AddAnnotation'. The keys should 83 | // be prefix-less (i.e., the admission controller will add an 84 | // appropriate prefix). 85 | // +optional 86 | map auditAnnotations = 3; 87 | } 88 | 89 | -------------------------------------------------------------------------------- /common-protos/k8s.io/api/node/v1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.api.node.v1; 23 | 24 | import "k8s.io/api/core/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; 26 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 27 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 28 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 29 | 30 | // Package-wide variables from generator "generated". 31 | option go_package = "k8s.io/api/node/v1"; 32 | 33 | // Overhead structure represents the resource overhead associated with running a pod. 34 | message Overhead { 35 | // podFixed represents the fixed resource overhead associated with running a pod. 36 | // +optional 37 | map podFixed = 1; 38 | } 39 | 40 | // RuntimeClass defines a class of container runtime supported in the cluster. 41 | // The RuntimeClass is used to determine which container runtime is used to run 42 | // all containers in a pod. RuntimeClasses are manually defined by a 43 | // user or cluster provisioner, and referenced in the PodSpec. The Kubelet is 44 | // responsible for resolving the RuntimeClassName reference before running the 45 | // pod. For more details, see 46 | // https://kubernetes.io/docs/concepts/containers/runtime-class/ 47 | message RuntimeClass { 48 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 49 | // +optional 50 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 51 | 52 | // handler specifies the underlying runtime and configuration that the CRI 53 | // implementation will use to handle pods of this class. The possible values 54 | // are specific to the node & CRI configuration. It is assumed that all 55 | // handlers are available on every node, and handlers of the same name are 56 | // equivalent on every node. 57 | // For example, a handler called "runc" might specify that the runc OCI 58 | // runtime (using native Linux containers) will be used to run the containers 59 | // in a pod. 60 | // The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, 61 | // and is immutable. 62 | optional string handler = 2; 63 | 64 | // overhead represents the resource overhead associated with running a pod for a 65 | // given RuntimeClass. For more details, see 66 | // https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/ 67 | // +optional 68 | optional Overhead overhead = 3; 69 | 70 | // scheduling holds the scheduling constraints to ensure that pods running 71 | // with this RuntimeClass are scheduled to nodes that support it. 72 | // If scheduling is nil, this RuntimeClass is assumed to be supported by all 73 | // nodes. 74 | // +optional 75 | optional Scheduling scheduling = 4; 76 | } 77 | 78 | // RuntimeClassList is a list of RuntimeClass objects. 79 | message RuntimeClassList { 80 | // Standard list metadata. 81 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 82 | // +optional 83 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 84 | 85 | // items is a list of schema objects. 86 | repeated RuntimeClass items = 2; 87 | } 88 | 89 | // Scheduling specifies the scheduling constraints for nodes supporting a 90 | // RuntimeClass. 91 | message Scheduling { 92 | // nodeSelector lists labels that must be present on nodes that support this 93 | // RuntimeClass. Pods using this RuntimeClass can only be scheduled to a 94 | // node matched by this selector. The RuntimeClass nodeSelector is merged 95 | // with a pod's existing nodeSelector. Any conflicts will cause the pod to 96 | // be rejected in admission. 97 | // +optional 98 | // +mapType=atomic 99 | map nodeSelector = 1; 100 | 101 | // tolerations are appended (excluding duplicates) to pods running with this 102 | // RuntimeClass during admission, effectively unioning the set of nodes 103 | // tolerated by the pod and the RuntimeClass. 104 | // +optional 105 | // +listType=atomic 106 | repeated k8s.io.api.core.v1.Toleration tolerations = 2; 107 | } 108 | 109 | -------------------------------------------------------------------------------- /common-protos/k8s.io/api/scheduling/v1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.api.scheduling.v1; 23 | 24 | import "k8s.io/api/core/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 26 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 27 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 28 | 29 | // Package-wide variables from generator "generated". 30 | option go_package = "k8s.io/api/scheduling/v1"; 31 | 32 | // PriorityClass defines mapping from a priority class name to the priority 33 | // integer value. The value can be any valid integer. 34 | message PriorityClass { 35 | // Standard object's metadata. 36 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 37 | // +optional 38 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 39 | 40 | // value represents the integer value of this priority class. This is the actual priority that pods 41 | // receive when they have the name of this class in their pod spec. 42 | optional int32 value = 2; 43 | 44 | // globalDefault specifies whether this PriorityClass should be considered as 45 | // the default priority for pods that do not have any priority class. 46 | // Only one PriorityClass can be marked as `globalDefault`. However, if more than 47 | // one PriorityClasses exists with their `globalDefault` field set to true, 48 | // the smallest value of such global default PriorityClasses will be used as the default priority. 49 | // +optional 50 | optional bool globalDefault = 3; 51 | 52 | // description is an arbitrary string that usually provides guidelines on 53 | // when this priority class should be used. 54 | // +optional 55 | optional string description = 4; 56 | 57 | // preemptionPolicy is the Policy for preempting pods with lower priority. 58 | // One of Never, PreemptLowerPriority. 59 | // Defaults to PreemptLowerPriority if unset. 60 | // +optional 61 | optional string preemptionPolicy = 5; 62 | } 63 | 64 | // PriorityClassList is a collection of priority classes. 65 | message PriorityClassList { 66 | // Standard list metadata 67 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 68 | // +optional 69 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 70 | 71 | // items is the list of PriorityClasses 72 | repeated PriorityClass items = 2; 73 | } 74 | 75 | -------------------------------------------------------------------------------- /common-protos/k8s.io/api/scheduling/v1alpha1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.api.scheduling.v1alpha1; 23 | 24 | import "k8s.io/api/core/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 26 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 27 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 28 | 29 | // Package-wide variables from generator "generated". 30 | option go_package = "k8s.io/api/scheduling/v1alpha1"; 31 | 32 | // DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. 33 | // PriorityClass defines mapping from a priority class name to the priority 34 | // integer value. The value can be any valid integer. 35 | message PriorityClass { 36 | // Standard object's metadata. 37 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 38 | // +optional 39 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 40 | 41 | // value represents the integer value of this priority class. This is the actual priority that pods 42 | // receive when they have the name of this class in their pod spec. 43 | optional int32 value = 2; 44 | 45 | // globalDefault specifies whether this PriorityClass should be considered as 46 | // the default priority for pods that do not have any priority class. 47 | // Only one PriorityClass can be marked as `globalDefault`. However, if more than 48 | // one PriorityClasses exists with their `globalDefault` field set to true, 49 | // the smallest value of such global default PriorityClasses will be used as the default priority. 50 | // +optional 51 | optional bool globalDefault = 3; 52 | 53 | // description is an arbitrary string that usually provides guidelines on 54 | // when this priority class should be used. 55 | // +optional 56 | optional string description = 4; 57 | 58 | // preemptionPolicy is the Policy for preempting pods with lower priority. 59 | // One of Never, PreemptLowerPriority. 60 | // Defaults to PreemptLowerPriority if unset. 61 | // +optional 62 | optional string preemptionPolicy = 5; 63 | } 64 | 65 | // PriorityClassList is a collection of priority classes. 66 | message PriorityClassList { 67 | // Standard list metadata 68 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 69 | // +optional 70 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 71 | 72 | // items is the list of PriorityClasses 73 | repeated PriorityClass items = 2; 74 | } 75 | 76 | -------------------------------------------------------------------------------- /common-protos/k8s.io/api/scheduling/v1beta1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.api.scheduling.v1beta1; 23 | 24 | import "k8s.io/api/core/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 26 | import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 27 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 28 | 29 | // Package-wide variables from generator "generated". 30 | option go_package = "k8s.io/api/scheduling/v1beta1"; 31 | 32 | // DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. 33 | // PriorityClass defines mapping from a priority class name to the priority 34 | // integer value. The value can be any valid integer. 35 | message PriorityClass { 36 | // Standard object's metadata. 37 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 38 | // +optional 39 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 40 | 41 | // value represents the integer value of this priority class. This is the actual priority that pods 42 | // receive when they have the name of this class in their pod spec. 43 | optional int32 value = 2; 44 | 45 | // globalDefault specifies whether this PriorityClass should be considered as 46 | // the default priority for pods that do not have any priority class. 47 | // Only one PriorityClass can be marked as `globalDefault`. However, if more than 48 | // one PriorityClasses exists with their `globalDefault` field set to true, 49 | // the smallest value of such global default PriorityClasses will be used as the default priority. 50 | // +optional 51 | optional bool globalDefault = 3; 52 | 53 | // description is an arbitrary string that usually provides guidelines on 54 | // when this priority class should be used. 55 | // +optional 56 | optional string description = 4; 57 | 58 | // preemptionPolicy is the Policy for preempting pods with lower priority. 59 | // One of Never, PreemptLowerPriority. 60 | // Defaults to PreemptLowerPriority if unset. 61 | // +optional 62 | optional string preemptionPolicy = 5; 63 | } 64 | 65 | // PriorityClassList is a collection of priority classes. 66 | message PriorityClassList { 67 | // Standard list metadata 68 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 69 | // +optional 70 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 71 | 72 | // items is the list of PriorityClasses 73 | repeated PriorityClass items = 2; 74 | } 75 | 76 | -------------------------------------------------------------------------------- /common-protos/k8s.io/apimachinery/pkg/api/resource/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.apimachinery.pkg.api.resource; 23 | 24 | // Package-wide variables from generator "generated". 25 | option go_package = "k8s.io/apimachinery/pkg/api/resource"; 26 | 27 | // Quantity is a fixed-point representation of a number. 28 | // It provides convenient marshaling/unmarshaling in JSON and YAML, 29 | // in addition to String() and AsInt64() accessors. 30 | // 31 | // The serialization format is: 32 | // 33 | // ``` 34 | // ::= 35 | // 36 | // (Note that may be empty, from the "" case in .) 37 | // 38 | // ::= 0 | 1 | ... | 9 39 | // ::= | 40 | // ::= | . | . | . 41 | // ::= "+" | "-" 42 | // ::= | 43 | // ::= | | 44 | // ::= Ki | Mi | Gi | Ti | Pi | Ei 45 | // 46 | // (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) 47 | // 48 | // ::= m | "" | k | M | G | T | P | E 49 | // 50 | // (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) 51 | // 52 | // ::= "e" | "E" 53 | // ``` 54 | // 55 | // No matter which of the three exponent forms is used, no quantity may represent 56 | // a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal 57 | // places. Numbers larger or more precise will be capped or rounded up. 58 | // (E.g.: 0.1m will rounded up to 1m.) 59 | // This may be extended in the future if we require larger or smaller quantities. 60 | // 61 | // When a Quantity is parsed from a string, it will remember the type of suffix 62 | // it had, and will use the same type again when it is serialized. 63 | // 64 | // Before serializing, Quantity will be put in "canonical form". 65 | // This means that Exponent/suffix will be adjusted up or down (with a 66 | // corresponding increase or decrease in Mantissa) such that: 67 | // 68 | // - No precision is lost 69 | // - No fractional digits will be emitted 70 | // - The exponent (or suffix) is as large as possible. 71 | // 72 | // The sign will be omitted unless the number is negative. 73 | // 74 | // Examples: 75 | // 76 | // - 1.5 will be serialized as "1500m" 77 | // - 1.5Gi will be serialized as "1536Mi" 78 | // 79 | // Note that the quantity will NEVER be internally represented by a 80 | // floating point number. That is the whole point of this exercise. 81 | // 82 | // Non-canonical values will still parse as long as they are well formed, 83 | // but will be re-emitted in their canonical form. (So always use canonical 84 | // form, or don't diff.) 85 | // 86 | // This format is intended to make it difficult to use these numbers without 87 | // writing some sort of special handling code in the hopes that that will 88 | // cause implementors to also use a fixed point implementation. 89 | // 90 | // +protobuf=true 91 | // +protobuf.embed=string 92 | // +protobuf.options.marshal=false 93 | // +protobuf.options.(gogoproto.goproto_stringer)=false 94 | // +k8s:deepcopy-gen=true 95 | // +k8s:openapi-gen=true 96 | message Quantity { 97 | optional string string = 1; 98 | } 99 | 100 | // QuantityValue makes it possible to use a Quantity as value for a command 101 | // line parameter. 102 | // 103 | // +protobuf=true 104 | // +protobuf.embed=string 105 | // +protobuf.options.marshal=false 106 | // +protobuf.options.(gogoproto.goproto_stringer)=false 107 | // +k8s:deepcopy-gen=true 108 | message QuantityValue { 109 | optional string string = 1; 110 | } 111 | 112 | -------------------------------------------------------------------------------- /common-protos/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.apimachinery.pkg.apis.meta.v1beta1; 23 | 24 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 25 | import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 26 | 27 | // Package-wide variables from generator "generated". 28 | option go_package = "k8s.io/apimachinery/pkg/apis/meta/v1beta1"; 29 | 30 | // PartialObjectMetadataList contains a list of objects containing only their metadata. 31 | // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 32 | message PartialObjectMetadataList { 33 | // Standard list metadata. 34 | // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 35 | // +optional 36 | optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 2; 37 | 38 | // items contains each of the included items. 39 | repeated k8s.io.apimachinery.pkg.apis.meta.v1.PartialObjectMetadata items = 1; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /common-protos/k8s.io/apimachinery/pkg/runtime/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.apimachinery.pkg.runtime; 23 | 24 | // Package-wide variables from generator "generated". 25 | option go_package = "k8s.io/apimachinery/pkg/runtime"; 26 | 27 | // RawExtension is used to hold extensions in external versions. 28 | // 29 | // To use this, make a field which has RawExtension as its type in your external, versioned 30 | // struct, and Object in your internal struct. You also need to register your 31 | // various plugin types. 32 | // 33 | // // Internal package: 34 | // 35 | // type MyAPIObject struct { 36 | // runtime.TypeMeta `json:",inline"` 37 | // MyPlugin runtime.Object `json:"myPlugin"` 38 | // } 39 | // 40 | // type PluginA struct { 41 | // AOption string `json:"aOption"` 42 | // } 43 | // 44 | // // External package: 45 | // 46 | // type MyAPIObject struct { 47 | // runtime.TypeMeta `json:",inline"` 48 | // MyPlugin runtime.RawExtension `json:"myPlugin"` 49 | // } 50 | // 51 | // type PluginA struct { 52 | // AOption string `json:"aOption"` 53 | // } 54 | // 55 | // // On the wire, the JSON will look something like this: 56 | // 57 | // { 58 | // "kind":"MyAPIObject", 59 | // "apiVersion":"v1", 60 | // "myPlugin": { 61 | // "kind":"PluginA", 62 | // "aOption":"foo", 63 | // }, 64 | // } 65 | // 66 | // So what happens? Decode first uses json or yaml to unmarshal the serialized data into 67 | // your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. 68 | // The next step is to copy (using pkg/conversion) into the internal struct. The runtime 69 | // package's DefaultScheme has conversion functions installed which will unpack the 70 | // JSON stored in RawExtension, turning it into the correct object type, and storing it 71 | // in the Object. (TODO: In the case where the object is of an unknown type, a 72 | // runtime.Unknown object will be created and stored.) 73 | // 74 | // +k8s:deepcopy-gen=true 75 | // +protobuf=true 76 | // +k8s:openapi-gen=true 77 | message RawExtension { 78 | // Raw is the underlying serialization of this object. 79 | // 80 | // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. 81 | optional bytes raw = 1; 82 | } 83 | 84 | // TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, 85 | // like this: 86 | // 87 | // type MyAwesomeAPIObject struct { 88 | // runtime.TypeMeta `json:",inline"` 89 | // ... // other fields 90 | // } 91 | // 92 | // func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind 93 | // 94 | // TypeMeta is provided here for convenience. You may use it directly from this package or define 95 | // your own with the same fields. 96 | // 97 | // +k8s:deepcopy-gen=false 98 | // +protobuf=true 99 | // +k8s:openapi-gen=true 100 | message TypeMeta { 101 | // +optional 102 | optional string apiVersion = 1; 103 | 104 | // +optional 105 | optional string kind = 2; 106 | } 107 | 108 | // Unknown allows api objects with unknown types to be passed-through. This can be used 109 | // to deal with the API objects from a plug-in. Unknown objects still have functioning 110 | // TypeMeta features-- kind, version, etc. 111 | // TODO: Make this object have easy access to field based accessors and settors for 112 | // metadata and field mutatation. 113 | // 114 | // +k8s:deepcopy-gen=true 115 | // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 116 | // +protobuf=true 117 | // +k8s:openapi-gen=true 118 | message Unknown { 119 | optional TypeMeta typeMeta = 1; 120 | 121 | // Raw will hold the complete serialized object which couldn't be matched 122 | // with a registered type. Most likely, nothing should be done with this 123 | // except for passing it through the system. 124 | optional bytes raw = 2; 125 | 126 | // ContentEncoding is encoding used to encode 'Raw' data. 127 | // Unspecified means no encoding. 128 | optional string contentEncoding = 3; 129 | 130 | // ContentType is serialization method used to serialize 'Raw'. 131 | // Unspecified means ContentTypeJSON. 132 | optional string contentType = 4; 133 | } 134 | 135 | -------------------------------------------------------------------------------- /common-protos/k8s.io/apimachinery/pkg/runtime/schema/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.apimachinery.pkg.runtime.schema; 23 | 24 | // Package-wide variables from generator "generated". 25 | option go_package = "k8s.io/apimachinery/pkg/runtime/schema"; 26 | 27 | -------------------------------------------------------------------------------- /common-protos/k8s.io/apimachinery/pkg/util/intstr/generated.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubernetes Authors. 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 | 18 | // This file was autogenerated by go-to-protobuf. Do not edit it manually! 19 | 20 | syntax = "proto2"; 21 | 22 | package k8s.io.apimachinery.pkg.util.intstr; 23 | 24 | // Package-wide variables from generator "generated". 25 | option go_package = "k8s.io/apimachinery/pkg/util/intstr"; 26 | 27 | // IntOrString is a type that can hold an int32 or a string. When used in 28 | // JSON or YAML marshalling and unmarshalling, it produces or consumes the 29 | // inner type. This allows you to have, for example, a JSON field that can 30 | // accept a name or number. 31 | // TODO: Rename to Int32OrString 32 | // 33 | // +protobuf=true 34 | // +protobuf.options.(gogoproto.goproto_stringer)=false 35 | // +k8s:openapi-gen=true 36 | message IntOrString { 37 | optional int64 type = 1; 38 | 39 | optional int32 intVal = 2; 40 | 41 | optional string strVal = 3; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /files/.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "istio build-tools", 3 | "image": "gcr.io/istio-testing/build-tools:master-267d17ce87eaf154c1a6bc2bc743b9a27a12d551", 4 | "privileged": true, 5 | "remoteEnv": { 6 | "USE_GKE_GCLOUD_AUTH_PLUGIN": "True", 7 | "BUILD_WITH_CONTAINER": "0", 8 | "CARGO_HOME": "/home/.cargo", 9 | "RUSTUP_HOME": "/home/.rustup" 10 | }, 11 | "features": { 12 | "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, 13 | "ghcr.io/mpriscella/features/kind:1": {} 14 | }, 15 | "customizations": { 16 | "vscode": { 17 | "extensions": [ 18 | "golang.go", 19 | "rust-lang.rust-analyzer", 20 | "eamodio.gitlens", 21 | "zxh404.vscode-proto3", 22 | "ms-azuretools.vscode-docker", 23 | "redhat.vscode-yaml", 24 | "IBM.output-colorizer" 25 | ], 26 | "settings": { 27 | "files.eol": "\n", 28 | "go.useLanguageServer": true, 29 | "go.lintTool": "golangci-lint" 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /files/.gitattributes: -------------------------------------------------------------------------------- 1 | *.descriptor linguist-generated=true 2 | *.descriptor -diff -merge 3 | *.descriptor_set linguist-generated=true 4 | *.descriptor_set -diff -merge 5 | *.pb.html linguist-generated=true 6 | *.pb.go linguist-generated=true 7 | *.gen.go linguist-generated=true 8 | *.gen.yaml linguist-generated=true 9 | *.gen.json linguist-generated=true 10 | *_pb2.py linguist-generated=true 11 | manifests/charts/**/profile*.yaml linguist-generated=true 12 | go.sum merge=union 13 | vendor/** linguist-vendored 14 | common/** linguist-vendored 15 | archive/** linquist-vendored 16 | **/vmlinux.h linquist-vendored 17 | -------------------------------------------------------------------------------- /files/BUGS-AND-FEATURE-REQUESTS.md: -------------------------------------------------------------------------------- 1 | # Bugs and Feature Requests 2 | 3 | You can report bugs and feature requests to the Istio team in one of three places: 4 | 5 | - [Product Bugs and Feature Requests](https://github.com/istio/istio/issues) 6 | - [Documentation Bugs and Feature Requests](https://github.com/istio/istio.io/issues) 7 | - [Community and Governance Issues](https://github.com/istio/community/issues) 8 | 9 | For security vulnerabilities, please don't report a bug (which is public) and instead follow 10 | [these procedures](https://istio.io/about/security-vulnerabilities/). 11 | -------------------------------------------------------------------------------- /files/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution guidelines 2 | 3 | So you want to hack on Istio? Yay! Please refer to Istio's overall 4 | [contribution guidelines](https://github.com/istio/community/blob/master/CONTRIBUTING.md) 5 | to find out how you can help. 6 | -------------------------------------------------------------------------------- /files/Makefile: -------------------------------------------------------------------------------- 1 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 2 | # 3 | # The original version of this file is located in the https://github.com/istio/common-files repo. 4 | # If you're looking at this file in a different repo and want to make a change, please go to the 5 | # common-files repo, make the change there and check it in. Then come back to this repo and run 6 | # "make update-common". 7 | 8 | # Copyright Istio Authors 9 | # 10 | # Licensed under the Apache License, Version 2.0 (the "License"); 11 | # you may not use this file except in compliance with the License. 12 | # You may obtain a copy of the License at 13 | # 14 | # http://www.apache.org/licenses/LICENSE-2.0 15 | # 16 | # Unless required by applicable law or agreed to in writing, software 17 | # distributed under the License is distributed on an "AS IS" BASIS, 18 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | # See the License for the specific language governing permissions and 20 | # limitations under the License. 21 | 22 | SHELL := /usr/bin/env bash 23 | 24 | # allow optional per-repo overrides 25 | -include Makefile.overrides.mk 26 | 27 | # Set the environment variable BUILD_WITH_CONTAINER to use a container 28 | # to build the repo. The only dependencies in this mode are to have make and 29 | # docker. If you'd rather build with a local tool chain instead, you'll need to 30 | # figure out all the tools you need in your environment to make that work. 31 | export BUILD_WITH_CONTAINER ?= 0 32 | 33 | ifeq ($(BUILD_WITH_CONTAINER),1) 34 | 35 | # An export free of arguments in a Makefile places all variables in the Makefile into the 36 | # environment. This is needed to allow overrides from Makefile.overrides.mk. 37 | export 38 | 39 | RUN = ./common/scripts/run.sh 40 | 41 | MAKE_DOCKER = $(RUN) make --no-print-directory -e -f Makefile.core.mk 42 | 43 | %: 44 | @$(MAKE_DOCKER) $@ 45 | 46 | default: 47 | @$(MAKE_DOCKER) 48 | 49 | shell: 50 | @$(RUN) /bin/bash 51 | 52 | .PHONY: default shell 53 | 54 | else 55 | 56 | # If we are not in build container, we need a workaround to get environment properly set 57 | # Write to file, then include 58 | $(shell mkdir -p out) 59 | $(shell $(shell pwd)/common/scripts/setup_env.sh envfile > out/.env) 60 | include out/.env 61 | # An export free of arguments in a Makefile places all variables in the Makefile into the 62 | # environment. This behavior may be surprising to many that use shell often, which simply 63 | # displays the existing environment 64 | export 65 | 66 | export GOBIN ?= $(GOPATH)/bin 67 | include Makefile.core.mk 68 | 69 | endif 70 | -------------------------------------------------------------------------------- /files/SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | Here are some resources to help you understand and use Istio: 4 | 5 | - For in-depth information about how to use Istio, visit [istio.io](https://istio.io) 6 | - To ask questions and get assistance from our community, visit [GitHub Discussions](https://github.com/istio/istio/discussions) 7 | - To learn how to participate in our overall community, visit [our community page](https://istio.io/latest/get-involved/) 8 | -------------------------------------------------------------------------------- /files/common/config/.hadolint.yml: -------------------------------------------------------------------------------- 1 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 2 | # 3 | # The original version of this file is located in the https://github.com/istio/common-files repo. 4 | # If you're looking at this file in a different repo and want to make a change, please go to the 5 | # common-files repo, make the change there and check it in. Then come back to this repo and run 6 | # "make update-common". 7 | 8 | ignored: 9 | - DL3008 10 | - DL3059 11 | 12 | trustedRegistries: 13 | - gcr.io 14 | - docker.io 15 | - quay.io 16 | - "*.pkg.dev" 17 | - "cgr.dev" 18 | -------------------------------------------------------------------------------- /files/common/config/.yamllint.yml: -------------------------------------------------------------------------------- 1 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 2 | # 3 | # The original version of this file is located in the https://github.com/istio/common-files repo. 4 | # If you're looking at this file in a different repo and want to make a change, please go to the 5 | # common-files repo, make the change there and check it in. Then come back to this repo and run 6 | # "make update-common". 7 | 8 | rules: 9 | braces: disable 10 | brackets: disable 11 | colons: enable 12 | commas: disable 13 | comments: disable 14 | comments-indentation: disable 15 | document-end: disable 16 | document-start: disable 17 | empty-lines: disable 18 | empty-values: disable 19 | hyphens: enable 20 | indentation: disable 21 | key-duplicates: enable 22 | key-ordering: disable 23 | line-length: disable 24 | new-line-at-end-of-file: disable 25 | new-lines: enable 26 | octal-values: disable 27 | quoted-strings: disable 28 | trailing-spaces: disable 29 | truthy: disable 30 | -------------------------------------------------------------------------------- /files/common/config/license-lint.yml: -------------------------------------------------------------------------------- 1 | unrestricted_licenses: 2 | - Apache-2.0 3 | - CC-BY-3.0 4 | - ISC 5 | - AFL-2.1 6 | - AFL-3.0 7 | - Artistic-1.0 8 | - Artistic-2.0 9 | - Apache-1.1 10 | - BSD-1-Clause 11 | - BSD-2-Clause 12 | - BSD-3-Clause 13 | - 0BSD 14 | - FTL 15 | - LPL-1.02 16 | - MS-PL 17 | - MIT 18 | - NCSA 19 | - OpenSSL 20 | - PHP-3.0 21 | - TCP-wrappers 22 | - W3C 23 | - Xnet 24 | - Zlib 25 | 26 | reciprocal_licenses: 27 | - CC0-1.0 28 | - APSL-2.0 29 | - CDDL-1.0 30 | - CDDL-1.1 31 | - CPL-1.0 32 | - EPL-1.0 33 | - IPL-1.0 34 | - MPL-1.0 35 | - MPL-1.1 36 | - MPL-2.0 37 | - MPL-2.0-no-copyleft-exception 38 | - Ruby 39 | 40 | restricted_licenses: 41 | - GPL-1.0-only 42 | - GPL-1.0-or-later 43 | - GPL-2.0-only 44 | - GPL-2.0-or-later 45 | - GPL-3.0-only 46 | - GPL-3.0-or-later 47 | - LGPL-2.0-only 48 | - LGPL-2.0-or-later 49 | - LGPL-2.1-only 50 | - LGPL-2.1-or-later 51 | - LGPL-3.0-only 52 | - LGPL-3.0-or-later 53 | - NPL-1.0 54 | - NPL-1.1 55 | - OSL-1.0 56 | - OSL-1.1 57 | - OSL-2.0 58 | - OSL-2.1 59 | - OSL-3.0 60 | - QPL-1.0 61 | - Sleepycat 62 | 63 | allowlisted_modules: 64 | # MIT: https://github.com/ghodss/yaml/blob/master/LICENSE 65 | - github.com/ghodss/yaml 66 | 67 | # BSD: https://github.com/gogo/protobuf/blob/master/LICENSE 68 | - github.com/gogo/protobuf 69 | 70 | # BSD: https://github.com/magiconair/properties/blob/master/LICENSE.md 71 | - github.com/magiconair/properties 72 | 73 | # Apache 2.0 74 | - github.com/spf13/cobra 75 | - github.com/spf13/afero 76 | 77 | # Public domain: https://github.com/xi2/xz/blob/master/LICENSE 78 | - github.com/xi2/xz 79 | 80 | # Helm is Apache 2.0: https://github.com/helm/helm/blob/master/LICENSE 81 | # However, it has a bunch of LICENSE test files that our linter fails to understand 82 | - helm.sh/helm/v3 83 | 84 | # https://github.com/pelletier/go-toml/blob/master/LICENSE 85 | # Uses MIT for everything, except a few files copied from 86 | # google's civil library that uses Apache 2 87 | - github.com/pelletier/go-toml 88 | 89 | # https://github.com/xeipuuv/gojsonpointer/blob/master/LICENSE-APACHE-2.0.txt 90 | - github.com/xeipuuv/gojsonpointer 91 | # https://github.com/xeipuuv/gojsonreference/blob/master/LICENSE-APACHE-2.0.txt 92 | - github.com/xeipuuv/gojsonreference 93 | # Apache 2.0: https://github.com/xeipuuv/gojsonschema/blob/master/LICENSE-APACHE-2.0.txt 94 | - github.com/xeipuuv/gojsonschema 95 | 96 | # Apache 2.0 (but missing appendix): https://github.com/garyburd/redigo/blob/master/LICENSE 97 | - github.com/garyburd/redigo 98 | - github.com/gomodule/redigo 99 | 100 | # Apache 2.0 101 | # github.com/ghodss/yaml: MIT / BSD-3 102 | # github.com/gogo/protobuf: BSD-3 103 | # github.com/jmespath/go-jmespath: Apache 2.0 104 | # sigs.k8s.io/yaml: MIT / BSD-3 105 | - github.com/tektoncd/pipeline 106 | 107 | # MIT: https://github.com/kubernetes-sigs/yaml/blob/master/LICENSE 108 | - sigs.k8s.io/yaml 109 | 110 | # https://github.com/go-errors/errors/blob/master/LICENSE.MIT 111 | - github.com/go-errors/errors 112 | 113 | # runc is Apache 2.0: https://github.com/opencontainers/runc/blob/master/LICENSE 114 | # but it contains BSD dep which our linter fails to understand: https://github.com/opencontainers/runc/blob/v0.1.1/Godeps/_workspace/src/github.com/golang/protobuf/LICENSE 115 | - github.com/opencontainers/runc 116 | 117 | # MIT: https://github.com/felixge/fgprof/blob/master/LICENSE.txt 118 | - github.com/felixge/fgprof 119 | 120 | # Apache 2.0 121 | - github.com/google/pprof 122 | 123 | # MIT: https://github.com/invopop/yaml/blob/v0.1.0/LICENSE 124 | - github.com/invopop/yaml 125 | 126 | # Simplified BSD (BSD-2-Clause): https://github.com/russross/blackfriday/blob/master/LICENSE.txt 127 | - github.com/russross/blackfriday 128 | - github.com/russross/blackfriday/v2 129 | 130 | # W3C Test Suite License, W3C 3-clause BSD License 131 | # gonum uses this for its some of its test files 132 | # gonum.org/v1/gonum/graph/formats/rdf/testdata/LICENSE.md 133 | - gonum.org/v1/gonum 134 | 135 | # BSD 3-clause: https://github.com/go-inf/inf/blob/v0.9.1/LICENSE 136 | - gopkg.in/inf.v0 137 | 138 | # BSD 3-clause: https://github.com/go-git/gcfg/blob/main/LICENSE 139 | - github.com/go-git/gcfg 140 | 141 | # Apache 2.0 142 | - github.com/aws/smithy-go 143 | 144 | # Simplified BSD License: https://github.com/gomarkdown/markdown/blob/master/LICENSE.txt 145 | - github.com/gomarkdown/markdown 146 | -------------------------------------------------------------------------------- /files/common/config/mdl.rb: -------------------------------------------------------------------------------- 1 | all 2 | rule 'MD002', :level => 1 3 | rule 'MD007', :indent => 4 4 | rule 'MD013', :line_length => 160, :code_blocks => false, :tables => false 5 | rule 'MD026', :punctuation => ".,;:!" 6 | exclude_rule 'MD013' 7 | exclude_rule 'MD014' 8 | exclude_rule 'MD030' 9 | exclude_rule 'MD032' 10 | exclude_rule 'MD033' 11 | exclude_rule 'MD041' 12 | exclude_rule 'MD046' 13 | -------------------------------------------------------------------------------- /files/common/config/sass-lint.yml: -------------------------------------------------------------------------------- 1 | ######################### 2 | ## Config for sass-lint 3 | ######################### 4 | # Linter Options 5 | options: 6 | # Don't merge default rules 7 | merge-default-rules: false 8 | # Raise an error if more than 50 warnings are generated 9 | max-warnings: 500 10 | # Rule Configuration 11 | rules: 12 | attribute-quotes: 13 | - 2 14 | - 15 | include: false 16 | bem-depth: 2 17 | border-zero: 2 18 | brace-style: 2 19 | class-name-format: 2 20 | clean-import-paths: 2 21 | declarations-before-nesting: 2 22 | empty-args: 2 23 | empty-line-between-blocks: 2 24 | extends-before-declarations: 2 25 | extends-before-mixins: 2 26 | final-newline: 2 27 | force-attribute-nesting: 0 28 | force-element-nesting: 0 29 | force-pseudo-nesting: 0 30 | function-name-format: 2 31 | hex-length: 0 32 | hex-notation: 2 33 | id-name-format: 2 34 | indentation: 35 | - 2 36 | - 37 | size: 4 38 | leading-zero: 39 | - 2 40 | - 41 | include: false 42 | max-file-line-count: 0 43 | max-file-length: 0 44 | mixins-before-declarations: 2 45 | no-attribute-selectors: 0 46 | no-color-hex: 0 47 | no-color-keywords: 0 48 | no-color-literals: 0 49 | no-combinators: 0 50 | no-css-comments: 2 51 | no-debug: 2 52 | no-disallowed-properties: 2 53 | no-duplicate-properties: 2 54 | no-empty-rulesets: 2 55 | no-extends: 2 56 | no-ids: 0 57 | no-invalid-hex: 2 58 | no-important: 0 59 | no-mergeable-selectors: 2 60 | no-misspelled-properties: 2 61 | no-qualifying-elements: 0 62 | no-trailing-whitespace: 2 63 | no-trailing-zero: 2 64 | no-transition-all: 0 65 | no-url-domains: 2 66 | no-url-protocols: 2 67 | no-warn: 2 68 | one-declaration-per-line: 2 69 | placeholder-in-extend: 2 70 | placeholder-name-format: 2 71 | property-sort-order: 0 72 | property-units: 2 73 | pseudo-element: 2 74 | quotes: 75 | - 2 76 | - 77 | style: double 78 | shorthand-values: 2 79 | single-line-per-selector: 0 80 | space-after-bang: 2 81 | space-after-colon: 2 82 | space-after-comma: 2 83 | space-around-operator: 2 84 | space-before-bang: 2 85 | space-before-brace: 2 86 | space-before-colon: 2 87 | space-between-parens: 2 88 | trailing-semicolon: 2 89 | url-quotes: 2 90 | variable-for-property: 91 | - 0 92 | - 93 | properties: 94 | - color 95 | - background-color 96 | - fill 97 | variable-name-format: 0 98 | zero-unit: 2 99 | -------------------------------------------------------------------------------- /files/common/config/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "error", 3 | "extends": [ 4 | "tslint:recommended" 5 | ], 6 | "rules": { 7 | "max-line-length": { 8 | "options": [160] 9 | }, 10 | "arrow-parens": false, 11 | "new-parens": true, 12 | "no-arg": true, 13 | "no-bitwise": true, 14 | "no-conditional-assignment": true, 15 | "no-consecutive-blank-lines": true, 16 | "no-console": { 17 | "severity": "warning", 18 | "options": ["debug", "info", "log", "time", "timeEnd", "trace"] 19 | }, 20 | "no-shadowed-variable": false, 21 | "eofline": false 22 | }, 23 | "jsRules": {}, 24 | "rulesDirectory": [] 25 | } -------------------------------------------------------------------------------- /files/common/scripts/check_clean_repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright Istio Authors 4 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | function write_patch_file() { 18 | if [ -z "${ARTIFACTS}" ]; then 19 | return 0 20 | fi 21 | 22 | PATCH_NAME="check-clean-repo-diff.patch" 23 | PATCH_OUT="${ARTIFACTS}/${PATCH_NAME}" 24 | git diff > "${PATCH_OUT}" 25 | 26 | [ -n "${JOB_NAME}" ] && [ -n "${BUILD_ID}" ] 27 | # shellcheck disable=SC2319 28 | IN_PROW="$?" 29 | 30 | # Don't persist large diffs (30M+) on CI 31 | LARGE_FILE="$(find "${ARTIFACTS}" -name "${PATCH_NAME}" -type 'f' -size +30M)" 32 | if [ "${IN_PROW}" -eq 0 ] && [ -n "${LARGE_FILE}" ]; then 33 | rm "${PATCH_OUT}" 34 | echo "WARNING: patch file was too large to persist ($(du -h "${PATCH_OUT}"))" 35 | return 0 36 | fi 37 | outName="artifacts/${PATCH_OUT#"${ARTIFACTS}"/}" 38 | patchFile="${PROW_ARTIFACTS_BASE:-https://gcsweb.istio.io/gcs/istio-prow}/pr-logs/pull/${REPO_OWNER}_${REPO_NAME}/${PULL_NUMBER}/${JOB_NAME}/${BUILD_ID}/${outName}" 39 | echo "You can also try applying the patch file from the build artifacts: 40 | 41 | git apply <(curl -sL \"${patchFile}\") 42 | " 43 | } 44 | 45 | if [[ -n $(git status --porcelain) ]]; then 46 | git status 47 | git diff 48 | echo "ERROR: Some files need to be updated, please run 'make gen' and include any changed files in your PR" 49 | write_patch_file 50 | exit 1 51 | fi 52 | -------------------------------------------------------------------------------- /files/common/scripts/copyright-banner-go.txt: -------------------------------------------------------------------------------- 1 | // Copyright Istio Authors 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 | -------------------------------------------------------------------------------- /files/common/scripts/fix_copyright_banner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 4 | # 5 | # The original version of this file is located in the https://github.com/istio/common-files repo. 6 | # If you're looking at this file in a different repo and want to make a change, please go to the 7 | # common-files repo, make the change there and check it in. Then come back to this repo and run 8 | # "make update-common". 9 | 10 | # Copyright Istio Authors 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | 24 | set -e 25 | 26 | WD=$(dirname "$0") 27 | WD=$(cd "$WD"; pwd) 28 | 29 | for fn in "$@"; do 30 | if ! grep -L -q -e "Apache License, Version 2" -e "Copyright" "${fn}"; then 31 | if [[ "${fn}" == *.go || "${fn}" == *.rs ]]; then 32 | newfile=$(cat "${WD}/copyright-banner-go.txt" "${fn}") 33 | echo "${newfile}" > "${fn}" 34 | echo "Fixing license: ${fn}" 35 | else 36 | echo "Cannot fix license: ${fn}. Unknown file type" 37 | fi 38 | fi 39 | done 40 | -------------------------------------------------------------------------------- /files/common/scripts/format_go.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 4 | # 5 | # The original version of this file is located in the https://github.com/istio/common-files repo. 6 | # If you're looking at this file in a different repo and want to make a change, please go to the 7 | # common-files repo, make the change there and check it in. Then come back to this repo and run 8 | # "make update-common". 9 | 10 | # Copyright Istio Authors 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | 24 | golangci-lint run --fix -c ./common/config/.golangci.yml 25 | -------------------------------------------------------------------------------- /files/common/scripts/gobuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 4 | # 5 | # The original version of this file is located in the https://github.com/istio/common-files repo. 6 | # If you're looking at this file in a different repo and want to make a change, please go to the 7 | # common-files repo, make the change there and check it in. Then come back to this repo and run 8 | # "make update-common". 9 | 10 | # Copyright Istio Authors. All Rights Reserved. 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | 24 | # This script builds and version stamps the output 25 | 26 | VERBOSE=${VERBOSE:-"0"} 27 | V="" 28 | if [[ "${VERBOSE}" == "1" ]];then 29 | V="-x" 30 | set -x 31 | fi 32 | 33 | SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 34 | 35 | OUT=${1:?"output path"} 36 | shift 37 | 38 | set -e 39 | 40 | export BUILD_GOOS=${GOOS:-linux} 41 | export BUILD_GOARCH=${GOARCH:-amd64} 42 | GOBINARY=${GOBINARY:-go} 43 | GOPKG="$GOPATH/pkg" 44 | BUILDINFO=${BUILDINFO:-""} 45 | STATIC=${STATIC:-1} 46 | LDFLAGS=${LDFLAGS:--extldflags -static} 47 | GOBUILDFLAGS=${GOBUILDFLAGS:-""} 48 | # Split GOBUILDFLAGS by spaces into an array called GOBUILDFLAGS_ARRAY. 49 | IFS=' ' read -r -a GOBUILDFLAGS_ARRAY <<< "$GOBUILDFLAGS" 50 | 51 | GCFLAGS=${GCFLAGS:-} 52 | export CGO_ENABLED=${CGO_ENABLED:-0} 53 | 54 | if [[ "${STATIC}" != "1" ]];then 55 | LDFLAGS="" 56 | fi 57 | 58 | # gather buildinfo if not already provided 59 | # For a release build BUILDINFO should be produced 60 | # at the beginning of the build and used throughout 61 | if [[ -z ${BUILDINFO} ]];then 62 | BUILDINFO=$(mktemp) 63 | "${SCRIPTPATH}/report_build_info.sh" > "${BUILDINFO}" 64 | fi 65 | 66 | # BUILD LD_EXTRAFLAGS 67 | LD_EXTRAFLAGS="" 68 | 69 | while read -r line; do 70 | LD_EXTRAFLAGS="${LD_EXTRAFLAGS} -X ${line}" 71 | done < "${BUILDINFO}" 72 | 73 | OPTIMIZATION_FLAGS=(-trimpath) 74 | if [ "${DEBUG}" == "1" ]; then 75 | OPTIMIZATION_FLAGS=() 76 | fi 77 | 78 | time GOOS=${BUILD_GOOS} GOARCH=${BUILD_GOARCH} ${GOBINARY} build \ 79 | ${V} "${GOBUILDFLAGS_ARRAY[@]}" ${GCFLAGS:+-gcflags "${GCFLAGS}"} \ 80 | -o "${OUT}" \ 81 | "${OPTIMIZATION_FLAGS[@]}" \ 82 | -pkgdir="${GOPKG}/${BUILD_GOOS}_${BUILD_GOARCH}" \ 83 | -ldflags "${LDFLAGS} ${LD_EXTRAFLAGS}" "${@}" 84 | -------------------------------------------------------------------------------- /files/common/scripts/lint_copyright_banner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 4 | # 5 | # The original version of this file is located in the https://github.com/istio/common-files repo. 6 | # If you're looking at this file in a different repo and want to make a change, please go to the 7 | # common-files repo, make the change there and check it in. Then come back to this repo and run 8 | # "make update-common". 9 | 10 | # Copyright Istio Authors 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | 24 | set -e 25 | 26 | ec=0 27 | for fn in "$@"; do 28 | if ! grep -L -q -e "Apache License, Version 2" "${fn}"; then 29 | echo "Missing license: ${fn}" 30 | ec=1 31 | fi 32 | 33 | if ! grep -L -q -e "Copyright" "${fn}"; then 34 | echo "Missing copyright: ${fn}" 35 | ec=1 36 | fi 37 | done 38 | 39 | exit $ec 40 | -------------------------------------------------------------------------------- /files/common/scripts/lint_go.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 4 | # 5 | # The original version of this file is located in the https://github.com/istio/common-files repo. 6 | # If you're looking at this file in a different repo and want to make a change, please go to the 7 | # common-files repo, make the change there and check it in. Then come back to this repo and run 8 | # "make update-common". 9 | 10 | # Copyright Istio Authors 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | 24 | GOLANGCILINT_RUN_ARGS=(--output.text.path stdout --output.junit-xml.path "${ARTIFACTS}"/junit-lint.xml) 25 | 26 | if [[ "${ARTIFACTS}" != "" ]]; then 27 | golangci-lint run -v -c ./common/config/.golangci.yml "${GOLANGCILINT_RUN_ARGS[@]}" 28 | else 29 | golangci-lint run -v -c ./common/config/.golangci.yml 30 | fi 31 | -------------------------------------------------------------------------------- /files/common/scripts/report_build_info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 4 | # 5 | # The original version of this file is located in the https://github.com/istio/common-files repo. 6 | # If you're looking at this file in a different repo and want to make a change, please go to the 7 | # common-files repo, make the change there and check it in. Then come back to this repo and run 8 | # "make update-common". 9 | 10 | # Copyright Istio Authors 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | 24 | if BUILD_GIT_REVISION=$(git rev-parse HEAD 2> /dev/null); then 25 | if [[ -z "${IGNORE_DIRTY_TREE}" ]] && [[ -n "$(git status --porcelain 2>/dev/null)" ]]; then 26 | BUILD_GIT_REVISION=${BUILD_GIT_REVISION}"-dirty" 27 | fi 28 | else 29 | BUILD_GIT_REVISION=unknown 30 | fi 31 | 32 | # Check for local changes 33 | tree_status="Clean" 34 | if [[ -z "${IGNORE_DIRTY_TREE}" ]] && ! git diff-index --quiet HEAD --; then 35 | tree_status="Modified" 36 | fi 37 | 38 | GIT_DESCRIBE_TAG=$(git describe --tags --always) 39 | HUB=${HUB:-"docker.io/istio"} 40 | 41 | # used by common/scripts/gobuild.sh 42 | echo "istio.io/istio/pkg/version.buildVersion=${VERSION:-$BUILD_GIT_REVISION}" 43 | echo "istio.io/istio/pkg/version.buildGitRevision=${BUILD_GIT_REVISION}" 44 | echo "istio.io/istio/pkg/version.buildStatus=${tree_status}" 45 | echo "istio.io/istio/pkg/version.buildTag=${GIT_DESCRIBE_TAG}" 46 | echo "istio.io/istio/pkg/version.buildHub=${HUB}" 47 | echo "istio.io/istio/pkg/version.buildOS=${BUILD_GOOS}" 48 | echo "istio.io/istio/pkg/version.buildArch=${BUILD_GOARCH}" 49 | -------------------------------------------------------------------------------- /files/common/scripts/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 4 | # 5 | # The original version of this file is located in the https://github.com/istio/common-files repo. 6 | # If you're looking at this file in a different repo and want to make a change, please go to the 7 | # common-files repo, make the change there and check it in. Then come back to this repo and run 8 | # "make update-common". 9 | 10 | # Copyright Istio Authors 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | 24 | set -e 25 | 26 | WD=$(dirname "$0") 27 | WD=$(cd "$WD"; pwd) 28 | 29 | export FOR_BUILD_CONTAINER=1 30 | # shellcheck disable=SC1090,SC1091 31 | source "${WD}/setup_env.sh" 32 | 33 | 34 | MOUNT_SOURCE="${MOUNT_SOURCE:-${PWD}}" 35 | MOUNT_DEST="${MOUNT_DEST:-/work}" 36 | 37 | read -ra DOCKER_RUN_OPTIONS <<< "${DOCKER_RUN_OPTIONS:-}" 38 | 39 | [[ -t 0 ]] && DOCKER_RUN_OPTIONS+=("-it") 40 | [[ ${UID} -ne 0 ]] && DOCKER_RUN_OPTIONS+=(-u "${UID}:${DOCKER_GID}") 41 | 42 | # $CONTAINER_OPTIONS becomes an empty arg when quoted, so SC2086 is disabled for the 43 | # following command only 44 | # shellcheck disable=SC2086 45 | "${CONTAINER_CLI}" run \ 46 | --rm \ 47 | "${DOCKER_RUN_OPTIONS[@]}" \ 48 | --init \ 49 | --sig-proxy=true \ 50 | --cap-add=SYS_ADMIN \ 51 | ${DOCKER_SOCKET_MOUNT:--v /var/run/docker.sock:/var/run/docker.sock} \ 52 | -e DOCKER_HOST=${DOCKER_SOCKET_HOST:-unix:///var/run/docker.sock} \ 53 | $CONTAINER_OPTIONS \ 54 | --env-file <(env | grep -v ${ENV_BLOCKLIST}) \ 55 | -e IN_BUILD_CONTAINER=1 \ 56 | -e TZ="${TIMEZONE:-$TZ}" \ 57 | --mount "type=bind,source=${MOUNT_SOURCE},destination=/work" \ 58 | --mount "type=volume,source=go,destination=/go" \ 59 | --mount "type=volume,source=gocache,destination=/gocache" \ 60 | --mount "type=volume,source=cache,destination=/home/.cache" \ 61 | --mount "type=volume,source=crates,destination=/home/.cargo/registry" \ 62 | --mount "type=volume,source=git-crates,destination=/home/.cargo/git" \ 63 | ${CONDITIONAL_HOST_MOUNTS} \ 64 | -w "${MOUNT_DEST}" "${IMG}" "$@" 65 | -------------------------------------------------------------------------------- /files/common/scripts/tracing.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # WARNING: DO NOT EDIT, THIS FILE IS PROBABLY A COPY 4 | # 5 | # The original version of this file is located in the https://github.com/istio/common-files repo. 6 | # If you're looking at this file in a different repo and want to make a change, please go to the 7 | # common-files repo, make the change there and check it in. Then come back to this repo and run 8 | # "make update-common". 9 | 10 | # Copyright Istio Authors 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | 24 | # Usage: tracing::extract_prow_trace. 25 | # If running in a prow job, this sets the parent trace to the same value Prow tracing will use, as defined in https://github.com/kubernetes/test-infra/issues/30010 26 | function tracing::extract_prow_trace() { 27 | if [[ "${PROW_JOB_ID:-}" != "" ]]; then 28 | local trace 29 | trace="$(<<< "$PROW_JOB_ID" tr -d '\-')" 30 | local span 31 | span="${trace:0:16}" 32 | export TRACEPARENT="01-${trace}-${span}-00" 33 | fi 34 | } 35 | 36 | function _genattrs() { 37 | # No upstream standard, so copy from https://github.com/jenkinsci/opentelemetry-plugin/blob/master/docs/job-traces.md 38 | if [[ -n "${PULL_NUMBER:=}" ]] 39 | then 40 | # Presubmit 41 | url="https://prow.istio.io/view/gs/istio-prow/pr-logs/pull/${REPO_OWNER}_${REPO_NAME}/${PULL_NUMBER}/${JOB_NAME}/${BUILD_ID}," 42 | else 43 | # Postsubmit or periodic 44 | url="https://prow.istio.io/view/gs/istio-prow/pr-logs/${JOB_NAME}/${BUILD_ID}," 45 | fi 46 | # Use printf instead of echo to avoid spaces between args 47 | printf '%s' "ci.pipeline.id=${JOB_NAME},"\ 48 | "ci.pipeline.type=${JOB_TYPE},"\ 49 | "ci.pipeline.run.url=${url}"\ 50 | "ci.pipeline.run.number=${BUILD_ID},"\ 51 | "ci.pipeline.run.id=${PROW_JOB_ID},"\ 52 | "ci.pipeline.run.repo=${REPO_OWNER:-unknown}/${REPO_NAME:-unknown},"\ 53 | "ci.pipeline.run.base=${PULL_BASE_REF:-none},"\ 54 | "ci.pipeline.run.pull_number=${PULL_NUMBER:-none},"\ 55 | "ci.pipeline.run.pull_sha=${PULL_PULL_SHA:-${PULL_BASE_SHA:-none}}" 56 | } 57 | 58 | # Usage: tracing::run [command ...] 59 | function tracing::run() { 60 | # If not running in a prow job or otel-cli is not available (e.g. build system without otel-cli) just run the command 61 | if [ -z "${JOB_NAME:-}" ] || ! command -v otel-cli &> /dev/null 62 | then 63 | "${@:2}" 64 | return "$?" 65 | fi 66 | 67 | # Disable execution tracing to avoid noise 68 | { [[ $- = *x* ]] && was_execution_trace=1 || was_execution_trace=0; } 2>/dev/null 69 | { set +x; } 2>/dev/null 70 | # Throughout, "local" usage is critical to avoid nested calls overwriting things 71 | local start 72 | start="$(date -u +%s.%N)" 73 | # First, get a trace and span ID. We need to get one now so we can propagate it to the child 74 | # Get trace ID from TRACEPARENT, if present 75 | local tid 76 | tid="$(<<<"${TRACEPARENT:-}" cut -d- -f2)" 77 | tid="${tid:-"$(tr -dc 'a-f0-9' < /dev/urandom | head -c 32)"}" 78 | # Always generate a new span ID 79 | local sid 80 | sid="$(tr -dc 'a-f0-9' < /dev/urandom | head -c 16)" 81 | 82 | # Execute the command they wanted with the propagation through TRACEPARENT 83 | if [[ $was_execution_trace == 1 ]]; then 84 | { set -x; } 2>/dev/null 85 | fi 86 | 87 | TRACEPARENT="00-${tid}-${sid}-01" "${@:2}" 88 | local result="$?" 89 | { set +x; } 2>/dev/null 90 | 91 | local end 92 | end="$(date -u +%s.%N)" 93 | 94 | # Now report this span. We override the IDs to the ones we set before. 95 | otel-cli span \ 96 | --service "${BASH_SOURCE[-1]}" \ 97 | --name "$1" \ 98 | --start "$start" \ 99 | --end "$end" \ 100 | --force-trace-id "$tid" \ 101 | --force-span-id "$sid" \ 102 | --attrs "$(_genattrs)" 103 | if [[ $was_execution_trace == 1 ]]; then 104 | { set -x; } 2>/dev/null 105 | fi 106 | return "$result" 107 | } 108 | 109 | # Usage: tracing::decorate 110 | # Automatically makes a function traced. 111 | function tracing::decorate() { 112 | eval "\ 113 | function $1() { 114 | _$(typeset -f "$1") 115 | tracing::run '$1' _$1 116 | } 117 | " 118 | } 119 | -------------------------------------------------------------------------------- /get_protos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright Istio Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # This scripts obtains proto files used by the Istio project from upstream 18 | # locations. The proto file's repository is pinned. The pinned protos 19 | # are then copied into a directory called "protos". 20 | 21 | REPODIR="$(pwd)" 22 | 23 | # Temporary directories securely created 24 | TEMPDIR_PROTOCOLBUFFERS="$(mktemp -d /tmp/google-XXXXXXXX)" 25 | TEMPDIR_GOOGLEAPIS="$(mktemp -d /tmp/googleapis-XXXXXXXX)" 26 | TEMPDIR_API="$(mktemp -d /tmp/api-XXXXXXXX)" 27 | TEMPDIR_APIMACHINERY="$(mktemp -d /tmp/apimachinery-XXXXXXXX)" 28 | TEMPDIR_PROTOCGENVALIDATE="$(mktemp -d /tmp/genvalidate-XXXXXXXX)" 29 | TEMPDIR_OPENCENSUS="$(mktemp -d /tmp/opencensus-XXXXXXXX)" 30 | TEMPDIR_PROMETHEUS="$(mktemp -d /tmp/prometheus-XXXXXXXX)" 31 | 32 | # Upstream GIT tags or branches used for protobufs by repo 33 | PROTOCOLBUFFERS_TAG="516f8b15603b7f7613e2fb957c55bc56a36b64a6" 34 | GOOGLEAPIS_TAG="e121a35579e73377f998c11bcc09ba0486736404" 35 | 36 | API_TAG="v0.29.0" 37 | APIMACHINERY_TAG="v0.29.0" 38 | 39 | rm -fr common-protos 40 | mkdir common-protos 41 | 42 | # Copy istio extension protobufs 43 | echo "istio.io/*" 44 | cp -a "${REPODIR}"/protos/istio.io "${REPODIR}"/common-protos/istio.io 45 | 46 | # Retrieve a copy of Googles's protobufs 47 | echo "google/*" 48 | pushd "${TEMPDIR_PROTOCOLBUFFERS}" >/dev/null || exit 49 | git clone -q --single-branch --branch main https://github.com/protocolbuffers/protobuf.git 50 | pushd protobuf >/dev/null || exit 51 | git checkout -q "${PROTOCOLBUFFERS_TAG}" 52 | popd >/dev/null || exit 53 | pushd protobuf/src/google >/dev/null || exit 54 | find . -name \*proto | cpio --quiet -pdm "${REPODIR}"/common-protos/google 55 | popd >/dev/null || exit 56 | popd >/dev/null || exit 57 | 58 | # Retrieve a copy of Googles's protobufs including api, rpc, and type 59 | echo "google/*/*" 60 | pushd "${TEMPDIR_GOOGLEAPIS}" >/dev/null || exit 61 | git clone -q --single-branch --branch master https://github.com/googleapis/googleapis.git 62 | pushd googleapis >/dev/null || exit 63 | git checkout -q "${GOOGLEAPIS_TAG}" 64 | popd >/dev/null || exit 65 | pushd googleapis/google/api >/dev/null || exit 66 | find . -name \*proto | cpio --quiet -pdm "${REPODIR}"/common-protos/google/api 67 | popd >/dev/null || exit 68 | pushd googleapis/google/rpc >/dev/null || exit 69 | find . -name \*proto | cpio --quiet -pdm "${REPODIR}"/common-protos/google/rpc 70 | popd >/dev/null || exit 71 | pushd googleapis/google/type >/dev/null || exit 72 | find . -name \*proto | cpio --quiet -pdm "${REPODIR}"/common-protos/google/type 73 | popd >/dev/null || exit 74 | popd >/dev/null || exit 75 | 76 | # Retrieve a copy of K8s api proto files 77 | echo "k8s.io/api" 78 | pushd "${TEMPDIR_API}" >/dev/null || exit 79 | git clone -q https://github.com/kubernetes/api.git 80 | pushd api >/dev/null || exit 81 | git checkout -q "${API_TAG}" 82 | popd >/dev/null || exit 83 | find . -name \*proto | cpio --quiet -pdm "${REPODIR}"/common-protos/k8s.io 84 | popd >/dev/null || exit 85 | 86 | # Retrieve a copy of K8s apimachinery proto files 87 | echo "k8s.io/apimachinery" 88 | pushd "${TEMPDIR_APIMACHINERY}" >/dev/null || exit 89 | git clone -q https://github.com/kubernetes/apimachinery.git 90 | pushd apimachinery >/dev/null || exit 91 | git checkout -q ${APIMACHINERY_TAG} 92 | popd >/dev/null || exit 93 | find . -name \*proto | cpio --quiet -pdm "${REPODIR}"/common-protos/k8s.io 94 | popd >/dev/null || exit 95 | 96 | 97 | # Clean up junk that is not needed 98 | find common-protos -name vendor -exec rm -rf {} \; > /dev/null 2>&1 99 | find common-protos -name \*test\* -exec rm -rf {} \; > /dev/null 2>&1 100 | find common-protos -name \*ruby\* -exec rm -rf {} \; > /dev/null 2>&1 101 | 102 | # Clean up temporary directories 103 | rm -rf "${TEMPDIR_GOOGLE}" > /dev/null 2>&1 104 | rm -rf "${TEMPDIR_GOOGLEAPIS}" > /dev/null 2>&1 105 | rm -rf "${TEMPDIR_API}" > /dev/null 2>&1 106 | rm -rf "${TEMPDIR_APIMACHINERY}" > /dev/null 2>&1 107 | -------------------------------------------------------------------------------- /protos/istio.io/extensions/field_rules.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2019 Istio Authors 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 | 17 | package istio.extensions; 18 | 19 | option go_package="istio.io/api/extensions"; 20 | 21 | import "google/protobuf/descriptor.proto"; 22 | 23 | // Values applied at the field level. 24 | extend google.protobuf.FieldOptions { 25 | FieldRules rules = 1200; 26 | } 27 | 28 | // Field rules for a particular type. 29 | // Currently only primitive types of OpenAPI schemas are included. (https://swagger.io/docs/specification/data-models/data-types) 30 | message FieldRules { 31 | oneof type { 32 | FloatRules float = 1; 33 | DoubleRules double = 2; 34 | StringRules string = 3; 35 | BoolRules bool = 4; 36 | Int32Rules int32 = 5; 37 | Int64Rules int64 = 6; 38 | } 39 | } 40 | 41 | // FloatRules describe the rules for the float type. 42 | message FloatRules { 43 | float default = 1; 44 | } 45 | 46 | // DoubleRules describe the rules for the double type. 47 | message DoubleRules { 48 | double default = 1; 49 | } 50 | 51 | // StringRules describe the rules for the string type. 52 | message StringRules { 53 | string default = 1; 54 | // The regular expression the field must match against (RE2 syntax). 55 | string pattern = 2; 56 | } 57 | 58 | // BoolRules describe the rules for the bool type. 59 | message BoolRules { 60 | bool default = 1; 61 | } 62 | 63 | // Int32Rules describe the rules for the int32 type. 64 | message Int32Rules { 65 | int32 default = 1; 66 | } 67 | 68 | // Int64Rules describe the rules for the int64 type. 69 | message Int64Rules { 70 | int64 default = 1; 71 | } --------------------------------------------------------------------------------