gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/go-control-plane/envoy/service/ratelimit/v3/rls.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.16.0 5 // source: envoy/service/ratelimit/v3/rls.proto 6 7 package envoy_service_ratelimit_v3 8 9 import ( 10 context "context" 11 _ "github.com/cncf/xds/go/udpa/annotations" 12 v31 "gitee.com/ks-custle/core-gm/go-control-plane/envoy/config/core/v3" 13 v3 "gitee.com/ks-custle/core-gm/go-control-plane/envoy/extensions/common/ratelimit/v3" 14 _ "github.com/envoyproxy/protoc-gen-validate/validate" 15 proto "github.com/golang/protobuf/proto" 16 duration "github.com/golang/protobuf/ptypes/duration" 17 _struct "github.com/golang/protobuf/ptypes/struct" 18 timestamp "github.com/golang/protobuf/ptypes/timestamp" 19 grpc "gitee.com/ks-custle/core-gm/grpc" 20 codes "gitee.com/ks-custle/core-gm/grpc/codes" 21 status "gitee.com/ks-custle/core-gm/grpc/status" 22 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 23 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 24 reflect "reflect" 25 sync "sync" 26 ) 27 28 const ( 29 // Verify that this generated code is sufficiently up-to-date. 30 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 31 // Verify that runtime/protoimpl is sufficiently up-to-date. 32 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 33 ) 34 35 // This is a compile-time assertion that a sufficiently up-to-date version 36 // of the legacy proto package is being used. 37 const _ = proto.ProtoPackageIsVersion4 38 39 type RateLimitResponse_Code int32 40 41 const ( 42 // The response code is not known. 43 RateLimitResponse_UNKNOWN RateLimitResponse_Code = 0 44 // The response code to notify that the number of requests are under limit. 45 RateLimitResponse_OK RateLimitResponse_Code = 1 46 // The response code to notify that the number of requests are over limit. 47 RateLimitResponse_OVER_LIMIT RateLimitResponse_Code = 2 48 ) 49 50 // Enum value maps for RateLimitResponse_Code. 51 var ( 52 RateLimitResponse_Code_name = map[int32]string{ 53 0: "UNKNOWN", 54 1: "OK", 55 2: "OVER_LIMIT", 56 } 57 RateLimitResponse_Code_value = map[string]int32{ 58 "UNKNOWN": 0, 59 "OK": 1, 60 "OVER_LIMIT": 2, 61 } 62 ) 63 64 func (x RateLimitResponse_Code) Enum() *RateLimitResponse_Code { 65 p := new(RateLimitResponse_Code) 66 *p = x 67 return p 68 } 69 70 func (x RateLimitResponse_Code) String() string { 71 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 72 } 73 74 func (RateLimitResponse_Code) Descriptor() protoreflect.EnumDescriptor { 75 return file_envoy_service_ratelimit_v3_rls_proto_enumTypes[0].Descriptor() 76 } 77 78 func (RateLimitResponse_Code) Type() protoreflect.EnumType { 79 return &file_envoy_service_ratelimit_v3_rls_proto_enumTypes[0] 80 } 81 82 func (x RateLimitResponse_Code) Number() protoreflect.EnumNumber { 83 return protoreflect.EnumNumber(x) 84 } 85 86 // Deprecated: Use RateLimitResponse_Code.Descriptor instead. 87 func (RateLimitResponse_Code) EnumDescriptor() ([]byte, []int) { 88 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 0} 89 } 90 91 // Identifies the unit of of time for rate limit. 92 // [#comment: replace by envoy/type/v3/ratelimit_unit.proto in v4] 93 type RateLimitResponse_RateLimit_Unit int32 94 95 const ( 96 // The time unit is not known. 97 RateLimitResponse_RateLimit_UNKNOWN RateLimitResponse_RateLimit_Unit = 0 98 // The time unit representing a second. 99 RateLimitResponse_RateLimit_SECOND RateLimitResponse_RateLimit_Unit = 1 100 // The time unit representing a minute. 101 RateLimitResponse_RateLimit_MINUTE RateLimitResponse_RateLimit_Unit = 2 102 // The time unit representing an hour. 103 RateLimitResponse_RateLimit_HOUR RateLimitResponse_RateLimit_Unit = 3 104 // The time unit representing a day. 105 RateLimitResponse_RateLimit_DAY RateLimitResponse_RateLimit_Unit = 4 106 ) 107 108 // Enum value maps for RateLimitResponse_RateLimit_Unit. 109 var ( 110 RateLimitResponse_RateLimit_Unit_name = map[int32]string{ 111 0: "UNKNOWN", 112 1: "SECOND", 113 2: "MINUTE", 114 3: "HOUR", 115 4: "DAY", 116 } 117 RateLimitResponse_RateLimit_Unit_value = map[string]int32{ 118 "UNKNOWN": 0, 119 "SECOND": 1, 120 "MINUTE": 2, 121 "HOUR": 3, 122 "DAY": 4, 123 } 124 ) 125 126 func (x RateLimitResponse_RateLimit_Unit) Enum() *RateLimitResponse_RateLimit_Unit { 127 p := new(RateLimitResponse_RateLimit_Unit) 128 *p = x 129 return p 130 } 131 132 func (x RateLimitResponse_RateLimit_Unit) String() string { 133 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 134 } 135 136 func (RateLimitResponse_RateLimit_Unit) Descriptor() protoreflect.EnumDescriptor { 137 return file_envoy_service_ratelimit_v3_rls_proto_enumTypes[1].Descriptor() 138 } 139 140 func (RateLimitResponse_RateLimit_Unit) Type() protoreflect.EnumType { 141 return &file_envoy_service_ratelimit_v3_rls_proto_enumTypes[1] 142 } 143 144 func (x RateLimitResponse_RateLimit_Unit) Number() protoreflect.EnumNumber { 145 return protoreflect.EnumNumber(x) 146 } 147 148 // Deprecated: Use RateLimitResponse_RateLimit_Unit.Descriptor instead. 149 func (RateLimitResponse_RateLimit_Unit) EnumDescriptor() ([]byte, []int) { 150 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 0, 0} 151 } 152 153 // Main message for a rate limit request. The rate limit service is designed to be fully generic 154 // in the sense that it can operate on arbitrary hierarchical key/value pairs. The loaded 155 // configuration will parse the request and find the most specific limit to apply. In addition, 156 // a RateLimitRequest can contain multiple "descriptors" to limit on. When multiple descriptors 157 // are provided, the server will limit on *ALL* of them and return an OVER_LIMIT response if any 158 // of them are over limit. This enables more complex application level rate limiting scenarios 159 // if desired. 160 type RateLimitRequest struct { 161 state protoimpl.MessageState 162 sizeCache protoimpl.SizeCache 163 unknownFields protoimpl.UnknownFields 164 165 // All rate limit requests must specify a domain. This enables the configuration to be per 166 // application without fear of overlap. E.g., "envoy". 167 Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` 168 // All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is 169 // processed by the service (see below). If any of the descriptors are over limit, the entire 170 // request is considered to be over limit. 171 Descriptors []*v3.RateLimitDescriptor `protobuf:"bytes,2,rep,name=descriptors,proto3" json:"descriptors,omitempty"` 172 // Rate limit requests can optionally specify the number of hits a request adds to the matched 173 // limit. If the value is not set in the message, a request increases the matched limit by 1. 174 HitsAddend uint32 `protobuf:"varint,3,opt,name=hits_addend,json=hitsAddend,proto3" json:"hits_addend,omitempty"` 175 } 176 177 func (x *RateLimitRequest) Reset() { 178 *x = RateLimitRequest{} 179 if protoimpl.UnsafeEnabled { 180 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[0] 181 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 182 ms.StoreMessageInfo(mi) 183 } 184 } 185 186 func (x *RateLimitRequest) String() string { 187 return protoimpl.X.MessageStringOf(x) 188 } 189 190 func (*RateLimitRequest) ProtoMessage() {} 191 192 func (x *RateLimitRequest) ProtoReflect() protoreflect.Message { 193 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[0] 194 if protoimpl.UnsafeEnabled && x != nil { 195 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 196 if ms.LoadMessageInfo() == nil { 197 ms.StoreMessageInfo(mi) 198 } 199 return ms 200 } 201 return mi.MessageOf(x) 202 } 203 204 // Deprecated: Use RateLimitRequest.ProtoReflect.Descriptor instead. 205 func (*RateLimitRequest) Descriptor() ([]byte, []int) { 206 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{0} 207 } 208 209 func (x *RateLimitRequest) GetDomain() string { 210 if x != nil { 211 return x.Domain 212 } 213 return "" 214 } 215 216 func (x *RateLimitRequest) GetDescriptors() []*v3.RateLimitDescriptor { 217 if x != nil { 218 return x.Descriptors 219 } 220 return nil 221 } 222 223 func (x *RateLimitRequest) GetHitsAddend() uint32 { 224 if x != nil { 225 return x.HitsAddend 226 } 227 return 0 228 } 229 230 // A response from a ShouldRateLimit call. 231 // [#next-free-field: 7] 232 type RateLimitResponse struct { 233 state protoimpl.MessageState 234 sizeCache protoimpl.SizeCache 235 unknownFields protoimpl.UnknownFields 236 237 // The overall response code which takes into account all of the descriptors that were passed 238 // in the RateLimitRequest message. 239 OverallCode RateLimitResponse_Code `protobuf:"varint,1,opt,name=overall_code,json=overallCode,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_Code" json:"overall_code,omitempty"` 240 // A list of DescriptorStatus messages which matches the length of the descriptor list passed 241 // in the RateLimitRequest. This can be used by the caller to determine which individual 242 // descriptors failed and/or what the currently configured limits are for all of them. 243 Statuses []*RateLimitResponse_DescriptorStatus `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"` 244 // A list of headers to add to the response 245 ResponseHeadersToAdd []*v31.HeaderValue `protobuf:"bytes,3,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` 246 // A list of headers to add to the request when forwarded 247 RequestHeadersToAdd []*v31.HeaderValue `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` 248 // A response body to send to the downstream client when the response code is not OK. 249 RawBody []byte `protobuf:"bytes,5,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"` 250 // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next 251 // filter. This metadata lives in a namespace specified by the canonical name of extension filter 252 // that requires it: 253 // 254 // - :ref:`envoy.filters.http.ratelimit <config_http_filters_ratelimit_dynamic_metadata>` for HTTP filter. 255 // - :ref:`envoy.filters.network.ratelimit <config_network_filters_ratelimit_dynamic_metadata>` for network filter. 256 // - :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit_dynamic_metadata>` for Thrift filter. 257 DynamicMetadata *_struct.Struct `protobuf:"bytes,6,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` 258 } 259 260 func (x *RateLimitResponse) Reset() { 261 *x = RateLimitResponse{} 262 if protoimpl.UnsafeEnabled { 263 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[1] 264 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 265 ms.StoreMessageInfo(mi) 266 } 267 } 268 269 func (x *RateLimitResponse) String() string { 270 return protoimpl.X.MessageStringOf(x) 271 } 272 273 func (*RateLimitResponse) ProtoMessage() {} 274 275 func (x *RateLimitResponse) ProtoReflect() protoreflect.Message { 276 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[1] 277 if protoimpl.UnsafeEnabled && x != nil { 278 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 279 if ms.LoadMessageInfo() == nil { 280 ms.StoreMessageInfo(mi) 281 } 282 return ms 283 } 284 return mi.MessageOf(x) 285 } 286 287 // Deprecated: Use RateLimitResponse.ProtoReflect.Descriptor instead. 288 func (*RateLimitResponse) Descriptor() ([]byte, []int) { 289 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1} 290 } 291 292 func (x *RateLimitResponse) GetOverallCode() RateLimitResponse_Code { 293 if x != nil { 294 return x.OverallCode 295 } 296 return RateLimitResponse_UNKNOWN 297 } 298 299 func (x *RateLimitResponse) GetStatuses() []*RateLimitResponse_DescriptorStatus { 300 if x != nil { 301 return x.Statuses 302 } 303 return nil 304 } 305 306 func (x *RateLimitResponse) GetResponseHeadersToAdd() []*v31.HeaderValue { 307 if x != nil { 308 return x.ResponseHeadersToAdd 309 } 310 return nil 311 } 312 313 func (x *RateLimitResponse) GetRequestHeadersToAdd() []*v31.HeaderValue { 314 if x != nil { 315 return x.RequestHeadersToAdd 316 } 317 return nil 318 } 319 320 func (x *RateLimitResponse) GetRawBody() []byte { 321 if x != nil { 322 return x.RawBody 323 } 324 return nil 325 } 326 327 func (x *RateLimitResponse) GetDynamicMetadata() *_struct.Struct { 328 if x != nil { 329 return x.DynamicMetadata 330 } 331 return nil 332 } 333 334 // Defines an actual rate limit in terms of requests per unit of time and the unit itself. 335 type RateLimitResponse_RateLimit struct { 336 state protoimpl.MessageState 337 sizeCache protoimpl.SizeCache 338 unknownFields protoimpl.UnknownFields 339 340 // A name or description of this limit. 341 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` 342 // The number of requests per unit of time. 343 RequestsPerUnit uint32 `protobuf:"varint,1,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"` 344 // The unit of time. 345 Unit RateLimitResponse_RateLimit_Unit `protobuf:"varint,2,opt,name=unit,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_RateLimit_Unit" json:"unit,omitempty"` 346 } 347 348 func (x *RateLimitResponse_RateLimit) Reset() { 349 *x = RateLimitResponse_RateLimit{} 350 if protoimpl.UnsafeEnabled { 351 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[2] 352 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 353 ms.StoreMessageInfo(mi) 354 } 355 } 356 357 func (x *RateLimitResponse_RateLimit) String() string { 358 return protoimpl.X.MessageStringOf(x) 359 } 360 361 func (*RateLimitResponse_RateLimit) ProtoMessage() {} 362 363 func (x *RateLimitResponse_RateLimit) ProtoReflect() protoreflect.Message { 364 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[2] 365 if protoimpl.UnsafeEnabled && x != nil { 366 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 367 if ms.LoadMessageInfo() == nil { 368 ms.StoreMessageInfo(mi) 369 } 370 return ms 371 } 372 return mi.MessageOf(x) 373 } 374 375 // Deprecated: Use RateLimitResponse_RateLimit.ProtoReflect.Descriptor instead. 376 func (*RateLimitResponse_RateLimit) Descriptor() ([]byte, []int) { 377 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 0} 378 } 379 380 func (x *RateLimitResponse_RateLimit) GetName() string { 381 if x != nil { 382 return x.Name 383 } 384 return "" 385 } 386 387 func (x *RateLimitResponse_RateLimit) GetRequestsPerUnit() uint32 { 388 if x != nil { 389 return x.RequestsPerUnit 390 } 391 return 0 392 } 393 394 func (x *RateLimitResponse_RateLimit) GetUnit() RateLimitResponse_RateLimit_Unit { 395 if x != nil { 396 return x.Unit 397 } 398 return RateLimitResponse_RateLimit_UNKNOWN 399 } 400 401 // Cacheable quota for responses, see documentation for the :ref:`quota 402 // <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.DescriptorStatus.quota>` field. 403 // [#not-implemented-hide:] 404 type RateLimitResponse_Quota struct { 405 state protoimpl.MessageState 406 sizeCache protoimpl.SizeCache 407 unknownFields protoimpl.UnknownFields 408 409 // Number of matching requests granted in quota. Must be 1 or more. 410 Requests uint32 `protobuf:"varint,1,opt,name=requests,proto3" json:"requests,omitempty"` 411 // Types that are assignable to ExpirationSpecifier: 412 // *RateLimitResponse_Quota_ValidUntil 413 ExpirationSpecifier isRateLimitResponse_Quota_ExpirationSpecifier `protobuf_oneof:"expiration_specifier"` 414 } 415 416 func (x *RateLimitResponse_Quota) Reset() { 417 *x = RateLimitResponse_Quota{} 418 if protoimpl.UnsafeEnabled { 419 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3] 420 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 421 ms.StoreMessageInfo(mi) 422 } 423 } 424 425 func (x *RateLimitResponse_Quota) String() string { 426 return protoimpl.X.MessageStringOf(x) 427 } 428 429 func (*RateLimitResponse_Quota) ProtoMessage() {} 430 431 func (x *RateLimitResponse_Quota) ProtoReflect() protoreflect.Message { 432 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3] 433 if protoimpl.UnsafeEnabled && x != nil { 434 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 435 if ms.LoadMessageInfo() == nil { 436 ms.StoreMessageInfo(mi) 437 } 438 return ms 439 } 440 return mi.MessageOf(x) 441 } 442 443 // Deprecated: Use RateLimitResponse_Quota.ProtoReflect.Descriptor instead. 444 func (*RateLimitResponse_Quota) Descriptor() ([]byte, []int) { 445 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 1} 446 } 447 448 func (x *RateLimitResponse_Quota) GetRequests() uint32 { 449 if x != nil { 450 return x.Requests 451 } 452 return 0 453 } 454 455 func (m *RateLimitResponse_Quota) GetExpirationSpecifier() isRateLimitResponse_Quota_ExpirationSpecifier { 456 if m != nil { 457 return m.ExpirationSpecifier 458 } 459 return nil 460 } 461 462 func (x *RateLimitResponse_Quota) GetValidUntil() *timestamp.Timestamp { 463 if x, ok := x.GetExpirationSpecifier().(*RateLimitResponse_Quota_ValidUntil); ok { 464 return x.ValidUntil 465 } 466 return nil 467 } 468 469 type isRateLimitResponse_Quota_ExpirationSpecifier interface { 470 isRateLimitResponse_Quota_ExpirationSpecifier() 471 } 472 473 type RateLimitResponse_Quota_ValidUntil struct { 474 // Point in time at which the quota expires. 475 ValidUntil *timestamp.Timestamp `protobuf:"bytes,2,opt,name=valid_until,json=validUntil,proto3,oneof"` 476 } 477 478 func (*RateLimitResponse_Quota_ValidUntil) isRateLimitResponse_Quota_ExpirationSpecifier() {} 479 480 // [#next-free-field: 6] 481 type RateLimitResponse_DescriptorStatus struct { 482 state protoimpl.MessageState 483 sizeCache protoimpl.SizeCache 484 unknownFields protoimpl.UnknownFields 485 486 // The response code for an individual descriptor. 487 Code RateLimitResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_Code" json:"code,omitempty"` 488 // The current limit as configured by the server. Useful for debugging, etc. 489 CurrentLimit *RateLimitResponse_RateLimit `protobuf:"bytes,2,opt,name=current_limit,json=currentLimit,proto3" json:"current_limit,omitempty"` 490 // The limit remaining in the current time unit. 491 LimitRemaining uint32 `protobuf:"varint,3,opt,name=limit_remaining,json=limitRemaining,proto3" json:"limit_remaining,omitempty"` 492 // Duration until reset of the current limit window. 493 DurationUntilReset *duration.Duration `protobuf:"bytes,4,opt,name=duration_until_reset,json=durationUntilReset,proto3" json:"duration_until_reset,omitempty"` 494 // Quota granted for the descriptor. This is a certain number of requests over a period of time. 495 // The client may cache this result and apply the effective RateLimitResponse to future matching 496 // requests containing a matching descriptor without querying rate limit service. 497 // 498 // Quota is available for a request if its descriptor set has cached quota available for all 499 // descriptors. 500 // 501 // If quota is available, a RLS request will not be made and the quota will be reduced by 1 for 502 // all matching descriptors. 503 // 504 // If there is not sufficient quota, there are three cases: 505 // 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired. 506 // In this case, the request will be treated as OVER_LIMIT. 507 // 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors 508 // have no cached entry. This will trigger a new RLS request. 509 // When the result is returned, a single unit will be consumed from the quota for all 510 // matching descriptors. 511 // If the server did not provide a quota, such as the quota message is empty for some of 512 // the descriptors, then the request admission is determined by the 513 // :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`. 514 // 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request, 515 // When the result is returned, a single unit will be consumed from the quota for all 516 // matching descriptors. 517 // If the server did not provide a quota, such as the quota message is empty for some of 518 // the descriptors, then the request admission is determined by the 519 // :ref:`overall_code <envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.overall_code>`. 520 // 521 // When quota expires due to timeout, a new RLS request will also be made. 522 // The implementation may choose to preemptively query the rate limit server for more quota on or 523 // before expiration or before the available quota runs out. 524 // [#not-implemented-hide:] 525 Quota *RateLimitResponse_Quota `protobuf:"bytes,5,opt,name=quota,proto3" json:"quota,omitempty"` 526 } 527 528 func (x *RateLimitResponse_DescriptorStatus) Reset() { 529 *x = RateLimitResponse_DescriptorStatus{} 530 if protoimpl.UnsafeEnabled { 531 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[4] 532 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 533 ms.StoreMessageInfo(mi) 534 } 535 } 536 537 func (x *RateLimitResponse_DescriptorStatus) String() string { 538 return protoimpl.X.MessageStringOf(x) 539 } 540 541 func (*RateLimitResponse_DescriptorStatus) ProtoMessage() {} 542 543 func (x *RateLimitResponse_DescriptorStatus) ProtoReflect() protoreflect.Message { 544 mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[4] 545 if protoimpl.UnsafeEnabled && x != nil { 546 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 547 if ms.LoadMessageInfo() == nil { 548 ms.StoreMessageInfo(mi) 549 } 550 return ms 551 } 552 return mi.MessageOf(x) 553 } 554 555 // Deprecated: Use RateLimitResponse_DescriptorStatus.ProtoReflect.Descriptor instead. 556 func (*RateLimitResponse_DescriptorStatus) Descriptor() ([]byte, []int) { 557 return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 2} 558 } 559 560 func (x *RateLimitResponse_DescriptorStatus) GetCode() RateLimitResponse_Code { 561 if x != nil { 562 return x.Code 563 } 564 return RateLimitResponse_UNKNOWN 565 } 566 567 func (x *RateLimitResponse_DescriptorStatus) GetCurrentLimit() *RateLimitResponse_RateLimit { 568 if x != nil { 569 return x.CurrentLimit 570 } 571 return nil 572 } 573 574 func (x *RateLimitResponse_DescriptorStatus) GetLimitRemaining() uint32 { 575 if x != nil { 576 return x.LimitRemaining 577 } 578 return 0 579 } 580 581 func (x *RateLimitResponse_DescriptorStatus) GetDurationUntilReset() *duration.Duration { 582 if x != nil { 583 return x.DurationUntilReset 584 } 585 return nil 586 } 587 588 func (x *RateLimitResponse_DescriptorStatus) GetQuota() *RateLimitResponse_Quota { 589 if x != nil { 590 return x.Quota 591 } 592 return nil 593 } 594 595 var File_envoy_service_ratelimit_v3_rls_proto protoreflect.FileDescriptor 596 597 var file_envoy_service_ratelimit_v3_rls_proto_rawDesc = []byte{ 598 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 599 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6c, 0x73, 600 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 601 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 602 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 603 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 604 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 605 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x61, 0x74, 606 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 607 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 608 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 609 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 610 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 611 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 612 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 613 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 614 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 615 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 616 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 617 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 618 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 619 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 620 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 621 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 622 0x12, 0x5b, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x18, 623 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 624 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 625 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 626 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 627 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 628 0x0b, 0x68, 0x69, 0x74, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 629 0x28, 0x0d, 0x52, 0x0a, 0x68, 0x69, 0x74, 0x73, 0x41, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x3a, 0x32, 630 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 631 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 632 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 633 0x73, 0x74, 0x22, 0xa0, 0x0b, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 634 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x6f, 0x76, 0x65, 0x72, 635 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 636 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 637 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 638 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 639 0x64, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, 640 0x5a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 641 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 642 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 643 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 644 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 645 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x17, 0x72, 646 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 647 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 648 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 649 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 650 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 651 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x56, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 652 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 653 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 654 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 655 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 656 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x19, 0x0a, 657 0x08, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 658 0x07, 0x72, 0x61, 0x77, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 659 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 660 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 661 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 662 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x9c, 0x02, 0x0a, 663 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 664 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 665 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 666 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 667 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x04, 0x75, 0x6e, 668 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 669 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 670 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 671 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 672 0x74, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x3e, 0x0a, 0x04, 673 0x55, 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 674 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 675 0x06, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 676 0x52, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x3a, 0x3d, 0x9a, 0xc5, 677 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 678 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 679 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 680 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x83, 0x01, 0x0a, 0x05, 681 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 682 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 683 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x76, 0x61, 684 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 685 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 686 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x76, 687 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x42, 0x16, 0x0a, 0x14, 0x65, 0x78, 0x70, 688 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 689 0x72, 0x1a, 0xbf, 0x03, 0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 690 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x46, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 691 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 692 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 693 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 694 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x5c, 695 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 696 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 697 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 698 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 699 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0c, 700 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 701 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 702 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x6d, 0x61, 703 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x4b, 0x0a, 0x14, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 704 0x6e, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 705 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 706 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 707 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x52, 0x65, 0x73, 708 0x65, 0x74, 0x12, 0x49, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 709 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 710 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 711 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 712 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x3a, 0x44, 0x9a, 713 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 714 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 715 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 716 0x73, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 717 0x74, 0x75, 0x73, 0x22, 0x2b, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 718 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 719 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x02, 720 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 721 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 722 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 723 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x84, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 724 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68, 725 0x6f, 0x75, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e, 726 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 727 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 728 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 729 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 730 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 731 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x41, 0x0a, 0x28, 732 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 733 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 734 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 735 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 736 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 737 } 738 739 var ( 740 file_envoy_service_ratelimit_v3_rls_proto_rawDescOnce sync.Once 741 file_envoy_service_ratelimit_v3_rls_proto_rawDescData = file_envoy_service_ratelimit_v3_rls_proto_rawDesc 742 ) 743 744 func file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP() []byte { 745 file_envoy_service_ratelimit_v3_rls_proto_rawDescOnce.Do(func() { 746 file_envoy_service_ratelimit_v3_rls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_ratelimit_v3_rls_proto_rawDescData) 747 }) 748 return file_envoy_service_ratelimit_v3_rls_proto_rawDescData 749 } 750 751 var file_envoy_service_ratelimit_v3_rls_proto_enumTypes = make([]protoimpl.EnumInfo, 2) 752 var file_envoy_service_ratelimit_v3_rls_proto_msgTypes = make([]protoimpl.MessageInfo, 5) 753 var file_envoy_service_ratelimit_v3_rls_proto_goTypes = []interface{}{ 754 (RateLimitResponse_Code)(0), // 0: envoy.service.ratelimit.v3.RateLimitResponse.Code 755 (RateLimitResponse_RateLimit_Unit)(0), // 1: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit 756 (*RateLimitRequest)(nil), // 2: envoy.service.ratelimit.v3.RateLimitRequest 757 (*RateLimitResponse)(nil), // 3: envoy.service.ratelimit.v3.RateLimitResponse 758 (*RateLimitResponse_RateLimit)(nil), // 4: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit 759 (*RateLimitResponse_Quota)(nil), // 5: envoy.service.ratelimit.v3.RateLimitResponse.Quota 760 (*RateLimitResponse_DescriptorStatus)(nil), // 6: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus 761 (*v3.RateLimitDescriptor)(nil), // 7: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor 762 (*v31.HeaderValue)(nil), // 8: envoy.config.core.v3.HeaderValue 763 (*_struct.Struct)(nil), // 9: google.protobuf.Struct 764 (*timestamp.Timestamp)(nil), // 10: google.protobuf.Timestamp 765 (*duration.Duration)(nil), // 11: google.protobuf.Duration 766 } 767 var file_envoy_service_ratelimit_v3_rls_proto_depIdxs = []int32{ 768 7, // 0: envoy.service.ratelimit.v3.RateLimitRequest.descriptors:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor 769 0, // 1: envoy.service.ratelimit.v3.RateLimitResponse.overall_code:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Code 770 6, // 2: envoy.service.ratelimit.v3.RateLimitResponse.statuses:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus 771 8, // 3: envoy.service.ratelimit.v3.RateLimitResponse.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValue 772 8, // 4: envoy.service.ratelimit.v3.RateLimitResponse.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValue 773 9, // 5: envoy.service.ratelimit.v3.RateLimitResponse.dynamic_metadata:type_name -> google.protobuf.Struct 774 1, // 6: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.unit:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit 775 10, // 7: envoy.service.ratelimit.v3.RateLimitResponse.Quota.valid_until:type_name -> google.protobuf.Timestamp 776 0, // 8: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.code:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Code 777 4, // 9: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.current_limit:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.RateLimit 778 11, // 10: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.duration_until_reset:type_name -> google.protobuf.Duration 779 5, // 11: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.quota:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Quota 780 2, // 12: envoy.service.ratelimit.v3.RateLimitService.ShouldRateLimit:input_type -> envoy.service.ratelimit.v3.RateLimitRequest 781 3, // 13: envoy.service.ratelimit.v3.RateLimitService.ShouldRateLimit:output_type -> envoy.service.ratelimit.v3.RateLimitResponse 782 13, // [13:14] is the sub-list for method output_type 783 12, // [12:13] is the sub-list for method input_type 784 12, // [12:12] is the sub-list for extension type_name 785 12, // [12:12] is the sub-list for extension extendee 786 0, // [0:12] is the sub-list for field type_name 787 } 788 789 func init() { file_envoy_service_ratelimit_v3_rls_proto_init() } 790 func file_envoy_service_ratelimit_v3_rls_proto_init() { 791 if File_envoy_service_ratelimit_v3_rls_proto != nil { 792 return 793 } 794 if !protoimpl.UnsafeEnabled { 795 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 796 switch v := v.(*RateLimitRequest); i { 797 case 0: 798 return &v.state 799 case 1: 800 return &v.sizeCache 801 case 2: 802 return &v.unknownFields 803 default: 804 return nil 805 } 806 } 807 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 808 switch v := v.(*RateLimitResponse); i { 809 case 0: 810 return &v.state 811 case 1: 812 return &v.sizeCache 813 case 2: 814 return &v.unknownFields 815 default: 816 return nil 817 } 818 } 819 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 820 switch v := v.(*RateLimitResponse_RateLimit); i { 821 case 0: 822 return &v.state 823 case 1: 824 return &v.sizeCache 825 case 2: 826 return &v.unknownFields 827 default: 828 return nil 829 } 830 } 831 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 832 switch v := v.(*RateLimitResponse_Quota); i { 833 case 0: 834 return &v.state 835 case 1: 836 return &v.sizeCache 837 case 2: 838 return &v.unknownFields 839 default: 840 return nil 841 } 842 } 843 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 844 switch v := v.(*RateLimitResponse_DescriptorStatus); i { 845 case 0: 846 return &v.state 847 case 1: 848 return &v.sizeCache 849 case 2: 850 return &v.unknownFields 851 default: 852 return nil 853 } 854 } 855 } 856 file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3].OneofWrappers = []interface{}{ 857 (*RateLimitResponse_Quota_ValidUntil)(nil), 858 } 859 type x struct{} 860 out := protoimpl.TypeBuilder{ 861 File: protoimpl.DescBuilder{ 862 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 863 RawDescriptor: file_envoy_service_ratelimit_v3_rls_proto_rawDesc, 864 NumEnums: 2, 865 NumMessages: 5, 866 NumExtensions: 0, 867 NumServices: 1, 868 }, 869 GoTypes: file_envoy_service_ratelimit_v3_rls_proto_goTypes, 870 DependencyIndexes: file_envoy_service_ratelimit_v3_rls_proto_depIdxs, 871 EnumInfos: file_envoy_service_ratelimit_v3_rls_proto_enumTypes, 872 MessageInfos: file_envoy_service_ratelimit_v3_rls_proto_msgTypes, 873 }.Build() 874 File_envoy_service_ratelimit_v3_rls_proto = out.File 875 file_envoy_service_ratelimit_v3_rls_proto_rawDesc = nil 876 file_envoy_service_ratelimit_v3_rls_proto_goTypes = nil 877 file_envoy_service_ratelimit_v3_rls_proto_depIdxs = nil 878 } 879 880 // Reference imports to suppress errors if they are not otherwise used. 881 var _ context.Context 882 var _ grpc.ClientConnInterface 883 884 // This is a compile-time assertion to ensure that this generated file 885 // is compatible with the grpc package it is being compiled against. 886 const _ = grpc.SupportPackageIsVersion6 887 888 // RateLimitServiceClient is the client API for RateLimitService service. 889 // 890 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 891 type RateLimitServiceClient interface { 892 // Determine whether rate limiting should take place. 893 ShouldRateLimit(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitResponse, error) 894 } 895 896 type rateLimitServiceClient struct { 897 cc grpc.ClientConnInterface 898 } 899 900 func NewRateLimitServiceClient(cc grpc.ClientConnInterface) RateLimitServiceClient { 901 return &rateLimitServiceClient{cc} 902 } 903 904 func (c *rateLimitServiceClient) ShouldRateLimit(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitResponse, error) { 905 out := new(RateLimitResponse) 906 err := c.cc.Invoke(ctx, "/envoy.service.ratelimit.v3.RateLimitService/ShouldRateLimit", in, out, opts...) 907 if err != nil { 908 return nil, err 909 } 910 return out, nil 911 } 912 913 // RateLimitServiceServer is the server API for RateLimitService service. 914 type RateLimitServiceServer interface { 915 // Determine whether rate limiting should take place. 916 ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error) 917 } 918 919 // UnimplementedRateLimitServiceServer can be embedded to have forward compatible implementations. 920 type UnimplementedRateLimitServiceServer struct { 921 } 922 923 func (*UnimplementedRateLimitServiceServer) ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error) { 924 return nil, status.Errorf(codes.Unimplemented, "method ShouldRateLimit not implemented") 925 } 926 927 func RegisterRateLimitServiceServer(s *grpc.Server, srv RateLimitServiceServer) { 928 s.RegisterService(&_RateLimitService_serviceDesc, srv) 929 } 930 931 func _RateLimitService_ShouldRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 932 in := new(RateLimitRequest) 933 if err := dec(in); err != nil { 934 return nil, err 935 } 936 if interceptor == nil { 937 return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, in) 938 } 939 info := &grpc.UnaryServerInfo{ 940 Server: srv, 941 FullMethod: "/envoy.service.ratelimit.v3.RateLimitService/ShouldRateLimit", 942 } 943 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 944 return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, req.(*RateLimitRequest)) 945 } 946 return interceptor(ctx, in, info, handler) 947 } 948 949 var _RateLimitService_serviceDesc = grpc.ServiceDesc{ 950 ServiceName: "envoy.service.ratelimit.v3.RateLimitService", 951 HandlerType: (*RateLimitServiceServer)(nil), 952 Methods: []grpc.MethodDesc{ 953 { 954 MethodName: "ShouldRateLimit", 955 Handler: _RateLimitService_ShouldRateLimit_Handler, 956 }, 957 }, 958 Streams: []grpc.StreamDesc{}, 959 Metadata: "envoy/service/ratelimit/v3/rls.proto", 960 }