github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/pkg/protos/statistic/config.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.34.0 4 // protoc v4.25.3 5 // source: statistic/config.proto 6 7 package statistic 8 9 import ( 10 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 reflect "reflect" 13 sync "sync" 14 ) 15 16 const ( 17 // Verify that this generated code is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 // Verify that runtime/protoimpl is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 ) 22 23 // "tcp", "tcp4", "tcp6" 24 // "udp", "udp4", "udp6" 25 // "ip", "ip4", "ip6" 26 // "unix", "unixgram", "unixpacket" 27 type Type int32 28 29 const ( 30 Type_unknown Type = 0 31 Type_tcp Type = 1 32 Type_tcp4 Type = 2 33 Type_tcp6 Type = 3 34 Type_udp Type = 4 35 Type_udp4 Type = 5 36 Type_udp6 Type = 6 37 Type_ip Type = 7 38 Type_ip4 Type = 8 39 Type_ip6 Type = 9 40 Type_unix Type = 10 41 Type_unixgram Type = 11 42 Type_unixpacket Type = 12 43 ) 44 45 // Enum value maps for Type. 46 var ( 47 Type_name = map[int32]string{ 48 0: "unknown", 49 1: "tcp", 50 2: "tcp4", 51 3: "tcp6", 52 4: "udp", 53 5: "udp4", 54 6: "udp6", 55 7: "ip", 56 8: "ip4", 57 9: "ip6", 58 10: "unix", 59 11: "unixgram", 60 12: "unixpacket", 61 } 62 Type_value = map[string]int32{ 63 "unknown": 0, 64 "tcp": 1, 65 "tcp4": 2, 66 "tcp6": 3, 67 "udp": 4, 68 "udp4": 5, 69 "udp6": 6, 70 "ip": 7, 71 "ip4": 8, 72 "ip6": 9, 73 "unix": 10, 74 "unixgram": 11, 75 "unixpacket": 12, 76 } 77 ) 78 79 func (x Type) Enum() *Type { 80 p := new(Type) 81 *p = x 82 return p 83 } 84 85 func (x Type) String() string { 86 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 87 } 88 89 func (Type) Descriptor() protoreflect.EnumDescriptor { 90 return file_statistic_config_proto_enumTypes[0].Descriptor() 91 } 92 93 func (Type) Type() protoreflect.EnumType { 94 return &file_statistic_config_proto_enumTypes[0] 95 } 96 97 func (x Type) Number() protoreflect.EnumNumber { 98 return protoreflect.EnumNumber(x) 99 } 100 101 // Deprecated: Use Type.Descriptor instead. 102 func (Type) EnumDescriptor() ([]byte, []int) { 103 return file_statistic_config_proto_rawDescGZIP(), []int{0} 104 } 105 106 type NetType struct { 107 state protoimpl.MessageState 108 sizeCache protoimpl.SizeCache 109 unknownFields protoimpl.UnknownFields 110 111 ConnType Type `protobuf:"varint,1,opt,name=conn_type,proto3,enum=yuhaiin.statistic.Type" json:"conn_type,omitempty"` 112 UnderlyingType Type `protobuf:"varint,2,opt,name=underlying_type,proto3,enum=yuhaiin.statistic.Type" json:"underlying_type,omitempty"` 113 } 114 115 func (x *NetType) Reset() { 116 *x = NetType{} 117 if protoimpl.UnsafeEnabled { 118 mi := &file_statistic_config_proto_msgTypes[0] 119 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 120 ms.StoreMessageInfo(mi) 121 } 122 } 123 124 func (x *NetType) String() string { 125 return protoimpl.X.MessageStringOf(x) 126 } 127 128 func (*NetType) ProtoMessage() {} 129 130 func (x *NetType) ProtoReflect() protoreflect.Message { 131 mi := &file_statistic_config_proto_msgTypes[0] 132 if protoimpl.UnsafeEnabled && x != nil { 133 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 134 if ms.LoadMessageInfo() == nil { 135 ms.StoreMessageInfo(mi) 136 } 137 return ms 138 } 139 return mi.MessageOf(x) 140 } 141 142 // Deprecated: Use NetType.ProtoReflect.Descriptor instead. 143 func (*NetType) Descriptor() ([]byte, []int) { 144 return file_statistic_config_proto_rawDescGZIP(), []int{0} 145 } 146 147 func (x *NetType) GetConnType() Type { 148 if x != nil { 149 return x.ConnType 150 } 151 return Type_unknown 152 } 153 154 func (x *NetType) GetUnderlyingType() Type { 155 if x != nil { 156 return x.UnderlyingType 157 } 158 return Type_unknown 159 } 160 161 type Connection struct { 162 state protoimpl.MessageState 163 sizeCache protoimpl.SizeCache 164 unknownFields protoimpl.UnknownFields 165 166 Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` 167 Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` 168 Type *NetType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` 169 Extra map[string]string `protobuf:"bytes,4,rep,name=extra,proto3" json:"extra,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 170 } 171 172 func (x *Connection) Reset() { 173 *x = Connection{} 174 if protoimpl.UnsafeEnabled { 175 mi := &file_statistic_config_proto_msgTypes[1] 176 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 177 ms.StoreMessageInfo(mi) 178 } 179 } 180 181 func (x *Connection) String() string { 182 return protoimpl.X.MessageStringOf(x) 183 } 184 185 func (*Connection) ProtoMessage() {} 186 187 func (x *Connection) ProtoReflect() protoreflect.Message { 188 mi := &file_statistic_config_proto_msgTypes[1] 189 if protoimpl.UnsafeEnabled && x != nil { 190 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 191 if ms.LoadMessageInfo() == nil { 192 ms.StoreMessageInfo(mi) 193 } 194 return ms 195 } 196 return mi.MessageOf(x) 197 } 198 199 // Deprecated: Use Connection.ProtoReflect.Descriptor instead. 200 func (*Connection) Descriptor() ([]byte, []int) { 201 return file_statistic_config_proto_rawDescGZIP(), []int{1} 202 } 203 204 func (x *Connection) GetAddr() string { 205 if x != nil { 206 return x.Addr 207 } 208 return "" 209 } 210 211 func (x *Connection) GetId() uint64 { 212 if x != nil { 213 return x.Id 214 } 215 return 0 216 } 217 218 func (x *Connection) GetType() *NetType { 219 if x != nil { 220 return x.Type 221 } 222 return nil 223 } 224 225 func (x *Connection) GetExtra() map[string]string { 226 if x != nil { 227 return x.Extra 228 } 229 return nil 230 } 231 232 var File_statistic_config_proto protoreflect.FileDescriptor 233 234 var file_statistic_config_proto_rawDesc = []byte{ 235 0x0a, 0x16, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 236 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x79, 0x75, 0x68, 0x61, 0x69, 0x69, 237 0x6e, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x22, 0x84, 0x01, 0x0a, 0x08, 238 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 239 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x79, 0x75, 240 0x68, 0x61, 0x69, 0x69, 0x6e, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x2e, 241 0x74, 0x79, 0x70, 0x65, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 242 0x41, 0x0a, 0x0f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x79, 243 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x79, 0x75, 0x68, 0x61, 0x69, 244 0x69, 0x6e, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x74, 0x79, 0x70, 245 0x65, 0x52, 0x0f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x79, 246 0x70, 0x65, 0x22, 0xdb, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 247 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 248 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 249 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 250 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x79, 0x75, 0x68, 0x61, 0x69, 0x69, 0x6e, 0x2e, 0x73, 0x74, 251 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x6e, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 252 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 253 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x79, 0x75, 0x68, 0x61, 0x69, 0x69, 0x6e, 0x2e, 254 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 255 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 256 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x1a, 0x38, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x45, 257 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 258 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 259 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 260 0x2a, 0x8f, 0x01, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x75, 0x6e, 0x6b, 261 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x10, 0x01, 0x12, 262 0x08, 0x0a, 0x04, 0x74, 0x63, 0x70, 0x34, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x74, 0x63, 0x70, 263 0x36, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x75, 0x64, 0x70, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 264 0x75, 0x64, 0x70, 0x34, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x75, 0x64, 0x70, 0x36, 0x10, 0x06, 265 0x12, 0x06, 0x0a, 0x02, 0x69, 0x70, 0x10, 0x07, 0x12, 0x07, 0x0a, 0x03, 0x69, 0x70, 0x34, 0x10, 266 0x08, 0x12, 0x07, 0x0a, 0x03, 0x69, 0x70, 0x36, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x75, 0x6e, 267 0x69, 0x78, 0x10, 0x0a, 0x12, 0x0c, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x78, 0x67, 0x72, 0x61, 0x6d, 268 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x75, 0x6e, 0x69, 0x78, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 269 0x10, 0x0c, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 270 0x2f, 0x41, 0x73, 0x75, 0x74, 0x6f, 0x72, 0x75, 0x66, 0x61, 0x2f, 0x79, 0x75, 0x68, 0x61, 0x69, 271 0x69, 0x6e, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x73, 0x74, 272 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 273 } 274 275 var ( 276 file_statistic_config_proto_rawDescOnce sync.Once 277 file_statistic_config_proto_rawDescData = file_statistic_config_proto_rawDesc 278 ) 279 280 func file_statistic_config_proto_rawDescGZIP() []byte { 281 file_statistic_config_proto_rawDescOnce.Do(func() { 282 file_statistic_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_statistic_config_proto_rawDescData) 283 }) 284 return file_statistic_config_proto_rawDescData 285 } 286 287 var file_statistic_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 288 var file_statistic_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 289 var file_statistic_config_proto_goTypes = []interface{}{ 290 (Type)(0), // 0: yuhaiin.statistic.type 291 (*NetType)(nil), // 1: yuhaiin.statistic.net_type 292 (*Connection)(nil), // 2: yuhaiin.statistic.connection 293 nil, // 3: yuhaiin.statistic.connection.ExtraEntry 294 } 295 var file_statistic_config_proto_depIdxs = []int32{ 296 0, // 0: yuhaiin.statistic.net_type.conn_type:type_name -> yuhaiin.statistic.type 297 0, // 1: yuhaiin.statistic.net_type.underlying_type:type_name -> yuhaiin.statistic.type 298 1, // 2: yuhaiin.statistic.connection.type:type_name -> yuhaiin.statistic.net_type 299 3, // 3: yuhaiin.statistic.connection.extra:type_name -> yuhaiin.statistic.connection.ExtraEntry 300 4, // [4:4] is the sub-list for method output_type 301 4, // [4:4] is the sub-list for method input_type 302 4, // [4:4] is the sub-list for extension type_name 303 4, // [4:4] is the sub-list for extension extendee 304 0, // [0:4] is the sub-list for field type_name 305 } 306 307 func init() { file_statistic_config_proto_init() } 308 func file_statistic_config_proto_init() { 309 if File_statistic_config_proto != nil { 310 return 311 } 312 if !protoimpl.UnsafeEnabled { 313 file_statistic_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 314 switch v := v.(*NetType); i { 315 case 0: 316 return &v.state 317 case 1: 318 return &v.sizeCache 319 case 2: 320 return &v.unknownFields 321 default: 322 return nil 323 } 324 } 325 file_statistic_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 326 switch v := v.(*Connection); i { 327 case 0: 328 return &v.state 329 case 1: 330 return &v.sizeCache 331 case 2: 332 return &v.unknownFields 333 default: 334 return nil 335 } 336 } 337 } 338 type x struct{} 339 out := protoimpl.TypeBuilder{ 340 File: protoimpl.DescBuilder{ 341 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 342 RawDescriptor: file_statistic_config_proto_rawDesc, 343 NumEnums: 1, 344 NumMessages: 3, 345 NumExtensions: 0, 346 NumServices: 0, 347 }, 348 GoTypes: file_statistic_config_proto_goTypes, 349 DependencyIndexes: file_statistic_config_proto_depIdxs, 350 EnumInfos: file_statistic_config_proto_enumTypes, 351 MessageInfos: file_statistic_config_proto_msgTypes, 352 }.Build() 353 File_statistic_config_proto = out.File 354 file_statistic_config_proto_rawDesc = nil 355 file_statistic_config_proto_goTypes = nil 356 file_statistic_config_proto_depIdxs = nil 357 }