1
2
3
4
5
6
7 package envoy_extensions_common_ratelimit_v3
8
9 import (
10 _ "github.com/cncf/udpa/go/udpa/annotations"
11 v3 "github.com/datawire/ambassador/v2/pkg/api/envoy/type/v3"
12 _ "github.com/envoyproxy/protoc-gen-validate/validate"
13 proto "github.com/golang/protobuf/proto"
14 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
15 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
16 reflect "reflect"
17 sync "sync"
18 )
19
20 const (
21
22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
23
24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
25 )
26
27
28
29 const _ = proto.ProtoPackageIsVersion4
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76 type RateLimitDescriptor struct {
77 state protoimpl.MessageState
78 sizeCache protoimpl.SizeCache
79 unknownFields protoimpl.UnknownFields
80
81
82 Entries []*RateLimitDescriptor_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
83
84 Limit *RateLimitDescriptor_RateLimitOverride `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"`
85 }
86
87 func (x *RateLimitDescriptor) Reset() {
88 *x = RateLimitDescriptor{}
89 if protoimpl.UnsafeEnabled {
90 mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[0]
91 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
92 ms.StoreMessageInfo(mi)
93 }
94 }
95
96 func (x *RateLimitDescriptor) String() string {
97 return protoimpl.X.MessageStringOf(x)
98 }
99
100 func (*RateLimitDescriptor) ProtoMessage() {}
101
102 func (x *RateLimitDescriptor) ProtoReflect() protoreflect.Message {
103 mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[0]
104 if protoimpl.UnsafeEnabled && x != nil {
105 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
106 if ms.LoadMessageInfo() == nil {
107 ms.StoreMessageInfo(mi)
108 }
109 return ms
110 }
111 return mi.MessageOf(x)
112 }
113
114
115 func (*RateLimitDescriptor) Descriptor() ([]byte, []int) {
116 return file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescGZIP(), []int{0}
117 }
118
119 func (x *RateLimitDescriptor) GetEntries() []*RateLimitDescriptor_Entry {
120 if x != nil {
121 return x.Entries
122 }
123 return nil
124 }
125
126 func (x *RateLimitDescriptor) GetLimit() *RateLimitDescriptor_RateLimitOverride {
127 if x != nil {
128 return x.Limit
129 }
130 return nil
131 }
132
133 type RateLimitDescriptor_Entry struct {
134 state protoimpl.MessageState
135 sizeCache protoimpl.SizeCache
136 unknownFields protoimpl.UnknownFields
137
138
139 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
140
141 Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
142 }
143
144 func (x *RateLimitDescriptor_Entry) Reset() {
145 *x = RateLimitDescriptor_Entry{}
146 if protoimpl.UnsafeEnabled {
147 mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[1]
148 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
149 ms.StoreMessageInfo(mi)
150 }
151 }
152
153 func (x *RateLimitDescriptor_Entry) String() string {
154 return protoimpl.X.MessageStringOf(x)
155 }
156
157 func (*RateLimitDescriptor_Entry) ProtoMessage() {}
158
159 func (x *RateLimitDescriptor_Entry) ProtoReflect() protoreflect.Message {
160 mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[1]
161 if protoimpl.UnsafeEnabled && x != nil {
162 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
163 if ms.LoadMessageInfo() == nil {
164 ms.StoreMessageInfo(mi)
165 }
166 return ms
167 }
168 return mi.MessageOf(x)
169 }
170
171
172 func (*RateLimitDescriptor_Entry) Descriptor() ([]byte, []int) {
173 return file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescGZIP(), []int{0, 0}
174 }
175
176 func (x *RateLimitDescriptor_Entry) GetKey() string {
177 if x != nil {
178 return x.Key
179 }
180 return ""
181 }
182
183 func (x *RateLimitDescriptor_Entry) GetValue() string {
184 if x != nil {
185 return x.Value
186 }
187 return ""
188 }
189
190
191
192
193 type RateLimitDescriptor_RateLimitOverride struct {
194 state protoimpl.MessageState
195 sizeCache protoimpl.SizeCache
196 unknownFields protoimpl.UnknownFields
197
198
199 RequestsPerUnit uint32 `protobuf:"varint,1,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"`
200
201 Unit v3.RateLimitUnit `protobuf:"varint,2,opt,name=unit,proto3,enum=envoy.type.v3.RateLimitUnit" json:"unit,omitempty"`
202 }
203
204 func (x *RateLimitDescriptor_RateLimitOverride) Reset() {
205 *x = RateLimitDescriptor_RateLimitOverride{}
206 if protoimpl.UnsafeEnabled {
207 mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[2]
208 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
209 ms.StoreMessageInfo(mi)
210 }
211 }
212
213 func (x *RateLimitDescriptor_RateLimitOverride) String() string {
214 return protoimpl.X.MessageStringOf(x)
215 }
216
217 func (*RateLimitDescriptor_RateLimitOverride) ProtoMessage() {}
218
219 func (x *RateLimitDescriptor_RateLimitOverride) ProtoReflect() protoreflect.Message {
220 mi := &file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[2]
221 if protoimpl.UnsafeEnabled && x != nil {
222 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
223 if ms.LoadMessageInfo() == nil {
224 ms.StoreMessageInfo(mi)
225 }
226 return ms
227 }
228 return mi.MessageOf(x)
229 }
230
231
232 func (*RateLimitDescriptor_RateLimitOverride) Descriptor() ([]byte, []int) {
233 return file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescGZIP(), []int{0, 1}
234 }
235
236 func (x *RateLimitDescriptor_RateLimitOverride) GetRequestsPerUnit() uint32 {
237 if x != nil {
238 return x.RequestsPerUnit
239 }
240 return 0
241 }
242
243 func (x *RateLimitDescriptor_RateLimitOverride) GetUnit() v3.RateLimitUnit {
244 if x != nil {
245 return x.Unit
246 }
247 return v3.RateLimitUnit_UNKNOWN
248 }
249
250 var File_envoy_extensions_common_ratelimit_v3_ratelimit_proto protoreflect.FileDescriptor
251
252 var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDesc = []byte{
253 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
254 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69,
255 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74,
256 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78,
257 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
258 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e,
259 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65,
260 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
261 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
262 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
263 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
264 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f,
265 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
266 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x04, 0x0a, 0x13,
267 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
268 0x74, 0x6f, 0x72, 0x12, 0x63, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01,
269 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
270 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x72,
271 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65,
272 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
273 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52,
274 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69,
275 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
276 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
277 0x6e, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52,
278 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
279 0x6f, 0x72, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72,
280 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x7a, 0x0a, 0x05, 0x45,
281 0x6e, 0x74, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
282 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
283 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
284 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x37,
285 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69,
286 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x52, 0x61,
287 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
288 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x7b, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c,
289 0x69, 0x6d, 0x69, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x11,
290 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69,
291 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
292 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74,
293 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74,
294 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74,
295 0x55, 0x6e, 0x69, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04,
296 0x75, 0x6e, 0x69, 0x74, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76,
297 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69,
298 0x6d, 0x69, 0x74, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73,
299 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x42, 0x4e, 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e,
300 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
301 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
302 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52,
303 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba,
304 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
305 }
306
307 var (
308 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescOnce sync.Once
309 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescData = file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDesc
310 )
311
312 func file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescGZIP() []byte {
313 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescOnce.Do(func() {
314 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescData)
315 })
316 return file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDescData
317 }
318
319 var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
320 var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_goTypes = []interface{}{
321 (*RateLimitDescriptor)(nil),
322 (*RateLimitDescriptor_Entry)(nil),
323 (*RateLimitDescriptor_RateLimitOverride)(nil),
324 (v3.RateLimitUnit)(0),
325 }
326 var file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_depIdxs = []int32{
327 1,
328 2,
329 3,
330 3,
331 3,
332 3,
333 3,
334 0,
335 }
336
337 func init() { file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_init() }
338 func file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_init() {
339 if File_envoy_extensions_common_ratelimit_v3_ratelimit_proto != nil {
340 return
341 }
342 if !protoimpl.UnsafeEnabled {
343 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
344 switch v := v.(*RateLimitDescriptor); i {
345 case 0:
346 return &v.state
347 case 1:
348 return &v.sizeCache
349 case 2:
350 return &v.unknownFields
351 default:
352 return nil
353 }
354 }
355 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
356 switch v := v.(*RateLimitDescriptor_Entry); i {
357 case 0:
358 return &v.state
359 case 1:
360 return &v.sizeCache
361 case 2:
362 return &v.unknownFields
363 default:
364 return nil
365 }
366 }
367 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
368 switch v := v.(*RateLimitDescriptor_RateLimitOverride); i {
369 case 0:
370 return &v.state
371 case 1:
372 return &v.sizeCache
373 case 2:
374 return &v.unknownFields
375 default:
376 return nil
377 }
378 }
379 }
380 type x struct{}
381 out := protoimpl.TypeBuilder{
382 File: protoimpl.DescBuilder{
383 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
384 RawDescriptor: file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDesc,
385 NumEnums: 0,
386 NumMessages: 3,
387 NumExtensions: 0,
388 NumServices: 0,
389 },
390 GoTypes: file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_goTypes,
391 DependencyIndexes: file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_depIdxs,
392 MessageInfos: file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_msgTypes,
393 }.Build()
394 File_envoy_extensions_common_ratelimit_v3_ratelimit_proto = out.File
395 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_rawDesc = nil
396 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_goTypes = nil
397 file_envoy_extensions_common_ratelimit_v3_ratelimit_proto_depIdxs = nil
398 }
399
View as plain text