github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/icamauth/types/query.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: gaia/icamauth/v1beta1/query.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 13 _ "github.com/gogo/protobuf/gogoproto" 14 grpc1 "github.com/gogo/protobuf/grpc" 15 proto "github.com/gogo/protobuf/proto" 16 _ "google.golang.org/genproto/googleapis/api/annotations" 17 grpc "google.golang.org/grpc" 18 codes "google.golang.org/grpc/codes" 19 status "google.golang.org/grpc/status" 20 ) 21 22 // Reference imports to suppress errors if they are not otherwise used. 23 var _ = proto.Marshal 24 var _ = fmt.Errorf 25 var _ = math.Inf 26 27 // This is a compile-time assertion to ensure that this generated file 28 // is compatible with the proto package it is being compiled against. 29 // A compilation error at this line likely means your copy of the 30 // proto package needs to be updated. 31 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 32 33 // QueryInterchainAccountRequest is the request type for the Query/InterchainAccountAddress RPC 34 type QueryInterchainAccountRequest struct { 35 Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` 36 ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` 37 } 38 39 func (m *QueryInterchainAccountRequest) Reset() { *m = QueryInterchainAccountRequest{} } 40 func (m *QueryInterchainAccountRequest) String() string { return proto.CompactTextString(m) } 41 func (*QueryInterchainAccountRequest) ProtoMessage() {} 42 func (*QueryInterchainAccountRequest) Descriptor() ([]byte, []int) { 43 return fileDescriptor_2cf727725a0b026b, []int{0} 44 } 45 func (m *QueryInterchainAccountRequest) XXX_Unmarshal(b []byte) error { 46 return m.Unmarshal(b) 47 } 48 func (m *QueryInterchainAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 49 if deterministic { 50 return xxx_messageInfo_QueryInterchainAccountRequest.Marshal(b, m, deterministic) 51 } else { 52 b = b[:cap(b)] 53 n, err := m.MarshalToSizedBuffer(b) 54 if err != nil { 55 return nil, err 56 } 57 return b[:n], nil 58 } 59 } 60 func (m *QueryInterchainAccountRequest) XXX_Merge(src proto.Message) { 61 xxx_messageInfo_QueryInterchainAccountRequest.Merge(m, src) 62 } 63 func (m *QueryInterchainAccountRequest) XXX_Size() int { 64 return m.Size() 65 } 66 func (m *QueryInterchainAccountRequest) XXX_DiscardUnknown() { 67 xxx_messageInfo_QueryInterchainAccountRequest.DiscardUnknown(m) 68 } 69 70 var xxx_messageInfo_QueryInterchainAccountRequest proto.InternalMessageInfo 71 72 func (m *QueryInterchainAccountRequest) GetOwner() string { 73 if m != nil { 74 return m.Owner 75 } 76 return "" 77 } 78 79 func (m *QueryInterchainAccountRequest) GetConnectionId() string { 80 if m != nil { 81 return m.ConnectionId 82 } 83 return "" 84 } 85 86 // QueryInterchainAccountResponse the response type for the Query/InterchainAccountAddress RPC 87 type QueryInterchainAccountResponse struct { 88 InterchainAccountAddress string `protobuf:"bytes,1,opt,name=interchain_account_address,json=interchainAccountAddress,proto3" json:"interchain_account_address,omitempty" yaml:"interchain_account_address"` 89 } 90 91 func (m *QueryInterchainAccountResponse) Reset() { *m = QueryInterchainAccountResponse{} } 92 func (m *QueryInterchainAccountResponse) String() string { return proto.CompactTextString(m) } 93 func (*QueryInterchainAccountResponse) ProtoMessage() {} 94 func (*QueryInterchainAccountResponse) Descriptor() ([]byte, []int) { 95 return fileDescriptor_2cf727725a0b026b, []int{1} 96 } 97 func (m *QueryInterchainAccountResponse) XXX_Unmarshal(b []byte) error { 98 return m.Unmarshal(b) 99 } 100 func (m *QueryInterchainAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 101 if deterministic { 102 return xxx_messageInfo_QueryInterchainAccountResponse.Marshal(b, m, deterministic) 103 } else { 104 b = b[:cap(b)] 105 n, err := m.MarshalToSizedBuffer(b) 106 if err != nil { 107 return nil, err 108 } 109 return b[:n], nil 110 } 111 } 112 func (m *QueryInterchainAccountResponse) XXX_Merge(src proto.Message) { 113 xxx_messageInfo_QueryInterchainAccountResponse.Merge(m, src) 114 } 115 func (m *QueryInterchainAccountResponse) XXX_Size() int { 116 return m.Size() 117 } 118 func (m *QueryInterchainAccountResponse) XXX_DiscardUnknown() { 119 xxx_messageInfo_QueryInterchainAccountResponse.DiscardUnknown(m) 120 } 121 122 var xxx_messageInfo_QueryInterchainAccountResponse proto.InternalMessageInfo 123 124 func (m *QueryInterchainAccountResponse) GetInterchainAccountAddress() string { 125 if m != nil { 126 return m.InterchainAccountAddress 127 } 128 return "" 129 } 130 131 func init() { 132 proto.RegisterType((*QueryInterchainAccountRequest)(nil), "gaia.icamauth.v1beta1.QueryInterchainAccountRequest") 133 proto.RegisterType((*QueryInterchainAccountResponse)(nil), "gaia.icamauth.v1beta1.QueryInterchainAccountResponse") 134 } 135 136 func init() { proto.RegisterFile("gaia/icamauth/v1beta1/query.proto", fileDescriptor_2cf727725a0b026b) } 137 138 var fileDescriptor_2cf727725a0b026b = []byte{ 139 // 376 bytes of a gzipped FileDescriptorProto 140 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x41, 0x6b, 0xe2, 0x40, 141 0x14, 0x76, 0x04, 0x17, 0x76, 0xd8, 0x3d, 0x6c, 0x70, 0x21, 0x84, 0xdd, 0xb8, 0x06, 0x96, 0xdd, 142 0x53, 0x06, 0x77, 0xdb, 0x4b, 0xa1, 0x07, 0xbd, 0x79, 0x6c, 0xe8, 0xc9, 0x8b, 0x8c, 0x93, 0x21, 143 0x0e, 0x98, 0x79, 0x31, 0x33, 0x69, 0x2b, 0xe2, 0xa5, 0xd0, 0x7b, 0xa1, 0x7f, 0xaa, 0x47, 0xa1, 144 0x97, 0x1e, 0x8a, 0x14, 0x2d, 0xfd, 0x01, 0xfe, 0x82, 0x92, 0x4c, 0x5b, 0xb1, 0x6a, 0xa1, 0xa7, 145 0x99, 0xc7, 0xf7, 0xcd, 0xfb, 0xbe, 0xf7, 0xcd, 0xc3, 0xf5, 0x88, 0x0a, 0x4a, 0x04, 0xa3, 0x31, 146 0xcd, 0x74, 0x9f, 0x9c, 0x34, 0x7a, 0x5c, 0xd3, 0x06, 0x19, 0x66, 0x3c, 0x1d, 0xf9, 0x49, 0x0a, 147 0x1a, 0xac, 0xef, 0x39, 0xc5, 0x7f, 0xa1, 0xf8, 0xcf, 0x14, 0xa7, 0x1a, 0x41, 0x04, 0x05, 0x83, 148 0xe4, 0x37, 0x43, 0x76, 0x7e, 0x44, 0x00, 0xd1, 0x80, 0x13, 0x9a, 0x08, 0x42, 0xa5, 0x04, 0x4d, 149 0xb5, 0x00, 0xa9, 0x0c, 0xea, 0x69, 0xfc, 0xf3, 0x28, 0xef, 0xdc, 0x96, 0x9a, 0xa7, 0xac, 0x4f, 150 0x85, 0x6c, 0x32, 0x06, 0x99, 0xd4, 0x01, 0x1f, 0x66, 0x5c, 0x69, 0xab, 0x8a, 0x2b, 0x70, 0x2a, 151 0x79, 0x6a, 0xa3, 0x5f, 0xe8, 0xef, 0xe7, 0xc0, 0x14, 0xd6, 0x21, 0xfe, 0xca, 0x40, 0x4a, 0xce, 152 0xf2, 0x5e, 0x5d, 0x11, 0xda, 0xe5, 0x1c, 0x6d, 0xd9, 0xcb, 0x59, 0xad, 0x3a, 0xa2, 0xf1, 0xe0, 153 0xc0, 0x5b, 0x83, 0xbd, 0xe0, 0xcb, 0xaa, 0x6e, 0x87, 0xde, 0x05, 0xc2, 0xee, 0x2e, 0x59, 0x95, 154 0x80, 0x54, 0xdc, 0x62, 0xd8, 0x11, 0xaf, 0x60, 0x97, 0x1a, 0xb4, 0x4b, 0xc3, 0x30, 0xe5, 0x4a, 155 0x19, 0x33, 0xad, 0xdf, 0xcb, 0x59, 0xad, 0x6e, 0xe4, 0x76, 0x73, 0xbd, 0xc0, 0x16, 0x6f, 0x55, 156 0x9a, 0x06, 0xfa, 0xf7, 0x88, 0x70, 0xa5, 0xf0, 0x61, 0xdd, 0x21, 0xfc, 0x6d, 0xc3, 0x8c, 0xb5, 157 0xe7, 0x6f, 0x4d, 0xda, 0x7f, 0x37, 0x32, 0x67, 0xff, 0x83, 0xaf, 0xcc, 0xc4, 0x5e, 0xe7, 0xfc, 158 0xe6, 0xe1, 0xaa, 0x7c, 0x6c, 0x05, 0x64, 0xfb, 0x06, 0x6c, 0x8e, 0x48, 0x8a, 0xcf, 0x20, 0xe3, 159 0xe2, 0x98, 0x90, 0x55, 0xc4, 0x64, 0xbc, 0x16, 0xff, 0xa4, 0xd5, 0xbc, 0x9e, 0xbb, 0x68, 0x3a, 160 0x77, 0xd1, 0xfd, 0xdc, 0x45, 0x97, 0x0b, 0xb7, 0x34, 0x5d, 0xb8, 0xa5, 0xdb, 0x85, 0x5b, 0xea, 161 0xfc, 0x89, 0x84, 0xee, 0x67, 0x3d, 0x9f, 0x41, 0x4c, 0x18, 0xa8, 0x18, 0x94, 0x91, 0x3f, 0x5b, 162 0x19, 0xd0, 0xa3, 0x84, 0xab, 0xde, 0xa7, 0x62, 0x61, 0xfe, 0x3f, 0x05, 0x00, 0x00, 0xff, 0xff, 163 0x16, 0x91, 0x9a, 0x26, 0xa0, 0x02, 0x00, 0x00, 164 } 165 166 // Reference imports to suppress errors if they are not otherwise used. 167 var _ context.Context 168 var _ grpc.ClientConn 169 170 // This is a compile-time assertion to ensure that this generated file 171 // is compatible with the grpc package it is being compiled against. 172 const _ = grpc.SupportPackageIsVersion4 173 174 // QueryClient is the client API for Query service. 175 // 176 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 177 type QueryClient interface { 178 // QueryInterchainAccount returns the interchain account for given owner address on a given connection pair 179 InterchainAccount(ctx context.Context, in *QueryInterchainAccountRequest, opts ...grpc.CallOption) (*QueryInterchainAccountResponse, error) 180 } 181 182 type queryClient struct { 183 cc grpc1.ClientConn 184 } 185 186 func NewQueryClient(cc grpc1.ClientConn) QueryClient { 187 return &queryClient{cc} 188 } 189 190 func (c *queryClient) InterchainAccount(ctx context.Context, in *QueryInterchainAccountRequest, opts ...grpc.CallOption) (*QueryInterchainAccountResponse, error) { 191 out := new(QueryInterchainAccountResponse) 192 err := c.cc.Invoke(ctx, "/gaia.icamauth.v1beta1.Query/InterchainAccount", in, out, opts...) 193 if err != nil { 194 return nil, err 195 } 196 return out, nil 197 } 198 199 // QueryServer is the server API for Query service. 200 type QueryServer interface { 201 // QueryInterchainAccount returns the interchain account for given owner address on a given connection pair 202 InterchainAccount(context.Context, *QueryInterchainAccountRequest) (*QueryInterchainAccountResponse, error) 203 } 204 205 // UnimplementedQueryServer can be embedded to have forward compatible implementations. 206 type UnimplementedQueryServer struct { 207 } 208 209 func (*UnimplementedQueryServer) InterchainAccount(ctx context.Context, req *QueryInterchainAccountRequest) (*QueryInterchainAccountResponse, error) { 210 return nil, status.Errorf(codes.Unimplemented, "method InterchainAccount not implemented") 211 } 212 213 func RegisterQueryServer(s grpc1.Server, srv QueryServer) { 214 s.RegisterService(&_Query_serviceDesc, srv) 215 } 216 217 func _Query_InterchainAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 218 in := new(QueryInterchainAccountRequest) 219 if err := dec(in); err != nil { 220 return nil, err 221 } 222 if interceptor == nil { 223 return srv.(QueryServer).InterchainAccount(ctx, in) 224 } 225 info := &grpc.UnaryServerInfo{ 226 Server: srv, 227 FullMethod: "/gaia.icamauth.v1beta1.Query/InterchainAccount", 228 } 229 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 230 return srv.(QueryServer).InterchainAccount(ctx, req.(*QueryInterchainAccountRequest)) 231 } 232 return interceptor(ctx, in, info, handler) 233 } 234 235 var _Query_serviceDesc = grpc.ServiceDesc{ 236 ServiceName: "gaia.icamauth.v1beta1.Query", 237 HandlerType: (*QueryServer)(nil), 238 Methods: []grpc.MethodDesc{ 239 { 240 MethodName: "InterchainAccount", 241 Handler: _Query_InterchainAccount_Handler, 242 }, 243 }, 244 Streams: []grpc.StreamDesc{}, 245 Metadata: "gaia/icamauth/v1beta1/query.proto", 246 } 247 248 func (m *QueryInterchainAccountRequest) Marshal() (dAtA []byte, err error) { 249 size := m.Size() 250 dAtA = make([]byte, size) 251 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 252 if err != nil { 253 return nil, err 254 } 255 return dAtA[:n], nil 256 } 257 258 func (m *QueryInterchainAccountRequest) MarshalTo(dAtA []byte) (int, error) { 259 size := m.Size() 260 return m.MarshalToSizedBuffer(dAtA[:size]) 261 } 262 263 func (m *QueryInterchainAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 264 i := len(dAtA) 265 _ = i 266 var l int 267 _ = l 268 if len(m.ConnectionId) > 0 { 269 i -= len(m.ConnectionId) 270 copy(dAtA[i:], m.ConnectionId) 271 i = encodeVarintQuery(dAtA, i, uint64(len(m.ConnectionId))) 272 i-- 273 dAtA[i] = 0x12 274 } 275 if len(m.Owner) > 0 { 276 i -= len(m.Owner) 277 copy(dAtA[i:], m.Owner) 278 i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) 279 i-- 280 dAtA[i] = 0xa 281 } 282 return len(dAtA) - i, nil 283 } 284 285 func (m *QueryInterchainAccountResponse) Marshal() (dAtA []byte, err error) { 286 size := m.Size() 287 dAtA = make([]byte, size) 288 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 289 if err != nil { 290 return nil, err 291 } 292 return dAtA[:n], nil 293 } 294 295 func (m *QueryInterchainAccountResponse) MarshalTo(dAtA []byte) (int, error) { 296 size := m.Size() 297 return m.MarshalToSizedBuffer(dAtA[:size]) 298 } 299 300 func (m *QueryInterchainAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 301 i := len(dAtA) 302 _ = i 303 var l int 304 _ = l 305 if len(m.InterchainAccountAddress) > 0 { 306 i -= len(m.InterchainAccountAddress) 307 copy(dAtA[i:], m.InterchainAccountAddress) 308 i = encodeVarintQuery(dAtA, i, uint64(len(m.InterchainAccountAddress))) 309 i-- 310 dAtA[i] = 0xa 311 } 312 return len(dAtA) - i, nil 313 } 314 315 func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { 316 offset -= sovQuery(v) 317 base := offset 318 for v >= 1<<7 { 319 dAtA[offset] = uint8(v&0x7f | 0x80) 320 v >>= 7 321 offset++ 322 } 323 dAtA[offset] = uint8(v) 324 return base 325 } 326 func (m *QueryInterchainAccountRequest) Size() (n int) { 327 if m == nil { 328 return 0 329 } 330 var l int 331 _ = l 332 l = len(m.Owner) 333 if l > 0 { 334 n += 1 + l + sovQuery(uint64(l)) 335 } 336 l = len(m.ConnectionId) 337 if l > 0 { 338 n += 1 + l + sovQuery(uint64(l)) 339 } 340 return n 341 } 342 343 func (m *QueryInterchainAccountResponse) Size() (n int) { 344 if m == nil { 345 return 0 346 } 347 var l int 348 _ = l 349 l = len(m.InterchainAccountAddress) 350 if l > 0 { 351 n += 1 + l + sovQuery(uint64(l)) 352 } 353 return n 354 } 355 356 func sovQuery(x uint64) (n int) { 357 return (math_bits.Len64(x|1) + 6) / 7 358 } 359 func sozQuery(x uint64) (n int) { 360 return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 361 } 362 func (m *QueryInterchainAccountRequest) Unmarshal(dAtA []byte) error { 363 l := len(dAtA) 364 iNdEx := 0 365 for iNdEx < l { 366 preIndex := iNdEx 367 var wire uint64 368 for shift := uint(0); ; shift += 7 { 369 if shift >= 64 { 370 return ErrIntOverflowQuery 371 } 372 if iNdEx >= l { 373 return io.ErrUnexpectedEOF 374 } 375 b := dAtA[iNdEx] 376 iNdEx++ 377 wire |= uint64(b&0x7F) << shift 378 if b < 0x80 { 379 break 380 } 381 } 382 fieldNum := int32(wire >> 3) 383 wireType := int(wire & 0x7) 384 if wireType == 4 { 385 return fmt.Errorf("proto: QueryInterchainAccountRequest: wiretype end group for non-group") 386 } 387 if fieldNum <= 0 { 388 return fmt.Errorf("proto: QueryInterchainAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) 389 } 390 switch fieldNum { 391 case 1: 392 if wireType != 2 { 393 return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) 394 } 395 var stringLen uint64 396 for shift := uint(0); ; shift += 7 { 397 if shift >= 64 { 398 return ErrIntOverflowQuery 399 } 400 if iNdEx >= l { 401 return io.ErrUnexpectedEOF 402 } 403 b := dAtA[iNdEx] 404 iNdEx++ 405 stringLen |= uint64(b&0x7F) << shift 406 if b < 0x80 { 407 break 408 } 409 } 410 intStringLen := int(stringLen) 411 if intStringLen < 0 { 412 return ErrInvalidLengthQuery 413 } 414 postIndex := iNdEx + intStringLen 415 if postIndex < 0 { 416 return ErrInvalidLengthQuery 417 } 418 if postIndex > l { 419 return io.ErrUnexpectedEOF 420 } 421 m.Owner = string(dAtA[iNdEx:postIndex]) 422 iNdEx = postIndex 423 case 2: 424 if wireType != 2 { 425 return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) 426 } 427 var stringLen uint64 428 for shift := uint(0); ; shift += 7 { 429 if shift >= 64 { 430 return ErrIntOverflowQuery 431 } 432 if iNdEx >= l { 433 return io.ErrUnexpectedEOF 434 } 435 b := dAtA[iNdEx] 436 iNdEx++ 437 stringLen |= uint64(b&0x7F) << shift 438 if b < 0x80 { 439 break 440 } 441 } 442 intStringLen := int(stringLen) 443 if intStringLen < 0 { 444 return ErrInvalidLengthQuery 445 } 446 postIndex := iNdEx + intStringLen 447 if postIndex < 0 { 448 return ErrInvalidLengthQuery 449 } 450 if postIndex > l { 451 return io.ErrUnexpectedEOF 452 } 453 m.ConnectionId = string(dAtA[iNdEx:postIndex]) 454 iNdEx = postIndex 455 default: 456 iNdEx = preIndex 457 skippy, err := skipQuery(dAtA[iNdEx:]) 458 if err != nil { 459 return err 460 } 461 if (skippy < 0) || (iNdEx+skippy) < 0 { 462 return ErrInvalidLengthQuery 463 } 464 if (iNdEx + skippy) > l { 465 return io.ErrUnexpectedEOF 466 } 467 iNdEx += skippy 468 } 469 } 470 471 if iNdEx > l { 472 return io.ErrUnexpectedEOF 473 } 474 return nil 475 } 476 func (m *QueryInterchainAccountResponse) Unmarshal(dAtA []byte) error { 477 l := len(dAtA) 478 iNdEx := 0 479 for iNdEx < l { 480 preIndex := iNdEx 481 var wire uint64 482 for shift := uint(0); ; shift += 7 { 483 if shift >= 64 { 484 return ErrIntOverflowQuery 485 } 486 if iNdEx >= l { 487 return io.ErrUnexpectedEOF 488 } 489 b := dAtA[iNdEx] 490 iNdEx++ 491 wire |= uint64(b&0x7F) << shift 492 if b < 0x80 { 493 break 494 } 495 } 496 fieldNum := int32(wire >> 3) 497 wireType := int(wire & 0x7) 498 if wireType == 4 { 499 return fmt.Errorf("proto: QueryInterchainAccountResponse: wiretype end group for non-group") 500 } 501 if fieldNum <= 0 { 502 return fmt.Errorf("proto: QueryInterchainAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) 503 } 504 switch fieldNum { 505 case 1: 506 if wireType != 2 { 507 return fmt.Errorf("proto: wrong wireType = %d for field InterchainAccountAddress", wireType) 508 } 509 var stringLen uint64 510 for shift := uint(0); ; shift += 7 { 511 if shift >= 64 { 512 return ErrIntOverflowQuery 513 } 514 if iNdEx >= l { 515 return io.ErrUnexpectedEOF 516 } 517 b := dAtA[iNdEx] 518 iNdEx++ 519 stringLen |= uint64(b&0x7F) << shift 520 if b < 0x80 { 521 break 522 } 523 } 524 intStringLen := int(stringLen) 525 if intStringLen < 0 { 526 return ErrInvalidLengthQuery 527 } 528 postIndex := iNdEx + intStringLen 529 if postIndex < 0 { 530 return ErrInvalidLengthQuery 531 } 532 if postIndex > l { 533 return io.ErrUnexpectedEOF 534 } 535 m.InterchainAccountAddress = string(dAtA[iNdEx:postIndex]) 536 iNdEx = postIndex 537 default: 538 iNdEx = preIndex 539 skippy, err := skipQuery(dAtA[iNdEx:]) 540 if err != nil { 541 return err 542 } 543 if (skippy < 0) || (iNdEx+skippy) < 0 { 544 return ErrInvalidLengthQuery 545 } 546 if (iNdEx + skippy) > l { 547 return io.ErrUnexpectedEOF 548 } 549 iNdEx += skippy 550 } 551 } 552 553 if iNdEx > l { 554 return io.ErrUnexpectedEOF 555 } 556 return nil 557 } 558 func skipQuery(dAtA []byte) (n int, err error) { 559 l := len(dAtA) 560 iNdEx := 0 561 depth := 0 562 for iNdEx < l { 563 var wire uint64 564 for shift := uint(0); ; shift += 7 { 565 if shift >= 64 { 566 return 0, ErrIntOverflowQuery 567 } 568 if iNdEx >= l { 569 return 0, io.ErrUnexpectedEOF 570 } 571 b := dAtA[iNdEx] 572 iNdEx++ 573 wire |= (uint64(b) & 0x7F) << shift 574 if b < 0x80 { 575 break 576 } 577 } 578 wireType := int(wire & 0x7) 579 switch wireType { 580 case 0: 581 for shift := uint(0); ; shift += 7 { 582 if shift >= 64 { 583 return 0, ErrIntOverflowQuery 584 } 585 if iNdEx >= l { 586 return 0, io.ErrUnexpectedEOF 587 } 588 iNdEx++ 589 if dAtA[iNdEx-1] < 0x80 { 590 break 591 } 592 } 593 case 1: 594 iNdEx += 8 595 case 2: 596 var length int 597 for shift := uint(0); ; shift += 7 { 598 if shift >= 64 { 599 return 0, ErrIntOverflowQuery 600 } 601 if iNdEx >= l { 602 return 0, io.ErrUnexpectedEOF 603 } 604 b := dAtA[iNdEx] 605 iNdEx++ 606 length |= (int(b) & 0x7F) << shift 607 if b < 0x80 { 608 break 609 } 610 } 611 if length < 0 { 612 return 0, ErrInvalidLengthQuery 613 } 614 iNdEx += length 615 case 3: 616 depth++ 617 case 4: 618 if depth == 0 { 619 return 0, ErrUnexpectedEndOfGroupQuery 620 } 621 depth-- 622 case 5: 623 iNdEx += 4 624 default: 625 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 626 } 627 if iNdEx < 0 { 628 return 0, ErrInvalidLengthQuery 629 } 630 if depth == 0 { 631 return iNdEx, nil 632 } 633 } 634 return 0, io.ErrUnexpectedEOF 635 } 636 637 var ( 638 ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") 639 ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") 640 ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") 641 )