github.com/m3db/m3@v1.5.0/src/x/generated/proto/test/test.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/m3db/m3/src/x/generated/proto/test/test.proto 3 4 // Copyright (c) 2020 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 /* 25 Package m3_test is a generated protocol buffer package. 26 27 It is generated from these files: 28 github.com/m3db/m3/src/x/generated/proto/test/test.proto 29 30 It has these top-level messages: 31 Empty 32 PingRequest 33 PingResponse 34 */ 35 package m3_test 36 37 import proto "github.com/gogo/protobuf/proto" 38 import fmt "fmt" 39 import math "math" 40 41 import context "golang.org/x/net/context" 42 import grpc "google.golang.org/grpc" 43 44 import io "io" 45 46 // Reference imports to suppress errors if they are not otherwise used. 47 var _ = proto.Marshal 48 var _ = fmt.Errorf 49 var _ = math.Inf 50 51 // This is a compile-time assertion to ensure that this generated file 52 // is compatible with the proto package it is being compiled against. 53 // A compilation error at this line likely means your copy of the 54 // proto package needs to be updated. 55 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 56 57 type Empty struct { 58 } 59 60 func (m *Empty) Reset() { *m = Empty{} } 61 func (m *Empty) String() string { return proto.CompactTextString(m) } 62 func (*Empty) ProtoMessage() {} 63 func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } 64 65 type PingRequest struct { 66 Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` 67 SleepTimeMs int32 `protobuf:"varint,2,opt,name=sleep_time_ms,json=sleepTimeMs,proto3" json:"sleep_time_ms,omitempty"` 68 ErrorCodeReturned uint32 `protobuf:"varint,3,opt,name=error_code_returned,json=errorCodeReturned,proto3" json:"error_code_returned,omitempty"` 69 } 70 71 func (m *PingRequest) Reset() { *m = PingRequest{} } 72 func (m *PingRequest) String() string { return proto.CompactTextString(m) } 73 func (*PingRequest) ProtoMessage() {} 74 func (*PingRequest) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} } 75 76 func (m *PingRequest) GetValue() string { 77 if m != nil { 78 return m.Value 79 } 80 return "" 81 } 82 83 func (m *PingRequest) GetSleepTimeMs() int32 { 84 if m != nil { 85 return m.SleepTimeMs 86 } 87 return 0 88 } 89 90 func (m *PingRequest) GetErrorCodeReturned() uint32 { 91 if m != nil { 92 return m.ErrorCodeReturned 93 } 94 return 0 95 } 96 97 type PingResponse struct { 98 Value string `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"` 99 Counter int32 `protobuf:"varint,2,opt,name=counter,proto3" json:"counter,omitempty"` 100 } 101 102 func (m *PingResponse) Reset() { *m = PingResponse{} } 103 func (m *PingResponse) String() string { return proto.CompactTextString(m) } 104 func (*PingResponse) ProtoMessage() {} 105 func (*PingResponse) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2} } 106 107 func (m *PingResponse) GetValue() string { 108 if m != nil { 109 return m.Value 110 } 111 return "" 112 } 113 114 func (m *PingResponse) GetCounter() int32 { 115 if m != nil { 116 return m.Counter 117 } 118 return 0 119 } 120 121 func init() { 122 proto.RegisterType((*Empty)(nil), "m3.test.Empty") 123 proto.RegisterType((*PingRequest)(nil), "m3.test.PingRequest") 124 proto.RegisterType((*PingResponse)(nil), "m3.test.PingResponse") 125 } 126 127 // Reference imports to suppress errors if they are not otherwise used. 128 var _ context.Context 129 var _ grpc.ClientConn 130 131 // This is a compile-time assertion to ensure that this generated file 132 // is compatible with the grpc package it is being compiled against. 133 const _ = grpc.SupportPackageIsVersion4 134 135 // Client API for TestService service 136 137 type TestServiceClient interface { 138 PingEmpty(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PingResponse, error) 139 Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) 140 PingError(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*Empty, error) 141 PingList(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (TestService_PingListClient, error) 142 } 143 144 type testServiceClient struct { 145 cc *grpc.ClientConn 146 } 147 148 func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient { 149 return &testServiceClient{cc} 150 } 151 152 func (c *testServiceClient) PingEmpty(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PingResponse, error) { 153 out := new(PingResponse) 154 err := grpc.Invoke(ctx, "/m3.test.TestService/PingEmpty", in, out, c.cc, opts...) 155 if err != nil { 156 return nil, err 157 } 158 return out, nil 159 } 160 161 func (c *testServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { 162 out := new(PingResponse) 163 err := grpc.Invoke(ctx, "/m3.test.TestService/Ping", in, out, c.cc, opts...) 164 if err != nil { 165 return nil, err 166 } 167 return out, nil 168 } 169 170 func (c *testServiceClient) PingError(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*Empty, error) { 171 out := new(Empty) 172 err := grpc.Invoke(ctx, "/m3.test.TestService/PingError", in, out, c.cc, opts...) 173 if err != nil { 174 return nil, err 175 } 176 return out, nil 177 } 178 179 func (c *testServiceClient) PingList(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (TestService_PingListClient, error) { 180 stream, err := grpc.NewClientStream(ctx, &_TestService_serviceDesc.Streams[0], c.cc, "/m3.test.TestService/PingList", opts...) 181 if err != nil { 182 return nil, err 183 } 184 x := &testServicePingListClient{stream} 185 if err := x.ClientStream.SendMsg(in); err != nil { 186 return nil, err 187 } 188 if err := x.ClientStream.CloseSend(); err != nil { 189 return nil, err 190 } 191 return x, nil 192 } 193 194 type TestService_PingListClient interface { 195 Recv() (*PingResponse, error) 196 grpc.ClientStream 197 } 198 199 type testServicePingListClient struct { 200 grpc.ClientStream 201 } 202 203 func (x *testServicePingListClient) Recv() (*PingResponse, error) { 204 m := new(PingResponse) 205 if err := x.ClientStream.RecvMsg(m); err != nil { 206 return nil, err 207 } 208 return m, nil 209 } 210 211 // Server API for TestService service 212 213 type TestServiceServer interface { 214 PingEmpty(context.Context, *Empty) (*PingResponse, error) 215 Ping(context.Context, *PingRequest) (*PingResponse, error) 216 PingError(context.Context, *PingRequest) (*Empty, error) 217 PingList(*PingRequest, TestService_PingListServer) error 218 } 219 220 func RegisterTestServiceServer(s *grpc.Server, srv TestServiceServer) { 221 s.RegisterService(&_TestService_serviceDesc, srv) 222 } 223 224 func _TestService_PingEmpty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 225 in := new(Empty) 226 if err := dec(in); err != nil { 227 return nil, err 228 } 229 if interceptor == nil { 230 return srv.(TestServiceServer).PingEmpty(ctx, in) 231 } 232 info := &grpc.UnaryServerInfo{ 233 Server: srv, 234 FullMethod: "/m3.test.TestService/PingEmpty", 235 } 236 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 237 return srv.(TestServiceServer).PingEmpty(ctx, req.(*Empty)) 238 } 239 return interceptor(ctx, in, info, handler) 240 } 241 242 func _TestService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 243 in := new(PingRequest) 244 if err := dec(in); err != nil { 245 return nil, err 246 } 247 if interceptor == nil { 248 return srv.(TestServiceServer).Ping(ctx, in) 249 } 250 info := &grpc.UnaryServerInfo{ 251 Server: srv, 252 FullMethod: "/m3.test.TestService/Ping", 253 } 254 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 255 return srv.(TestServiceServer).Ping(ctx, req.(*PingRequest)) 256 } 257 return interceptor(ctx, in, info, handler) 258 } 259 260 func _TestService_PingError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 261 in := new(PingRequest) 262 if err := dec(in); err != nil { 263 return nil, err 264 } 265 if interceptor == nil { 266 return srv.(TestServiceServer).PingError(ctx, in) 267 } 268 info := &grpc.UnaryServerInfo{ 269 Server: srv, 270 FullMethod: "/m3.test.TestService/PingError", 271 } 272 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 273 return srv.(TestServiceServer).PingError(ctx, req.(*PingRequest)) 274 } 275 return interceptor(ctx, in, info, handler) 276 } 277 278 func _TestService_PingList_Handler(srv interface{}, stream grpc.ServerStream) error { 279 m := new(PingRequest) 280 if err := stream.RecvMsg(m); err != nil { 281 return err 282 } 283 return srv.(TestServiceServer).PingList(m, &testServicePingListServer{stream}) 284 } 285 286 type TestService_PingListServer interface { 287 Send(*PingResponse) error 288 grpc.ServerStream 289 } 290 291 type testServicePingListServer struct { 292 grpc.ServerStream 293 } 294 295 func (x *testServicePingListServer) Send(m *PingResponse) error { 296 return x.ServerStream.SendMsg(m) 297 } 298 299 var _TestService_serviceDesc = grpc.ServiceDesc{ 300 ServiceName: "m3.test.TestService", 301 HandlerType: (*TestServiceServer)(nil), 302 Methods: []grpc.MethodDesc{ 303 { 304 MethodName: "PingEmpty", 305 Handler: _TestService_PingEmpty_Handler, 306 }, 307 { 308 MethodName: "Ping", 309 Handler: _TestService_Ping_Handler, 310 }, 311 { 312 MethodName: "PingError", 313 Handler: _TestService_PingError_Handler, 314 }, 315 }, 316 Streams: []grpc.StreamDesc{ 317 { 318 StreamName: "PingList", 319 Handler: _TestService_PingList_Handler, 320 ServerStreams: true, 321 }, 322 }, 323 Metadata: "github.com/m3db/m3/src/x/generated/proto/test/test.proto", 324 } 325 326 func (m *Empty) Marshal() (dAtA []byte, err error) { 327 size := m.Size() 328 dAtA = make([]byte, size) 329 n, err := m.MarshalTo(dAtA) 330 if err != nil { 331 return nil, err 332 } 333 return dAtA[:n], nil 334 } 335 336 func (m *Empty) MarshalTo(dAtA []byte) (int, error) { 337 var i int 338 _ = i 339 var l int 340 _ = l 341 return i, nil 342 } 343 344 func (m *PingRequest) Marshal() (dAtA []byte, err error) { 345 size := m.Size() 346 dAtA = make([]byte, size) 347 n, err := m.MarshalTo(dAtA) 348 if err != nil { 349 return nil, err 350 } 351 return dAtA[:n], nil 352 } 353 354 func (m *PingRequest) MarshalTo(dAtA []byte) (int, error) { 355 var i int 356 _ = i 357 var l int 358 _ = l 359 if len(m.Value) > 0 { 360 dAtA[i] = 0xa 361 i++ 362 i = encodeVarintTest(dAtA, i, uint64(len(m.Value))) 363 i += copy(dAtA[i:], m.Value) 364 } 365 if m.SleepTimeMs != 0 { 366 dAtA[i] = 0x10 367 i++ 368 i = encodeVarintTest(dAtA, i, uint64(m.SleepTimeMs)) 369 } 370 if m.ErrorCodeReturned != 0 { 371 dAtA[i] = 0x18 372 i++ 373 i = encodeVarintTest(dAtA, i, uint64(m.ErrorCodeReturned)) 374 } 375 return i, nil 376 } 377 378 func (m *PingResponse) Marshal() (dAtA []byte, err error) { 379 size := m.Size() 380 dAtA = make([]byte, size) 381 n, err := m.MarshalTo(dAtA) 382 if err != nil { 383 return nil, err 384 } 385 return dAtA[:n], nil 386 } 387 388 func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) { 389 var i int 390 _ = i 391 var l int 392 _ = l 393 if len(m.Value) > 0 { 394 dAtA[i] = 0xa 395 i++ 396 i = encodeVarintTest(dAtA, i, uint64(len(m.Value))) 397 i += copy(dAtA[i:], m.Value) 398 } 399 if m.Counter != 0 { 400 dAtA[i] = 0x10 401 i++ 402 i = encodeVarintTest(dAtA, i, uint64(m.Counter)) 403 } 404 return i, nil 405 } 406 407 func encodeVarintTest(dAtA []byte, offset int, v uint64) int { 408 for v >= 1<<7 { 409 dAtA[offset] = uint8(v&0x7f | 0x80) 410 v >>= 7 411 offset++ 412 } 413 dAtA[offset] = uint8(v) 414 return offset + 1 415 } 416 func (m *Empty) Size() (n int) { 417 var l int 418 _ = l 419 return n 420 } 421 422 func (m *PingRequest) Size() (n int) { 423 var l int 424 _ = l 425 l = len(m.Value) 426 if l > 0 { 427 n += 1 + l + sovTest(uint64(l)) 428 } 429 if m.SleepTimeMs != 0 { 430 n += 1 + sovTest(uint64(m.SleepTimeMs)) 431 } 432 if m.ErrorCodeReturned != 0 { 433 n += 1 + sovTest(uint64(m.ErrorCodeReturned)) 434 } 435 return n 436 } 437 438 func (m *PingResponse) Size() (n int) { 439 var l int 440 _ = l 441 l = len(m.Value) 442 if l > 0 { 443 n += 1 + l + sovTest(uint64(l)) 444 } 445 if m.Counter != 0 { 446 n += 1 + sovTest(uint64(m.Counter)) 447 } 448 return n 449 } 450 451 func sovTest(x uint64) (n int) { 452 for { 453 n++ 454 x >>= 7 455 if x == 0 { 456 break 457 } 458 } 459 return n 460 } 461 func sozTest(x uint64) (n int) { 462 return sovTest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 463 } 464 func (m *Empty) Unmarshal(dAtA []byte) error { 465 l := len(dAtA) 466 iNdEx := 0 467 for iNdEx < l { 468 preIndex := iNdEx 469 var wire uint64 470 for shift := uint(0); ; shift += 7 { 471 if shift >= 64 { 472 return ErrIntOverflowTest 473 } 474 if iNdEx >= l { 475 return io.ErrUnexpectedEOF 476 } 477 b := dAtA[iNdEx] 478 iNdEx++ 479 wire |= (uint64(b) & 0x7F) << shift 480 if b < 0x80 { 481 break 482 } 483 } 484 fieldNum := int32(wire >> 3) 485 wireType := int(wire & 0x7) 486 if wireType == 4 { 487 return fmt.Errorf("proto: Empty: wiretype end group for non-group") 488 } 489 if fieldNum <= 0 { 490 return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) 491 } 492 switch fieldNum { 493 default: 494 iNdEx = preIndex 495 skippy, err := skipTest(dAtA[iNdEx:]) 496 if err != nil { 497 return err 498 } 499 if skippy < 0 { 500 return ErrInvalidLengthTest 501 } 502 if (iNdEx + skippy) > l { 503 return io.ErrUnexpectedEOF 504 } 505 iNdEx += skippy 506 } 507 } 508 509 if iNdEx > l { 510 return io.ErrUnexpectedEOF 511 } 512 return nil 513 } 514 func (m *PingRequest) Unmarshal(dAtA []byte) error { 515 l := len(dAtA) 516 iNdEx := 0 517 for iNdEx < l { 518 preIndex := iNdEx 519 var wire uint64 520 for shift := uint(0); ; shift += 7 { 521 if shift >= 64 { 522 return ErrIntOverflowTest 523 } 524 if iNdEx >= l { 525 return io.ErrUnexpectedEOF 526 } 527 b := dAtA[iNdEx] 528 iNdEx++ 529 wire |= (uint64(b) & 0x7F) << shift 530 if b < 0x80 { 531 break 532 } 533 } 534 fieldNum := int32(wire >> 3) 535 wireType := int(wire & 0x7) 536 if wireType == 4 { 537 return fmt.Errorf("proto: PingRequest: wiretype end group for non-group") 538 } 539 if fieldNum <= 0 { 540 return fmt.Errorf("proto: PingRequest: illegal tag %d (wire type %d)", fieldNum, wire) 541 } 542 switch fieldNum { 543 case 1: 544 if wireType != 2 { 545 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 546 } 547 var stringLen uint64 548 for shift := uint(0); ; shift += 7 { 549 if shift >= 64 { 550 return ErrIntOverflowTest 551 } 552 if iNdEx >= l { 553 return io.ErrUnexpectedEOF 554 } 555 b := dAtA[iNdEx] 556 iNdEx++ 557 stringLen |= (uint64(b) & 0x7F) << shift 558 if b < 0x80 { 559 break 560 } 561 } 562 intStringLen := int(stringLen) 563 if intStringLen < 0 { 564 return ErrInvalidLengthTest 565 } 566 postIndex := iNdEx + intStringLen 567 if postIndex > l { 568 return io.ErrUnexpectedEOF 569 } 570 m.Value = string(dAtA[iNdEx:postIndex]) 571 iNdEx = postIndex 572 case 2: 573 if wireType != 0 { 574 return fmt.Errorf("proto: wrong wireType = %d for field SleepTimeMs", wireType) 575 } 576 m.SleepTimeMs = 0 577 for shift := uint(0); ; shift += 7 { 578 if shift >= 64 { 579 return ErrIntOverflowTest 580 } 581 if iNdEx >= l { 582 return io.ErrUnexpectedEOF 583 } 584 b := dAtA[iNdEx] 585 iNdEx++ 586 m.SleepTimeMs |= (int32(b) & 0x7F) << shift 587 if b < 0x80 { 588 break 589 } 590 } 591 case 3: 592 if wireType != 0 { 593 return fmt.Errorf("proto: wrong wireType = %d for field ErrorCodeReturned", wireType) 594 } 595 m.ErrorCodeReturned = 0 596 for shift := uint(0); ; shift += 7 { 597 if shift >= 64 { 598 return ErrIntOverflowTest 599 } 600 if iNdEx >= l { 601 return io.ErrUnexpectedEOF 602 } 603 b := dAtA[iNdEx] 604 iNdEx++ 605 m.ErrorCodeReturned |= (uint32(b) & 0x7F) << shift 606 if b < 0x80 { 607 break 608 } 609 } 610 default: 611 iNdEx = preIndex 612 skippy, err := skipTest(dAtA[iNdEx:]) 613 if err != nil { 614 return err 615 } 616 if skippy < 0 { 617 return ErrInvalidLengthTest 618 } 619 if (iNdEx + skippy) > l { 620 return io.ErrUnexpectedEOF 621 } 622 iNdEx += skippy 623 } 624 } 625 626 if iNdEx > l { 627 return io.ErrUnexpectedEOF 628 } 629 return nil 630 } 631 func (m *PingResponse) Unmarshal(dAtA []byte) error { 632 l := len(dAtA) 633 iNdEx := 0 634 for iNdEx < l { 635 preIndex := iNdEx 636 var wire uint64 637 for shift := uint(0); ; shift += 7 { 638 if shift >= 64 { 639 return ErrIntOverflowTest 640 } 641 if iNdEx >= l { 642 return io.ErrUnexpectedEOF 643 } 644 b := dAtA[iNdEx] 645 iNdEx++ 646 wire |= (uint64(b) & 0x7F) << shift 647 if b < 0x80 { 648 break 649 } 650 } 651 fieldNum := int32(wire >> 3) 652 wireType := int(wire & 0x7) 653 if wireType == 4 { 654 return fmt.Errorf("proto: PingResponse: wiretype end group for non-group") 655 } 656 if fieldNum <= 0 { 657 return fmt.Errorf("proto: PingResponse: illegal tag %d (wire type %d)", fieldNum, wire) 658 } 659 switch fieldNum { 660 case 1: 661 if wireType != 2 { 662 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 663 } 664 var stringLen uint64 665 for shift := uint(0); ; shift += 7 { 666 if shift >= 64 { 667 return ErrIntOverflowTest 668 } 669 if iNdEx >= l { 670 return io.ErrUnexpectedEOF 671 } 672 b := dAtA[iNdEx] 673 iNdEx++ 674 stringLen |= (uint64(b) & 0x7F) << shift 675 if b < 0x80 { 676 break 677 } 678 } 679 intStringLen := int(stringLen) 680 if intStringLen < 0 { 681 return ErrInvalidLengthTest 682 } 683 postIndex := iNdEx + intStringLen 684 if postIndex > l { 685 return io.ErrUnexpectedEOF 686 } 687 m.Value = string(dAtA[iNdEx:postIndex]) 688 iNdEx = postIndex 689 case 2: 690 if wireType != 0 { 691 return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) 692 } 693 m.Counter = 0 694 for shift := uint(0); ; shift += 7 { 695 if shift >= 64 { 696 return ErrIntOverflowTest 697 } 698 if iNdEx >= l { 699 return io.ErrUnexpectedEOF 700 } 701 b := dAtA[iNdEx] 702 iNdEx++ 703 m.Counter |= (int32(b) & 0x7F) << shift 704 if b < 0x80 { 705 break 706 } 707 } 708 default: 709 iNdEx = preIndex 710 skippy, err := skipTest(dAtA[iNdEx:]) 711 if err != nil { 712 return err 713 } 714 if skippy < 0 { 715 return ErrInvalidLengthTest 716 } 717 if (iNdEx + skippy) > l { 718 return io.ErrUnexpectedEOF 719 } 720 iNdEx += skippy 721 } 722 } 723 724 if iNdEx > l { 725 return io.ErrUnexpectedEOF 726 } 727 return nil 728 } 729 func skipTest(dAtA []byte) (n int, err error) { 730 l := len(dAtA) 731 iNdEx := 0 732 for iNdEx < l { 733 var wire uint64 734 for shift := uint(0); ; shift += 7 { 735 if shift >= 64 { 736 return 0, ErrIntOverflowTest 737 } 738 if iNdEx >= l { 739 return 0, io.ErrUnexpectedEOF 740 } 741 b := dAtA[iNdEx] 742 iNdEx++ 743 wire |= (uint64(b) & 0x7F) << shift 744 if b < 0x80 { 745 break 746 } 747 } 748 wireType := int(wire & 0x7) 749 switch wireType { 750 case 0: 751 for shift := uint(0); ; shift += 7 { 752 if shift >= 64 { 753 return 0, ErrIntOverflowTest 754 } 755 if iNdEx >= l { 756 return 0, io.ErrUnexpectedEOF 757 } 758 iNdEx++ 759 if dAtA[iNdEx-1] < 0x80 { 760 break 761 } 762 } 763 return iNdEx, nil 764 case 1: 765 iNdEx += 8 766 return iNdEx, nil 767 case 2: 768 var length int 769 for shift := uint(0); ; shift += 7 { 770 if shift >= 64 { 771 return 0, ErrIntOverflowTest 772 } 773 if iNdEx >= l { 774 return 0, io.ErrUnexpectedEOF 775 } 776 b := dAtA[iNdEx] 777 iNdEx++ 778 length |= (int(b) & 0x7F) << shift 779 if b < 0x80 { 780 break 781 } 782 } 783 iNdEx += length 784 if length < 0 { 785 return 0, ErrInvalidLengthTest 786 } 787 return iNdEx, nil 788 case 3: 789 for { 790 var innerWire uint64 791 var start int = iNdEx 792 for shift := uint(0); ; shift += 7 { 793 if shift >= 64 { 794 return 0, ErrIntOverflowTest 795 } 796 if iNdEx >= l { 797 return 0, io.ErrUnexpectedEOF 798 } 799 b := dAtA[iNdEx] 800 iNdEx++ 801 innerWire |= (uint64(b) & 0x7F) << shift 802 if b < 0x80 { 803 break 804 } 805 } 806 innerWireType := int(innerWire & 0x7) 807 if innerWireType == 4 { 808 break 809 } 810 next, err := skipTest(dAtA[start:]) 811 if err != nil { 812 return 0, err 813 } 814 iNdEx = start + next 815 } 816 return iNdEx, nil 817 case 4: 818 return iNdEx, nil 819 case 5: 820 iNdEx += 4 821 return iNdEx, nil 822 default: 823 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 824 } 825 } 826 panic("unreachable") 827 } 828 829 var ( 830 ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling") 831 ErrIntOverflowTest = fmt.Errorf("proto: integer overflow") 832 ) 833 834 func init() { 835 proto.RegisterFile("github.com/m3db/m3/src/x/generated/proto/test/test.proto", fileDescriptorTest) 836 } 837 838 var fileDescriptorTest = []byte{ 839 // 324 bytes of a gzipped FileDescriptorProto 840 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x4f, 0x4b, 0xc3, 0x30, 841 0x14, 0xc0, 0x17, 0x75, 0xce, 0xbd, 0x39, 0xd1, 0x38, 0xa1, 0x78, 0x28, 0xa3, 0xa7, 0x9d, 0x1a, 842 0xb1, 0x0a, 0x82, 0xe0, 0x41, 0xf1, 0xa6, 0x20, 0x75, 0x78, 0x2d, 0x5b, 0xfb, 0x98, 0x81, 0xa5, 843 0xa9, 0x49, 0x3a, 0xf5, 0x5b, 0xf8, 0xb1, 0x3c, 0xfa, 0x11, 0xa4, 0x5e, 0xfd, 0x10, 0x92, 0xac, 844 0xca, 0x18, 0xec, 0xe0, 0x25, 0xf0, 0x7b, 0x7f, 0xf2, 0xcb, 0x7b, 0x81, 0xb3, 0x09, 0x37, 0x8f, 845 0xe5, 0x38, 0x4c, 0xa5, 0x60, 0x22, 0xca, 0xc6, 0x4c, 0x44, 0x4c, 0xab, 0x94, 0xbd, 0xb0, 0x09, 846 0xe6, 0xa8, 0x46, 0x06, 0x33, 0x56, 0x28, 0x69, 0x24, 0x33, 0xa8, 0x8d, 0x3b, 0x42, 0xc7, 0xb4, 847 0x25, 0xa2, 0xd0, 0x62, 0xd0, 0x82, 0xe6, 0xb5, 0x28, 0xcc, 0x6b, 0xf0, 0x0c, 0x9d, 0x3b, 0x9e, 848 0x4f, 0x62, 0x7c, 0x2a, 0x51, 0x1b, 0xda, 0x83, 0xe6, 0x6c, 0x34, 0x2d, 0xd1, 0x23, 0x7d, 0x32, 849 0x68, 0xc7, 0x73, 0xa0, 0x01, 0x74, 0xf5, 0x14, 0xb1, 0x48, 0x0c, 0x17, 0x98, 0x08, 0xed, 0xad, 850 0xf5, 0xc9, 0xa0, 0x19, 0x77, 0x5c, 0x70, 0xc8, 0x05, 0xde, 0x6a, 0x1a, 0xc2, 0x3e, 0x2a, 0x25, 851 0x55, 0x92, 0xca, 0x0c, 0x13, 0x85, 0xa6, 0x54, 0x39, 0x66, 0xde, 0x7a, 0x9f, 0x0c, 0xba, 0xf1, 852 0x9e, 0x4b, 0x5d, 0xc9, 0x0c, 0xe3, 0x3a, 0x11, 0x5c, 0xc0, 0xf6, 0x5c, 0xac, 0x0b, 0x99, 0x6b, 853 0xb4, 0xe6, 0x87, 0x45, 0xb3, 0x03, 0xea, 0x41, 0x2b, 0x95, 0x65, 0x6e, 0x50, 0xd5, 0xce, 0x5f, 854 0x3c, 0xfe, 0x26, 0xd0, 0x19, 0xa2, 0x36, 0xf7, 0xa8, 0x66, 0x3c, 0x45, 0x7a, 0x02, 0x6d, 0x7b, 855 0x9f, 0x9b, 0x8a, 0xee, 0x84, 0xf5, 0xa0, 0xa1, 0xe3, 0xc3, 0x83, 0x3f, 0x5e, 0x74, 0x06, 0x0d, 856 0x7a, 0x0a, 0x1b, 0x36, 0x42, 0x7b, 0x4b, 0x05, 0x6e, 0x1b, 0xab, 0xdb, 0xa2, 0x5a, 0x66, 0xa7, 857 0x5a, 0xd1, 0xbb, 0xf4, 0x84, 0xa0, 0x41, 0xcf, 0x61, 0xcb, 0x16, 0xdc, 0x70, 0xbb, 0xe7, 0x7f, 858 0xf9, 0x8e, 0xc8, 0xe5, 0xee, 0x7b, 0xe5, 0x93, 0x8f, 0xca, 0x27, 0x9f, 0x95, 0x4f, 0xde, 0xbe, 859 0xfc, 0xc6, 0x78, 0xd3, 0x7d, 0x69, 0xf4, 0x13, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xfc, 0x96, 0xad, 860 0x0e, 0x02, 0x00, 0x00, 861 }