github.com/Finschia/finschia-sdk@v0.48.1/testutil/testdata/query.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: query.proto 3 4 package testdata 5 6 import ( 7 context "context" 8 fmt "fmt" 9 types "github.com/Finschia/finschia-sdk/codec/types" 10 grpc1 "github.com/gogo/protobuf/grpc" 11 proto "github.com/gogo/protobuf/proto" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 io "io" 16 math "math" 17 math_bits "math/bits" 18 ) 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var _ = proto.Marshal 22 var _ = fmt.Errorf 23 var _ = math.Inf 24 25 // This is a compile-time assertion to ensure that this generated file 26 // is compatible with the proto package it is being compiled against. 27 // A compilation error at this line likely means your copy of the 28 // proto package needs to be updated. 29 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 30 31 type EchoRequest struct { 32 Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` 33 } 34 35 func (m *EchoRequest) Reset() { *m = EchoRequest{} } 36 func (m *EchoRequest) String() string { return proto.CompactTextString(m) } 37 func (*EchoRequest) ProtoMessage() {} 38 func (*EchoRequest) Descriptor() ([]byte, []int) { 39 return fileDescriptor_5c6ac9b241082464, []int{0} 40 } 41 func (m *EchoRequest) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43 } 44 func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 if deterministic { 46 return xxx_messageInfo_EchoRequest.Marshal(b, m, deterministic) 47 } else { 48 b = b[:cap(b)] 49 n, err := m.MarshalToSizedBuffer(b) 50 if err != nil { 51 return nil, err 52 } 53 return b[:n], nil 54 } 55 } 56 func (m *EchoRequest) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_EchoRequest.Merge(m, src) 58 } 59 func (m *EchoRequest) XXX_Size() int { 60 return m.Size() 61 } 62 func (m *EchoRequest) XXX_DiscardUnknown() { 63 xxx_messageInfo_EchoRequest.DiscardUnknown(m) 64 } 65 66 var xxx_messageInfo_EchoRequest proto.InternalMessageInfo 67 68 func (m *EchoRequest) GetMessage() string { 69 if m != nil { 70 return m.Message 71 } 72 return "" 73 } 74 75 type EchoResponse struct { 76 Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` 77 } 78 79 func (m *EchoResponse) Reset() { *m = EchoResponse{} } 80 func (m *EchoResponse) String() string { return proto.CompactTextString(m) } 81 func (*EchoResponse) ProtoMessage() {} 82 func (*EchoResponse) Descriptor() ([]byte, []int) { 83 return fileDescriptor_5c6ac9b241082464, []int{1} 84 } 85 func (m *EchoResponse) XXX_Unmarshal(b []byte) error { 86 return m.Unmarshal(b) 87 } 88 func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 89 if deterministic { 90 return xxx_messageInfo_EchoResponse.Marshal(b, m, deterministic) 91 } else { 92 b = b[:cap(b)] 93 n, err := m.MarshalToSizedBuffer(b) 94 if err != nil { 95 return nil, err 96 } 97 return b[:n], nil 98 } 99 } 100 func (m *EchoResponse) XXX_Merge(src proto.Message) { 101 xxx_messageInfo_EchoResponse.Merge(m, src) 102 } 103 func (m *EchoResponse) XXX_Size() int { 104 return m.Size() 105 } 106 func (m *EchoResponse) XXX_DiscardUnknown() { 107 xxx_messageInfo_EchoResponse.DiscardUnknown(m) 108 } 109 110 var xxx_messageInfo_EchoResponse proto.InternalMessageInfo 111 112 func (m *EchoResponse) GetMessage() string { 113 if m != nil { 114 return m.Message 115 } 116 return "" 117 } 118 119 type SayHelloRequest struct { 120 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 121 } 122 123 func (m *SayHelloRequest) Reset() { *m = SayHelloRequest{} } 124 func (m *SayHelloRequest) String() string { return proto.CompactTextString(m) } 125 func (*SayHelloRequest) ProtoMessage() {} 126 func (*SayHelloRequest) Descriptor() ([]byte, []int) { 127 return fileDescriptor_5c6ac9b241082464, []int{2} 128 } 129 func (m *SayHelloRequest) XXX_Unmarshal(b []byte) error { 130 return m.Unmarshal(b) 131 } 132 func (m *SayHelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 133 if deterministic { 134 return xxx_messageInfo_SayHelloRequest.Marshal(b, m, deterministic) 135 } else { 136 b = b[:cap(b)] 137 n, err := m.MarshalToSizedBuffer(b) 138 if err != nil { 139 return nil, err 140 } 141 return b[:n], nil 142 } 143 } 144 func (m *SayHelloRequest) XXX_Merge(src proto.Message) { 145 xxx_messageInfo_SayHelloRequest.Merge(m, src) 146 } 147 func (m *SayHelloRequest) XXX_Size() int { 148 return m.Size() 149 } 150 func (m *SayHelloRequest) XXX_DiscardUnknown() { 151 xxx_messageInfo_SayHelloRequest.DiscardUnknown(m) 152 } 153 154 var xxx_messageInfo_SayHelloRequest proto.InternalMessageInfo 155 156 func (m *SayHelloRequest) GetName() string { 157 if m != nil { 158 return m.Name 159 } 160 return "" 161 } 162 163 type SayHelloResponse struct { 164 Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"` 165 } 166 167 func (m *SayHelloResponse) Reset() { *m = SayHelloResponse{} } 168 func (m *SayHelloResponse) String() string { return proto.CompactTextString(m) } 169 func (*SayHelloResponse) ProtoMessage() {} 170 func (*SayHelloResponse) Descriptor() ([]byte, []int) { 171 return fileDescriptor_5c6ac9b241082464, []int{3} 172 } 173 func (m *SayHelloResponse) XXX_Unmarshal(b []byte) error { 174 return m.Unmarshal(b) 175 } 176 func (m *SayHelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 177 if deterministic { 178 return xxx_messageInfo_SayHelloResponse.Marshal(b, m, deterministic) 179 } else { 180 b = b[:cap(b)] 181 n, err := m.MarshalToSizedBuffer(b) 182 if err != nil { 183 return nil, err 184 } 185 return b[:n], nil 186 } 187 } 188 func (m *SayHelloResponse) XXX_Merge(src proto.Message) { 189 xxx_messageInfo_SayHelloResponse.Merge(m, src) 190 } 191 func (m *SayHelloResponse) XXX_Size() int { 192 return m.Size() 193 } 194 func (m *SayHelloResponse) XXX_DiscardUnknown() { 195 xxx_messageInfo_SayHelloResponse.DiscardUnknown(m) 196 } 197 198 var xxx_messageInfo_SayHelloResponse proto.InternalMessageInfo 199 200 func (m *SayHelloResponse) GetGreeting() string { 201 if m != nil { 202 return m.Greeting 203 } 204 return "" 205 } 206 207 type TestAnyRequest struct { 208 AnyAnimal *types.Any `protobuf:"bytes,1,opt,name=any_animal,json=anyAnimal,proto3" json:"any_animal,omitempty"` 209 } 210 211 func (m *TestAnyRequest) Reset() { *m = TestAnyRequest{} } 212 func (m *TestAnyRequest) String() string { return proto.CompactTextString(m) } 213 func (*TestAnyRequest) ProtoMessage() {} 214 func (*TestAnyRequest) Descriptor() ([]byte, []int) { 215 return fileDescriptor_5c6ac9b241082464, []int{4} 216 } 217 func (m *TestAnyRequest) XXX_Unmarshal(b []byte) error { 218 return m.Unmarshal(b) 219 } 220 func (m *TestAnyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 221 if deterministic { 222 return xxx_messageInfo_TestAnyRequest.Marshal(b, m, deterministic) 223 } else { 224 b = b[:cap(b)] 225 n, err := m.MarshalToSizedBuffer(b) 226 if err != nil { 227 return nil, err 228 } 229 return b[:n], nil 230 } 231 } 232 func (m *TestAnyRequest) XXX_Merge(src proto.Message) { 233 xxx_messageInfo_TestAnyRequest.Merge(m, src) 234 } 235 func (m *TestAnyRequest) XXX_Size() int { 236 return m.Size() 237 } 238 func (m *TestAnyRequest) XXX_DiscardUnknown() { 239 xxx_messageInfo_TestAnyRequest.DiscardUnknown(m) 240 } 241 242 var xxx_messageInfo_TestAnyRequest proto.InternalMessageInfo 243 244 func (m *TestAnyRequest) GetAnyAnimal() *types.Any { 245 if m != nil { 246 return m.AnyAnimal 247 } 248 return nil 249 } 250 251 type TestAnyResponse struct { 252 HasAnimal *HasAnimal `protobuf:"bytes,1,opt,name=has_animal,json=hasAnimal,proto3" json:"has_animal,omitempty"` 253 } 254 255 func (m *TestAnyResponse) Reset() { *m = TestAnyResponse{} } 256 func (m *TestAnyResponse) String() string { return proto.CompactTextString(m) } 257 func (*TestAnyResponse) ProtoMessage() {} 258 func (*TestAnyResponse) Descriptor() ([]byte, []int) { 259 return fileDescriptor_5c6ac9b241082464, []int{5} 260 } 261 func (m *TestAnyResponse) XXX_Unmarshal(b []byte) error { 262 return m.Unmarshal(b) 263 } 264 func (m *TestAnyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 265 if deterministic { 266 return xxx_messageInfo_TestAnyResponse.Marshal(b, m, deterministic) 267 } else { 268 b = b[:cap(b)] 269 n, err := m.MarshalToSizedBuffer(b) 270 if err != nil { 271 return nil, err 272 } 273 return b[:n], nil 274 } 275 } 276 func (m *TestAnyResponse) XXX_Merge(src proto.Message) { 277 xxx_messageInfo_TestAnyResponse.Merge(m, src) 278 } 279 func (m *TestAnyResponse) XXX_Size() int { 280 return m.Size() 281 } 282 func (m *TestAnyResponse) XXX_DiscardUnknown() { 283 xxx_messageInfo_TestAnyResponse.DiscardUnknown(m) 284 } 285 286 var xxx_messageInfo_TestAnyResponse proto.InternalMessageInfo 287 288 func (m *TestAnyResponse) GetHasAnimal() *HasAnimal { 289 if m != nil { 290 return m.HasAnimal 291 } 292 return nil 293 } 294 295 func init() { 296 proto.RegisterType((*EchoRequest)(nil), "testdata.EchoRequest") 297 proto.RegisterType((*EchoResponse)(nil), "testdata.EchoResponse") 298 proto.RegisterType((*SayHelloRequest)(nil), "testdata.SayHelloRequest") 299 proto.RegisterType((*SayHelloResponse)(nil), "testdata.SayHelloResponse") 300 proto.RegisterType((*TestAnyRequest)(nil), "testdata.TestAnyRequest") 301 proto.RegisterType((*TestAnyResponse)(nil), "testdata.TestAnyResponse") 302 } 303 304 func init() { proto.RegisterFile("query.proto", fileDescriptor_5c6ac9b241082464) } 305 306 var fileDescriptor_5c6ac9b241082464 = []byte{ 307 // 365 bytes of a gzipped FileDescriptorProto 308 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x4f, 0x4f, 0xf2, 0x40, 309 0x10, 0x87, 0x69, 0xc2, 0xfb, 0x02, 0x83, 0x01, 0x53, 0xff, 0x04, 0xf6, 0xd0, 0x98, 0x26, 0x46, 310 0x2e, 0x6e, 0x93, 0x12, 0xaf, 0x26, 0x98, 0x60, 0x38, 0x78, 0x11, 0x3d, 0x79, 0x31, 0x0b, 0x2c, 311 0x6d, 0x63, 0xbb, 0x0b, 0xec, 0xf6, 0xd0, 0x6f, 0xe1, 0x57, 0xf2, 0xe6, 0x91, 0xa3, 0x47, 0x03, 312 0x5f, 0xc4, 0xb4, 0xdd, 0x6d, 0x85, 0x10, 0x6f, 0x33, 0xbb, 0xcf, 0x3c, 0x93, 0xf9, 0x41, 0x73, 313 0x19, 0xd3, 0x55, 0x82, 0x17, 0x2b, 0x2e, 0xb9, 0x59, 0x97, 0x54, 0xc8, 0x19, 0x91, 0x04, 0x75, 314 0x3d, 0xce, 0xbd, 0x90, 0x3a, 0xd9, 0xfb, 0x24, 0x9e, 0x3b, 0x84, 0x29, 0x08, 0xb5, 0x34, 0x94, 315 0xf7, 0xf6, 0x15, 0x34, 0x87, 0x53, 0x9f, 0x8f, 0xe9, 0x32, 0xa6, 0x42, 0x9a, 0x1d, 0xa8, 0x45, 316 0x54, 0x08, 0xe2, 0xd1, 0x8e, 0x71, 0x61, 0xf4, 0x1a, 0x63, 0xdd, 0xda, 0x3d, 0x38, 0xca, 0x41, 317 0xb1, 0xe0, 0x4c, 0xd0, 0x3f, 0xc8, 0x4b, 0x68, 0x3f, 0x91, 0x64, 0x44, 0xc3, 0xb0, 0xd0, 0x9a, 318 0x50, 0x65, 0x24, 0xd2, 0x64, 0x56, 0xdb, 0x18, 0x8e, 0x4b, 0x4c, 0x49, 0x11, 0xd4, 0xbd, 0x15, 319 0xa5, 0x32, 0x60, 0x9e, 0x62, 0x8b, 0xde, 0x1e, 0x42, 0xeb, 0x99, 0x0a, 0x39, 0x60, 0x89, 0xb6, 320 0xf6, 0x01, 0x08, 0x4b, 0x5e, 0x09, 0x0b, 0x22, 0x12, 0x66, 0x7c, 0xd3, 0x3d, 0xc5, 0xf9, 0xed, 321 0x58, 0xdf, 0x8e, 0xd3, 0x81, 0x06, 0x61, 0xc9, 0x20, 0xc3, 0xec, 0x21, 0xb4, 0x0b, 0x8d, 0xda, 322 0xea, 0x02, 0xf8, 0x44, 0xec, 0x7a, 0x4e, 0x70, 0x11, 0xd4, 0x88, 0x88, 0x7c, 0x76, 0xdc, 0xf0, 323 0x75, 0xe9, 0x7e, 0x18, 0xf0, 0xef, 0x31, 0x0d, 0xdf, 0xbc, 0x81, 0x6a, 0x1a, 0x8c, 0x79, 0x56, 324 0x4e, 0xfc, 0x4a, 0x14, 0x9d, 0xef, 0x3f, 0xab, 0xa5, 0x03, 0xa8, 0xeb, 0xf3, 0xcd, 0x6e, 0xc9, 325 0xec, 0x25, 0x87, 0xd0, 0xa1, 0x2f, 0xa5, 0xb8, 0x85, 0x9a, 0x3a, 0xc5, 0xec, 0x94, 0xd8, 0x6e, 326 0x48, 0xa8, 0x7b, 0xe0, 0x27, 0x9f, 0xbf, 0x7b, 0xf8, 0xdc, 0x58, 0xc6, 0x7a, 0x63, 0x19, 0xdf, 327 0x1b, 0xcb, 0x78, 0xdf, 0x5a, 0x95, 0xf5, 0xd6, 0xaa, 0x7c, 0x6d, 0xad, 0xca, 0x8b, 0xeb, 0x05, 328 0xd2, 0x8f, 0x27, 0x78, 0xca, 0x23, 0xe7, 0x3e, 0x60, 0x62, 0xea, 0x07, 0xc4, 0x99, 0xab, 0xe2, 329 0x5a, 0xcc, 0xde, 0x9c, 0x54, 0x1a, 0xcb, 0x20, 0x74, 0xb4, 0x7d, 0xf2, 0x3f, 0x4b, 0xbc, 0xff, 330 0x13, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x5f, 0x63, 0x94, 0x94, 0x02, 0x00, 0x00, 331 } 332 333 // Reference imports to suppress errors if they are not otherwise used. 334 var _ context.Context 335 var _ grpc.ClientConn 336 337 // This is a compile-time assertion to ensure that this generated file 338 // is compatible with the grpc package it is being compiled against. 339 const _ = grpc.SupportPackageIsVersion4 340 341 // QueryClient is the client API for Query service. 342 // 343 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 344 type QueryClient interface { 345 Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) 346 SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) 347 TestAny(ctx context.Context, in *TestAnyRequest, opts ...grpc.CallOption) (*TestAnyResponse, error) 348 } 349 350 type queryClient struct { 351 cc grpc1.ClientConn 352 } 353 354 func NewQueryClient(cc grpc1.ClientConn) QueryClient { 355 return &queryClient{cc} 356 } 357 358 func (c *queryClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { 359 out := new(EchoResponse) 360 err := c.cc.Invoke(ctx, "/testdata.Query/Echo", in, out, opts...) 361 if err != nil { 362 return nil, err 363 } 364 return out, nil 365 } 366 367 func (c *queryClient) SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) { 368 out := new(SayHelloResponse) 369 err := c.cc.Invoke(ctx, "/testdata.Query/SayHello", in, out, opts...) 370 if err != nil { 371 return nil, err 372 } 373 return out, nil 374 } 375 376 func (c *queryClient) TestAny(ctx context.Context, in *TestAnyRequest, opts ...grpc.CallOption) (*TestAnyResponse, error) { 377 out := new(TestAnyResponse) 378 err := c.cc.Invoke(ctx, "/testdata.Query/TestAny", in, out, opts...) 379 if err != nil { 380 return nil, err 381 } 382 return out, nil 383 } 384 385 // QueryServer is the server API for Query service. 386 type QueryServer interface { 387 Echo(context.Context, *EchoRequest) (*EchoResponse, error) 388 SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) 389 TestAny(context.Context, *TestAnyRequest) (*TestAnyResponse, error) 390 } 391 392 // UnimplementedQueryServer can be embedded to have forward compatible implementations. 393 type UnimplementedQueryServer struct { 394 } 395 396 func (*UnimplementedQueryServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) { 397 return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") 398 } 399 func (*UnimplementedQueryServer) SayHello(ctx context.Context, req *SayHelloRequest) (*SayHelloResponse, error) { 400 return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") 401 } 402 func (*UnimplementedQueryServer) TestAny(ctx context.Context, req *TestAnyRequest) (*TestAnyResponse, error) { 403 return nil, status.Errorf(codes.Unimplemented, "method TestAny not implemented") 404 } 405 406 func RegisterQueryServer(s grpc1.Server, srv QueryServer) { 407 s.RegisterService(&_Query_serviceDesc, srv) 408 } 409 410 func _Query_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 411 in := new(EchoRequest) 412 if err := dec(in); err != nil { 413 return nil, err 414 } 415 if interceptor == nil { 416 return srv.(QueryServer).Echo(ctx, in) 417 } 418 info := &grpc.UnaryServerInfo{ 419 Server: srv, 420 FullMethod: "/testdata.Query/Echo", 421 } 422 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 423 return srv.(QueryServer).Echo(ctx, req.(*EchoRequest)) 424 } 425 return interceptor(ctx, in, info, handler) 426 } 427 428 func _Query_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 429 in := new(SayHelloRequest) 430 if err := dec(in); err != nil { 431 return nil, err 432 } 433 if interceptor == nil { 434 return srv.(QueryServer).SayHello(ctx, in) 435 } 436 info := &grpc.UnaryServerInfo{ 437 Server: srv, 438 FullMethod: "/testdata.Query/SayHello", 439 } 440 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 441 return srv.(QueryServer).SayHello(ctx, req.(*SayHelloRequest)) 442 } 443 return interceptor(ctx, in, info, handler) 444 } 445 446 func _Query_TestAny_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 447 in := new(TestAnyRequest) 448 if err := dec(in); err != nil { 449 return nil, err 450 } 451 if interceptor == nil { 452 return srv.(QueryServer).TestAny(ctx, in) 453 } 454 info := &grpc.UnaryServerInfo{ 455 Server: srv, 456 FullMethod: "/testdata.Query/TestAny", 457 } 458 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 459 return srv.(QueryServer).TestAny(ctx, req.(*TestAnyRequest)) 460 } 461 return interceptor(ctx, in, info, handler) 462 } 463 464 var _Query_serviceDesc = grpc.ServiceDesc{ 465 ServiceName: "testdata.Query", 466 HandlerType: (*QueryServer)(nil), 467 Methods: []grpc.MethodDesc{ 468 { 469 MethodName: "Echo", 470 Handler: _Query_Echo_Handler, 471 }, 472 { 473 MethodName: "SayHello", 474 Handler: _Query_SayHello_Handler, 475 }, 476 { 477 MethodName: "TestAny", 478 Handler: _Query_TestAny_Handler, 479 }, 480 }, 481 Streams: []grpc.StreamDesc{}, 482 Metadata: "query.proto", 483 } 484 485 func (m *EchoRequest) Marshal() (dAtA []byte, err error) { 486 size := m.Size() 487 dAtA = make([]byte, size) 488 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 489 if err != nil { 490 return nil, err 491 } 492 return dAtA[:n], nil 493 } 494 495 func (m *EchoRequest) MarshalTo(dAtA []byte) (int, error) { 496 size := m.Size() 497 return m.MarshalToSizedBuffer(dAtA[:size]) 498 } 499 500 func (m *EchoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 501 i := len(dAtA) 502 _ = i 503 var l int 504 _ = l 505 if len(m.Message) > 0 { 506 i -= len(m.Message) 507 copy(dAtA[i:], m.Message) 508 i = encodeVarintQuery(dAtA, i, uint64(len(m.Message))) 509 i-- 510 dAtA[i] = 0xa 511 } 512 return len(dAtA) - i, nil 513 } 514 515 func (m *EchoResponse) Marshal() (dAtA []byte, err error) { 516 size := m.Size() 517 dAtA = make([]byte, size) 518 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 519 if err != nil { 520 return nil, err 521 } 522 return dAtA[:n], nil 523 } 524 525 func (m *EchoResponse) MarshalTo(dAtA []byte) (int, error) { 526 size := m.Size() 527 return m.MarshalToSizedBuffer(dAtA[:size]) 528 } 529 530 func (m *EchoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 531 i := len(dAtA) 532 _ = i 533 var l int 534 _ = l 535 if len(m.Message) > 0 { 536 i -= len(m.Message) 537 copy(dAtA[i:], m.Message) 538 i = encodeVarintQuery(dAtA, i, uint64(len(m.Message))) 539 i-- 540 dAtA[i] = 0xa 541 } 542 return len(dAtA) - i, nil 543 } 544 545 func (m *SayHelloRequest) Marshal() (dAtA []byte, err error) { 546 size := m.Size() 547 dAtA = make([]byte, size) 548 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 549 if err != nil { 550 return nil, err 551 } 552 return dAtA[:n], nil 553 } 554 555 func (m *SayHelloRequest) MarshalTo(dAtA []byte) (int, error) { 556 size := m.Size() 557 return m.MarshalToSizedBuffer(dAtA[:size]) 558 } 559 560 func (m *SayHelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 561 i := len(dAtA) 562 _ = i 563 var l int 564 _ = l 565 if len(m.Name) > 0 { 566 i -= len(m.Name) 567 copy(dAtA[i:], m.Name) 568 i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) 569 i-- 570 dAtA[i] = 0xa 571 } 572 return len(dAtA) - i, nil 573 } 574 575 func (m *SayHelloResponse) Marshal() (dAtA []byte, err error) { 576 size := m.Size() 577 dAtA = make([]byte, size) 578 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 579 if err != nil { 580 return nil, err 581 } 582 return dAtA[:n], nil 583 } 584 585 func (m *SayHelloResponse) MarshalTo(dAtA []byte) (int, error) { 586 size := m.Size() 587 return m.MarshalToSizedBuffer(dAtA[:size]) 588 } 589 590 func (m *SayHelloResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 591 i := len(dAtA) 592 _ = i 593 var l int 594 _ = l 595 if len(m.Greeting) > 0 { 596 i -= len(m.Greeting) 597 copy(dAtA[i:], m.Greeting) 598 i = encodeVarintQuery(dAtA, i, uint64(len(m.Greeting))) 599 i-- 600 dAtA[i] = 0xa 601 } 602 return len(dAtA) - i, nil 603 } 604 605 func (m *TestAnyRequest) Marshal() (dAtA []byte, err error) { 606 size := m.Size() 607 dAtA = make([]byte, size) 608 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 609 if err != nil { 610 return nil, err 611 } 612 return dAtA[:n], nil 613 } 614 615 func (m *TestAnyRequest) MarshalTo(dAtA []byte) (int, error) { 616 size := m.Size() 617 return m.MarshalToSizedBuffer(dAtA[:size]) 618 } 619 620 func (m *TestAnyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 621 i := len(dAtA) 622 _ = i 623 var l int 624 _ = l 625 if m.AnyAnimal != nil { 626 { 627 size, err := m.AnyAnimal.MarshalToSizedBuffer(dAtA[:i]) 628 if err != nil { 629 return 0, err 630 } 631 i -= size 632 i = encodeVarintQuery(dAtA, i, uint64(size)) 633 } 634 i-- 635 dAtA[i] = 0xa 636 } 637 return len(dAtA) - i, nil 638 } 639 640 func (m *TestAnyResponse) Marshal() (dAtA []byte, err error) { 641 size := m.Size() 642 dAtA = make([]byte, size) 643 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 644 if err != nil { 645 return nil, err 646 } 647 return dAtA[:n], nil 648 } 649 650 func (m *TestAnyResponse) MarshalTo(dAtA []byte) (int, error) { 651 size := m.Size() 652 return m.MarshalToSizedBuffer(dAtA[:size]) 653 } 654 655 func (m *TestAnyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 656 i := len(dAtA) 657 _ = i 658 var l int 659 _ = l 660 if m.HasAnimal != nil { 661 { 662 size, err := m.HasAnimal.MarshalToSizedBuffer(dAtA[:i]) 663 if err != nil { 664 return 0, err 665 } 666 i -= size 667 i = encodeVarintQuery(dAtA, i, uint64(size)) 668 } 669 i-- 670 dAtA[i] = 0xa 671 } 672 return len(dAtA) - i, nil 673 } 674 675 func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { 676 offset -= sovQuery(v) 677 base := offset 678 for v >= 1<<7 { 679 dAtA[offset] = uint8(v&0x7f | 0x80) 680 v >>= 7 681 offset++ 682 } 683 dAtA[offset] = uint8(v) 684 return base 685 } 686 func (m *EchoRequest) Size() (n int) { 687 if m == nil { 688 return 0 689 } 690 var l int 691 _ = l 692 l = len(m.Message) 693 if l > 0 { 694 n += 1 + l + sovQuery(uint64(l)) 695 } 696 return n 697 } 698 699 func (m *EchoResponse) Size() (n int) { 700 if m == nil { 701 return 0 702 } 703 var l int 704 _ = l 705 l = len(m.Message) 706 if l > 0 { 707 n += 1 + l + sovQuery(uint64(l)) 708 } 709 return n 710 } 711 712 func (m *SayHelloRequest) Size() (n int) { 713 if m == nil { 714 return 0 715 } 716 var l int 717 _ = l 718 l = len(m.Name) 719 if l > 0 { 720 n += 1 + l + sovQuery(uint64(l)) 721 } 722 return n 723 } 724 725 func (m *SayHelloResponse) Size() (n int) { 726 if m == nil { 727 return 0 728 } 729 var l int 730 _ = l 731 l = len(m.Greeting) 732 if l > 0 { 733 n += 1 + l + sovQuery(uint64(l)) 734 } 735 return n 736 } 737 738 func (m *TestAnyRequest) Size() (n int) { 739 if m == nil { 740 return 0 741 } 742 var l int 743 _ = l 744 if m.AnyAnimal != nil { 745 l = m.AnyAnimal.Size() 746 n += 1 + l + sovQuery(uint64(l)) 747 } 748 return n 749 } 750 751 func (m *TestAnyResponse) Size() (n int) { 752 if m == nil { 753 return 0 754 } 755 var l int 756 _ = l 757 if m.HasAnimal != nil { 758 l = m.HasAnimal.Size() 759 n += 1 + l + sovQuery(uint64(l)) 760 } 761 return n 762 } 763 764 func sovQuery(x uint64) (n int) { 765 return (math_bits.Len64(x|1) + 6) / 7 766 } 767 func sozQuery(x uint64) (n int) { 768 return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 769 } 770 func (m *EchoRequest) Unmarshal(dAtA []byte) error { 771 l := len(dAtA) 772 iNdEx := 0 773 for iNdEx < l { 774 preIndex := iNdEx 775 var wire uint64 776 for shift := uint(0); ; shift += 7 { 777 if shift >= 64 { 778 return ErrIntOverflowQuery 779 } 780 if iNdEx >= l { 781 return io.ErrUnexpectedEOF 782 } 783 b := dAtA[iNdEx] 784 iNdEx++ 785 wire |= uint64(b&0x7F) << shift 786 if b < 0x80 { 787 break 788 } 789 } 790 fieldNum := int32(wire >> 3) 791 wireType := int(wire & 0x7) 792 if wireType == 4 { 793 return fmt.Errorf("proto: EchoRequest: wiretype end group for non-group") 794 } 795 if fieldNum <= 0 { 796 return fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) 797 } 798 switch fieldNum { 799 case 1: 800 if wireType != 2 { 801 return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) 802 } 803 var stringLen uint64 804 for shift := uint(0); ; shift += 7 { 805 if shift >= 64 { 806 return ErrIntOverflowQuery 807 } 808 if iNdEx >= l { 809 return io.ErrUnexpectedEOF 810 } 811 b := dAtA[iNdEx] 812 iNdEx++ 813 stringLen |= uint64(b&0x7F) << shift 814 if b < 0x80 { 815 break 816 } 817 } 818 intStringLen := int(stringLen) 819 if intStringLen < 0 { 820 return ErrInvalidLengthQuery 821 } 822 postIndex := iNdEx + intStringLen 823 if postIndex < 0 { 824 return ErrInvalidLengthQuery 825 } 826 if postIndex > l { 827 return io.ErrUnexpectedEOF 828 } 829 m.Message = string(dAtA[iNdEx:postIndex]) 830 iNdEx = postIndex 831 default: 832 iNdEx = preIndex 833 skippy, err := skipQuery(dAtA[iNdEx:]) 834 if err != nil { 835 return err 836 } 837 if (skippy < 0) || (iNdEx+skippy) < 0 { 838 return ErrInvalidLengthQuery 839 } 840 if (iNdEx + skippy) > l { 841 return io.ErrUnexpectedEOF 842 } 843 iNdEx += skippy 844 } 845 } 846 847 if iNdEx > l { 848 return io.ErrUnexpectedEOF 849 } 850 return nil 851 } 852 func (m *EchoResponse) Unmarshal(dAtA []byte) error { 853 l := len(dAtA) 854 iNdEx := 0 855 for iNdEx < l { 856 preIndex := iNdEx 857 var wire uint64 858 for shift := uint(0); ; shift += 7 { 859 if shift >= 64 { 860 return ErrIntOverflowQuery 861 } 862 if iNdEx >= l { 863 return io.ErrUnexpectedEOF 864 } 865 b := dAtA[iNdEx] 866 iNdEx++ 867 wire |= uint64(b&0x7F) << shift 868 if b < 0x80 { 869 break 870 } 871 } 872 fieldNum := int32(wire >> 3) 873 wireType := int(wire & 0x7) 874 if wireType == 4 { 875 return fmt.Errorf("proto: EchoResponse: wiretype end group for non-group") 876 } 877 if fieldNum <= 0 { 878 return fmt.Errorf("proto: EchoResponse: illegal tag %d (wire type %d)", fieldNum, wire) 879 } 880 switch fieldNum { 881 case 1: 882 if wireType != 2 { 883 return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) 884 } 885 var stringLen uint64 886 for shift := uint(0); ; shift += 7 { 887 if shift >= 64 { 888 return ErrIntOverflowQuery 889 } 890 if iNdEx >= l { 891 return io.ErrUnexpectedEOF 892 } 893 b := dAtA[iNdEx] 894 iNdEx++ 895 stringLen |= uint64(b&0x7F) << shift 896 if b < 0x80 { 897 break 898 } 899 } 900 intStringLen := int(stringLen) 901 if intStringLen < 0 { 902 return ErrInvalidLengthQuery 903 } 904 postIndex := iNdEx + intStringLen 905 if postIndex < 0 { 906 return ErrInvalidLengthQuery 907 } 908 if postIndex > l { 909 return io.ErrUnexpectedEOF 910 } 911 m.Message = string(dAtA[iNdEx:postIndex]) 912 iNdEx = postIndex 913 default: 914 iNdEx = preIndex 915 skippy, err := skipQuery(dAtA[iNdEx:]) 916 if err != nil { 917 return err 918 } 919 if (skippy < 0) || (iNdEx+skippy) < 0 { 920 return ErrInvalidLengthQuery 921 } 922 if (iNdEx + skippy) > l { 923 return io.ErrUnexpectedEOF 924 } 925 iNdEx += skippy 926 } 927 } 928 929 if iNdEx > l { 930 return io.ErrUnexpectedEOF 931 } 932 return nil 933 } 934 func (m *SayHelloRequest) Unmarshal(dAtA []byte) error { 935 l := len(dAtA) 936 iNdEx := 0 937 for iNdEx < l { 938 preIndex := iNdEx 939 var wire uint64 940 for shift := uint(0); ; shift += 7 { 941 if shift >= 64 { 942 return ErrIntOverflowQuery 943 } 944 if iNdEx >= l { 945 return io.ErrUnexpectedEOF 946 } 947 b := dAtA[iNdEx] 948 iNdEx++ 949 wire |= uint64(b&0x7F) << shift 950 if b < 0x80 { 951 break 952 } 953 } 954 fieldNum := int32(wire >> 3) 955 wireType := int(wire & 0x7) 956 if wireType == 4 { 957 return fmt.Errorf("proto: SayHelloRequest: wiretype end group for non-group") 958 } 959 if fieldNum <= 0 { 960 return fmt.Errorf("proto: SayHelloRequest: illegal tag %d (wire type %d)", fieldNum, wire) 961 } 962 switch fieldNum { 963 case 1: 964 if wireType != 2 { 965 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 966 } 967 var stringLen uint64 968 for shift := uint(0); ; shift += 7 { 969 if shift >= 64 { 970 return ErrIntOverflowQuery 971 } 972 if iNdEx >= l { 973 return io.ErrUnexpectedEOF 974 } 975 b := dAtA[iNdEx] 976 iNdEx++ 977 stringLen |= uint64(b&0x7F) << shift 978 if b < 0x80 { 979 break 980 } 981 } 982 intStringLen := int(stringLen) 983 if intStringLen < 0 { 984 return ErrInvalidLengthQuery 985 } 986 postIndex := iNdEx + intStringLen 987 if postIndex < 0 { 988 return ErrInvalidLengthQuery 989 } 990 if postIndex > l { 991 return io.ErrUnexpectedEOF 992 } 993 m.Name = string(dAtA[iNdEx:postIndex]) 994 iNdEx = postIndex 995 default: 996 iNdEx = preIndex 997 skippy, err := skipQuery(dAtA[iNdEx:]) 998 if err != nil { 999 return err 1000 } 1001 if (skippy < 0) || (iNdEx+skippy) < 0 { 1002 return ErrInvalidLengthQuery 1003 } 1004 if (iNdEx + skippy) > l { 1005 return io.ErrUnexpectedEOF 1006 } 1007 iNdEx += skippy 1008 } 1009 } 1010 1011 if iNdEx > l { 1012 return io.ErrUnexpectedEOF 1013 } 1014 return nil 1015 } 1016 func (m *SayHelloResponse) Unmarshal(dAtA []byte) error { 1017 l := len(dAtA) 1018 iNdEx := 0 1019 for iNdEx < l { 1020 preIndex := iNdEx 1021 var wire uint64 1022 for shift := uint(0); ; shift += 7 { 1023 if shift >= 64 { 1024 return ErrIntOverflowQuery 1025 } 1026 if iNdEx >= l { 1027 return io.ErrUnexpectedEOF 1028 } 1029 b := dAtA[iNdEx] 1030 iNdEx++ 1031 wire |= uint64(b&0x7F) << shift 1032 if b < 0x80 { 1033 break 1034 } 1035 } 1036 fieldNum := int32(wire >> 3) 1037 wireType := int(wire & 0x7) 1038 if wireType == 4 { 1039 return fmt.Errorf("proto: SayHelloResponse: wiretype end group for non-group") 1040 } 1041 if fieldNum <= 0 { 1042 return fmt.Errorf("proto: SayHelloResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1043 } 1044 switch fieldNum { 1045 case 1: 1046 if wireType != 2 { 1047 return fmt.Errorf("proto: wrong wireType = %d for field Greeting", wireType) 1048 } 1049 var stringLen uint64 1050 for shift := uint(0); ; shift += 7 { 1051 if shift >= 64 { 1052 return ErrIntOverflowQuery 1053 } 1054 if iNdEx >= l { 1055 return io.ErrUnexpectedEOF 1056 } 1057 b := dAtA[iNdEx] 1058 iNdEx++ 1059 stringLen |= uint64(b&0x7F) << shift 1060 if b < 0x80 { 1061 break 1062 } 1063 } 1064 intStringLen := int(stringLen) 1065 if intStringLen < 0 { 1066 return ErrInvalidLengthQuery 1067 } 1068 postIndex := iNdEx + intStringLen 1069 if postIndex < 0 { 1070 return ErrInvalidLengthQuery 1071 } 1072 if postIndex > l { 1073 return io.ErrUnexpectedEOF 1074 } 1075 m.Greeting = string(dAtA[iNdEx:postIndex]) 1076 iNdEx = postIndex 1077 default: 1078 iNdEx = preIndex 1079 skippy, err := skipQuery(dAtA[iNdEx:]) 1080 if err != nil { 1081 return err 1082 } 1083 if (skippy < 0) || (iNdEx+skippy) < 0 { 1084 return ErrInvalidLengthQuery 1085 } 1086 if (iNdEx + skippy) > l { 1087 return io.ErrUnexpectedEOF 1088 } 1089 iNdEx += skippy 1090 } 1091 } 1092 1093 if iNdEx > l { 1094 return io.ErrUnexpectedEOF 1095 } 1096 return nil 1097 } 1098 func (m *TestAnyRequest) Unmarshal(dAtA []byte) error { 1099 l := len(dAtA) 1100 iNdEx := 0 1101 for iNdEx < l { 1102 preIndex := iNdEx 1103 var wire uint64 1104 for shift := uint(0); ; shift += 7 { 1105 if shift >= 64 { 1106 return ErrIntOverflowQuery 1107 } 1108 if iNdEx >= l { 1109 return io.ErrUnexpectedEOF 1110 } 1111 b := dAtA[iNdEx] 1112 iNdEx++ 1113 wire |= uint64(b&0x7F) << shift 1114 if b < 0x80 { 1115 break 1116 } 1117 } 1118 fieldNum := int32(wire >> 3) 1119 wireType := int(wire & 0x7) 1120 if wireType == 4 { 1121 return fmt.Errorf("proto: TestAnyRequest: wiretype end group for non-group") 1122 } 1123 if fieldNum <= 0 { 1124 return fmt.Errorf("proto: TestAnyRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1125 } 1126 switch fieldNum { 1127 case 1: 1128 if wireType != 2 { 1129 return fmt.Errorf("proto: wrong wireType = %d for field AnyAnimal", wireType) 1130 } 1131 var msglen int 1132 for shift := uint(0); ; shift += 7 { 1133 if shift >= 64 { 1134 return ErrIntOverflowQuery 1135 } 1136 if iNdEx >= l { 1137 return io.ErrUnexpectedEOF 1138 } 1139 b := dAtA[iNdEx] 1140 iNdEx++ 1141 msglen |= int(b&0x7F) << shift 1142 if b < 0x80 { 1143 break 1144 } 1145 } 1146 if msglen < 0 { 1147 return ErrInvalidLengthQuery 1148 } 1149 postIndex := iNdEx + msglen 1150 if postIndex < 0 { 1151 return ErrInvalidLengthQuery 1152 } 1153 if postIndex > l { 1154 return io.ErrUnexpectedEOF 1155 } 1156 if m.AnyAnimal == nil { 1157 m.AnyAnimal = &types.Any{} 1158 } 1159 if err := m.AnyAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1160 return err 1161 } 1162 iNdEx = postIndex 1163 default: 1164 iNdEx = preIndex 1165 skippy, err := skipQuery(dAtA[iNdEx:]) 1166 if err != nil { 1167 return err 1168 } 1169 if (skippy < 0) || (iNdEx+skippy) < 0 { 1170 return ErrInvalidLengthQuery 1171 } 1172 if (iNdEx + skippy) > l { 1173 return io.ErrUnexpectedEOF 1174 } 1175 iNdEx += skippy 1176 } 1177 } 1178 1179 if iNdEx > l { 1180 return io.ErrUnexpectedEOF 1181 } 1182 return nil 1183 } 1184 func (m *TestAnyResponse) Unmarshal(dAtA []byte) error { 1185 l := len(dAtA) 1186 iNdEx := 0 1187 for iNdEx < l { 1188 preIndex := iNdEx 1189 var wire uint64 1190 for shift := uint(0); ; shift += 7 { 1191 if shift >= 64 { 1192 return ErrIntOverflowQuery 1193 } 1194 if iNdEx >= l { 1195 return io.ErrUnexpectedEOF 1196 } 1197 b := dAtA[iNdEx] 1198 iNdEx++ 1199 wire |= uint64(b&0x7F) << shift 1200 if b < 0x80 { 1201 break 1202 } 1203 } 1204 fieldNum := int32(wire >> 3) 1205 wireType := int(wire & 0x7) 1206 if wireType == 4 { 1207 return fmt.Errorf("proto: TestAnyResponse: wiretype end group for non-group") 1208 } 1209 if fieldNum <= 0 { 1210 return fmt.Errorf("proto: TestAnyResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1211 } 1212 switch fieldNum { 1213 case 1: 1214 if wireType != 2 { 1215 return fmt.Errorf("proto: wrong wireType = %d for field HasAnimal", wireType) 1216 } 1217 var msglen int 1218 for shift := uint(0); ; shift += 7 { 1219 if shift >= 64 { 1220 return ErrIntOverflowQuery 1221 } 1222 if iNdEx >= l { 1223 return io.ErrUnexpectedEOF 1224 } 1225 b := dAtA[iNdEx] 1226 iNdEx++ 1227 msglen |= int(b&0x7F) << shift 1228 if b < 0x80 { 1229 break 1230 } 1231 } 1232 if msglen < 0 { 1233 return ErrInvalidLengthQuery 1234 } 1235 postIndex := iNdEx + msglen 1236 if postIndex < 0 { 1237 return ErrInvalidLengthQuery 1238 } 1239 if postIndex > l { 1240 return io.ErrUnexpectedEOF 1241 } 1242 if m.HasAnimal == nil { 1243 m.HasAnimal = &HasAnimal{} 1244 } 1245 if err := m.HasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1246 return err 1247 } 1248 iNdEx = postIndex 1249 default: 1250 iNdEx = preIndex 1251 skippy, err := skipQuery(dAtA[iNdEx:]) 1252 if err != nil { 1253 return err 1254 } 1255 if (skippy < 0) || (iNdEx+skippy) < 0 { 1256 return ErrInvalidLengthQuery 1257 } 1258 if (iNdEx + skippy) > l { 1259 return io.ErrUnexpectedEOF 1260 } 1261 iNdEx += skippy 1262 } 1263 } 1264 1265 if iNdEx > l { 1266 return io.ErrUnexpectedEOF 1267 } 1268 return nil 1269 } 1270 func skipQuery(dAtA []byte) (n int, err error) { 1271 l := len(dAtA) 1272 iNdEx := 0 1273 depth := 0 1274 for iNdEx < l { 1275 var wire uint64 1276 for shift := uint(0); ; shift += 7 { 1277 if shift >= 64 { 1278 return 0, ErrIntOverflowQuery 1279 } 1280 if iNdEx >= l { 1281 return 0, io.ErrUnexpectedEOF 1282 } 1283 b := dAtA[iNdEx] 1284 iNdEx++ 1285 wire |= (uint64(b) & 0x7F) << shift 1286 if b < 0x80 { 1287 break 1288 } 1289 } 1290 wireType := int(wire & 0x7) 1291 switch wireType { 1292 case 0: 1293 for shift := uint(0); ; shift += 7 { 1294 if shift >= 64 { 1295 return 0, ErrIntOverflowQuery 1296 } 1297 if iNdEx >= l { 1298 return 0, io.ErrUnexpectedEOF 1299 } 1300 iNdEx++ 1301 if dAtA[iNdEx-1] < 0x80 { 1302 break 1303 } 1304 } 1305 case 1: 1306 iNdEx += 8 1307 case 2: 1308 var length int 1309 for shift := uint(0); ; shift += 7 { 1310 if shift >= 64 { 1311 return 0, ErrIntOverflowQuery 1312 } 1313 if iNdEx >= l { 1314 return 0, io.ErrUnexpectedEOF 1315 } 1316 b := dAtA[iNdEx] 1317 iNdEx++ 1318 length |= (int(b) & 0x7F) << shift 1319 if b < 0x80 { 1320 break 1321 } 1322 } 1323 if length < 0 { 1324 return 0, ErrInvalidLengthQuery 1325 } 1326 iNdEx += length 1327 case 3: 1328 depth++ 1329 case 4: 1330 if depth == 0 { 1331 return 0, ErrUnexpectedEndOfGroupQuery 1332 } 1333 depth-- 1334 case 5: 1335 iNdEx += 4 1336 default: 1337 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1338 } 1339 if iNdEx < 0 { 1340 return 0, ErrInvalidLengthQuery 1341 } 1342 if depth == 0 { 1343 return iNdEx, nil 1344 } 1345 } 1346 return 0, io.ErrUnexpectedEOF 1347 } 1348 1349 var ( 1350 ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") 1351 ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") 1352 ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") 1353 )