/
util_msg.pb.go
267 lines (236 loc) · 8.26 KB
/
util_msg.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: util_msg.proto
package bess_pb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// / The Field message represents one field in a packet -- either stored in metadata or in the packet body.
type Field struct {
// Types that are valid to be assigned to Position:
// *Field_AttrName
// *Field_Offset
Position isField_Position `protobuf_oneof:"position"`
NumBytes uint32 `protobuf:"varint,3,opt,name=num_bytes,json=numBytes" json:"num_bytes,omitempty"`
}
func (m *Field) Reset() { *m = Field{} }
func (m *Field) String() string { return proto.CompactTextString(m) }
func (*Field) ProtoMessage() {}
func (*Field) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
type isField_Position interface{ isField_Position() }
type Field_AttrName struct {
AttrName string `protobuf:"bytes,1,opt,name=attr_name,json=attrName,oneof"`
}
type Field_Offset struct {
Offset uint32 `protobuf:"varint,2,opt,name=offset,oneof"`
}
func (*Field_AttrName) isField_Position() {}
func (*Field_Offset) isField_Position() {}
func (m *Field) GetPosition() isField_Position {
if m != nil {
return m.Position
}
return nil
}
func (m *Field) GetAttrName() string {
if x, ok := m.GetPosition().(*Field_AttrName); ok {
return x.AttrName
}
return ""
}
func (m *Field) GetOffset() uint32 {
if x, ok := m.GetPosition().(*Field_Offset); ok {
return x.Offset
}
return 0
}
func (m *Field) GetNumBytes() uint32 {
if m != nil {
return m.NumBytes
}
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Field) 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 _Field_OneofMarshaler, _Field_OneofUnmarshaler, _Field_OneofSizer, []interface{}{
(*Field_AttrName)(nil),
(*Field_Offset)(nil),
}
}
func _Field_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Field)
// position
switch x := m.Position.(type) {
case *Field_AttrName:
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeStringBytes(x.AttrName)
case *Field_Offset:
b.EncodeVarint(2<<3 | proto.WireVarint)
b.EncodeVarint(uint64(x.Offset))
case nil:
default:
return fmt.Errorf("Field.Position has unexpected type %T", x)
}
return nil
}
func _Field_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Field)
switch tag {
case 1: // position.attr_name
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Position = &Field_AttrName{x}
return true, err
case 2: // position.offset
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.Position = &Field_Offset{uint32(x)}
return true, err
default:
return false, nil
}
}
func _Field_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Field)
// position
switch x := m.Position.(type) {
case *Field_AttrName:
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.AttrName)))
n += len(x.AttrName)
case *Field_Offset:
n += proto.SizeVarint(2<<3 | proto.WireVarint)
n += proto.SizeVarint(uint64(x.Offset))
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// / The FieldData message encodes a value to insert into a packet; the value can be supplied as either an int or a bytestring.
type FieldData struct {
// Types that are valid to be assigned to Encoding:
// *FieldData_ValueBin
// *FieldData_ValueInt
Encoding isFieldData_Encoding `protobuf_oneof:"encoding"`
}
func (m *FieldData) Reset() { *m = FieldData{} }
func (m *FieldData) String() string { return proto.CompactTextString(m) }
func (*FieldData) ProtoMessage() {}
func (*FieldData) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} }
type isFieldData_Encoding interface{ isFieldData_Encoding() }
type FieldData_ValueBin struct {
ValueBin []byte `protobuf:"bytes,1,opt,name=value_bin,json=valueBin,proto3,oneof"`
}
type FieldData_ValueInt struct {
ValueInt uint64 `protobuf:"varint,2,opt,name=value_int,json=valueInt,oneof"`
}
func (*FieldData_ValueBin) isFieldData_Encoding() {}
func (*FieldData_ValueInt) isFieldData_Encoding() {}
func (m *FieldData) GetEncoding() isFieldData_Encoding {
if m != nil {
return m.Encoding
}
return nil
}
func (m *FieldData) GetValueBin() []byte {
if x, ok := m.GetEncoding().(*FieldData_ValueBin); ok {
return x.ValueBin
}
return nil
}
func (m *FieldData) GetValueInt() uint64 {
if x, ok := m.GetEncoding().(*FieldData_ValueInt); ok {
return x.ValueInt
}
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*FieldData) 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 _FieldData_OneofMarshaler, _FieldData_OneofUnmarshaler, _FieldData_OneofSizer, []interface{}{
(*FieldData_ValueBin)(nil),
(*FieldData_ValueInt)(nil),
}
}
func _FieldData_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*FieldData)
// encoding
switch x := m.Encoding.(type) {
case *FieldData_ValueBin:
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeRawBytes(x.ValueBin)
case *FieldData_ValueInt:
b.EncodeVarint(2<<3 | proto.WireVarint)
b.EncodeVarint(uint64(x.ValueInt))
case nil:
default:
return fmt.Errorf("FieldData.Encoding has unexpected type %T", x)
}
return nil
}
func _FieldData_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*FieldData)
switch tag {
case 1: // encoding.value_bin
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeRawBytes(true)
m.Encoding = &FieldData_ValueBin{x}
return true, err
case 2: // encoding.value_int
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.Encoding = &FieldData_ValueInt{x}
return true, err
default:
return false, nil
}
}
func _FieldData_OneofSizer(msg proto.Message) (n int) {
m := msg.(*FieldData)
// encoding
switch x := m.Encoding.(type) {
case *FieldData_ValueBin:
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.ValueBin)))
n += len(x.ValueBin)
case *FieldData_ValueInt:
n += proto.SizeVarint(2<<3 | proto.WireVarint)
n += proto.SizeVarint(uint64(x.ValueInt))
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterType((*Field)(nil), "bess.pb.Field")
proto.RegisterType((*FieldData)(nil), "bess.pb.FieldData")
}
func init() { proto.RegisterFile("util_msg.proto", fileDescriptor4) }
var fileDescriptor4 = []byte{
// 198 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xcf, 0x4f, 0x4b, 0xc4, 0x30,
0x10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