From dbc38add5513015aaf32ee19228f613877e961b6 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 17 Jan 2019 20:42:55 -0800 Subject: [PATCH 1/6] add direct response Signed-off-by: Kuat Yessenov --- mixer/v1/istio.mixer.v1.pb.html | 2 +- mixer/v1/mixer.pb.go | 2 +- mixer/v1/mixer.proto | 2 +- policy/v1beta1/cfg.pb.go | 8 +- policy/v1beta1/cfg.proto | 6 +- policy/v1beta1/http_response.proto | 96 +++++ policy/v1beta1/istio.policy.v1beta1.pb.html | 345 +++++++++++++++- .../policy/v1beta1/http_response_pb2.py | 379 ++++++++++++++++++ 8 files changed, 827 insertions(+), 13 deletions(-) create mode 100644 policy/v1beta1/http_response.proto create mode 100644 python/istio_api/policy/v1beta1/http_response_pb2.py diff --git a/mixer/v1/istio.mixer.v1.pb.html b/mixer/v1/istio.mixer.v1.pb.html index 442d9ccace..43ed3b88a8 100644 --- a/mixer/v1/istio.mixer.v1.pb.html +++ b/mixer/v1/istio.mixer.v1.pb.html @@ -800,7 +800,7 @@

ReportResponse

RouteDirective

Expresses the routing manipulation actions to be performed on behalf of -Mixer in response to a successful precondition check.

+Mixer in response to a precondition check.

diff --git a/mixer/v1/mixer.pb.go b/mixer/v1/mixer.pb.go index 0f6c334879..915e3b31e2 100644 --- a/mixer/v1/mixer.pb.go +++ b/mixer/v1/mixer.pb.go @@ -230,7 +230,7 @@ func (*HeaderOperation) ProtoMessage() {} func (*HeaderOperation) Descriptor() ([]byte, []int) { return fileDescriptorMixer, []int{3} } // Expresses the routing manipulation actions to be performed on behalf of -// Mixer in response to a successful precondition check. +// Mixer in response to a precondition check. type RouteDirective struct { // Operations on the request headers. RequestHeaderOperations []HeaderOperation `protobuf:"bytes,1,rep,name=request_header_operations,json=requestHeaderOperations" json:"request_header_operations"` diff --git a/mixer/v1/mixer.proto b/mixer/v1/mixer.proto index 8d95d91ed0..461d3e2a35 100644 --- a/mixer/v1/mixer.proto +++ b/mixer/v1/mixer.proto @@ -202,7 +202,7 @@ message HeaderOperation { } // Expresses the routing manipulation actions to be performed on behalf of -// Mixer in response to a successful precondition check. +// Mixer in response to a precondition check. message RouteDirective { // Operations on the request headers. repeated HeaderOperation request_header_operations = 1 [(gogoproto.nullable) = false]; diff --git a/policy/v1beta1/cfg.pb.go b/policy/v1beta1/cfg.pb.go index c20dc5f660..9107e53be9 100644 --- a/policy/v1beta1/cfg.pb.go +++ b/policy/v1beta1/cfg.pb.go @@ -6,6 +6,7 @@ It is generated from these files: policy/v1beta1/cfg.proto + policy/v1beta1/http_response.proto policy/v1beta1/type.proto policy/v1beta1/value_type.proto @@ -24,6 +25,7 @@ Tls OAuth Mutual + DirectHttpResponse Value IPAddress Duration @@ -267,7 +269,7 @@ func (m *AttributeManifest_AttributeInfo) GetValueType() ValueType { // instance constructed using the 'RequestCountByService' instance. // // ```yaml -// - match: destination.service == "*" +// - match: match(destination.service.host, "*") // actions: // - handler: prometheus-handler // instances: @@ -282,7 +284,7 @@ type Rule struct { // // * an empty match evaluates to `true` // * `true`, a boolean literal; a rule with this match will always be executed - // * `destination.service == ratings*` selects any request targeting a service whose + // * `match(destination.service.host, "ratings.*)` selects any request targeting a service whose // name starts with "ratings" // * `attr1 == "20" && attr2 == "30"` logical AND, OR, and NOT are also available Match string `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` @@ -458,7 +460,7 @@ func (m *Action) GetName() string { // params: // value: 1 // dimensions: -// source: source.service +// source: source.name // destination_ip: destination.ip // ``` type Instance struct { diff --git a/policy/v1beta1/cfg.proto b/policy/v1beta1/cfg.proto index aba4752692..248ebad308 100644 --- a/policy/v1beta1/cfg.proto +++ b/policy/v1beta1/cfg.proto @@ -104,7 +104,7 @@ message AttributeManifest { // instance constructed using the 'RequestCountByService' instance. // // ```yaml -// - match: destination.service == "*" +// - match: match(destination.service.host, "*") // actions: // - handler: prometheus-handler // instances: @@ -119,7 +119,7 @@ message Rule { // // * an empty match evaluates to `true` // * `true`, a boolean literal; a rule with this match will always be executed - // * `destination.service == ratings*` selects any request targeting a service whose + // * `match(destination.service.host, "ratings.*)` selects any request targeting a service whose // name starts with "ratings" // * `attr1 == "20" && attr2 == "30"` logical AND, OR, and NOT are also available string match = 1; @@ -225,7 +225,7 @@ message Action { // params: // value: 1 // dimensions: -// source: source.service +// source: source.name // destination_ip: destination.ip // ``` message Instance { diff --git a/policy/v1beta1/http_response.proto b/policy/v1beta1/http_response.proto new file mode 100644 index 0000000000..3a549784d2 --- /dev/null +++ b/policy/v1beta1/http_response.proto @@ -0,0 +1,96 @@ +// Copyright 2019 Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package istio.policy.v1beta1; + +// Direct HTTP response for a client-facing error message which can be attached +// to an RPC error. +message DirectHttpResponse { + // Optional HTTP status code. If not set, RPC error code is used. + HttpStatusCode code = 1; + + // HTTP response body. + string body = 2; +} + +// HTTP response codes. +// For more details: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml +enum HttpStatusCode { + // Empty - This code not part of the HTTP status code specification, but it is needed for proto + // `enum` type. + Empty = 0; + + Continue = 100; + + OK = 200; + Created = 201; + Accepted = 202; + NonAuthoritativeInformation = 203; + NoContent = 204; + ResetContent = 205; + PartialContent = 206; + MultiStatus = 207; + AlreadyReported = 208; + IMUsed = 226; + + MultipleChoices = 300; + MovedPermanently = 301; + Found = 302; + SeeOther = 303; + NotModified = 304; + UseProxy = 305; + TemporaryRedirect = 307; + PermanentRedirect = 308; + + BadRequest = 400; + Unauthorized = 401; + PaymentRequired = 402; + Forbidden = 403; + NotFound = 404; + MethodNotAllowed = 405; + NotAcceptable = 406; + ProxyAuthenticationRequired = 407; + RequestTimeout = 408; + Conflict = 409; + Gone = 410; + LengthRequired = 411; + PreconditionFailed = 412; + PayloadTooLarge = 413; + URITooLong = 414; + UnsupportedMediaType = 415; + RangeNotSatisfiable = 416; + ExpectationFailed = 417; + MisdirectedRequest = 421; + UnprocessableEntity = 422; + Locked = 423; + FailedDependency = 424; + UpgradeRequired = 426; + PreconditionRequired = 428; + TooManyRequests = 429; + RequestHeaderFieldsTooLarge = 431; + + InternalServerError = 500; + NotImplemented = 501; + BadGateway = 502; + ServiceUnavailable = 503; + GatewayTimeout = 504; + HTTPVersionNotSupported = 505; + VariantAlsoNegotiates = 506; + InsufficientStorage = 507; + LoopDetected = 508; + NotExtended = 510; + NetworkAuthenticationRequired = 511; +} diff --git a/policy/v1beta1/istio.policy.v1beta1.pb.html b/policy/v1beta1/istio.policy.v1beta1.pb.html index 39c716a87e..2c74519d4f 100644 --- a/policy/v1beta1/istio.policy.v1beta1.pb.html +++ b/policy/v1beta1/istio.policy.v1beta1.pb.html @@ -4,7 +4,7 @@ location: https://istio.io/docs/reference/config/policy-and-telemetry/istio.policy.v1beta1.html layout: protoc-gen-docs generator: protoc-gen-docs -number_of_entries: 23 +number_of_entries: 25 ---

Describes the rules used to configure Mixer’s policy and telemetry features.

@@ -288,6 +288,39 @@

DNSName

+ + +

DNSName encoded as string.

+
+
+

DirectHttpResponse

+
+

Direct HTTP response for a client-facing error message which can be attached +to an RPC error.

+ + + + + + + + + + + + + + + + + + + @@ -493,6 +526,310 @@

Handler

Optional. Information on how to connect to the out-of-process adapter. This is used if the adapter is not compiled into Mixer binary and is running as a separate process.

+ + + +
FieldTypeDescription
codeHttpStatusCode +

Optional HTTP status code. If not set, RPC error code is used.

+ +
bodystring +

HTTP response body.

+
+
+

HttpStatusCode

+
+

HTTP response codes. +For more details: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -544,7 +881,7 @@

Instance

params: value: 1 dimensions: - source: source.service + source: source.name destination_ip: destination.ip @@ -731,7 +1068,7 @@

Rule

The following example instructs Mixer to invoke ‘prometheus-handler’ handler for all services and pass it the instance constructed using the ‘RequestCountByService’ instance.

-
- match: destination.service == "*"
+
- match: match(destination.service.host, "*")
   actions:
   - handler: prometheus-handler
     instances:
@@ -760,7 +1097,7 @@ 

Rule

  • an empty match evaluates to true
  • true, a boolean literal; a rule with this match will always be executed
  • -
  • destination.service == ratings* selects any request targeting a service whose +
  • match(destination.service.host, "ratings.*) selects any request targeting a service whose name starts with “ratings”
  • attr1 == "20" && attr2 == "30" logical AND, OR, and NOT are also available
diff --git a/python/istio_api/policy/v1beta1/http_response_pb2.py b/python/istio_api/policy/v1beta1/http_response_pb2.py new file mode 100644 index 0000000000..ba159377d0 --- /dev/null +++ b/python/istio_api/policy/v1beta1/http_response_pb2.py @@ -0,0 +1,379 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: policy/v1beta1/http_response.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='policy/v1beta1/http_response.proto', + package='istio.policy.v1beta1', + syntax='proto3', + serialized_pb=_b('\n\"policy/v1beta1/http_response.proto\x12\x14istio.policy.v1beta1\"V\n\x12\x44irectHttpResponse\x12\x32\n\x04\x63ode\x18\x01 \x01(\x0e\x32$.istio.policy.v1beta1.HttpStatusCode\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t*\xb9\t\n\x0eHttpStatusCode\x12\t\n\x05\x45mpty\x10\x00\x12\x0c\n\x08\x43ontinue\x10\x64\x12\x07\n\x02OK\x10\xc8\x01\x12\x0c\n\x07\x43reated\x10\xc9\x01\x12\r\n\x08\x41\x63\x63\x65pted\x10\xca\x01\x12 \n\x1bNonAuthoritativeInformation\x10\xcb\x01\x12\x0e\n\tNoContent\x10\xcc\x01\x12\x11\n\x0cResetContent\x10\xcd\x01\x12\x13\n\x0ePartialContent\x10\xce\x01\x12\x10\n\x0bMultiStatus\x10\xcf\x01\x12\x14\n\x0f\x41lreadyReported\x10\xd0\x01\x12\x0b\n\x06IMUsed\x10\xe2\x01\x12\x14\n\x0fMultipleChoices\x10\xac\x02\x12\x15\n\x10MovedPermanently\x10\xad\x02\x12\n\n\x05\x46ound\x10\xae\x02\x12\r\n\x08SeeOther\x10\xaf\x02\x12\x10\n\x0bNotModified\x10\xb0\x02\x12\r\n\x08UseProxy\x10\xb1\x02\x12\x16\n\x11TemporaryRedirect\x10\xb3\x02\x12\x16\n\x11PermanentRedirect\x10\xb4\x02\x12\x0f\n\nBadRequest\x10\x90\x03\x12\x11\n\x0cUnauthorized\x10\x91\x03\x12\x14\n\x0fPaymentRequired\x10\x92\x03\x12\x0e\n\tForbidden\x10\x93\x03\x12\r\n\x08NotFound\x10\x94\x03\x12\x15\n\x10MethodNotAllowed\x10\x95\x03\x12\x12\n\rNotAcceptable\x10\x96\x03\x12 \n\x1bProxyAuthenticationRequired\x10\x97\x03\x12\x13\n\x0eRequestTimeout\x10\x98\x03\x12\r\n\x08\x43onflict\x10\x99\x03\x12\t\n\x04Gone\x10\x9a\x03\x12\x13\n\x0eLengthRequired\x10\x9b\x03\x12\x17\n\x12PreconditionFailed\x10\x9c\x03\x12\x14\n\x0fPayloadTooLarge\x10\x9d\x03\x12\x0f\n\nURITooLong\x10\x9e\x03\x12\x19\n\x14UnsupportedMediaType\x10\x9f\x03\x12\x18\n\x13RangeNotSatisfiable\x10\xa0\x03\x12\x16\n\x11\x45xpectationFailed\x10\xa1\x03\x12\x17\n\x12MisdirectedRequest\x10\xa5\x03\x12\x18\n\x13UnprocessableEntity\x10\xa6\x03\x12\x0b\n\x06Locked\x10\xa7\x03\x12\x15\n\x10\x46\x61iledDependency\x10\xa8\x03\x12\x14\n\x0fUpgradeRequired\x10\xaa\x03\x12\x19\n\x14PreconditionRequired\x10\xac\x03\x12\x14\n\x0fTooManyRequests\x10\xad\x03\x12 \n\x1bRequestHeaderFieldsTooLarge\x10\xaf\x03\x12\x18\n\x13InternalServerError\x10\xf4\x03\x12\x13\n\x0eNotImplemented\x10\xf5\x03\x12\x0f\n\nBadGateway\x10\xf6\x03\x12\x17\n\x12ServiceUnavailable\x10\xf7\x03\x12\x13\n\x0eGatewayTimeout\x10\xf8\x03\x12\x1c\n\x17HTTPVersionNotSupported\x10\xf9\x03\x12\x1a\n\x15VariantAlsoNegotiates\x10\xfa\x03\x12\x18\n\x13InsufficientStorage\x10\xfb\x03\x12\x11\n\x0cLoopDetected\x10\xfc\x03\x12\x10\n\x0bNotExtended\x10\xfe\x03\x12\"\n\x1dNetworkAuthenticationRequired\x10\xff\x03\x62\x06proto3') +) + +_HTTPSTATUSCODE = _descriptor.EnumDescriptor( + name='HttpStatusCode', + full_name='istio.policy.v1beta1.HttpStatusCode', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='Empty', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Continue', index=1, number=100, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='OK', index=2, number=200, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Created', index=3, number=201, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Accepted', index=4, number=202, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NonAuthoritativeInformation', index=5, number=203, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NoContent', index=6, number=204, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ResetContent', index=7, number=205, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PartialContent', index=8, number=206, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MultiStatus', index=9, number=207, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='AlreadyReported', index=10, number=208, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='IMUsed', index=11, number=226, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MultipleChoices', index=12, number=300, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MovedPermanently', index=13, number=301, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Found', index=14, number=302, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='SeeOther', index=15, number=303, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotModified', index=16, number=304, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UseProxy', index=17, number=305, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='TemporaryRedirect', index=18, number=307, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PermanentRedirect', index=19, number=308, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BadRequest', index=20, number=400, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Unauthorized', index=21, number=401, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PaymentRequired', index=22, number=402, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Forbidden', index=23, number=403, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotFound', index=24, number=404, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MethodNotAllowed', index=25, number=405, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotAcceptable', index=26, number=406, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ProxyAuthenticationRequired', index=27, number=407, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='RequestTimeout', index=28, number=408, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Conflict', index=29, number=409, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Gone', index=30, number=410, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='LengthRequired', index=31, number=411, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PreconditionFailed', index=32, number=412, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PayloadTooLarge', index=33, number=413, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='URITooLong', index=34, number=414, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UnsupportedMediaType', index=35, number=415, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='RangeNotSatisfiable', index=36, number=416, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ExpectationFailed', index=37, number=417, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MisdirectedRequest', index=38, number=421, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UnprocessableEntity', index=39, number=422, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='Locked', index=40, number=423, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='FailedDependency', index=41, number=424, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UpgradeRequired', index=42, number=426, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PreconditionRequired', index=43, number=428, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='TooManyRequests', index=44, number=429, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='RequestHeaderFieldsTooLarge', index=45, number=431, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='InternalServerError', index=46, number=500, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotImplemented', index=47, number=501, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BadGateway', index=48, number=502, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ServiceUnavailable', index=49, number=503, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='GatewayTimeout', index=50, number=504, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='HTTPVersionNotSupported', index=51, number=505, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='VariantAlsoNegotiates', index=52, number=506, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='InsufficientStorage', index=53, number=507, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='LoopDetected', index=54, number=508, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NotExtended', index=55, number=510, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='NetworkAuthenticationRequired', index=56, number=511, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=149, + serialized_end=1358, +) +_sym_db.RegisterEnumDescriptor(_HTTPSTATUSCODE) + +HttpStatusCode = enum_type_wrapper.EnumTypeWrapper(_HTTPSTATUSCODE) +Empty = 0 +Continue = 100 +OK = 200 +Created = 201 +Accepted = 202 +NonAuthoritativeInformation = 203 +NoContent = 204 +ResetContent = 205 +PartialContent = 206 +MultiStatus = 207 +AlreadyReported = 208 +IMUsed = 226 +MultipleChoices = 300 +MovedPermanently = 301 +Found = 302 +SeeOther = 303 +NotModified = 304 +UseProxy = 305 +TemporaryRedirect = 307 +PermanentRedirect = 308 +BadRequest = 400 +Unauthorized = 401 +PaymentRequired = 402 +Forbidden = 403 +NotFound = 404 +MethodNotAllowed = 405 +NotAcceptable = 406 +ProxyAuthenticationRequired = 407 +RequestTimeout = 408 +Conflict = 409 +Gone = 410 +LengthRequired = 411 +PreconditionFailed = 412 +PayloadTooLarge = 413 +URITooLong = 414 +UnsupportedMediaType = 415 +RangeNotSatisfiable = 416 +ExpectationFailed = 417 +MisdirectedRequest = 421 +UnprocessableEntity = 422 +Locked = 423 +FailedDependency = 424 +UpgradeRequired = 426 +PreconditionRequired = 428 +TooManyRequests = 429 +RequestHeaderFieldsTooLarge = 431 +InternalServerError = 500 +NotImplemented = 501 +BadGateway = 502 +ServiceUnavailable = 503 +GatewayTimeout = 504 +HTTPVersionNotSupported = 505 +VariantAlsoNegotiates = 506 +InsufficientStorage = 507 +LoopDetected = 508 +NotExtended = 510 +NetworkAuthenticationRequired = 511 + + + +_DIRECTHTTPRESPONSE = _descriptor.Descriptor( + name='DirectHttpResponse', + full_name='istio.policy.v1beta1.DirectHttpResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='code', full_name='istio.policy.v1beta1.DirectHttpResponse.code', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='body', full_name='istio.policy.v1beta1.DirectHttpResponse.body', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=60, + serialized_end=146, +) + +_DIRECTHTTPRESPONSE.fields_by_name['code'].enum_type = _HTTPSTATUSCODE +DESCRIPTOR.message_types_by_name['DirectHttpResponse'] = _DIRECTHTTPRESPONSE +DESCRIPTOR.enum_types_by_name['HttpStatusCode'] = _HTTPSTATUSCODE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +DirectHttpResponse = _reflection.GeneratedProtocolMessageType('DirectHttpResponse', (_message.Message,), dict( + DESCRIPTOR = _DIRECTHTTPRESPONSE, + __module__ = 'policy.v1beta1.http_response_pb2' + # @@protoc_insertion_point(class_scope:istio.policy.v1beta1.DirectHttpResponse) + )) +_sym_db.RegisterMessage(DirectHttpResponse) + + +# @@protoc_insertion_point(module_scope) From 6ed16974207cec8ba6e3b74d7943e51ba685e403 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 17 Jan 2019 20:57:24 -0800 Subject: [PATCH 2/6] linter Signed-off-by: Kuat Yessenov --- policy/v1beta1/http_response.pb.go | 644 ++++++++++++++++++ policy/v1beta1/http_response.proto | 2 + .../policy/v1beta1/http_response_pb2.py | 4 +- 3 files changed, 649 insertions(+), 1 deletion(-) create mode 100644 policy/v1beta1/http_response.pb.go diff --git a/policy/v1beta1/http_response.pb.go b/policy/v1beta1/http_response.pb.go new file mode 100644 index 0000000000..fccb5b5b05 --- /dev/null +++ b/policy/v1beta1/http_response.pb.go @@ -0,0 +1,644 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: policy/v1beta1/http_response.proto + +package v1beta1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// HTTP response codes. +// For more details: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml +type HttpStatusCode int32 + +const ( + // Empty - This code not part of the HTTP status code specification, but it is needed for proto + // `enum` type. + Empty HttpStatusCode = 0 + Continue HttpStatusCode = 100 + OK HttpStatusCode = 200 + Created HttpStatusCode = 201 + Accepted HttpStatusCode = 202 + NonAuthoritativeInformation HttpStatusCode = 203 + NoContent HttpStatusCode = 204 + ResetContent HttpStatusCode = 205 + PartialContent HttpStatusCode = 206 + MultiStatus HttpStatusCode = 207 + AlreadyReported HttpStatusCode = 208 + IMUsed HttpStatusCode = 226 + MultipleChoices HttpStatusCode = 300 + MovedPermanently HttpStatusCode = 301 + Found HttpStatusCode = 302 + SeeOther HttpStatusCode = 303 + NotModified HttpStatusCode = 304 + UseProxy HttpStatusCode = 305 + TemporaryRedirect HttpStatusCode = 307 + PermanentRedirect HttpStatusCode = 308 + BadRequest HttpStatusCode = 400 + Unauthorized HttpStatusCode = 401 + PaymentRequired HttpStatusCode = 402 + Forbidden HttpStatusCode = 403 + NotFound HttpStatusCode = 404 + MethodNotAllowed HttpStatusCode = 405 + NotAcceptable HttpStatusCode = 406 + ProxyAuthenticationRequired HttpStatusCode = 407 + RequestTimeout HttpStatusCode = 408 + Conflict HttpStatusCode = 409 + Gone HttpStatusCode = 410 + LengthRequired HttpStatusCode = 411 + PreconditionFailed HttpStatusCode = 412 + PayloadTooLarge HttpStatusCode = 413 + URITooLong HttpStatusCode = 414 + UnsupportedMediaType HttpStatusCode = 415 + RangeNotSatisfiable HttpStatusCode = 416 + ExpectationFailed HttpStatusCode = 417 + MisdirectedRequest HttpStatusCode = 421 + UnprocessableEntity HttpStatusCode = 422 + Locked HttpStatusCode = 423 + FailedDependency HttpStatusCode = 424 + UpgradeRequired HttpStatusCode = 426 + PreconditionRequired HttpStatusCode = 428 + TooManyRequests HttpStatusCode = 429 + RequestHeaderFieldsTooLarge HttpStatusCode = 431 + InternalServerError HttpStatusCode = 500 + NotImplemented HttpStatusCode = 501 + BadGateway HttpStatusCode = 502 + ServiceUnavailable HttpStatusCode = 503 + GatewayTimeout HttpStatusCode = 504 + HTTPVersionNotSupported HttpStatusCode = 505 + VariantAlsoNegotiates HttpStatusCode = 506 + InsufficientStorage HttpStatusCode = 507 + LoopDetected HttpStatusCode = 508 + NotExtended HttpStatusCode = 510 + NetworkAuthenticationRequired HttpStatusCode = 511 +) + +var HttpStatusCode_name = map[int32]string{ + 0: "Empty", + 100: "Continue", + 200: "OK", + 201: "Created", + 202: "Accepted", + 203: "NonAuthoritativeInformation", + 204: "NoContent", + 205: "ResetContent", + 206: "PartialContent", + 207: "MultiStatus", + 208: "AlreadyReported", + 226: "IMUsed", + 300: "MultipleChoices", + 301: "MovedPermanently", + 302: "Found", + 303: "SeeOther", + 304: "NotModified", + 305: "UseProxy", + 307: "TemporaryRedirect", + 308: "PermanentRedirect", + 400: "BadRequest", + 401: "Unauthorized", + 402: "PaymentRequired", + 403: "Forbidden", + 404: "NotFound", + 405: "MethodNotAllowed", + 406: "NotAcceptable", + 407: "ProxyAuthenticationRequired", + 408: "RequestTimeout", + 409: "Conflict", + 410: "Gone", + 411: "LengthRequired", + 412: "PreconditionFailed", + 413: "PayloadTooLarge", + 414: "URITooLong", + 415: "UnsupportedMediaType", + 416: "RangeNotSatisfiable", + 417: "ExpectationFailed", + 421: "MisdirectedRequest", + 422: "UnprocessableEntity", + 423: "Locked", + 424: "FailedDependency", + 426: "UpgradeRequired", + 428: "PreconditionRequired", + 429: "TooManyRequests", + 431: "RequestHeaderFieldsTooLarge", + 500: "InternalServerError", + 501: "NotImplemented", + 502: "BadGateway", + 503: "ServiceUnavailable", + 504: "GatewayTimeout", + 505: "HTTPVersionNotSupported", + 506: "VariantAlsoNegotiates", + 507: "InsufficientStorage", + 508: "LoopDetected", + 510: "NotExtended", + 511: "NetworkAuthenticationRequired", +} +var HttpStatusCode_value = map[string]int32{ + "Empty": 0, + "Continue": 100, + "OK": 200, + "Created": 201, + "Accepted": 202, + "NonAuthoritativeInformation": 203, + "NoContent": 204, + "ResetContent": 205, + "PartialContent": 206, + "MultiStatus": 207, + "AlreadyReported": 208, + "IMUsed": 226, + "MultipleChoices": 300, + "MovedPermanently": 301, + "Found": 302, + "SeeOther": 303, + "NotModified": 304, + "UseProxy": 305, + "TemporaryRedirect": 307, + "PermanentRedirect": 308, + "BadRequest": 400, + "Unauthorized": 401, + "PaymentRequired": 402, + "Forbidden": 403, + "NotFound": 404, + "MethodNotAllowed": 405, + "NotAcceptable": 406, + "ProxyAuthenticationRequired": 407, + "RequestTimeout": 408, + "Conflict": 409, + "Gone": 410, + "LengthRequired": 411, + "PreconditionFailed": 412, + "PayloadTooLarge": 413, + "URITooLong": 414, + "UnsupportedMediaType": 415, + "RangeNotSatisfiable": 416, + "ExpectationFailed": 417, + "MisdirectedRequest": 421, + "UnprocessableEntity": 422, + "Locked": 423, + "FailedDependency": 424, + "UpgradeRequired": 426, + "PreconditionRequired": 428, + "TooManyRequests": 429, + "RequestHeaderFieldsTooLarge": 431, + "InternalServerError": 500, + "NotImplemented": 501, + "BadGateway": 502, + "ServiceUnavailable": 503, + "GatewayTimeout": 504, + "HTTPVersionNotSupported": 505, + "VariantAlsoNegotiates": 506, + "InsufficientStorage": 507, + "LoopDetected": 508, + "NotExtended": 510, + "NetworkAuthenticationRequired": 511, +} + +func (HttpStatusCode) EnumDescriptor() ([]byte, []int) { return fileDescriptorHttpResponse, []int{0} } + +// Direct HTTP response for a client-facing error message which can be attached +// to an RPC error. +type DirectHttpResponse struct { + // Optional HTTP status code. If not set, RPC error code is used. + Code HttpStatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=istio.policy.v1beta1.HttpStatusCode" json:"code,omitempty"` + // HTTP response body. + Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` +} + +func (m *DirectHttpResponse) Reset() { *m = DirectHttpResponse{} } +func (*DirectHttpResponse) ProtoMessage() {} +func (*DirectHttpResponse) Descriptor() ([]byte, []int) { return fileDescriptorHttpResponse, []int{0} } + +func (m *DirectHttpResponse) GetCode() HttpStatusCode { + if m != nil { + return m.Code + } + return Empty +} + +func (m *DirectHttpResponse) GetBody() string { + if m != nil { + return m.Body + } + return "" +} + +func init() { + proto.RegisterType((*DirectHttpResponse)(nil), "istio.policy.v1beta1.DirectHttpResponse") + proto.RegisterEnum("istio.policy.v1beta1.HttpStatusCode", HttpStatusCode_name, HttpStatusCode_value) +} +func (x HttpStatusCode) String() string { + s, ok := HttpStatusCode_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *DirectHttpResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DirectHttpResponse) + if !ok { + that2, ok := that.(DirectHttpResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Code != that1.Code { + return false + } + if this.Body != that1.Body { + return false + } + return true +} +func (this *DirectHttpResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&v1beta1.DirectHttpResponse{") + s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n") + s = append(s, "Body: "+fmt.Sprintf("%#v", this.Body)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringHttpResponse(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *DirectHttpResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DirectHttpResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Code != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintHttpResponse(dAtA, i, uint64(m.Code)) + } + if len(m.Body) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintHttpResponse(dAtA, i, uint64(len(m.Body))) + i += copy(dAtA[i:], m.Body) + } + return i, nil +} + +func encodeVarintHttpResponse(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *DirectHttpResponse) Size() (n int) { + var l int + _ = l + if m.Code != 0 { + n += 1 + sovHttpResponse(uint64(m.Code)) + } + l = len(m.Body) + if l > 0 { + n += 1 + l + sovHttpResponse(uint64(l)) + } + return n +} + +func sovHttpResponse(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozHttpResponse(x uint64) (n int) { + return sovHttpResponse(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *DirectHttpResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DirectHttpResponse{`, + `Code:` + fmt.Sprintf("%v", this.Code) + `,`, + `Body:` + fmt.Sprintf("%v", this.Body) + `,`, + `}`, + }, "") + return s +} +func valueToStringHttpResponse(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *DirectHttpResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DirectHttpResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DirectHttpResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= (HttpStatusCode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthHttpResponse + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Body = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipHttpResponse(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthHttpResponse + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipHttpResponse(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthHttpResponse + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpResponse + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipHttpResponse(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthHttpResponse = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowHttpResponse = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("policy/v1beta1/http_response.proto", fileDescriptorHttpResponse) } + +var fileDescriptorHttpResponse = []byte{ + // 967 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4b, 0x6f, 0x5b, 0xc5, + 0x17, 0xcf, 0xf5, 0xa4, 0x8f, 0x4c, 0xd3, 0x74, 0x3a, 0x4d, 0xff, 0xcd, 0x9f, 0xc2, 0x55, 0x14, + 0xb1, 0xa8, 0x58, 0x24, 0x2a, 0x6c, 0xd8, 0xa6, 0x79, 0x34, 0x16, 0xb1, 0x6b, 0x39, 0x76, 0x17, + 0x6c, 0xd0, 0xf8, 0xce, 0xb1, 0x3d, 0xea, 0xf5, 0x9c, 0xdb, 0xb9, 0xc7, 0x49, 0x2e, 0x2b, 0x3e, + 0x42, 0x79, 0xbf, 0x5f, 0x0b, 0xa0, 0x42, 0x2d, 0x05, 0xc1, 0x86, 0x6f, 0x50, 0xde, 0x59, 0xb2, + 0x24, 0x66, 0xc3, 0xb2, 0x0b, 0xde, 0x20, 0x40, 0x33, 0x76, 0xac, 0x56, 0x82, 0x5d, 0xee, 0xc9, + 0xf9, 0x9d, 0xf3, 0x7b, 0x1c, 0x0f, 0x5f, 0xc8, 0x30, 0x35, 0x49, 0xb1, 0xb4, 0x7d, 0xbe, 0x05, + 0xa4, 0xce, 0x2f, 0x75, 0x89, 0xb2, 0x27, 0x1c, 0xe4, 0x19, 0xda, 0x1c, 0x16, 0x33, 0x87, 0x84, + 0x72, 0xd6, 0xe4, 0x64, 0x70, 0x71, 0xd8, 0xb9, 0x38, 0xea, 0x5c, 0x68, 0x71, 0xb9, 0x6a, 0x1c, + 0x24, 0xb4, 0x41, 0x94, 0xd5, 0x47, 0x08, 0xf9, 0x28, 0x9f, 0x4c, 0x50, 0xc3, 0x5c, 0x34, 0x1f, + 0x9d, 0x9b, 0x79, 0xf8, 0xc1, 0xc5, 0x7f, 0x83, 0x2e, 0x7a, 0xc4, 0x16, 0x29, 0xea, 0xe7, 0x2b, + 0xa8, 0xa1, 0x1e, 0x10, 0x52, 0xf2, 0xc9, 0x16, 0xea, 0x62, 0xae, 0x34, 0x1f, 0x9d, 0x9b, 0xaa, + 0x87, 0xbf, 0x1f, 0xfa, 0x74, 0x8a, 0xcf, 0xdc, 0xdb, 0x2c, 0xa7, 0xf8, 0xa1, 0xb5, 0x5e, 0x46, + 0x85, 0x98, 0x90, 0xd3, 0xfc, 0xe8, 0x0a, 0x5a, 0x32, 0xb6, 0x0f, 0x42, 0xcb, 0x23, 0xbc, 0x74, + 0xe9, 0x31, 0x71, 0x3b, 0x92, 0xd3, 0xfc, 0xc8, 0x8a, 0x03, 0x45, 0xa0, 0xc5, 0x67, 0x91, 0x3c, + 0xce, 0x8f, 0x2e, 0x27, 0x09, 0x64, 0xfe, 0xf3, 0xf3, 0x48, 0xce, 0xf3, 0xb3, 0x55, 0xb4, 0xcb, + 0x7d, 0xea, 0xa2, 0x33, 0xa4, 0xc8, 0x6c, 0x43, 0xd9, 0xb6, 0xd1, 0xf5, 0x14, 0x19, 0xb4, 0xe2, + 0x8b, 0x48, 0xce, 0xf0, 0xa9, 0x2a, 0xfa, 0xb9, 0x60, 0x49, 0x7c, 0x19, 0xc9, 0x93, 0x7c, 0xba, + 0x0e, 0x39, 0xd0, 0x41, 0xe9, 0xab, 0x48, 0x9e, 0xe2, 0x33, 0x35, 0xe5, 0xc8, 0xa8, 0xf4, 0xa0, + 0xf8, 0x75, 0x24, 0x05, 0x3f, 0x56, 0xe9, 0xa7, 0x64, 0x86, 0x5c, 0xc5, 0x37, 0x91, 0x9c, 0xe5, + 0x27, 0x96, 0x53, 0x07, 0x4a, 0x17, 0x75, 0xc8, 0xd0, 0x79, 0x06, 0x7b, 0x91, 0x3c, 0xc6, 0x0f, + 0x97, 0x2b, 0xcd, 0x1c, 0xb4, 0x18, 0x84, 0x96, 0x00, 0xca, 0x52, 0x58, 0xe9, 0xa2, 0x49, 0x20, + 0x17, 0x37, 0x4a, 0xf2, 0x34, 0x17, 0x15, 0xdc, 0x06, 0x5d, 0x03, 0xd7, 0x53, 0x16, 0x2c, 0xa5, + 0x85, 0xb8, 0x59, 0x92, 0x9c, 0x1f, 0x5a, 0xc7, 0xbe, 0xd5, 0xe2, 0x83, 0x92, 0x97, 0xb5, 0x05, + 0x70, 0x89, 0xba, 0xe0, 0xc4, 0xad, 0x92, 0x5f, 0x5e, 0x45, 0xaa, 0xa0, 0x36, 0x6d, 0x03, 0x5a, + 0x7c, 0x18, 0x1a, 0x9a, 0x39, 0xd4, 0x1c, 0xee, 0x16, 0xe2, 0xa3, 0x92, 0xfc, 0x1f, 0x3f, 0xd9, + 0x80, 0x5e, 0x86, 0x4e, 0xb9, 0xa2, 0x0e, 0x3a, 0x04, 0x27, 0x3e, 0x0e, 0xf5, 0xf1, 0x96, 0x71, + 0xfd, 0x93, 0x92, 0x3c, 0xc1, 0xf9, 0x05, 0xa5, 0xeb, 0x70, 0xb5, 0x0f, 0x39, 0x89, 0x6b, 0xcc, + 0xdb, 0xd0, 0xb4, 0x6a, 0xe8, 0xdb, 0x93, 0xa0, 0xc5, 0xd3, 0xcc, 0x93, 0xaf, 0xa9, 0xa2, 0x17, + 0x90, 0x57, 0xfb, 0xc6, 0x81, 0x16, 0xcf, 0x30, 0xef, 0xdf, 0x3a, 0xba, 0x96, 0xd1, 0x1a, 0xac, + 0x78, 0x96, 0x79, 0x22, 0x55, 0xa4, 0x21, 0xf1, 0xe7, 0x58, 0xd0, 0x06, 0xd4, 0x45, 0x5d, 0x45, + 0x5a, 0x4e, 0x53, 0xdc, 0x01, 0x2d, 0x9e, 0x67, 0x52, 0xf2, 0xe3, 0xbe, 0x10, 0x92, 0x52, 0xad, + 0x14, 0xc4, 0x0b, 0xcc, 0x67, 0x15, 0xf8, 0xfb, 0xb4, 0xc0, 0x92, 0x49, 0x42, 0x46, 0xe3, 0x5d, + 0x2f, 0x32, 0x1f, 0xc4, 0x88, 0x62, 0xc3, 0xf4, 0x00, 0xfb, 0x24, 0x5e, 0x0a, 0x0b, 0x57, 0xd0, + 0xb6, 0x53, 0x93, 0x90, 0x78, 0x99, 0xc9, 0x29, 0x3e, 0x79, 0x11, 0x2d, 0x88, 0x57, 0x42, 0xfb, + 0x26, 0xd8, 0x0e, 0x75, 0xc7, 0x33, 0x5e, 0x65, 0xf2, 0x0c, 0x97, 0x35, 0x07, 0x09, 0x5a, 0x6d, + 0xfc, 0xf8, 0x75, 0x65, 0x52, 0xd0, 0xe2, 0xb5, 0x03, 0x79, 0x29, 0x2a, 0xdd, 0x40, 0xdc, 0x54, + 0xae, 0x03, 0xe2, 0x75, 0xe6, 0x8d, 0x69, 0xd6, 0xcb, 0xbe, 0x82, 0xb6, 0x23, 0xde, 0x60, 0xf2, + 0xff, 0x7c, 0xb6, 0x69, 0xf3, 0x7e, 0x36, 0x4c, 0xb8, 0x02, 0xda, 0xa8, 0x46, 0x91, 0x81, 0x78, + 0x93, 0xc9, 0x39, 0x7e, 0xaa, 0xae, 0x6c, 0x07, 0xaa, 0x48, 0x5b, 0x8a, 0x4c, 0xde, 0x36, 0x41, + 0xda, 0x5b, 0xcc, 0xdb, 0xbe, 0xb6, 0x9b, 0x41, 0x42, 0xea, 0xae, 0x9d, 0x6f, 0x07, 0x32, 0x15, + 0x93, 0x0f, 0x63, 0x80, 0xb1, 0xfd, 0xef, 0x84, 0x51, 0x4d, 0x9b, 0x39, 0x4c, 0x20, 0xcf, 0xfd, + 0x90, 0x35, 0x4b, 0x86, 0x0a, 0xf1, 0x2e, 0xf3, 0xf7, 0xb4, 0x89, 0xc9, 0x15, 0xd0, 0xe2, 0xbd, + 0xe0, 0xee, 0x70, 0xd8, 0x2a, 0x64, 0x60, 0x35, 0xd8, 0xa4, 0x10, 0xd7, 0x83, 0x94, 0x66, 0xd6, + 0x71, 0x4a, 0xc3, 0x58, 0xf9, 0xfb, 0x81, 0xf9, 0xdd, 0xca, 0xc7, 0xff, 0xba, 0x11, 0x00, 0x0d, + 0xc4, 0x8a, 0xb2, 0xc5, 0x88, 0x43, 0x2e, 0x6e, 0x86, 0x40, 0x46, 0x9f, 0x1b, 0xa0, 0x34, 0xb8, + 0x75, 0x03, 0xa9, 0xce, 0xc7, 0xee, 0xdc, 0x0a, 0x34, 0xcb, 0x96, 0xc0, 0x59, 0x95, 0x6e, 0x81, + 0xdb, 0x06, 0xb7, 0xe6, 0x1c, 0x3a, 0xf1, 0x63, 0xf0, 0xbe, 0x8a, 0x54, 0xee, 0x65, 0x29, 0xf8, + 0x8b, 0x01, 0x2d, 0x7e, 0x62, 0xa3, 0x2b, 0xbb, 0xa8, 0x08, 0x76, 0x54, 0x21, 0x7e, 0x0e, 0xfa, + 0x3d, 0xce, 0x24, 0xd0, 0xb4, 0x6a, 0x5b, 0x99, 0x34, 0x18, 0xf6, 0x4b, 0x80, 0x8f, 0xda, 0x0e, + 0x92, 0xfe, 0x95, 0xc9, 0xfb, 0xf9, 0x99, 0x8d, 0x46, 0xa3, 0x76, 0x19, 0x5c, 0x6e, 0xd0, 0x7a, + 0x97, 0x0f, 0x62, 0x10, 0xbf, 0x31, 0x79, 0x1f, 0x3f, 0x7d, 0x59, 0x39, 0xa3, 0x2c, 0x2d, 0xa7, + 0x39, 0x56, 0xa1, 0x83, 0x64, 0x14, 0x41, 0x2e, 0x7e, 0x1f, 0xf1, 0xcc, 0xfb, 0xed, 0xb6, 0x49, + 0x0c, 0x58, 0xda, 0x22, 0x74, 0xaa, 0x03, 0xe2, 0x8f, 0x70, 0xe7, 0x9b, 0x88, 0xd9, 0x2a, 0x50, + 0x88, 0x40, 0xfc, 0xc9, 0x46, 0x3f, 0xae, 0xb5, 0x5d, 0xf2, 0x8e, 0x6a, 0xf1, 0x17, 0x93, 0x0b, + 0xfc, 0x81, 0x2a, 0xd0, 0x0e, 0xba, 0x2b, 0xff, 0x71, 0x9b, 0x7f, 0xb3, 0x0b, 0xe5, 0xbd, 0xfd, + 0x78, 0xe2, 0xdb, 0xfd, 0x78, 0xe2, 0xce, 0x7e, 0x1c, 0x3d, 0x35, 0x88, 0xa3, 0xeb, 0x83, 0x38, + 0xba, 0x3d, 0x88, 0xa3, 0xbd, 0x41, 0x1c, 0x7d, 0x37, 0x88, 0xa3, 0x1f, 0x06, 0xf1, 0xc4, 0x9d, + 0x41, 0x1c, 0x5d, 0xfb, 0x3e, 0x9e, 0x78, 0xfc, 0xec, 0xf0, 0xa1, 0x34, 0xb8, 0xa4, 0x32, 0xb3, + 0x74, 0xef, 0xa3, 0xdc, 0x3a, 0x1c, 0xde, 0xe1, 0x47, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xf1, + 0x71, 0x26, 0xea, 0xad, 0x05, 0x00, 0x00, +} diff --git a/policy/v1beta1/http_response.proto b/policy/v1beta1/http_response.proto index 3a549784d2..845aa24e66 100644 --- a/policy/v1beta1/http_response.proto +++ b/policy/v1beta1/http_response.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package istio.policy.v1beta1; +option go_package="istio.io/api/policy/v1beta1"; + // Direct HTTP response for a client-facing error message which can be attached // to an RPC error. message DirectHttpResponse { diff --git a/python/istio_api/policy/v1beta1/http_response_pb2.py b/python/istio_api/policy/v1beta1/http_response_pb2.py index ba159377d0..99c8f309ea 100644 --- a/python/istio_api/policy/v1beta1/http_response_pb2.py +++ b/python/istio_api/policy/v1beta1/http_response_pb2.py @@ -20,7 +20,7 @@ name='policy/v1beta1/http_response.proto', package='istio.policy.v1beta1', syntax='proto3', - serialized_pb=_b('\n\"policy/v1beta1/http_response.proto\x12\x14istio.policy.v1beta1\"V\n\x12\x44irectHttpResponse\x12\x32\n\x04\x63ode\x18\x01 \x01(\x0e\x32$.istio.policy.v1beta1.HttpStatusCode\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t*\xb9\t\n\x0eHttpStatusCode\x12\t\n\x05\x45mpty\x10\x00\x12\x0c\n\x08\x43ontinue\x10\x64\x12\x07\n\x02OK\x10\xc8\x01\x12\x0c\n\x07\x43reated\x10\xc9\x01\x12\r\n\x08\x41\x63\x63\x65pted\x10\xca\x01\x12 \n\x1bNonAuthoritativeInformation\x10\xcb\x01\x12\x0e\n\tNoContent\x10\xcc\x01\x12\x11\n\x0cResetContent\x10\xcd\x01\x12\x13\n\x0ePartialContent\x10\xce\x01\x12\x10\n\x0bMultiStatus\x10\xcf\x01\x12\x14\n\x0f\x41lreadyReported\x10\xd0\x01\x12\x0b\n\x06IMUsed\x10\xe2\x01\x12\x14\n\x0fMultipleChoices\x10\xac\x02\x12\x15\n\x10MovedPermanently\x10\xad\x02\x12\n\n\x05\x46ound\x10\xae\x02\x12\r\n\x08SeeOther\x10\xaf\x02\x12\x10\n\x0bNotModified\x10\xb0\x02\x12\r\n\x08UseProxy\x10\xb1\x02\x12\x16\n\x11TemporaryRedirect\x10\xb3\x02\x12\x16\n\x11PermanentRedirect\x10\xb4\x02\x12\x0f\n\nBadRequest\x10\x90\x03\x12\x11\n\x0cUnauthorized\x10\x91\x03\x12\x14\n\x0fPaymentRequired\x10\x92\x03\x12\x0e\n\tForbidden\x10\x93\x03\x12\r\n\x08NotFound\x10\x94\x03\x12\x15\n\x10MethodNotAllowed\x10\x95\x03\x12\x12\n\rNotAcceptable\x10\x96\x03\x12 \n\x1bProxyAuthenticationRequired\x10\x97\x03\x12\x13\n\x0eRequestTimeout\x10\x98\x03\x12\r\n\x08\x43onflict\x10\x99\x03\x12\t\n\x04Gone\x10\x9a\x03\x12\x13\n\x0eLengthRequired\x10\x9b\x03\x12\x17\n\x12PreconditionFailed\x10\x9c\x03\x12\x14\n\x0fPayloadTooLarge\x10\x9d\x03\x12\x0f\n\nURITooLong\x10\x9e\x03\x12\x19\n\x14UnsupportedMediaType\x10\x9f\x03\x12\x18\n\x13RangeNotSatisfiable\x10\xa0\x03\x12\x16\n\x11\x45xpectationFailed\x10\xa1\x03\x12\x17\n\x12MisdirectedRequest\x10\xa5\x03\x12\x18\n\x13UnprocessableEntity\x10\xa6\x03\x12\x0b\n\x06Locked\x10\xa7\x03\x12\x15\n\x10\x46\x61iledDependency\x10\xa8\x03\x12\x14\n\x0fUpgradeRequired\x10\xaa\x03\x12\x19\n\x14PreconditionRequired\x10\xac\x03\x12\x14\n\x0fTooManyRequests\x10\xad\x03\x12 \n\x1bRequestHeaderFieldsTooLarge\x10\xaf\x03\x12\x18\n\x13InternalServerError\x10\xf4\x03\x12\x13\n\x0eNotImplemented\x10\xf5\x03\x12\x0f\n\nBadGateway\x10\xf6\x03\x12\x17\n\x12ServiceUnavailable\x10\xf7\x03\x12\x13\n\x0eGatewayTimeout\x10\xf8\x03\x12\x1c\n\x17HTTPVersionNotSupported\x10\xf9\x03\x12\x1a\n\x15VariantAlsoNegotiates\x10\xfa\x03\x12\x18\n\x13InsufficientStorage\x10\xfb\x03\x12\x11\n\x0cLoopDetected\x10\xfc\x03\x12\x10\n\x0bNotExtended\x10\xfe\x03\x12\"\n\x1dNetworkAuthenticationRequired\x10\xff\x03\x62\x06proto3') + serialized_pb=_b('\n\"policy/v1beta1/http_response.proto\x12\x14istio.policy.v1beta1\"V\n\x12\x44irectHttpResponse\x12\x32\n\x04\x63ode\x18\x01 \x01(\x0e\x32$.istio.policy.v1beta1.HttpStatusCode\x12\x0c\n\x04\x62ody\x18\x02 \x01(\t*\xb9\t\n\x0eHttpStatusCode\x12\t\n\x05\x45mpty\x10\x00\x12\x0c\n\x08\x43ontinue\x10\x64\x12\x07\n\x02OK\x10\xc8\x01\x12\x0c\n\x07\x43reated\x10\xc9\x01\x12\r\n\x08\x41\x63\x63\x65pted\x10\xca\x01\x12 \n\x1bNonAuthoritativeInformation\x10\xcb\x01\x12\x0e\n\tNoContent\x10\xcc\x01\x12\x11\n\x0cResetContent\x10\xcd\x01\x12\x13\n\x0ePartialContent\x10\xce\x01\x12\x10\n\x0bMultiStatus\x10\xcf\x01\x12\x14\n\x0f\x41lreadyReported\x10\xd0\x01\x12\x0b\n\x06IMUsed\x10\xe2\x01\x12\x14\n\x0fMultipleChoices\x10\xac\x02\x12\x15\n\x10MovedPermanently\x10\xad\x02\x12\n\n\x05\x46ound\x10\xae\x02\x12\r\n\x08SeeOther\x10\xaf\x02\x12\x10\n\x0bNotModified\x10\xb0\x02\x12\r\n\x08UseProxy\x10\xb1\x02\x12\x16\n\x11TemporaryRedirect\x10\xb3\x02\x12\x16\n\x11PermanentRedirect\x10\xb4\x02\x12\x0f\n\nBadRequest\x10\x90\x03\x12\x11\n\x0cUnauthorized\x10\x91\x03\x12\x14\n\x0fPaymentRequired\x10\x92\x03\x12\x0e\n\tForbidden\x10\x93\x03\x12\r\n\x08NotFound\x10\x94\x03\x12\x15\n\x10MethodNotAllowed\x10\x95\x03\x12\x12\n\rNotAcceptable\x10\x96\x03\x12 \n\x1bProxyAuthenticationRequired\x10\x97\x03\x12\x13\n\x0eRequestTimeout\x10\x98\x03\x12\r\n\x08\x43onflict\x10\x99\x03\x12\t\n\x04Gone\x10\x9a\x03\x12\x13\n\x0eLengthRequired\x10\x9b\x03\x12\x17\n\x12PreconditionFailed\x10\x9c\x03\x12\x14\n\x0fPayloadTooLarge\x10\x9d\x03\x12\x0f\n\nURITooLong\x10\x9e\x03\x12\x19\n\x14UnsupportedMediaType\x10\x9f\x03\x12\x18\n\x13RangeNotSatisfiable\x10\xa0\x03\x12\x16\n\x11\x45xpectationFailed\x10\xa1\x03\x12\x17\n\x12MisdirectedRequest\x10\xa5\x03\x12\x18\n\x13UnprocessableEntity\x10\xa6\x03\x12\x0b\n\x06Locked\x10\xa7\x03\x12\x15\n\x10\x46\x61iledDependency\x10\xa8\x03\x12\x14\n\x0fUpgradeRequired\x10\xaa\x03\x12\x19\n\x14PreconditionRequired\x10\xac\x03\x12\x14\n\x0fTooManyRequests\x10\xad\x03\x12 \n\x1bRequestHeaderFieldsTooLarge\x10\xaf\x03\x12\x18\n\x13InternalServerError\x10\xf4\x03\x12\x13\n\x0eNotImplemented\x10\xf5\x03\x12\x0f\n\nBadGateway\x10\xf6\x03\x12\x17\n\x12ServiceUnavailable\x10\xf7\x03\x12\x13\n\x0eGatewayTimeout\x10\xf8\x03\x12\x1c\n\x17HTTPVersionNotSupported\x10\xf9\x03\x12\x1a\n\x15VariantAlsoNegotiates\x10\xfa\x03\x12\x18\n\x13InsufficientStorage\x10\xfb\x03\x12\x11\n\x0cLoopDetected\x10\xfc\x03\x12\x10\n\x0bNotExtended\x10\xfe\x03\x12\"\n\x1dNetworkAuthenticationRequired\x10\xff\x03\x42\x1dZ\x1bistio.io/api/policy/v1beta1b\x06proto3') ) _HTTPSTATUSCODE = _descriptor.EnumDescriptor( @@ -376,4 +376,6 @@ _sym_db.RegisterMessage(DirectHttpResponse) +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\033istio.io/api/policy/v1beta1')) # @@protoc_insertion_point(module_scope) From 62f6788fcd99db1079b0da03bcc937e6c9445510 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 17 Jan 2019 21:50:38 -0800 Subject: [PATCH 3/6] linter Signed-off-by: Kuat Yessenov --- prototool.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/prototool.yaml b/prototool.yaml index ebf22bd55b..2ef3f74021 100644 --- a/prototool.yaml +++ b/prototool.yaml @@ -13,6 +13,7 @@ lint: - id: ENUM_FIELD_NAMES_UPPER_SNAKE_CASE files: - networking/v1alpha3/gateway.proto + - policy/v1beta1/http_response.proto - id: REQUEST_RESPONSE_TYPES_UNIQUE files: - mcp/v1alpha1/mcp.proto From bd2e6bc0833175e6912a6c130323dadb0c090e7b Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 17 Jan 2019 21:59:52 -0800 Subject: [PATCH 4/6] some commit Signed-off-by: Kuat Yessenov --- proto.lock | 570 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 570 insertions(+) diff --git a/proto.lock b/proto.lock index 67af790a4d..000ace1629 100644 --- a/proto.lock +++ b/proto.lock @@ -4629,6 +4629,263 @@ ] } }, + { + "protopath": "policy:/:v1beta1:/:http_response.proto", + "def": { + "enums": [ + { + "name": "HttpStatusCode", + "enum_fields": [ + { + "name": "Empty", + "integer": 0 + }, + { + "name": "Continue", + "integer": 100 + }, + { + "name": "OK", + "integer": 200 + }, + { + "name": "Created", + "integer": 201 + }, + { + "name": "Accepted", + "integer": 202 + }, + { + "name": "NonAuthoritativeInformation", + "integer": 203 + }, + { + "name": "NoContent", + "integer": 204 + }, + { + "name": "ResetContent", + "integer": 205 + }, + { + "name": "PartialContent", + "integer": 206 + }, + { + "name": "MultiStatus", + "integer": 207 + }, + { + "name": "AlreadyReported", + "integer": 208 + }, + { + "name": "IMUsed", + "integer": 226 + }, + { + "name": "MultipleChoices", + "integer": 300 + }, + { + "name": "MovedPermanently", + "integer": 301 + }, + { + "name": "Found", + "integer": 302 + }, + { + "name": "SeeOther", + "integer": 303 + }, + { + "name": "NotModified", + "integer": 304 + }, + { + "name": "UseProxy", + "integer": 305 + }, + { + "name": "TemporaryRedirect", + "integer": 307 + }, + { + "name": "PermanentRedirect", + "integer": 308 + }, + { + "name": "BadRequest", + "integer": 400 + }, + { + "name": "Unauthorized", + "integer": 401 + }, + { + "name": "PaymentRequired", + "integer": 402 + }, + { + "name": "Forbidden", + "integer": 403 + }, + { + "name": "NotFound", + "integer": 404 + }, + { + "name": "MethodNotAllowed", + "integer": 405 + }, + { + "name": "NotAcceptable", + "integer": 406 + }, + { + "name": "ProxyAuthenticationRequired", + "integer": 407 + }, + { + "name": "RequestTimeout", + "integer": 408 + }, + { + "name": "Conflict", + "integer": 409 + }, + { + "name": "Gone", + "integer": 410 + }, + { + "name": "LengthRequired", + "integer": 411 + }, + { + "name": "PreconditionFailed", + "integer": 412 + }, + { + "name": "PayloadTooLarge", + "integer": 413 + }, + { + "name": "URITooLong", + "integer": 414 + }, + { + "name": "UnsupportedMediaType", + "integer": 415 + }, + { + "name": "RangeNotSatisfiable", + "integer": 416 + }, + { + "name": "ExpectationFailed", + "integer": 417 + }, + { + "name": "MisdirectedRequest", + "integer": 421 + }, + { + "name": "UnprocessableEntity", + "integer": 422 + }, + { + "name": "Locked", + "integer": 423 + }, + { + "name": "FailedDependency", + "integer": 424 + }, + { + "name": "UpgradeRequired", + "integer": 426 + }, + { + "name": "PreconditionRequired", + "integer": 428 + }, + { + "name": "TooManyRequests", + "integer": 429 + }, + { + "name": "RequestHeaderFieldsTooLarge", + "integer": 431 + }, + { + "name": "InternalServerError", + "integer": 500 + }, + { + "name": "NotImplemented", + "integer": 501 + }, + { + "name": "BadGateway", + "integer": 502 + }, + { + "name": "ServiceUnavailable", + "integer": 503 + }, + { + "name": "GatewayTimeout", + "integer": 504 + }, + { + "name": "HTTPVersionNotSupported", + "integer": 505 + }, + { + "name": "VariantAlsoNegotiates", + "integer": 506 + }, + { + "name": "InsufficientStorage", + "integer": 507 + }, + { + "name": "LoopDetected", + "integer": 508 + }, + { + "name": "NotExtended", + "integer": 510 + }, + { + "name": "NetworkAuthenticationRequired", + "integer": 511 + } + ] + } + ], + "messages": [ + { + "name": "DirectHttpResponse", + "fields": [ + { + "id": 1, + "name": "code", + "type": "HttpStatusCode" + }, + { + "id": 2, + "name": "body", + "type": "string" + } + ] + } + ] + } + }, { "protopath": "policy:/:v1beta1:/:type.proto", "def": { @@ -4811,6 +5068,319 @@ ] } }, + { + "protopath": "protoc-tmp:/:google:/:rpc:/:code.proto", + "def": { + "enums": [ + { + "name": "Code", + "enum_fields": [ + { + "name": "OK", + "integer": 0 + }, + { + "name": "CANCELLED", + "integer": 1 + }, + { + "name": "UNKNOWN", + "integer": 2 + }, + { + "name": "INVALID_ARGUMENT", + "integer": 3 + }, + { + "name": "DEADLINE_EXCEEDED", + "integer": 4 + }, + { + "name": "NOT_FOUND", + "integer": 5 + }, + { + "name": "ALREADY_EXISTS", + "integer": 6 + }, + { + "name": "PERMISSION_DENIED", + "integer": 7 + }, + { + "name": "UNAUTHENTICATED", + "integer": 16 + }, + { + "name": "RESOURCE_EXHAUSTED", + "integer": 8 + }, + { + "name": "FAILED_PRECONDITION", + "integer": 9 + }, + { + "name": "ABORTED", + "integer": 10 + }, + { + "name": "OUT_OF_RANGE", + "integer": 11 + }, + { + "name": "UNIMPLEMENTED", + "integer": 12 + }, + { + "name": "INTERNAL", + "integer": 13 + }, + { + "name": "UNAVAILABLE", + "integer": 14 + }, + { + "name": "DATA_LOSS", + "integer": 15 + } + ] + } + ] + } + }, + { + "protopath": "protoc-tmp:/:google:/:rpc:/:error_details.proto", + "def": { + "messages": [ + { + "name": "RetryInfo", + "fields": [ + { + "id": 1, + "name": "retry_delay", + "type": "google.protobuf.Duration" + } + ] + }, + { + "name": "DebugInfo", + "fields": [ + { + "id": 1, + "name": "stack_entries", + "type": "string", + "is_repeated": true + }, + { + "id": 2, + "name": "detail", + "type": "string" + } + ] + }, + { + "name": "QuotaFailure", + "fields": [ + { + "id": 1, + "name": "violations", + "type": "Violation", + "is_repeated": true + } + ], + "messages": [ + { + "name": "Violation", + "fields": [ + { + "id": 1, + "name": "subject", + "type": "string" + }, + { + "id": 2, + "name": "description", + "type": "string" + } + ] + } + ] + }, + { + "name": "PreconditionFailure", + "fields": [ + { + "id": 1, + "name": "violations", + "type": "Violation", + "is_repeated": true + } + ], + "messages": [ + { + "name": "Violation", + "fields": [ + { + "id": 1, + "name": "type", + "type": "string" + }, + { + "id": 2, + "name": "subject", + "type": "string" + }, + { + "id": 3, + "name": "description", + "type": "string" + } + ] + } + ] + }, + { + "name": "BadRequest", + "fields": [ + { + "id": 1, + "name": "field_violations", + "type": "FieldViolation", + "is_repeated": true + } + ], + "messages": [ + { + "name": "FieldViolation", + "fields": [ + { + "id": 1, + "name": "field", + "type": "string" + }, + { + "id": 2, + "name": "description", + "type": "string" + } + ] + } + ] + }, + { + "name": "RequestInfo", + "fields": [ + { + "id": 1, + "name": "request_id", + "type": "string" + }, + { + "id": 2, + "name": "serving_data", + "type": "string" + } + ] + }, + { + "name": "ResourceInfo", + "fields": [ + { + "id": 1, + "name": "resource_type", + "type": "string" + }, + { + "id": 2, + "name": "resource_name", + "type": "string" + }, + { + "id": 3, + "name": "owner", + "type": "string" + }, + { + "id": 4, + "name": "description", + "type": "string" + } + ] + }, + { + "name": "Help", + "fields": [ + { + "id": 1, + "name": "links", + "type": "Link", + "is_repeated": true + } + ], + "messages": [ + { + "name": "Link", + "fields": [ + { + "id": 1, + "name": "description", + "type": "string" + }, + { + "id": 2, + "name": "url", + "type": "string" + } + ] + } + ] + }, + { + "name": "LocalizedMessage", + "fields": [ + { + "id": 1, + "name": "locale", + "type": "string" + }, + { + "id": 2, + "name": "message", + "type": "string" + } + ] + } + ] + } + }, + { + "protopath": "protoc-tmp:/:google:/:rpc:/:status.proto", + "def": { + "messages": [ + { + "name": "Status", + "fields": [ + { + "id": 1, + "name": "code", + "type": "int32" + }, + { + "id": 2, + "name": "message", + "type": "string" + }, + { + "id": 3, + "name": "details", + "type": "google.protobuf.Any", + "is_repeated": true + } + ] + } + ] + } + }, { "protopath": "rbac:/:v1alpha1:/:rbac.proto", "def": { From 984c050dbaf47167f5d341d54d960254948d82ae Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 17 Jan 2019 22:12:00 -0800 Subject: [PATCH 5/6] silly Signed-off-by: Kuat Yessenov --- proto.lock | 315 +---------------------------------------------------- 1 file changed, 1 insertion(+), 314 deletions(-) diff --git a/proto.lock b/proto.lock index 000ace1629..3e5fa081a1 100644 --- a/proto.lock +++ b/proto.lock @@ -5068,319 +5068,6 @@ ] } }, - { - "protopath": "protoc-tmp:/:google:/:rpc:/:code.proto", - "def": { - "enums": [ - { - "name": "Code", - "enum_fields": [ - { - "name": "OK", - "integer": 0 - }, - { - "name": "CANCELLED", - "integer": 1 - }, - { - "name": "UNKNOWN", - "integer": 2 - }, - { - "name": "INVALID_ARGUMENT", - "integer": 3 - }, - { - "name": "DEADLINE_EXCEEDED", - "integer": 4 - }, - { - "name": "NOT_FOUND", - "integer": 5 - }, - { - "name": "ALREADY_EXISTS", - "integer": 6 - }, - { - "name": "PERMISSION_DENIED", - "integer": 7 - }, - { - "name": "UNAUTHENTICATED", - "integer": 16 - }, - { - "name": "RESOURCE_EXHAUSTED", - "integer": 8 - }, - { - "name": "FAILED_PRECONDITION", - "integer": 9 - }, - { - "name": "ABORTED", - "integer": 10 - }, - { - "name": "OUT_OF_RANGE", - "integer": 11 - }, - { - "name": "UNIMPLEMENTED", - "integer": 12 - }, - { - "name": "INTERNAL", - "integer": 13 - }, - { - "name": "UNAVAILABLE", - "integer": 14 - }, - { - "name": "DATA_LOSS", - "integer": 15 - } - ] - } - ] - } - }, - { - "protopath": "protoc-tmp:/:google:/:rpc:/:error_details.proto", - "def": { - "messages": [ - { - "name": "RetryInfo", - "fields": [ - { - "id": 1, - "name": "retry_delay", - "type": "google.protobuf.Duration" - } - ] - }, - { - "name": "DebugInfo", - "fields": [ - { - "id": 1, - "name": "stack_entries", - "type": "string", - "is_repeated": true - }, - { - "id": 2, - "name": "detail", - "type": "string" - } - ] - }, - { - "name": "QuotaFailure", - "fields": [ - { - "id": 1, - "name": "violations", - "type": "Violation", - "is_repeated": true - } - ], - "messages": [ - { - "name": "Violation", - "fields": [ - { - "id": 1, - "name": "subject", - "type": "string" - }, - { - "id": 2, - "name": "description", - "type": "string" - } - ] - } - ] - }, - { - "name": "PreconditionFailure", - "fields": [ - { - "id": 1, - "name": "violations", - "type": "Violation", - "is_repeated": true - } - ], - "messages": [ - { - "name": "Violation", - "fields": [ - { - "id": 1, - "name": "type", - "type": "string" - }, - { - "id": 2, - "name": "subject", - "type": "string" - }, - { - "id": 3, - "name": "description", - "type": "string" - } - ] - } - ] - }, - { - "name": "BadRequest", - "fields": [ - { - "id": 1, - "name": "field_violations", - "type": "FieldViolation", - "is_repeated": true - } - ], - "messages": [ - { - "name": "FieldViolation", - "fields": [ - { - "id": 1, - "name": "field", - "type": "string" - }, - { - "id": 2, - "name": "description", - "type": "string" - } - ] - } - ] - }, - { - "name": "RequestInfo", - "fields": [ - { - "id": 1, - "name": "request_id", - "type": "string" - }, - { - "id": 2, - "name": "serving_data", - "type": "string" - } - ] - }, - { - "name": "ResourceInfo", - "fields": [ - { - "id": 1, - "name": "resource_type", - "type": "string" - }, - { - "id": 2, - "name": "resource_name", - "type": "string" - }, - { - "id": 3, - "name": "owner", - "type": "string" - }, - { - "id": 4, - "name": "description", - "type": "string" - } - ] - }, - { - "name": "Help", - "fields": [ - { - "id": 1, - "name": "links", - "type": "Link", - "is_repeated": true - } - ], - "messages": [ - { - "name": "Link", - "fields": [ - { - "id": 1, - "name": "description", - "type": "string" - }, - { - "id": 2, - "name": "url", - "type": "string" - } - ] - } - ] - }, - { - "name": "LocalizedMessage", - "fields": [ - { - "id": 1, - "name": "locale", - "type": "string" - }, - { - "id": 2, - "name": "message", - "type": "string" - } - ] - } - ] - } - }, - { - "protopath": "protoc-tmp:/:google:/:rpc:/:status.proto", - "def": { - "messages": [ - { - "name": "Status", - "fields": [ - { - "id": 1, - "name": "code", - "type": "int32" - }, - { - "id": 2, - "name": "message", - "type": "string" - }, - { - "id": 3, - "name": "details", - "type": "google.protobuf.Any", - "is_repeated": true - } - ] - } - ] - } - }, { "protopath": "rbac:/:v1alpha1:/:rbac.proto", "def": { @@ -5707,4 +5394,4 @@ } } ] -} \ No newline at end of file +} From 71c59dc67e7ecfbb827f89bcaff02259c3ab9318 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 17 Jan 2019 22:25:17 -0800 Subject: [PATCH 6/6] silly Signed-off-by: Kuat Yessenov --- proto.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto.lock b/proto.lock index 3e5fa081a1..1a8c8476f1 100644 --- a/proto.lock +++ b/proto.lock @@ -5394,4 +5394,4 @@ } } ] -} +} \ No newline at end of file
NameDescription
Empty +

Empty - This code not part of the HTTP status code specification, but it is needed for proto +enum type.

+ +
Continue +
OK +
Created +
Accepted +
NonAuthoritativeInformation +
NoContent +
ResetContent +
PartialContent +
MultiStatus +
AlreadyReported +
IMUsed +
MultipleChoices +
MovedPermanently +
Found +
SeeOther +
NotModified +
UseProxy +
TemporaryRedirect +
PermanentRedirect +
BadRequest +
Unauthorized +
PaymentRequired +
Forbidden +
NotFound +
MethodNotAllowed +
NotAcceptable +
ProxyAuthenticationRequired +
RequestTimeout +
Conflict +
Gone +
LengthRequired +
PreconditionFailed +
PayloadTooLarge +
URITooLong +
UnsupportedMediaType +
RangeNotSatisfiable +
ExpectationFailed +
MisdirectedRequest +
UnprocessableEntity +
Locked +
FailedDependency +
UpgradeRequired +
PreconditionRequired +
TooManyRequests +
RequestHeaderFieldsTooLarge +
InternalServerError +
NotImplemented +
BadGateway +
ServiceUnavailable +
GatewayTimeout +
HTTPVersionNotSupported +
VariantAlsoNegotiates +
InsufficientStorage +
LoopDetected +
NotExtended +
NetworkAuthenticationRequired