github.com/hoveychen/protoreflect@v1.4.7-0.20221103114119-0b4b3385ec76/internal/testprotos/desc_test_comments.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: desc_test_comments.proto 3 4 // And now the package declaration 5 6 package testprotos 7 8 import ( 9 context "context" 10 fmt "fmt" 11 proto "github.com/golang/protobuf/proto" 12 empty "github.com/golang/protobuf/ptypes/empty" 13 grpc "google.golang.org/grpc" 14 math "math" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 27 28 type Request_MarioCharacters int32 29 30 const ( 31 Request_MARIO Request_MarioCharacters = 1 32 Request_LUIGI Request_MarioCharacters = 2 33 Request_PEACH Request_MarioCharacters = 3 34 Request_BOWSER Request_MarioCharacters = 4 35 Request_WARIO Request_MarioCharacters = 5 36 Request_WALUIGI Request_MarioCharacters = 6 37 Request_SHY_GUY Request_MarioCharacters = 7 38 Request_HEY_HO Request_MarioCharacters = 7 39 Request_MAGIKOOPA Request_MarioCharacters = 8 40 Request_KAMEK Request_MarioCharacters = 8 41 Request_SNIFIT Request_MarioCharacters = -101 42 ) 43 44 var Request_MarioCharacters_name = map[int32]string{ 45 1: "MARIO", 46 2: "LUIGI", 47 3: "PEACH", 48 4: "BOWSER", 49 5: "WARIO", 50 6: "WALUIGI", 51 7: "SHY_GUY", 52 // Duplicate value: 7: "HEY_HO", 53 8: "MAGIKOOPA", 54 // Duplicate value: 8: "KAMEK", 55 -101: "SNIFIT", 56 } 57 58 var Request_MarioCharacters_value = map[string]int32{ 59 "MARIO": 1, 60 "LUIGI": 2, 61 "PEACH": 3, 62 "BOWSER": 4, 63 "WARIO": 5, 64 "WALUIGI": 6, 65 "SHY_GUY": 7, 66 "HEY_HO": 7, 67 "MAGIKOOPA": 8, 68 "KAMEK": 8, 69 "SNIFIT": -101, 70 } 71 72 func (x Request_MarioCharacters) Enum() *Request_MarioCharacters { 73 p := new(Request_MarioCharacters) 74 *p = x 75 return p 76 } 77 78 func (x Request_MarioCharacters) String() string { 79 return proto.EnumName(Request_MarioCharacters_name, int32(x)) 80 } 81 82 func (x *Request_MarioCharacters) UnmarshalJSON(data []byte) error { 83 value, err := proto.UnmarshalJSONEnum(Request_MarioCharacters_value, data, "Request_MarioCharacters") 84 if err != nil { 85 return err 86 } 87 *x = Request_MarioCharacters(value) 88 return nil 89 } 90 91 func (Request_MarioCharacters) EnumDescriptor() ([]byte, []int) { 92 return fileDescriptor_62dea87c686ed756, []int{0, 0} 93 } 94 95 // We need a request for our RPC service below. 96 // 97 // Deprecated: Do not use. 98 type Request struct { 99 // A field comment 100 Ids []int32 `protobuf:"varint,1,rep,packed,name=ids,json=|foo|" json:"ids,omitempty"` 101 // label comment 102 Name *string `protobuf:"bytes,2,opt,name=name,def=fubar" json:"name,omitempty"` 103 Extras *Request_Extras `protobuf:"group,3,opt,name=Extras,json=extras" json:"extras,omitempty"` 104 // can be this or that 105 // 106 // Types that are valid to be assigned to Abc: 107 // *Request_This 108 // *Request_That 109 Abc isRequest_Abc `protobuf_oneof:"abc"` 110 // can be these or those 111 // 112 // Types that are valid to be assigned to Xyz: 113 // *Request_These 114 // *Request_Those 115 Xyz isRequest_Xyz `protobuf_oneof:"xyz"` 116 // map field 117 Things map[string]string `protobuf:"bytes,8,rep,name=things" json:"things,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 118 XXX_NoUnkeyedLiteral struct{} `json:"-"` 119 proto.XXX_InternalExtensions `json:"-"` 120 XXX_unrecognized []byte `json:"-"` 121 XXX_sizecache int32 `json:"-"` 122 } 123 124 func (m *Request) Reset() { *m = Request{} } 125 func (m *Request) String() string { return proto.CompactTextString(m) } 126 func (*Request) ProtoMessage() {} 127 func (*Request) Descriptor() ([]byte, []int) { 128 return fileDescriptor_62dea87c686ed756, []int{0} 129 } 130 131 var extRange_Request = []proto.ExtensionRange{ 132 {Start: 100, End: 200}, 133 {Start: 201, End: 250}, 134 } 135 136 func (*Request) ExtensionRangeArray() []proto.ExtensionRange { 137 return extRange_Request 138 } 139 140 func (m *Request) XXX_Unmarshal(b []byte) error { 141 return xxx_messageInfo_Request.Unmarshal(m, b) 142 } 143 func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 144 return xxx_messageInfo_Request.Marshal(b, m, deterministic) 145 } 146 func (m *Request) XXX_Merge(src proto.Message) { 147 xxx_messageInfo_Request.Merge(m, src) 148 } 149 func (m *Request) XXX_Size() int { 150 return xxx_messageInfo_Request.Size(m) 151 } 152 func (m *Request) XXX_DiscardUnknown() { 153 xxx_messageInfo_Request.DiscardUnknown(m) 154 } 155 156 var xxx_messageInfo_Request proto.InternalMessageInfo 157 158 const Default_Request_Name string = "fubar" 159 160 func (m *Request) GetIds() []int32 { 161 if m != nil { 162 return m.Ids 163 } 164 return nil 165 } 166 167 func (m *Request) GetName() string { 168 if m != nil && m.Name != nil { 169 return *m.Name 170 } 171 return Default_Request_Name 172 } 173 174 func (m *Request) GetExtras() *Request_Extras { 175 if m != nil { 176 return m.Extras 177 } 178 return nil 179 } 180 181 type isRequest_Abc interface { 182 isRequest_Abc() 183 } 184 185 type Request_This struct { 186 This string `protobuf:"bytes,4,opt,name=this,oneof"` 187 } 188 189 type Request_That struct { 190 That int32 `protobuf:"varint,5,opt,name=that,oneof"` 191 } 192 193 func (*Request_This) isRequest_Abc() {} 194 195 func (*Request_That) isRequest_Abc() {} 196 197 func (m *Request) GetAbc() isRequest_Abc { 198 if m != nil { 199 return m.Abc 200 } 201 return nil 202 } 203 204 func (m *Request) GetThis() string { 205 if x, ok := m.GetAbc().(*Request_This); ok { 206 return x.This 207 } 208 return "" 209 } 210 211 func (m *Request) GetThat() int32 { 212 if x, ok := m.GetAbc().(*Request_That); ok { 213 return x.That 214 } 215 return 0 216 } 217 218 type isRequest_Xyz interface { 219 isRequest_Xyz() 220 } 221 222 type Request_These struct { 223 These string `protobuf:"bytes,6,opt,name=these,oneof"` 224 } 225 226 type Request_Those struct { 227 Those int32 `protobuf:"varint,7,opt,name=those,oneof"` 228 } 229 230 func (*Request_These) isRequest_Xyz() {} 231 232 func (*Request_Those) isRequest_Xyz() {} 233 234 func (m *Request) GetXyz() isRequest_Xyz { 235 if m != nil { 236 return m.Xyz 237 } 238 return nil 239 } 240 241 func (m *Request) GetThese() string { 242 if x, ok := m.GetXyz().(*Request_These); ok { 243 return x.These 244 } 245 return "" 246 } 247 248 func (m *Request) GetThose() int32 { 249 if x, ok := m.GetXyz().(*Request_Those); ok { 250 return x.Those 251 } 252 return 0 253 } 254 255 func (m *Request) GetThings() map[string]string { 256 if m != nil { 257 return m.Things 258 } 259 return nil 260 } 261 262 // XXX_OneofWrappers is for the internal use of the proto package. 263 func (*Request) XXX_OneofWrappers() []interface{} { 264 return []interface{}{ 265 (*Request_This)(nil), 266 (*Request_That)(nil), 267 (*Request_These)(nil), 268 (*Request_Those)(nil), 269 } 270 } 271 272 // Group comment 273 type Request_Extras struct { 274 Dbl *float64 `protobuf:"fixed64,1,opt,name=dbl" json:"dbl,omitempty"` 275 Flt *float32 `protobuf:"fixed32,2,opt,name=flt" json:"flt,omitempty"` 276 // Leading comment... 277 Str *string `protobuf:"bytes,3,opt,name=str" json:"str,omitempty"` 278 XXX_NoUnkeyedLiteral struct{} `json:"-"` 279 XXX_unrecognized []byte `json:"-"` 280 XXX_sizecache int32 `json:"-"` 281 } 282 283 func (m *Request_Extras) Reset() { *m = Request_Extras{} } 284 func (m *Request_Extras) String() string { return proto.CompactTextString(m) } 285 func (*Request_Extras) ProtoMessage() {} 286 func (*Request_Extras) Descriptor() ([]byte, []int) { 287 return fileDescriptor_62dea87c686ed756, []int{0, 0} 288 } 289 290 func (m *Request_Extras) XXX_Unmarshal(b []byte) error { 291 return xxx_messageInfo_Request_Extras.Unmarshal(m, b) 292 } 293 func (m *Request_Extras) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 294 return xxx_messageInfo_Request_Extras.Marshal(b, m, deterministic) 295 } 296 func (m *Request_Extras) XXX_Merge(src proto.Message) { 297 xxx_messageInfo_Request_Extras.Merge(m, src) 298 } 299 func (m *Request_Extras) XXX_Size() int { 300 return xxx_messageInfo_Request_Extras.Size(m) 301 } 302 func (m *Request_Extras) XXX_DiscardUnknown() { 303 xxx_messageInfo_Request_Extras.DiscardUnknown(m) 304 } 305 306 var xxx_messageInfo_Request_Extras proto.InternalMessageInfo 307 308 func (m *Request_Extras) GetDbl() float64 { 309 if m != nil && m.Dbl != nil { 310 return *m.Dbl 311 } 312 return 0 313 } 314 315 func (m *Request_Extras) GetFlt() float32 { 316 if m != nil && m.Flt != nil { 317 return *m.Flt 318 } 319 return 0 320 } 321 322 func (m *Request_Extras) GetStr() string { 323 if m != nil && m.Str != nil { 324 return *m.Str 325 } 326 return "" 327 } 328 329 type AnEmptyMessage struct { 330 XXX_NoUnkeyedLiteral struct{} `json:"-"` 331 XXX_unrecognized []byte `json:"-"` 332 XXX_sizecache int32 `json:"-"` 333 } 334 335 func (m *AnEmptyMessage) Reset() { *m = AnEmptyMessage{} } 336 func (m *AnEmptyMessage) String() string { return proto.CompactTextString(m) } 337 func (*AnEmptyMessage) ProtoMessage() {} 338 func (*AnEmptyMessage) Descriptor() ([]byte, []int) { 339 return fileDescriptor_62dea87c686ed756, []int{1} 340 } 341 342 func (m *AnEmptyMessage) XXX_Unmarshal(b []byte) error { 343 return xxx_messageInfo_AnEmptyMessage.Unmarshal(m, b) 344 } 345 func (m *AnEmptyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 346 return xxx_messageInfo_AnEmptyMessage.Marshal(b, m, deterministic) 347 } 348 func (m *AnEmptyMessage) XXX_Merge(src proto.Message) { 349 xxx_messageInfo_AnEmptyMessage.Merge(m, src) 350 } 351 func (m *AnEmptyMessage) XXX_Size() int { 352 return xxx_messageInfo_AnEmptyMessage.Size(m) 353 } 354 func (m *AnEmptyMessage) XXX_DiscardUnknown() { 355 xxx_messageInfo_AnEmptyMessage.DiscardUnknown(m) 356 } 357 358 var xxx_messageInfo_AnEmptyMessage proto.InternalMessageInfo 359 360 var E_Guid1 = &proto.ExtensionDesc{ 361 ExtendedType: (*Request)(nil), 362 ExtensionType: (*uint64)(nil), 363 Field: 123, 364 Name: "foo.bar.guid1", 365 Tag: "varint,123,opt,name=guid1", 366 Filename: "desc_test_comments.proto", 367 } 368 369 var E_Guid2 = &proto.ExtensionDesc{ 370 ExtendedType: (*Request)(nil), 371 ExtensionType: (*uint64)(nil), 372 Field: 124, 373 Name: "foo.bar.guid2", 374 Tag: "varint,124,opt,name=guid2", 375 Filename: "desc_test_comments.proto", 376 } 377 378 func init() { 379 proto.RegisterEnum("foo.bar.Request_MarioCharacters", Request_MarioCharacters_name, Request_MarioCharacters_value) 380 proto.RegisterType((*Request)(nil), "foo.bar.Request") 381 proto.RegisterMapType((map[string]string)(nil), "foo.bar.Request.ThingsEntry") 382 proto.RegisterType((*Request_Extras)(nil), "foo.bar.Request.Extras") 383 proto.RegisterType((*AnEmptyMessage)(nil), "foo.bar.AnEmptyMessage") 384 proto.RegisterExtension(E_Guid1) 385 proto.RegisterExtension(E_Guid2) 386 } 387 388 func init() { proto.RegisterFile("desc_test_comments.proto", fileDescriptor_62dea87c686ed756) } 389 390 var fileDescriptor_62dea87c686ed756 = []byte{ 391 // 785 bytes of a gzipped FileDescriptorProto 392 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0x4f, 0x6f, 0x1b, 0x45, 393 0x14, 0xf7, 0x78, 0x67, 0xd6, 0xeb, 0x67, 0xfe, 0x8c, 0x86, 0x26, 0x5d, 0xb6, 0xa8, 0x32, 0x11, 394 0x02, 0xab, 0x87, 0xb5, 0xea, 0x72, 0x80, 0x9c, 0x70, 0x2a, 0x37, 0x76, 0x83, 0x71, 0x35, 0x6e, 395 0x14, 0x85, 0x03, 0xd1, 0xec, 0x7a, 0x6c, 0x2f, 0xd8, 0x3b, 0x66, 0x67, 0x5c, 0xe2, 0x34, 0x17, 396 0x6e, 0xfd, 0x04, 0x5c, 0x38, 0x70, 0x41, 0x22, 0x8a, 0x84, 0x14, 0x7a, 0xe3, 0x82, 0xe0, 0x46, 397 0xbe, 0x00, 0x37, 0x3e, 0x05, 0x87, 0x3d, 0x70, 0x00, 0xed, 0xae, 0xab, 0x22, 0x92, 0xb9, 0xcc, 398 0x7b, 0xbf, 0xf7, 0x7b, 0xbf, 0x79, 0x6f, 0xf4, 0x66, 0xc0, 0x1d, 0x49, 0x1d, 0x1e, 0x19, 0xa9, 399 0xcd, 0x51, 0xa8, 0xe6, 0x73, 0x19, 0x1b, 0xed, 0x2f, 0x12, 0x65, 0x14, 0xab, 0x8c, 0x95, 0xf2, 400 0x03, 0x91, 0x78, 0xb7, 0x26, 0x4a, 0x4d, 0x66, 0xb2, 0x99, 0xc3, 0xc1, 0x72, 0xdc, 0x94, 0xf3, 401 0x85, 0x59, 0x15, 0x2c, 0xef, 0xe6, 0xcb, 0x7c, 0xb5, 0x30, 0x91, 0x8a, 0xd7, 0xe9, 0x5b, 0xbf, 402 0x11, 0xa8, 0x70, 0xf9, 0xe5, 0x52, 0x6a, 0xc3, 0xde, 0x01, 0x2b, 0x1a, 0x69, 0x17, 0xd5, 0xad, 403 0x06, 0xd9, 0xa1, 0xe7, 0x29, 0xb6, 0x44, 0x10, 0x3e, 0x4f, 0xb1, 0x75, 0xbc, 0x3a, 0xa1, 0x88, 404 0x93, 0xd3, 0xb1, 0x52, 0xa7, 0xec, 0x4d, 0xc0, 0xb1, 0x98, 0x4b, 0xb7, 0x5c, 0x47, 0x8d, 0xea, 405 0x36, 0x19, 0x2f, 0x03, 0x91, 0xf0, 0x1c, 0x62, 0x4d, 0xb0, 0xe5, 0xb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32, 0x34, 0xcd, 0x28, 0x36, 0x32, 0x89, 0xc5, 0xac, 0x99, 0x7d, 440 0x06, 0x79, 0x44, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x33, 0x20, 0x0a, 0x5e, 0x04, 0x00, 441 0x00, 442 } 443 444 // Reference imports to suppress errors if they are not otherwise used. 445 var _ context.Context 446 var _ grpc.ClientConn 447 448 // This is a compile-time assertion to ensure that this generated file 449 // is compatible with the grpc package it is being compiled against. 450 const _ = grpc.SupportPackageIsVersion4 451 452 // RpcServiceClient is the client API for RpcService service. 453 // 454 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 455 type RpcServiceClient interface { 456 // Method comment 457 StreamingRpc(ctx context.Context, opts ...grpc.CallOption) (RpcService_StreamingRpcClient, error) 458 UnaryRpc(ctx context.Context, in *Request, opts ...grpc.CallOption) (*empty.Empty, error) 459 } 460 461 type rpcServiceClient struct { 462 cc *grpc.ClientConn 463 } 464 465 func NewRpcServiceClient(cc *grpc.ClientConn) RpcServiceClient { 466 return &rpcServiceClient{cc} 467 } 468 469 func (c *rpcServiceClient) StreamingRpc(ctx context.Context, opts ...grpc.CallOption) (RpcService_StreamingRpcClient, error) { 470 stream, err := c.cc.NewStream(ctx, &_RpcService_serviceDesc.Streams[0], "/foo.bar.RpcService/StreamingRpc", opts...) 471 if err != nil { 472 return nil, err 473 } 474 x := &rpcServiceStreamingRpcClient{stream} 475 return x, nil 476 } 477 478 type RpcService_StreamingRpcClient interface { 479 Send(*Request) error 480 CloseAndRecv() (*Request, error) 481 grpc.ClientStream 482 } 483 484 type rpcServiceStreamingRpcClient struct { 485 grpc.ClientStream 486 } 487 488 func (x *rpcServiceStreamingRpcClient) Send(m *Request) error { 489 return x.ClientStream.SendMsg(m) 490 } 491 492 func (x *rpcServiceStreamingRpcClient) CloseAndRecv() (*Request, error) { 493 if err := x.ClientStream.CloseSend(); err != nil { 494 return nil, err 495 } 496 m := new(Request) 497 if err := x.ClientStream.RecvMsg(m); err != nil { 498 return nil, err 499 } 500 return m, nil 501 } 502 503 // Deprecated: Do not use. 504 func (c *rpcServiceClient) UnaryRpc(ctx context.Context, in *Request, opts ...grpc.CallOption) (*empty.Empty, error) { 505 out := new(empty.Empty) 506 err := c.cc.Invoke(ctx, "/foo.bar.RpcService/UnaryRpc", in, out, opts...) 507 if err != nil { 508 return nil, err 509 } 510 return out, nil 511 } 512 513 // RpcServiceServer is the server API for RpcService service. 514 type RpcServiceServer interface { 515 // Method comment 516 StreamingRpc(RpcService_StreamingRpcServer) error 517 UnaryRpc(context.Context, *Request) (*empty.Empty, error) 518 } 519 520 func RegisterRpcServiceServer(s *grpc.Server, srv RpcServiceServer) { 521 s.RegisterService(&_RpcService_serviceDesc, srv) 522 } 523 524 func _RpcService_StreamingRpc_Handler(srv interface{}, stream grpc.ServerStream) error { 525 return srv.(RpcServiceServer).StreamingRpc(&rpcServiceStreamingRpcServer{stream}) 526 } 527 528 type RpcService_StreamingRpcServer interface { 529 SendAndClose(*Request) error 530 Recv() (*Request, error) 531 grpc.ServerStream 532 } 533 534 type rpcServiceStreamingRpcServer struct { 535 grpc.ServerStream 536 } 537 538 func (x *rpcServiceStreamingRpcServer) SendAndClose(m *Request) error { 539 return x.ServerStream.SendMsg(m) 540 } 541 542 func (x *rpcServiceStreamingRpcServer) Recv() (*Request, error) { 543 m := new(Request) 544 if err := x.ServerStream.RecvMsg(m); err != nil { 545 return nil, err 546 } 547 return m, nil 548 } 549 550 func _RpcService_UnaryRpc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 551 in := new(Request) 552 if err := dec(in); err != nil { 553 return nil, err 554 } 555 if interceptor == nil { 556 return srv.(RpcServiceServer).UnaryRpc(ctx, in) 557 } 558 info := &grpc.UnaryServerInfo{ 559 Server: srv, 560 FullMethod: "/foo.bar.RpcService/UnaryRpc", 561 } 562 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 563 return srv.(RpcServiceServer).UnaryRpc(ctx, req.(*Request)) 564 } 565 return interceptor(ctx, in, info, handler) 566 } 567 568 var _RpcService_serviceDesc = grpc.ServiceDesc{ 569 ServiceName: "foo.bar.RpcService", 570 HandlerType: (*RpcServiceServer)(nil), 571 Methods: []grpc.MethodDesc{ 572 { 573 MethodName: "UnaryRpc", 574 Handler: _RpcService_UnaryRpc_Handler, 575 }, 576 }, 577 Streams: []grpc.StreamDesc{ 578 { 579 StreamName: "StreamingRpc", 580 Handler: _RpcService_StreamingRpc_Handler, 581 ClientStreams: true, 582 }, 583 }, 584 Metadata: "desc_test_comments.proto", 585 }