-
Notifications
You must be signed in to change notification settings - Fork 432
/
attribute.pb.go
376 lines (345 loc) · 12.6 KB
/
attribute.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: attribute.proto
/*
Package v1 is a generated protocol buffer package.
It is generated from these files:
attribute.proto
config.proto
metadata.proto
role.proto
status.proto
upstream.proto
virtualservice.proto
It has these top-level messages:
Attribute
ListenerAttribute
Config
Metadata
Role
Listener
Status
Upstream
ServiceInfo
Function
VirtualService
Route
RequestMatcher
EventMatcher
WeightedDestination
Destination
FunctionDestination
UpstreamDestination
SSLConfig
SSLFiles
*/
package v1
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/gogo/protobuf/types"
import _ "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// *
// An attribute is a container for configuration that is intended to be applied across a set of labeled resources inside of Gloo.
// Attributes specify a set of selectors which are compared with labels by Gloo at runtime
// In the current implementation, only Listeners have be selected, and therefore configured by Attributes.
// Labels and Selectors follow the same logical patterns implemented by Kubernetes.
// Read about the Kubernetes concepts here: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
// Attributes are useful when applying shared configuration to a large number of objects, such as the sharing of route
// configuration between roles.
type Attribute struct {
// Name of the attribute.
//
// Attribute Names must be unique and follow the following syntax rules:
// One or more lowercase rfc1035/rfc1123 labels separated by '.' with a maximum length of 253 characters.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Attributes can apply only to one kind of resource
// Currently available are:
// * Listeners
//
// Types that are valid to be assigned to AttributeType:
// *Attribute_ListenerAttribute
AttributeType isAttribute_AttributeType `protobuf_oneof:"attribute_type"`
// Status indicates the validation status of the attribute resource.
// Status is read-only by clients, and set by gloo during validation
Status *Status `protobuf:"bytes,6,opt,name=status" json:"status,omitempty" testdiff:"ignore"`
// Metadata contains the resource metadata for the attribute
Metadata *Metadata `protobuf:"bytes,7,opt,name=metadata" json:"metadata,omitempty"`
}
func (m *Attribute) Reset() { *m = Attribute{} }
func (m *Attribute) String() string { return proto.CompactTextString(m) }
func (*Attribute) ProtoMessage() {}
func (*Attribute) Descriptor() ([]byte, []int) { return fileDescriptorAttribute, []int{0} }
type isAttribute_AttributeType interface {
isAttribute_AttributeType()
Equal(interface{}) bool
}
type Attribute_ListenerAttribute struct {
ListenerAttribute *ListenerAttribute `protobuf:"bytes,2,opt,name=listener_attribute,json=listenerAttribute,oneof"`
}
func (*Attribute_ListenerAttribute) isAttribute_AttributeType() {}
func (m *Attribute) GetAttributeType() isAttribute_AttributeType {
if m != nil {
return m.AttributeType
}
return nil
}
func (m *Attribute) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Attribute) GetListenerAttribute() *ListenerAttribute {
if x, ok := m.GetAttributeType().(*Attribute_ListenerAttribute); ok {
return x.ListenerAttribute
}
return nil
}
func (m *Attribute) GetStatus() *Status {
if m != nil {
return m.Status
}
return nil
}
func (m *Attribute) GetMetadata() *Metadata {
if m != nil {
return m.Metadata
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Attribute) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Attribute_OneofMarshaler, _Attribute_OneofUnmarshaler, _Attribute_OneofSizer, []interface{}{
(*Attribute_ListenerAttribute)(nil),
}
}
func _Attribute_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Attribute)
// attribute_type
switch x := m.AttributeType.(type) {
case *Attribute_ListenerAttribute:
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ListenerAttribute); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Attribute.AttributeType has unexpected type %T", x)
}
return nil
}
func _Attribute_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Attribute)
switch tag {
case 2: // attribute_type.listener_attribute
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ListenerAttribute)
err := b.DecodeMessage(msg)
m.AttributeType = &Attribute_ListenerAttribute{msg}
return true, err
default:
return false, nil
}
}
func _Attribute_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Attribute)
// attribute_type
switch x := m.AttributeType.(type) {
case *Attribute_ListenerAttribute:
s := proto.Size(x.ListenerAttribute)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Listeners define the address:port where the proxy will listen for incoming connections
// Each listener defines a unique set of TCP and HTTP behaviors
type ListenerAttribute struct {
// Apply this attribute to listeners with label keys and values matching this
// selector. If empty or not present, the attribute will not be applied to any listeners.
Selector map[string]string `protobuf:"bytes,1,rep,name=selector" json:"selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Listeners can serve HTTP or raw TCP, but not both. If at least one Virtual Service is specified here,
// the listener will become an HTTP listener serving routes defined in these virtual services.
// Some Listener plugins may impose restrictions on the Virtual Services that can be applied to a listener.
// For example, some plugins may require all applied virtual services only route to a specific upstream,
// a common requirement for Service Meshes
VirtualServices []string `protobuf:"bytes,4,rep,name=virtual_services,json=virtualServices" json:"virtual_services,omitempty"`
// Config contains top-level config to be applied to a listener
// Listener config is applied to all TCP/HTTP traffic that
// initiates via this listener.
// Configuration such as gzip compression and TLS authentication is specified here
// This config struct will be merged with Role-specific Listener Conig. If two fields overlap between the
// Listener config on the role and the config on the attribute, the config on the Role will supersede this one
Config *google_protobuf.Struct `protobuf:"bytes,5,opt,name=config" json:"config,omitempty"`
}
func (m *ListenerAttribute) Reset() { *m = ListenerAttribute{} }
func (m *ListenerAttribute) String() string { return proto.CompactTextString(m) }
func (*ListenerAttribute) ProtoMessage() {}
func (*ListenerAttribute) Descriptor() ([]byte, []int) { return fileDescriptorAttribute, []int{1} }
func (m *ListenerAttribute) GetSelector() map[string]string {
if m != nil {
return m.Selector
}
return nil
}
func (m *ListenerAttribute) GetVirtualServices() []string {
if m != nil {
return m.VirtualServices
}
return nil
}
func (m *ListenerAttribute) GetConfig() *google_protobuf.Struct {
if m != nil {
return m.Config
}
return nil
}
func init() {
proto.RegisterType((*Attribute)(nil), "gloo.api.v1.Attribute")
proto.RegisterType((*ListenerAttribute)(nil), "gloo.api.v1.ListenerAttribute")
}
func (this *Attribute) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Attribute)
if !ok {
that2, ok := that.(Attribute)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Name != that1.Name {
return false
}
if that1.AttributeType == nil {
if this.AttributeType != nil {
return false
}
} else if this.AttributeType == nil {
return false
} else if !this.AttributeType.Equal(that1.AttributeType) {
return false
}
if !this.Status.Equal(that1.Status) {
return false
}
if !this.Metadata.Equal(that1.Metadata) {
return false
}
return true
}
func (this *Attribute_ListenerAttribute) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Attribute_ListenerAttribute)
if !ok {
that2, ok := that.(Attribute_ListenerAttribute)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !this.ListenerAttribute.Equal(that1.ListenerAttribute) {
return false
}
return true
}
func (this *ListenerAttribute) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*ListenerAttribute)
if !ok {
that2, ok := that.(ListenerAttribute)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if len(this.Selector) != len(that1.Selector) {
return false
}
for i := range this.Selector {
if this.Selector[i] != that1.Selector[i] {
return false
}
}
if len(this.VirtualServices) != len(that1.VirtualServices) {
return false
}
for i := range this.VirtualServices {
if this.VirtualServices[i] != that1.VirtualServices[i] {
return false
}
}
if !this.Config.Equal(that1.Config) {
return false
}
return true
}
func init() { proto.RegisterFile("attribute.proto", fileDescriptorAttribute) }
var fileDescriptorAttribute = []byte{
// 411 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x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