-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmsg.pb.go
More file actions
300 lines (262 loc) · 8.06 KB
/
msg.pb.go
File metadata and controls
300 lines (262 loc) · 8.06 KB
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
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v3.5.0
// source: msg.proto
package pingtunnel
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type MyMsg_TYPE int32
const (
MyMsg_DATA MyMsg_TYPE = 0
MyMsg_PING MyMsg_TYPE = 1
MyMsg_KICK MyMsg_TYPE = 2
MyMsg_MAGIC MyMsg_TYPE = 57005
)
// Enum value maps for MyMsg_TYPE.
var (
MyMsg_TYPE_name = map[int32]string{
0: "DATA",
1: "PING",
2: "KICK",
57005: "MAGIC",
}
MyMsg_TYPE_value = map[string]int32{
"DATA": 0,
"PING": 1,
"KICK": 2,
"MAGIC": 57005,
}
)
func (x MyMsg_TYPE) Enum() *MyMsg_TYPE {
p := new(MyMsg_TYPE)
*p = x
return p
}
func (x MyMsg_TYPE) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MyMsg_TYPE) Descriptor() protoreflect.EnumDescriptor {
return file_msg_proto_enumTypes[0].Descriptor()
}
func (MyMsg_TYPE) Type() protoreflect.EnumType {
return &file_msg_proto_enumTypes[0]
}
func (x MyMsg_TYPE) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MyMsg_TYPE.Descriptor instead.
func (MyMsg_TYPE) EnumDescriptor() ([]byte, []int) {
return file_msg_proto_rawDescGZIP(), []int{0, 0}
}
type MyMsg struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
Rproto int32 `protobuf:"zigzag32,5,opt,name=rproto,proto3" json:"rproto,omitempty"`
Magic int32 `protobuf:"zigzag32,6,opt,name=magic,proto3" json:"magic,omitempty"`
Key int32 `protobuf:"zigzag32,7,opt,name=key,proto3" json:"key,omitempty"`
Timeout int32 `protobuf:"varint,8,opt,name=timeout,proto3" json:"timeout,omitempty"`
Tcpmode int32 `protobuf:"varint,9,opt,name=tcpmode,proto3" json:"tcpmode,omitempty"`
TcpmodeBuffersize int32 `protobuf:"varint,10,opt,name=tcpmode_buffersize,json=tcpmodeBuffersize,proto3" json:"tcpmode_buffersize,omitempty"`
TcpmodeMaxwin int32 `protobuf:"varint,11,opt,name=tcpmode_maxwin,json=tcpmodeMaxwin,proto3" json:"tcpmode_maxwin,omitempty"`
TcpmodeResendTimems int32 `protobuf:"varint,12,opt,name=tcpmode_resend_timems,json=tcpmodeResendTimems,proto3" json:"tcpmode_resend_timems,omitempty"`
TcpmodeCompress int32 `protobuf:"varint,13,opt,name=tcpmode_compress,json=tcpmodeCompress,proto3" json:"tcpmode_compress,omitempty"`
TcpmodeStat int32 `protobuf:"varint,14,opt,name=tcpmode_stat,json=tcpmodeStat,proto3" json:"tcpmode_stat,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *MyMsg) Reset() {
*x = MyMsg{}
mi := &file_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *MyMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MyMsg) ProtoMessage() {}
func (x *MyMsg) ProtoReflect() protoreflect.Message {
mi := &file_msg_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MyMsg.ProtoReflect.Descriptor instead.
func (*MyMsg) Descriptor() ([]byte, []int) {
return file_msg_proto_rawDescGZIP(), []int{0}
}
func (x *MyMsg) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *MyMsg) GetType() int32 {
if x != nil {
return x.Type
}
return 0
}
func (x *MyMsg) GetTarget() string {
if x != nil {
return x.Target
}
return ""
}
func (x *MyMsg) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
func (x *MyMsg) GetRproto() int32 {
if x != nil {
return x.Rproto
}
return 0
}
func (x *MyMsg) GetMagic() int32 {
if x != nil {
return x.Magic
}
return 0
}
func (x *MyMsg) GetKey() int32 {
if x != nil {
return x.Key
}
return 0
}
func (x *MyMsg) GetTimeout() int32 {
if x != nil {
return x.Timeout
}
return 0
}
func (x *MyMsg) GetTcpmode() int32 {
if x != nil {
return x.Tcpmode
}
return 0
}
func (x *MyMsg) GetTcpmodeBuffersize() int32 {
if x != nil {
return x.TcpmodeBuffersize
}
return 0
}
func (x *MyMsg) GetTcpmodeMaxwin() int32 {
if x != nil {
return x.TcpmodeMaxwin
}
return 0
}
func (x *MyMsg) GetTcpmodeResendTimems() int32 {
if x != nil {
return x.TcpmodeResendTimems
}
return 0
}
func (x *MyMsg) GetTcpmodeCompress() int32 {
if x != nil {
return x.TcpmodeCompress
}
return 0
}
func (x *MyMsg) GetTcpmodeStat() int32 {
if x != nil {
return x.TcpmodeStat
}
return 0
}
var File_msg_proto protoreflect.FileDescriptor
const file_msg_proto_rawDesc = "" +
"\n" +
"\tmsg.proto\"\xd6\x03\n" +
"\x05MyMsg\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
"\x04type\x18\x02 \x01(\x05R\x04type\x12\x16\n" +
"\x06target\x18\x03 \x01(\tR\x06target\x12\x12\n" +
"\x04data\x18\x04 \x01(\fR\x04data\x12\x16\n" +
"\x06rproto\x18\x05 \x01(\x11R\x06rproto\x12\x14\n" +
"\x05magic\x18\x06 \x01(\x11R\x05magic\x12\x10\n" +
"\x03key\x18\a \x01(\x11R\x03key\x12\x18\n" +
"\atimeout\x18\b \x01(\x05R\atimeout\x12\x18\n" +
"\atcpmode\x18\t \x01(\x05R\atcpmode\x12-\n" +
"\x12tcpmode_buffersize\x18\n" +
" \x01(\x05R\x11tcpmodeBuffersize\x12%\n" +
"\x0etcpmode_maxwin\x18\v \x01(\x05R\rtcpmodeMaxwin\x122\n" +
"\x15tcpmode_resend_timems\x18\f \x01(\x05R\x13tcpmodeResendTimems\x12)\n" +
"\x10tcpmode_compress\x18\r \x01(\x05R\x0ftcpmodeCompress\x12!\n" +
"\ftcpmode_stat\x18\x0e \x01(\x05R\vtcpmodeStat\"1\n" +
"\x04TYPE\x12\b\n" +
"\x04DATA\x10\x00\x12\b\n" +
"\x04PING\x10\x01\x12\b\n" +
"\x04KICK\x10\x02\x12\v\n" +
"\x05MAGIC\x10\xad\xbd\x03B\x0eZ\f./pingtunnelb\x06proto3"
var (
file_msg_proto_rawDescOnce sync.Once
file_msg_proto_rawDescData []byte
)
func file_msg_proto_rawDescGZIP() []byte {
file_msg_proto_rawDescOnce.Do(func() {
file_msg_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_msg_proto_rawDesc), len(file_msg_proto_rawDesc)))
})
return file_msg_proto_rawDescData
}
var file_msg_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_msg_proto_goTypes = []any{
(MyMsg_TYPE)(0), // 0: MyMsg.TYPE
(*MyMsg)(nil), // 1: MyMsg
}
var file_msg_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_msg_proto_init() }
func file_msg_proto_init() {
if File_msg_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_msg_proto_rawDesc), len(file_msg_proto_rawDesc)),
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_msg_proto_goTypes,
DependencyIndexes: file_msg_proto_depIdxs,
EnumInfos: file_msg_proto_enumTypes,
MessageInfos: file_msg_proto_msgTypes,
}.Build()
File_msg_proto = out.File
file_msg_proto_goTypes = nil
file_msg_proto_depIdxs = nil
}