github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/m3ninx/generated/proto/querypb/query.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/m3db/m3/src/m3ninx/generated/proto/querypb/query.proto 3 4 // Copyright (c) 2019 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 querypb is a generated protocol buffer package. 26 27 It is generated from these files: 28 github.com/m3db/m3/src/m3ninx/generated/proto/querypb/query.proto 29 30 It has these top-level messages: 31 FieldQuery 32 TermQuery 33 RegexpQuery 34 NegationQuery 35 ConjunctionQuery 36 DisjunctionQuery 37 AllQuery 38 Query 39 */ 40 package querypb 41 42 import proto "github.com/gogo/protobuf/proto" 43 import fmt "fmt" 44 import math "math" 45 46 import io "io" 47 48 // Reference imports to suppress errors if they are not otherwise used. 49 var _ = proto.Marshal 50 var _ = fmt.Errorf 51 var _ = math.Inf 52 53 // This is a compile-time assertion to ensure that this generated file 54 // is compatible with the proto package it is being compiled against. 55 // A compilation error at this line likely means your copy of the 56 // proto package needs to be updated. 57 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 58 59 type FieldQuery struct { 60 Field []byte `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` 61 } 62 63 func (m *FieldQuery) Reset() { *m = FieldQuery{} } 64 func (m *FieldQuery) String() string { return proto.CompactTextString(m) } 65 func (*FieldQuery) ProtoMessage() {} 66 func (*FieldQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{0} } 67 68 func (m *FieldQuery) GetField() []byte { 69 if m != nil { 70 return m.Field 71 } 72 return nil 73 } 74 75 type TermQuery struct { 76 Field []byte `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` 77 Term []byte `protobuf:"bytes,2,opt,name=term,proto3" json:"term,omitempty"` 78 } 79 80 func (m *TermQuery) Reset() { *m = TermQuery{} } 81 func (m *TermQuery) String() string { return proto.CompactTextString(m) } 82 func (*TermQuery) ProtoMessage() {} 83 func (*TermQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{1} } 84 85 func (m *TermQuery) GetField() []byte { 86 if m != nil { 87 return m.Field 88 } 89 return nil 90 } 91 92 func (m *TermQuery) GetTerm() []byte { 93 if m != nil { 94 return m.Term 95 } 96 return nil 97 } 98 99 type RegexpQuery struct { 100 Field []byte `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` 101 Regexp []byte `protobuf:"bytes,2,opt,name=regexp,proto3" json:"regexp,omitempty"` 102 } 103 104 func (m *RegexpQuery) Reset() { *m = RegexpQuery{} } 105 func (m *RegexpQuery) String() string { return proto.CompactTextString(m) } 106 func (*RegexpQuery) ProtoMessage() {} 107 func (*RegexpQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{2} } 108 109 func (m *RegexpQuery) GetField() []byte { 110 if m != nil { 111 return m.Field 112 } 113 return nil 114 } 115 116 func (m *RegexpQuery) GetRegexp() []byte { 117 if m != nil { 118 return m.Regexp 119 } 120 return nil 121 } 122 123 type NegationQuery struct { 124 Query *Query `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"` 125 } 126 127 func (m *NegationQuery) Reset() { *m = NegationQuery{} } 128 func (m *NegationQuery) String() string { return proto.CompactTextString(m) } 129 func (*NegationQuery) ProtoMessage() {} 130 func (*NegationQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{3} } 131 132 func (m *NegationQuery) GetQuery() *Query { 133 if m != nil { 134 return m.Query 135 } 136 return nil 137 } 138 139 type ConjunctionQuery struct { 140 Queries []*Query `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"` 141 } 142 143 func (m *ConjunctionQuery) Reset() { *m = ConjunctionQuery{} } 144 func (m *ConjunctionQuery) String() string { return proto.CompactTextString(m) } 145 func (*ConjunctionQuery) ProtoMessage() {} 146 func (*ConjunctionQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{4} } 147 148 func (m *ConjunctionQuery) GetQueries() []*Query { 149 if m != nil { 150 return m.Queries 151 } 152 return nil 153 } 154 155 type DisjunctionQuery struct { 156 Queries []*Query `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"` 157 } 158 159 func (m *DisjunctionQuery) Reset() { *m = DisjunctionQuery{} } 160 func (m *DisjunctionQuery) String() string { return proto.CompactTextString(m) } 161 func (*DisjunctionQuery) ProtoMessage() {} 162 func (*DisjunctionQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{5} } 163 164 func (m *DisjunctionQuery) GetQueries() []*Query { 165 if m != nil { 166 return m.Queries 167 } 168 return nil 169 } 170 171 type AllQuery struct { 172 } 173 174 func (m *AllQuery) Reset() { *m = AllQuery{} } 175 func (m *AllQuery) String() string { return proto.CompactTextString(m) } 176 func (*AllQuery) ProtoMessage() {} 177 func (*AllQuery) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{6} } 178 179 type Query struct { 180 // Types that are valid to be assigned to Query: 181 // *Query_Term 182 // *Query_Regexp 183 // *Query_Negation 184 // *Query_Conjunction 185 // *Query_Disjunction 186 // *Query_All 187 // *Query_Field 188 Query isQuery_Query `protobuf_oneof:"query"` 189 } 190 191 func (m *Query) Reset() { *m = Query{} } 192 func (m *Query) String() string { return proto.CompactTextString(m) } 193 func (*Query) ProtoMessage() {} 194 func (*Query) Descriptor() ([]byte, []int) { return fileDescriptorQuery, []int{7} } 195 196 type isQuery_Query interface { 197 isQuery_Query() 198 MarshalTo([]byte) (int, error) 199 Size() int 200 } 201 202 type Query_Term struct { 203 Term *TermQuery `protobuf:"bytes,1,opt,name=term,oneof"` 204 } 205 type Query_Regexp struct { 206 Regexp *RegexpQuery `protobuf:"bytes,2,opt,name=regexp,oneof"` 207 } 208 type Query_Negation struct { 209 Negation *NegationQuery `protobuf:"bytes,3,opt,name=negation,oneof"` 210 } 211 type Query_Conjunction struct { 212 Conjunction *ConjunctionQuery `protobuf:"bytes,4,opt,name=conjunction,oneof"` 213 } 214 type Query_Disjunction struct { 215 Disjunction *DisjunctionQuery `protobuf:"bytes,5,opt,name=disjunction,oneof"` 216 } 217 type Query_All struct { 218 All *AllQuery `protobuf:"bytes,6,opt,name=all,oneof"` 219 } 220 type Query_Field struct { 221 Field *FieldQuery `protobuf:"bytes,7,opt,name=field,oneof"` 222 } 223 224 func (*Query_Term) isQuery_Query() {} 225 func (*Query_Regexp) isQuery_Query() {} 226 func (*Query_Negation) isQuery_Query() {} 227 func (*Query_Conjunction) isQuery_Query() {} 228 func (*Query_Disjunction) isQuery_Query() {} 229 func (*Query_All) isQuery_Query() {} 230 func (*Query_Field) isQuery_Query() {} 231 232 func (m *Query) GetQuery() isQuery_Query { 233 if m != nil { 234 return m.Query 235 } 236 return nil 237 } 238 239 func (m *Query) GetTerm() *TermQuery { 240 if x, ok := m.GetQuery().(*Query_Term); ok { 241 return x.Term 242 } 243 return nil 244 } 245 246 func (m *Query) GetRegexp() *RegexpQuery { 247 if x, ok := m.GetQuery().(*Query_Regexp); ok { 248 return x.Regexp 249 } 250 return nil 251 } 252 253 func (m *Query) GetNegation() *NegationQuery { 254 if x, ok := m.GetQuery().(*Query_Negation); ok { 255 return x.Negation 256 } 257 return nil 258 } 259 260 func (m *Query) GetConjunction() *ConjunctionQuery { 261 if x, ok := m.GetQuery().(*Query_Conjunction); ok { 262 return x.Conjunction 263 } 264 return nil 265 } 266 267 func (m *Query) GetDisjunction() *DisjunctionQuery { 268 if x, ok := m.GetQuery().(*Query_Disjunction); ok { 269 return x.Disjunction 270 } 271 return nil 272 } 273 274 func (m *Query) GetAll() *AllQuery { 275 if x, ok := m.GetQuery().(*Query_All); ok { 276 return x.All 277 } 278 return nil 279 } 280 281 func (m *Query) GetField() *FieldQuery { 282 if x, ok := m.GetQuery().(*Query_Field); ok { 283 return x.Field 284 } 285 return nil 286 } 287 288 // XXX_OneofFuncs is for the internal use of the proto package. 289 func (*Query) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { 290 return _Query_OneofMarshaler, _Query_OneofUnmarshaler, _Query_OneofSizer, []interface{}{ 291 (*Query_Term)(nil), 292 (*Query_Regexp)(nil), 293 (*Query_Negation)(nil), 294 (*Query_Conjunction)(nil), 295 (*Query_Disjunction)(nil), 296 (*Query_All)(nil), 297 (*Query_Field)(nil), 298 } 299 } 300 301 func _Query_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { 302 m := msg.(*Query) 303 // query 304 switch x := m.Query.(type) { 305 case *Query_Term: 306 _ = b.EncodeVarint(1<<3 | proto.WireBytes) 307 if err := b.EncodeMessage(x.Term); err != nil { 308 return err 309 } 310 case *Query_Regexp: 311 _ = b.EncodeVarint(2<<3 | proto.WireBytes) 312 if err := b.EncodeMessage(x.Regexp); err != nil { 313 return err 314 } 315 case *Query_Negation: 316 _ = b.EncodeVarint(3<<3 | proto.WireBytes) 317 if err := b.EncodeMessage(x.Negation); err != nil { 318 return err 319 } 320 case *Query_Conjunction: 321 _ = b.EncodeVarint(4<<3 | proto.WireBytes) 322 if err := b.EncodeMessage(x.Conjunction); err != nil { 323 return err 324 } 325 case *Query_Disjunction: 326 _ = b.EncodeVarint(5<<3 | proto.WireBytes) 327 if err := b.EncodeMessage(x.Disjunction); err != nil { 328 return err 329 } 330 case *Query_All: 331 _ = b.EncodeVarint(6<<3 | proto.WireBytes) 332 if err := b.EncodeMessage(x.All); err != nil { 333 return err 334 } 335 case *Query_Field: 336 _ = b.EncodeVarint(7<<3 | proto.WireBytes) 337 if err := b.EncodeMessage(x.Field); err != nil { 338 return err 339 } 340 case nil: 341 default: 342 return fmt.Errorf("Query.Query has unexpected type %T", x) 343 } 344 return nil 345 } 346 347 func _Query_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { 348 m := msg.(*Query) 349 switch tag { 350 case 1: // query.term 351 if wire != proto.WireBytes { 352 return true, proto.ErrInternalBadWireType 353 } 354 msg := new(TermQuery) 355 err := b.DecodeMessage(msg) 356 m.Query = &Query_Term{msg} 357 return true, err 358 case 2: // query.regexp 359 if wire != proto.WireBytes { 360 return true, proto.ErrInternalBadWireType 361 } 362 msg := new(RegexpQuery) 363 err := b.DecodeMessage(msg) 364 m.Query = &Query_Regexp{msg} 365 return true, err 366 case 3: // query.negation 367 if wire != proto.WireBytes { 368 return true, proto.ErrInternalBadWireType 369 } 370 msg := new(NegationQuery) 371 err := b.DecodeMessage(msg) 372 m.Query = &Query_Negation{msg} 373 return true, err 374 case 4: // query.conjunction 375 if wire != proto.WireBytes { 376 return true, proto.ErrInternalBadWireType 377 } 378 msg := new(ConjunctionQuery) 379 err := b.DecodeMessage(msg) 380 m.Query = &Query_Conjunction{msg} 381 return true, err 382 case 5: // query.disjunction 383 if wire != proto.WireBytes { 384 return true, proto.ErrInternalBadWireType 385 } 386 msg := new(DisjunctionQuery) 387 err := b.DecodeMessage(msg) 388 m.Query = &Query_Disjunction{msg} 389 return true, err 390 case 6: // query.all 391 if wire != proto.WireBytes { 392 return true, proto.ErrInternalBadWireType 393 } 394 msg := new(AllQuery) 395 err := b.DecodeMessage(msg) 396 m.Query = &Query_All{msg} 397 return true, err 398 case 7: // query.field 399 if wire != proto.WireBytes { 400 return true, proto.ErrInternalBadWireType 401 } 402 msg := new(FieldQuery) 403 err := b.DecodeMessage(msg) 404 m.Query = &Query_Field{msg} 405 return true, err 406 default: 407 return false, nil 408 } 409 } 410 411 func _Query_OneofSizer(msg proto.Message) (n int) { 412 m := msg.(*Query) 413 // query 414 switch x := m.Query.(type) { 415 case *Query_Term: 416 s := proto.Size(x.Term) 417 n += proto.SizeVarint(1<<3 | proto.WireBytes) 418 n += proto.SizeVarint(uint64(s)) 419 n += s 420 case *Query_Regexp: 421 s := proto.Size(x.Regexp) 422 n += proto.SizeVarint(2<<3 | proto.WireBytes) 423 n += proto.SizeVarint(uint64(s)) 424 n += s 425 case *Query_Negation: 426 s := proto.Size(x.Negation) 427 n += proto.SizeVarint(3<<3 | proto.WireBytes) 428 n += proto.SizeVarint(uint64(s)) 429 n += s 430 case *Query_Conjunction: 431 s := proto.Size(x.Conjunction) 432 n += proto.SizeVarint(4<<3 | proto.WireBytes) 433 n += proto.SizeVarint(uint64(s)) 434 n += s 435 case *Query_Disjunction: 436 s := proto.Size(x.Disjunction) 437 n += proto.SizeVarint(5<<3 | proto.WireBytes) 438 n += proto.SizeVarint(uint64(s)) 439 n += s 440 case *Query_All: 441 s := proto.Size(x.All) 442 n += proto.SizeVarint(6<<3 | proto.WireBytes) 443 n += proto.SizeVarint(uint64(s)) 444 n += s 445 case *Query_Field: 446 s := proto.Size(x.Field) 447 n += proto.SizeVarint(7<<3 | proto.WireBytes) 448 n += proto.SizeVarint(uint64(s)) 449 n += s 450 case nil: 451 default: 452 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) 453 } 454 return n 455 } 456 457 func init() { 458 proto.RegisterType((*FieldQuery)(nil), "query.FieldQuery") 459 proto.RegisterType((*TermQuery)(nil), "query.TermQuery") 460 proto.RegisterType((*RegexpQuery)(nil), "query.RegexpQuery") 461 proto.RegisterType((*NegationQuery)(nil), "query.NegationQuery") 462 proto.RegisterType((*ConjunctionQuery)(nil), "query.ConjunctionQuery") 463 proto.RegisterType((*DisjunctionQuery)(nil), "query.DisjunctionQuery") 464 proto.RegisterType((*AllQuery)(nil), "query.AllQuery") 465 proto.RegisterType((*Query)(nil), "query.Query") 466 } 467 func (m *FieldQuery) Marshal() (dAtA []byte, err error) { 468 size := m.Size() 469 dAtA = make([]byte, size) 470 n, err := m.MarshalTo(dAtA) 471 if err != nil { 472 return nil, err 473 } 474 return dAtA[:n], nil 475 } 476 477 func (m *FieldQuery) MarshalTo(dAtA []byte) (int, error) { 478 var i int 479 _ = i 480 var l int 481 _ = l 482 if len(m.Field) > 0 { 483 dAtA[i] = 0xa 484 i++ 485 i = encodeVarintQuery(dAtA, i, uint64(len(m.Field))) 486 i += copy(dAtA[i:], m.Field) 487 } 488 return i, nil 489 } 490 491 func (m *TermQuery) Marshal() (dAtA []byte, err error) { 492 size := m.Size() 493 dAtA = make([]byte, size) 494 n, err := m.MarshalTo(dAtA) 495 if err != nil { 496 return nil, err 497 } 498 return dAtA[:n], nil 499 } 500 501 func (m *TermQuery) MarshalTo(dAtA []byte) (int, error) { 502 var i int 503 _ = i 504 var l int 505 _ = l 506 if len(m.Field) > 0 { 507 dAtA[i] = 0xa 508 i++ 509 i = encodeVarintQuery(dAtA, i, uint64(len(m.Field))) 510 i += copy(dAtA[i:], m.Field) 511 } 512 if len(m.Term) > 0 { 513 dAtA[i] = 0x12 514 i++ 515 i = encodeVarintQuery(dAtA, i, uint64(len(m.Term))) 516 i += copy(dAtA[i:], m.Term) 517 } 518 return i, nil 519 } 520 521 func (m *RegexpQuery) Marshal() (dAtA []byte, err error) { 522 size := m.Size() 523 dAtA = make([]byte, size) 524 n, err := m.MarshalTo(dAtA) 525 if err != nil { 526 return nil, err 527 } 528 return dAtA[:n], nil 529 } 530 531 func (m *RegexpQuery) MarshalTo(dAtA []byte) (int, error) { 532 var i int 533 _ = i 534 var l int 535 _ = l 536 if len(m.Field) > 0 { 537 dAtA[i] = 0xa 538 i++ 539 i = encodeVarintQuery(dAtA, i, uint64(len(m.Field))) 540 i += copy(dAtA[i:], m.Field) 541 } 542 if len(m.Regexp) > 0 { 543 dAtA[i] = 0x12 544 i++ 545 i = encodeVarintQuery(dAtA, i, uint64(len(m.Regexp))) 546 i += copy(dAtA[i:], m.Regexp) 547 } 548 return i, nil 549 } 550 551 func (m *NegationQuery) Marshal() (dAtA []byte, err error) { 552 size := m.Size() 553 dAtA = make([]byte, size) 554 n, err := m.MarshalTo(dAtA) 555 if err != nil { 556 return nil, err 557 } 558 return dAtA[:n], nil 559 } 560 561 func (m *NegationQuery) MarshalTo(dAtA []byte) (int, error) { 562 var i int 563 _ = i 564 var l int 565 _ = l 566 if m.Query != nil { 567 dAtA[i] = 0xa 568 i++ 569 i = encodeVarintQuery(dAtA, i, uint64(m.Query.Size())) 570 n1, err := m.Query.MarshalTo(dAtA[i:]) 571 if err != nil { 572 return 0, err 573 } 574 i += n1 575 } 576 return i, nil 577 } 578 579 func (m *ConjunctionQuery) Marshal() (dAtA []byte, err error) { 580 size := m.Size() 581 dAtA = make([]byte, size) 582 n, err := m.MarshalTo(dAtA) 583 if err != nil { 584 return nil, err 585 } 586 return dAtA[:n], nil 587 } 588 589 func (m *ConjunctionQuery) MarshalTo(dAtA []byte) (int, error) { 590 var i int 591 _ = i 592 var l int 593 _ = l 594 if len(m.Queries) > 0 { 595 for _, msg := range m.Queries { 596 dAtA[i] = 0xa 597 i++ 598 i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) 599 n, err := msg.MarshalTo(dAtA[i:]) 600 if err != nil { 601 return 0, err 602 } 603 i += n 604 } 605 } 606 return i, nil 607 } 608 609 func (m *DisjunctionQuery) Marshal() (dAtA []byte, err error) { 610 size := m.Size() 611 dAtA = make([]byte, size) 612 n, err := m.MarshalTo(dAtA) 613 if err != nil { 614 return nil, err 615 } 616 return dAtA[:n], nil 617 } 618 619 func (m *DisjunctionQuery) MarshalTo(dAtA []byte) (int, error) { 620 var i int 621 _ = i 622 var l int 623 _ = l 624 if len(m.Queries) > 0 { 625 for _, msg := range m.Queries { 626 dAtA[i] = 0xa 627 i++ 628 i = encodeVarintQuery(dAtA, i, uint64(msg.Size())) 629 n, err := msg.MarshalTo(dAtA[i:]) 630 if err != nil { 631 return 0, err 632 } 633 i += n 634 } 635 } 636 return i, nil 637 } 638 639 func (m *AllQuery) Marshal() (dAtA []byte, err error) { 640 size := m.Size() 641 dAtA = make([]byte, size) 642 n, err := m.MarshalTo(dAtA) 643 if err != nil { 644 return nil, err 645 } 646 return dAtA[:n], nil 647 } 648 649 func (m *AllQuery) MarshalTo(dAtA []byte) (int, error) { 650 var i int 651 _ = i 652 var l int 653 _ = l 654 return i, nil 655 } 656 657 func (m *Query) Marshal() (dAtA []byte, err error) { 658 size := m.Size() 659 dAtA = make([]byte, size) 660 n, err := m.MarshalTo(dAtA) 661 if err != nil { 662 return nil, err 663 } 664 return dAtA[:n], nil 665 } 666 667 func (m *Query) MarshalTo(dAtA []byte) (int, error) { 668 var i int 669 _ = i 670 var l int 671 _ = l 672 if m.Query != nil { 673 nn2, err := m.Query.MarshalTo(dAtA[i:]) 674 if err != nil { 675 return 0, err 676 } 677 i += nn2 678 } 679 return i, nil 680 } 681 682 func (m *Query_Term) MarshalTo(dAtA []byte) (int, error) { 683 i := 0 684 if m.Term != nil { 685 dAtA[i] = 0xa 686 i++ 687 i = encodeVarintQuery(dAtA, i, uint64(m.Term.Size())) 688 n3, err := m.Term.MarshalTo(dAtA[i:]) 689 if err != nil { 690 return 0, err 691 } 692 i += n3 693 } 694 return i, nil 695 } 696 func (m *Query_Regexp) MarshalTo(dAtA []byte) (int, error) { 697 i := 0 698 if m.Regexp != nil { 699 dAtA[i] = 0x12 700 i++ 701 i = encodeVarintQuery(dAtA, i, uint64(m.Regexp.Size())) 702 n4, err := m.Regexp.MarshalTo(dAtA[i:]) 703 if err != nil { 704 return 0, err 705 } 706 i += n4 707 } 708 return i, nil 709 } 710 func (m *Query_Negation) MarshalTo(dAtA []byte) (int, error) { 711 i := 0 712 if m.Negation != nil { 713 dAtA[i] = 0x1a 714 i++ 715 i = encodeVarintQuery(dAtA, i, uint64(m.Negation.Size())) 716 n5, err := m.Negation.MarshalTo(dAtA[i:]) 717 if err != nil { 718 return 0, err 719 } 720 i += n5 721 } 722 return i, nil 723 } 724 func (m *Query_Conjunction) MarshalTo(dAtA []byte) (int, error) { 725 i := 0 726 if m.Conjunction != nil { 727 dAtA[i] = 0x22 728 i++ 729 i = encodeVarintQuery(dAtA, i, uint64(m.Conjunction.Size())) 730 n6, err := m.Conjunction.MarshalTo(dAtA[i:]) 731 if err != nil { 732 return 0, err 733 } 734 i += n6 735 } 736 return i, nil 737 } 738 func (m *Query_Disjunction) MarshalTo(dAtA []byte) (int, error) { 739 i := 0 740 if m.Disjunction != nil { 741 dAtA[i] = 0x2a 742 i++ 743 i = encodeVarintQuery(dAtA, i, uint64(m.Disjunction.Size())) 744 n7, err := m.Disjunction.MarshalTo(dAtA[i:]) 745 if err != nil { 746 return 0, err 747 } 748 i += n7 749 } 750 return i, nil 751 } 752 func (m *Query_All) MarshalTo(dAtA []byte) (int, error) { 753 i := 0 754 if m.All != nil { 755 dAtA[i] = 0x32 756 i++ 757 i = encodeVarintQuery(dAtA, i, uint64(m.All.Size())) 758 n8, err := m.All.MarshalTo(dAtA[i:]) 759 if err != nil { 760 return 0, err 761 } 762 i += n8 763 } 764 return i, nil 765 } 766 func (m *Query_Field) MarshalTo(dAtA []byte) (int, error) { 767 i := 0 768 if m.Field != nil { 769 dAtA[i] = 0x3a 770 i++ 771 i = encodeVarintQuery(dAtA, i, uint64(m.Field.Size())) 772 n9, err := m.Field.MarshalTo(dAtA[i:]) 773 if err != nil { 774 return 0, err 775 } 776 i += n9 777 } 778 return i, nil 779 } 780 func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { 781 for v >= 1<<7 { 782 dAtA[offset] = uint8(v&0x7f | 0x80) 783 v >>= 7 784 offset++ 785 } 786 dAtA[offset] = uint8(v) 787 return offset + 1 788 } 789 func (m *FieldQuery) Size() (n int) { 790 var l int 791 _ = l 792 l = len(m.Field) 793 if l > 0 { 794 n += 1 + l + sovQuery(uint64(l)) 795 } 796 return n 797 } 798 799 func (m *TermQuery) Size() (n int) { 800 var l int 801 _ = l 802 l = len(m.Field) 803 if l > 0 { 804 n += 1 + l + sovQuery(uint64(l)) 805 } 806 l = len(m.Term) 807 if l > 0 { 808 n += 1 + l + sovQuery(uint64(l)) 809 } 810 return n 811 } 812 813 func (m *RegexpQuery) Size() (n int) { 814 var l int 815 _ = l 816 l = len(m.Field) 817 if l > 0 { 818 n += 1 + l + sovQuery(uint64(l)) 819 } 820 l = len(m.Regexp) 821 if l > 0 { 822 n += 1 + l + sovQuery(uint64(l)) 823 } 824 return n 825 } 826 827 func (m *NegationQuery) Size() (n int) { 828 var l int 829 _ = l 830 if m.Query != nil { 831 l = m.Query.Size() 832 n += 1 + l + sovQuery(uint64(l)) 833 } 834 return n 835 } 836 837 func (m *ConjunctionQuery) Size() (n int) { 838 var l int 839 _ = l 840 if len(m.Queries) > 0 { 841 for _, e := range m.Queries { 842 l = e.Size() 843 n += 1 + l + sovQuery(uint64(l)) 844 } 845 } 846 return n 847 } 848 849 func (m *DisjunctionQuery) Size() (n int) { 850 var l int 851 _ = l 852 if len(m.Queries) > 0 { 853 for _, e := range m.Queries { 854 l = e.Size() 855 n += 1 + l + sovQuery(uint64(l)) 856 } 857 } 858 return n 859 } 860 861 func (m *AllQuery) Size() (n int) { 862 var l int 863 _ = l 864 return n 865 } 866 867 func (m *Query) Size() (n int) { 868 var l int 869 _ = l 870 if m.Query != nil { 871 n += m.Query.Size() 872 } 873 return n 874 } 875 876 func (m *Query_Term) Size() (n int) { 877 var l int 878 _ = l 879 if m.Term != nil { 880 l = m.Term.Size() 881 n += 1 + l + sovQuery(uint64(l)) 882 } 883 return n 884 } 885 func (m *Query_Regexp) Size() (n int) { 886 var l int 887 _ = l 888 if m.Regexp != nil { 889 l = m.Regexp.Size() 890 n += 1 + l + sovQuery(uint64(l)) 891 } 892 return n 893 } 894 func (m *Query_Negation) Size() (n int) { 895 var l int 896 _ = l 897 if m.Negation != nil { 898 l = m.Negation.Size() 899 n += 1 + l + sovQuery(uint64(l)) 900 } 901 return n 902 } 903 func (m *Query_Conjunction) Size() (n int) { 904 var l int 905 _ = l 906 if m.Conjunction != nil { 907 l = m.Conjunction.Size() 908 n += 1 + l + sovQuery(uint64(l)) 909 } 910 return n 911 } 912 func (m *Query_Disjunction) Size() (n int) { 913 var l int 914 _ = l 915 if m.Disjunction != nil { 916 l = m.Disjunction.Size() 917 n += 1 + l + sovQuery(uint64(l)) 918 } 919 return n 920 } 921 func (m *Query_All) Size() (n int) { 922 var l int 923 _ = l 924 if m.All != nil { 925 l = m.All.Size() 926 n += 1 + l + sovQuery(uint64(l)) 927 } 928 return n 929 } 930 func (m *Query_Field) Size() (n int) { 931 var l int 932 _ = l 933 if m.Field != nil { 934 l = m.Field.Size() 935 n += 1 + l + sovQuery(uint64(l)) 936 } 937 return n 938 } 939 940 func sovQuery(x uint64) (n int) { 941 for { 942 n++ 943 x >>= 7 944 if x == 0 { 945 break 946 } 947 } 948 return n 949 } 950 func sozQuery(x uint64) (n int) { 951 return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 952 } 953 func (m *FieldQuery) Unmarshal(dAtA []byte) error { 954 l := len(dAtA) 955 iNdEx := 0 956 for iNdEx < l { 957 preIndex := iNdEx 958 var wire uint64 959 for shift := uint(0); ; shift += 7 { 960 if shift >= 64 { 961 return ErrIntOverflowQuery 962 } 963 if iNdEx >= l { 964 return io.ErrUnexpectedEOF 965 } 966 b := dAtA[iNdEx] 967 iNdEx++ 968 wire |= (uint64(b) & 0x7F) << shift 969 if b < 0x80 { 970 break 971 } 972 } 973 fieldNum := int32(wire >> 3) 974 wireType := int(wire & 0x7) 975 if wireType == 4 { 976 return fmt.Errorf("proto: FieldQuery: wiretype end group for non-group") 977 } 978 if fieldNum <= 0 { 979 return fmt.Errorf("proto: FieldQuery: illegal tag %d (wire type %d)", fieldNum, wire) 980 } 981 switch fieldNum { 982 case 1: 983 if wireType != 2 { 984 return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) 985 } 986 var byteLen int 987 for shift := uint(0); ; shift += 7 { 988 if shift >= 64 { 989 return ErrIntOverflowQuery 990 } 991 if iNdEx >= l { 992 return io.ErrUnexpectedEOF 993 } 994 b := dAtA[iNdEx] 995 iNdEx++ 996 byteLen |= (int(b) & 0x7F) << shift 997 if b < 0x80 { 998 break 999 } 1000 } 1001 if byteLen < 0 { 1002 return ErrInvalidLengthQuery 1003 } 1004 postIndex := iNdEx + byteLen 1005 if postIndex > l { 1006 return io.ErrUnexpectedEOF 1007 } 1008 m.Field = append(m.Field[:0], dAtA[iNdEx:postIndex]...) 1009 if m.Field == nil { 1010 m.Field = []byte{} 1011 } 1012 iNdEx = postIndex 1013 default: 1014 iNdEx = preIndex 1015 skippy, err := skipQuery(dAtA[iNdEx:]) 1016 if err != nil { 1017 return err 1018 } 1019 if skippy < 0 { 1020 return ErrInvalidLengthQuery 1021 } 1022 if (iNdEx + skippy) > l { 1023 return io.ErrUnexpectedEOF 1024 } 1025 iNdEx += skippy 1026 } 1027 } 1028 1029 if iNdEx > l { 1030 return io.ErrUnexpectedEOF 1031 } 1032 return nil 1033 } 1034 func (m *TermQuery) Unmarshal(dAtA []byte) error { 1035 l := len(dAtA) 1036 iNdEx := 0 1037 for iNdEx < l { 1038 preIndex := iNdEx 1039 var wire uint64 1040 for shift := uint(0); ; shift += 7 { 1041 if shift >= 64 { 1042 return ErrIntOverflowQuery 1043 } 1044 if iNdEx >= l { 1045 return io.ErrUnexpectedEOF 1046 } 1047 b := dAtA[iNdEx] 1048 iNdEx++ 1049 wire |= (uint64(b) & 0x7F) << shift 1050 if b < 0x80 { 1051 break 1052 } 1053 } 1054 fieldNum := int32(wire >> 3) 1055 wireType := int(wire & 0x7) 1056 if wireType == 4 { 1057 return fmt.Errorf("proto: TermQuery: wiretype end group for non-group") 1058 } 1059 if fieldNum <= 0 { 1060 return fmt.Errorf("proto: TermQuery: illegal tag %d (wire type %d)", fieldNum, wire) 1061 } 1062 switch fieldNum { 1063 case 1: 1064 if wireType != 2 { 1065 return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) 1066 } 1067 var byteLen int 1068 for shift := uint(0); ; shift += 7 { 1069 if shift >= 64 { 1070 return ErrIntOverflowQuery 1071 } 1072 if iNdEx >= l { 1073 return io.ErrUnexpectedEOF 1074 } 1075 b := dAtA[iNdEx] 1076 iNdEx++ 1077 byteLen |= (int(b) & 0x7F) << shift 1078 if b < 0x80 { 1079 break 1080 } 1081 } 1082 if byteLen < 0 { 1083 return ErrInvalidLengthQuery 1084 } 1085 postIndex := iNdEx + byteLen 1086 if postIndex > l { 1087 return io.ErrUnexpectedEOF 1088 } 1089 m.Field = append(m.Field[:0], dAtA[iNdEx:postIndex]...) 1090 if m.Field == nil { 1091 m.Field = []byte{} 1092 } 1093 iNdEx = postIndex 1094 case 2: 1095 if wireType != 2 { 1096 return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType) 1097 } 1098 var byteLen int 1099 for shift := uint(0); ; shift += 7 { 1100 if shift >= 64 { 1101 return ErrIntOverflowQuery 1102 } 1103 if iNdEx >= l { 1104 return io.ErrUnexpectedEOF 1105 } 1106 b := dAtA[iNdEx] 1107 iNdEx++ 1108 byteLen |= (int(b) & 0x7F) << shift 1109 if b < 0x80 { 1110 break 1111 } 1112 } 1113 if byteLen < 0 { 1114 return ErrInvalidLengthQuery 1115 } 1116 postIndex := iNdEx + byteLen 1117 if postIndex > l { 1118 return io.ErrUnexpectedEOF 1119 } 1120 m.Term = append(m.Term[:0], dAtA[iNdEx:postIndex]...) 1121 if m.Term == nil { 1122 m.Term = []byte{} 1123 } 1124 iNdEx = postIndex 1125 default: 1126 iNdEx = preIndex 1127 skippy, err := skipQuery(dAtA[iNdEx:]) 1128 if err != nil { 1129 return err 1130 } 1131 if skippy < 0 { 1132 return ErrInvalidLengthQuery 1133 } 1134 if (iNdEx + skippy) > l { 1135 return io.ErrUnexpectedEOF 1136 } 1137 iNdEx += skippy 1138 } 1139 } 1140 1141 if iNdEx > l { 1142 return io.ErrUnexpectedEOF 1143 } 1144 return nil 1145 } 1146 func (m *RegexpQuery) Unmarshal(dAtA []byte) error { 1147 l := len(dAtA) 1148 iNdEx := 0 1149 for iNdEx < l { 1150 preIndex := iNdEx 1151 var wire uint64 1152 for shift := uint(0); ; shift += 7 { 1153 if shift >= 64 { 1154 return ErrIntOverflowQuery 1155 } 1156 if iNdEx >= l { 1157 return io.ErrUnexpectedEOF 1158 } 1159 b := dAtA[iNdEx] 1160 iNdEx++ 1161 wire |= (uint64(b) & 0x7F) << shift 1162 if b < 0x80 { 1163 break 1164 } 1165 } 1166 fieldNum := int32(wire >> 3) 1167 wireType := int(wire & 0x7) 1168 if wireType == 4 { 1169 return fmt.Errorf("proto: RegexpQuery: wiretype end group for non-group") 1170 } 1171 if fieldNum <= 0 { 1172 return fmt.Errorf("proto: RegexpQuery: illegal tag %d (wire type %d)", fieldNum, wire) 1173 } 1174 switch fieldNum { 1175 case 1: 1176 if wireType != 2 { 1177 return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) 1178 } 1179 var byteLen int 1180 for shift := uint(0); ; shift += 7 { 1181 if shift >= 64 { 1182 return ErrIntOverflowQuery 1183 } 1184 if iNdEx >= l { 1185 return io.ErrUnexpectedEOF 1186 } 1187 b := dAtA[iNdEx] 1188 iNdEx++ 1189 byteLen |= (int(b) & 0x7F) << shift 1190 if b < 0x80 { 1191 break 1192 } 1193 } 1194 if byteLen < 0 { 1195 return ErrInvalidLengthQuery 1196 } 1197 postIndex := iNdEx + byteLen 1198 if postIndex > l { 1199 return io.ErrUnexpectedEOF 1200 } 1201 m.Field = append(m.Field[:0], dAtA[iNdEx:postIndex]...) 1202 if m.Field == nil { 1203 m.Field = []byte{} 1204 } 1205 iNdEx = postIndex 1206 case 2: 1207 if wireType != 2 { 1208 return fmt.Errorf("proto: wrong wireType = %d for field Regexp", wireType) 1209 } 1210 var byteLen int 1211 for shift := uint(0); ; shift += 7 { 1212 if shift >= 64 { 1213 return ErrIntOverflowQuery 1214 } 1215 if iNdEx >= l { 1216 return io.ErrUnexpectedEOF 1217 } 1218 b := dAtA[iNdEx] 1219 iNdEx++ 1220 byteLen |= (int(b) & 0x7F) << shift 1221 if b < 0x80 { 1222 break 1223 } 1224 } 1225 if byteLen < 0 { 1226 return ErrInvalidLengthQuery 1227 } 1228 postIndex := iNdEx + byteLen 1229 if postIndex > l { 1230 return io.ErrUnexpectedEOF 1231 } 1232 m.Regexp = append(m.Regexp[:0], dAtA[iNdEx:postIndex]...) 1233 if m.Regexp == nil { 1234 m.Regexp = []byte{} 1235 } 1236 iNdEx = postIndex 1237 default: 1238 iNdEx = preIndex 1239 skippy, err := skipQuery(dAtA[iNdEx:]) 1240 if err != nil { 1241 return err 1242 } 1243 if skippy < 0 { 1244 return ErrInvalidLengthQuery 1245 } 1246 if (iNdEx + skippy) > l { 1247 return io.ErrUnexpectedEOF 1248 } 1249 iNdEx += skippy 1250 } 1251 } 1252 1253 if iNdEx > l { 1254 return io.ErrUnexpectedEOF 1255 } 1256 return nil 1257 } 1258 func (m *NegationQuery) Unmarshal(dAtA []byte) error { 1259 l := len(dAtA) 1260 iNdEx := 0 1261 for iNdEx < l { 1262 preIndex := iNdEx 1263 var wire uint64 1264 for shift := uint(0); ; shift += 7 { 1265 if shift >= 64 { 1266 return ErrIntOverflowQuery 1267 } 1268 if iNdEx >= l { 1269 return io.ErrUnexpectedEOF 1270 } 1271 b := dAtA[iNdEx] 1272 iNdEx++ 1273 wire |= (uint64(b) & 0x7F) << shift 1274 if b < 0x80 { 1275 break 1276 } 1277 } 1278 fieldNum := int32(wire >> 3) 1279 wireType := int(wire & 0x7) 1280 if wireType == 4 { 1281 return fmt.Errorf("proto: NegationQuery: wiretype end group for non-group") 1282 } 1283 if fieldNum <= 0 { 1284 return fmt.Errorf("proto: NegationQuery: illegal tag %d (wire type %d)", fieldNum, wire) 1285 } 1286 switch fieldNum { 1287 case 1: 1288 if wireType != 2 { 1289 return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) 1290 } 1291 var msglen int 1292 for shift := uint(0); ; shift += 7 { 1293 if shift >= 64 { 1294 return ErrIntOverflowQuery 1295 } 1296 if iNdEx >= l { 1297 return io.ErrUnexpectedEOF 1298 } 1299 b := dAtA[iNdEx] 1300 iNdEx++ 1301 msglen |= (int(b) & 0x7F) << shift 1302 if b < 0x80 { 1303 break 1304 } 1305 } 1306 if msglen < 0 { 1307 return ErrInvalidLengthQuery 1308 } 1309 postIndex := iNdEx + msglen 1310 if postIndex > l { 1311 return io.ErrUnexpectedEOF 1312 } 1313 if m.Query == nil { 1314 m.Query = &Query{} 1315 } 1316 if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1317 return err 1318 } 1319 iNdEx = postIndex 1320 default: 1321 iNdEx = preIndex 1322 skippy, err := skipQuery(dAtA[iNdEx:]) 1323 if err != nil { 1324 return err 1325 } 1326 if skippy < 0 { 1327 return ErrInvalidLengthQuery 1328 } 1329 if (iNdEx + skippy) > l { 1330 return io.ErrUnexpectedEOF 1331 } 1332 iNdEx += skippy 1333 } 1334 } 1335 1336 if iNdEx > l { 1337 return io.ErrUnexpectedEOF 1338 } 1339 return nil 1340 } 1341 func (m *ConjunctionQuery) Unmarshal(dAtA []byte) error { 1342 l := len(dAtA) 1343 iNdEx := 0 1344 for iNdEx < l { 1345 preIndex := iNdEx 1346 var wire uint64 1347 for shift := uint(0); ; shift += 7 { 1348 if shift >= 64 { 1349 return ErrIntOverflowQuery 1350 } 1351 if iNdEx >= l { 1352 return io.ErrUnexpectedEOF 1353 } 1354 b := dAtA[iNdEx] 1355 iNdEx++ 1356 wire |= (uint64(b) & 0x7F) << shift 1357 if b < 0x80 { 1358 break 1359 } 1360 } 1361 fieldNum := int32(wire >> 3) 1362 wireType := int(wire & 0x7) 1363 if wireType == 4 { 1364 return fmt.Errorf("proto: ConjunctionQuery: wiretype end group for non-group") 1365 } 1366 if fieldNum <= 0 { 1367 return fmt.Errorf("proto: ConjunctionQuery: illegal tag %d (wire type %d)", fieldNum, wire) 1368 } 1369 switch fieldNum { 1370 case 1: 1371 if wireType != 2 { 1372 return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) 1373 } 1374 var msglen int 1375 for shift := uint(0); ; shift += 7 { 1376 if shift >= 64 { 1377 return ErrIntOverflowQuery 1378 } 1379 if iNdEx >= l { 1380 return io.ErrUnexpectedEOF 1381 } 1382 b := dAtA[iNdEx] 1383 iNdEx++ 1384 msglen |= (int(b) & 0x7F) << shift 1385 if b < 0x80 { 1386 break 1387 } 1388 } 1389 if msglen < 0 { 1390 return ErrInvalidLengthQuery 1391 } 1392 postIndex := iNdEx + msglen 1393 if postIndex > l { 1394 return io.ErrUnexpectedEOF 1395 } 1396 m.Queries = append(m.Queries, &Query{}) 1397 if err := m.Queries[len(m.Queries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1398 return err 1399 } 1400 iNdEx = postIndex 1401 default: 1402 iNdEx = preIndex 1403 skippy, err := skipQuery(dAtA[iNdEx:]) 1404 if err != nil { 1405 return err 1406 } 1407 if skippy < 0 { 1408 return ErrInvalidLengthQuery 1409 } 1410 if (iNdEx + skippy) > l { 1411 return io.ErrUnexpectedEOF 1412 } 1413 iNdEx += skippy 1414 } 1415 } 1416 1417 if iNdEx > l { 1418 return io.ErrUnexpectedEOF 1419 } 1420 return nil 1421 } 1422 func (m *DisjunctionQuery) Unmarshal(dAtA []byte) error { 1423 l := len(dAtA) 1424 iNdEx := 0 1425 for iNdEx < l { 1426 preIndex := iNdEx 1427 var wire uint64 1428 for shift := uint(0); ; shift += 7 { 1429 if shift >= 64 { 1430 return ErrIntOverflowQuery 1431 } 1432 if iNdEx >= l { 1433 return io.ErrUnexpectedEOF 1434 } 1435 b := dAtA[iNdEx] 1436 iNdEx++ 1437 wire |= (uint64(b) & 0x7F) << shift 1438 if b < 0x80 { 1439 break 1440 } 1441 } 1442 fieldNum := int32(wire >> 3) 1443 wireType := int(wire & 0x7) 1444 if wireType == 4 { 1445 return fmt.Errorf("proto: DisjunctionQuery: wiretype end group for non-group") 1446 } 1447 if fieldNum <= 0 { 1448 return fmt.Errorf("proto: DisjunctionQuery: illegal tag %d (wire type %d)", fieldNum, wire) 1449 } 1450 switch fieldNum { 1451 case 1: 1452 if wireType != 2 { 1453 return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) 1454 } 1455 var msglen int 1456 for shift := uint(0); ; shift += 7 { 1457 if shift >= 64 { 1458 return ErrIntOverflowQuery 1459 } 1460 if iNdEx >= l { 1461 return io.ErrUnexpectedEOF 1462 } 1463 b := dAtA[iNdEx] 1464 iNdEx++ 1465 msglen |= (int(b) & 0x7F) << shift 1466 if b < 0x80 { 1467 break 1468 } 1469 } 1470 if msglen < 0 { 1471 return ErrInvalidLengthQuery 1472 } 1473 postIndex := iNdEx + msglen 1474 if postIndex > l { 1475 return io.ErrUnexpectedEOF 1476 } 1477 m.Queries = append(m.Queries, &Query{}) 1478 if err := m.Queries[len(m.Queries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1479 return err 1480 } 1481 iNdEx = postIndex 1482 default: 1483 iNdEx = preIndex 1484 skippy, err := skipQuery(dAtA[iNdEx:]) 1485 if err != nil { 1486 return err 1487 } 1488 if skippy < 0 { 1489 return ErrInvalidLengthQuery 1490 } 1491 if (iNdEx + skippy) > l { 1492 return io.ErrUnexpectedEOF 1493 } 1494 iNdEx += skippy 1495 } 1496 } 1497 1498 if iNdEx > l { 1499 return io.ErrUnexpectedEOF 1500 } 1501 return nil 1502 } 1503 func (m *AllQuery) Unmarshal(dAtA []byte) error { 1504 l := len(dAtA) 1505 iNdEx := 0 1506 for iNdEx < l { 1507 preIndex := iNdEx 1508 var wire uint64 1509 for shift := uint(0); ; shift += 7 { 1510 if shift >= 64 { 1511 return ErrIntOverflowQuery 1512 } 1513 if iNdEx >= l { 1514 return io.ErrUnexpectedEOF 1515 } 1516 b := dAtA[iNdEx] 1517 iNdEx++ 1518 wire |= (uint64(b) & 0x7F) << shift 1519 if b < 0x80 { 1520 break 1521 } 1522 } 1523 fieldNum := int32(wire >> 3) 1524 wireType := int(wire & 0x7) 1525 if wireType == 4 { 1526 return fmt.Errorf("proto: AllQuery: wiretype end group for non-group") 1527 } 1528 if fieldNum <= 0 { 1529 return fmt.Errorf("proto: AllQuery: illegal tag %d (wire type %d)", fieldNum, wire) 1530 } 1531 switch fieldNum { 1532 default: 1533 iNdEx = preIndex 1534 skippy, err := skipQuery(dAtA[iNdEx:]) 1535 if err != nil { 1536 return err 1537 } 1538 if skippy < 0 { 1539 return ErrInvalidLengthQuery 1540 } 1541 if (iNdEx + skippy) > l { 1542 return io.ErrUnexpectedEOF 1543 } 1544 iNdEx += skippy 1545 } 1546 } 1547 1548 if iNdEx > l { 1549 return io.ErrUnexpectedEOF 1550 } 1551 return nil 1552 } 1553 func (m *Query) Unmarshal(dAtA []byte) error { 1554 l := len(dAtA) 1555 iNdEx := 0 1556 for iNdEx < l { 1557 preIndex := iNdEx 1558 var wire uint64 1559 for shift := uint(0); ; shift += 7 { 1560 if shift >= 64 { 1561 return ErrIntOverflowQuery 1562 } 1563 if iNdEx >= l { 1564 return io.ErrUnexpectedEOF 1565 } 1566 b := dAtA[iNdEx] 1567 iNdEx++ 1568 wire |= (uint64(b) & 0x7F) << shift 1569 if b < 0x80 { 1570 break 1571 } 1572 } 1573 fieldNum := int32(wire >> 3) 1574 wireType := int(wire & 0x7) 1575 if wireType == 4 { 1576 return fmt.Errorf("proto: Query: wiretype end group for non-group") 1577 } 1578 if fieldNum <= 0 { 1579 return fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire) 1580 } 1581 switch fieldNum { 1582 case 1: 1583 if wireType != 2 { 1584 return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType) 1585 } 1586 var msglen int 1587 for shift := uint(0); ; shift += 7 { 1588 if shift >= 64 { 1589 return ErrIntOverflowQuery 1590 } 1591 if iNdEx >= l { 1592 return io.ErrUnexpectedEOF 1593 } 1594 b := dAtA[iNdEx] 1595 iNdEx++ 1596 msglen |= (int(b) & 0x7F) << shift 1597 if b < 0x80 { 1598 break 1599 } 1600 } 1601 if msglen < 0 { 1602 return ErrInvalidLengthQuery 1603 } 1604 postIndex := iNdEx + msglen 1605 if postIndex > l { 1606 return io.ErrUnexpectedEOF 1607 } 1608 v := &TermQuery{} 1609 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1610 return err 1611 } 1612 m.Query = &Query_Term{v} 1613 iNdEx = postIndex 1614 case 2: 1615 if wireType != 2 { 1616 return fmt.Errorf("proto: wrong wireType = %d for field Regexp", wireType) 1617 } 1618 var msglen int 1619 for shift := uint(0); ; shift += 7 { 1620 if shift >= 64 { 1621 return ErrIntOverflowQuery 1622 } 1623 if iNdEx >= l { 1624 return io.ErrUnexpectedEOF 1625 } 1626 b := dAtA[iNdEx] 1627 iNdEx++ 1628 msglen |= (int(b) & 0x7F) << shift 1629 if b < 0x80 { 1630 break 1631 } 1632 } 1633 if msglen < 0 { 1634 return ErrInvalidLengthQuery 1635 } 1636 postIndex := iNdEx + msglen 1637 if postIndex > l { 1638 return io.ErrUnexpectedEOF 1639 } 1640 v := &RegexpQuery{} 1641 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1642 return err 1643 } 1644 m.Query = &Query_Regexp{v} 1645 iNdEx = postIndex 1646 case 3: 1647 if wireType != 2 { 1648 return fmt.Errorf("proto: wrong wireType = %d for field Negation", wireType) 1649 } 1650 var msglen int 1651 for shift := uint(0); ; shift += 7 { 1652 if shift >= 64 { 1653 return ErrIntOverflowQuery 1654 } 1655 if iNdEx >= l { 1656 return io.ErrUnexpectedEOF 1657 } 1658 b := dAtA[iNdEx] 1659 iNdEx++ 1660 msglen |= (int(b) & 0x7F) << shift 1661 if b < 0x80 { 1662 break 1663 } 1664 } 1665 if msglen < 0 { 1666 return ErrInvalidLengthQuery 1667 } 1668 postIndex := iNdEx + msglen 1669 if postIndex > l { 1670 return io.ErrUnexpectedEOF 1671 } 1672 v := &NegationQuery{} 1673 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1674 return err 1675 } 1676 m.Query = &Query_Negation{v} 1677 iNdEx = postIndex 1678 case 4: 1679 if wireType != 2 { 1680 return fmt.Errorf("proto: wrong wireType = %d for field Conjunction", wireType) 1681 } 1682 var msglen int 1683 for shift := uint(0); ; shift += 7 { 1684 if shift >= 64 { 1685 return ErrIntOverflowQuery 1686 } 1687 if iNdEx >= l { 1688 return io.ErrUnexpectedEOF 1689 } 1690 b := dAtA[iNdEx] 1691 iNdEx++ 1692 msglen |= (int(b) & 0x7F) << shift 1693 if b < 0x80 { 1694 break 1695 } 1696 } 1697 if msglen < 0 { 1698 return ErrInvalidLengthQuery 1699 } 1700 postIndex := iNdEx + msglen 1701 if postIndex > l { 1702 return io.ErrUnexpectedEOF 1703 } 1704 v := &ConjunctionQuery{} 1705 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1706 return err 1707 } 1708 m.Query = &Query_Conjunction{v} 1709 iNdEx = postIndex 1710 case 5: 1711 if wireType != 2 { 1712 return fmt.Errorf("proto: wrong wireType = %d for field Disjunction", wireType) 1713 } 1714 var msglen int 1715 for shift := uint(0); ; shift += 7 { 1716 if shift >= 64 { 1717 return ErrIntOverflowQuery 1718 } 1719 if iNdEx >= l { 1720 return io.ErrUnexpectedEOF 1721 } 1722 b := dAtA[iNdEx] 1723 iNdEx++ 1724 msglen |= (int(b) & 0x7F) << shift 1725 if b < 0x80 { 1726 break 1727 } 1728 } 1729 if msglen < 0 { 1730 return ErrInvalidLengthQuery 1731 } 1732 postIndex := iNdEx + msglen 1733 if postIndex > l { 1734 return io.ErrUnexpectedEOF 1735 } 1736 v := &DisjunctionQuery{} 1737 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1738 return err 1739 } 1740 m.Query = &Query_Disjunction{v} 1741 iNdEx = postIndex 1742 case 6: 1743 if wireType != 2 { 1744 return fmt.Errorf("proto: wrong wireType = %d for field All", wireType) 1745 } 1746 var msglen int 1747 for shift := uint(0); ; shift += 7 { 1748 if shift >= 64 { 1749 return ErrIntOverflowQuery 1750 } 1751 if iNdEx >= l { 1752 return io.ErrUnexpectedEOF 1753 } 1754 b := dAtA[iNdEx] 1755 iNdEx++ 1756 msglen |= (int(b) & 0x7F) << shift 1757 if b < 0x80 { 1758 break 1759 } 1760 } 1761 if msglen < 0 { 1762 return ErrInvalidLengthQuery 1763 } 1764 postIndex := iNdEx + msglen 1765 if postIndex > l { 1766 return io.ErrUnexpectedEOF 1767 } 1768 v := &AllQuery{} 1769 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1770 return err 1771 } 1772 m.Query = &Query_All{v} 1773 iNdEx = postIndex 1774 case 7: 1775 if wireType != 2 { 1776 return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) 1777 } 1778 var msglen int 1779 for shift := uint(0); ; shift += 7 { 1780 if shift >= 64 { 1781 return ErrIntOverflowQuery 1782 } 1783 if iNdEx >= l { 1784 return io.ErrUnexpectedEOF 1785 } 1786 b := dAtA[iNdEx] 1787 iNdEx++ 1788 msglen |= (int(b) & 0x7F) << shift 1789 if b < 0x80 { 1790 break 1791 } 1792 } 1793 if msglen < 0 { 1794 return ErrInvalidLengthQuery 1795 } 1796 postIndex := iNdEx + msglen 1797 if postIndex > l { 1798 return io.ErrUnexpectedEOF 1799 } 1800 v := &FieldQuery{} 1801 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1802 return err 1803 } 1804 m.Query = &Query_Field{v} 1805 iNdEx = postIndex 1806 default: 1807 iNdEx = preIndex 1808 skippy, err := skipQuery(dAtA[iNdEx:]) 1809 if err != nil { 1810 return err 1811 } 1812 if skippy < 0 { 1813 return ErrInvalidLengthQuery 1814 } 1815 if (iNdEx + skippy) > l { 1816 return io.ErrUnexpectedEOF 1817 } 1818 iNdEx += skippy 1819 } 1820 } 1821 1822 if iNdEx > l { 1823 return io.ErrUnexpectedEOF 1824 } 1825 return nil 1826 } 1827 func skipQuery(dAtA []byte) (n int, err error) { 1828 l := len(dAtA) 1829 iNdEx := 0 1830 for iNdEx < l { 1831 var wire uint64 1832 for shift := uint(0); ; shift += 7 { 1833 if shift >= 64 { 1834 return 0, ErrIntOverflowQuery 1835 } 1836 if iNdEx >= l { 1837 return 0, io.ErrUnexpectedEOF 1838 } 1839 b := dAtA[iNdEx] 1840 iNdEx++ 1841 wire |= (uint64(b) & 0x7F) << shift 1842 if b < 0x80 { 1843 break 1844 } 1845 } 1846 wireType := int(wire & 0x7) 1847 switch wireType { 1848 case 0: 1849 for shift := uint(0); ; shift += 7 { 1850 if shift >= 64 { 1851 return 0, ErrIntOverflowQuery 1852 } 1853 if iNdEx >= l { 1854 return 0, io.ErrUnexpectedEOF 1855 } 1856 iNdEx++ 1857 if dAtA[iNdEx-1] < 0x80 { 1858 break 1859 } 1860 } 1861 return iNdEx, nil 1862 case 1: 1863 iNdEx += 8 1864 return iNdEx, nil 1865 case 2: 1866 var length int 1867 for shift := uint(0); ; shift += 7 { 1868 if shift >= 64 { 1869 return 0, ErrIntOverflowQuery 1870 } 1871 if iNdEx >= l { 1872 return 0, io.ErrUnexpectedEOF 1873 } 1874 b := dAtA[iNdEx] 1875 iNdEx++ 1876 length |= (int(b) & 0x7F) << shift 1877 if b < 0x80 { 1878 break 1879 } 1880 } 1881 iNdEx += length 1882 if length < 0 { 1883 return 0, ErrInvalidLengthQuery 1884 } 1885 return iNdEx, nil 1886 case 3: 1887 for { 1888 var innerWire uint64 1889 var start int = iNdEx 1890 for shift := uint(0); ; shift += 7 { 1891 if shift >= 64 { 1892 return 0, ErrIntOverflowQuery 1893 } 1894 if iNdEx >= l { 1895 return 0, io.ErrUnexpectedEOF 1896 } 1897 b := dAtA[iNdEx] 1898 iNdEx++ 1899 innerWire |= (uint64(b) & 0x7F) << shift 1900 if b < 0x80 { 1901 break 1902 } 1903 } 1904 innerWireType := int(innerWire & 0x7) 1905 if innerWireType == 4 { 1906 break 1907 } 1908 next, err := skipQuery(dAtA[start:]) 1909 if err != nil { 1910 return 0, err 1911 } 1912 iNdEx = start + next 1913 } 1914 return iNdEx, nil 1915 case 4: 1916 return iNdEx, nil 1917 case 5: 1918 iNdEx += 4 1919 return iNdEx, nil 1920 default: 1921 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1922 } 1923 } 1924 panic("unreachable") 1925 } 1926 1927 var ( 1928 ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") 1929 ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") 1930 ) 1931 1932 func init() { 1933 proto.RegisterFile("github.com/m3db/m3/src/m3ninx/generated/proto/querypb/query.proto", fileDescriptorQuery) 1934 } 1935 1936 var fileDescriptorQuery = []byte{ 1937 // 389 bytes of a gzipped FileDescriptorProto 1938 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcd, 0x4a, 0xf3, 0x40, 1939 0x14, 0x86, 0x93, 0xb6, 0x69, 0xfa, 0x9d, 0xf4, 0xc3, 0x3a, 0x14, 0x8d, 0x9b, 0x50, 0x22, 0x88, 1940 0x82, 0x34, 0xd0, 0xe0, 0xc6, 0xae, 0x5a, 0x45, 0xb2, 0x12, 0x0c, 0xae, 0xdc, 0x35, 0xc9, 0x18, 1941 0x23, 0xc9, 0xa4, 0x4e, 0x53, 0xa8, 0x77, 0xe1, 0x65, 0xb9, 0xf4, 0x12, 0xa4, 0x7a, 0x21, 0x32, 1942 0x3f, 0x69, 0xda, 0x0a, 0x5d, 0xb8, 0x4a, 0xce, 0x9c, 0xf7, 0x81, 0x99, 0x87, 0x17, 0x46, 0x71, 1943 0x52, 0x3c, 0xcd, 0x83, 0x7e, 0x98, 0x67, 0x4e, 0xe6, 0x46, 0x81, 0x93, 0xb9, 0xce, 0x8c, 0x86, 1944 0x4e, 0xe6, 0x92, 0x84, 0x2c, 0x9c, 0x18, 0x13, 0x4c, 0x27, 0x05, 0x8e, 0x9c, 0x29, 0xcd, 0x8b, 1945 0xdc, 0x79, 0x99, 0x63, 0xfa, 0x3a, 0x0d, 0xc4, 0xb7, 0xcf, 0xcf, 0x90, 0xc6, 0x07, 0xdb, 0x06, 1946 0xb8, 0x49, 0x70, 0x1a, 0xdd, 0xb1, 0x09, 0x75, 0x41, 0x7b, 0x64, 0x93, 0xa9, 0xf6, 0xd4, 0xd3, 1947 0xb6, 0x2f, 0x06, 0xfb, 0x02, 0xfe, 0xdd, 0x63, 0x9a, 0xed, 0x88, 0x20, 0x04, 0x8d, 0x02, 0xd3, 1948 0xcc, 0xac, 0xf1, 0x43, 0xfe, 0x6f, 0x0f, 0xc1, 0xf0, 0x71, 0x8c, 0x17, 0xd3, 0x5d, 0xe0, 0x01, 1949 0x34, 0x29, 0x0f, 0x49, 0x54, 0x4e, 0xb6, 0x0b, 0xff, 0x6f, 0x71, 0x3c, 0x29, 0x92, 0x9c, 0x08, 1950 0xdc, 0x06, 0x71, 0x63, 0x8e, 0x1b, 0x83, 0x76, 0x5f, 0x3c, 0x86, 0x2f, 0x7d, 0xf9, 0x98, 0x4b, 1951 0xe8, 0x5c, 0xe5, 0xe4, 0x79, 0x4e, 0xc2, 0x8a, 0x3b, 0x01, 0x9d, 0x2d, 0x13, 0x3c, 0x33, 0xd5, 1952 0x5e, 0xfd, 0x17, 0x59, 0x2e, 0x19, 0x7b, 0x9d, 0xcc, 0xfe, 0xc6, 0x02, 0xb4, 0x46, 0x69, 0xca, 1953 0x0f, 0xed, 0xef, 0x1a, 0x68, 0x25, 0x2d, 0x9c, 0x88, 0x0b, 0x77, 0x24, 0xba, 0x32, 0xe9, 0x29, 1954 0xc2, 0x13, 0x3a, 0xdf, 0x50, 0x60, 0x0c, 0x90, 0x4c, 0xae, 0xc9, 0xf3, 0x94, 0x52, 0x0c, 0x1a, 1955 0x40, 0x8b, 0x48, 0x31, 0x66, 0x9d, 0xe7, 0xbb, 0x32, 0xbf, 0xe1, 0xcb, 0x53, 0xfc, 0x55, 0x0e, 1956 0x0d, 0xc1, 0x08, 0x2b, 0x2f, 0x66, 0x83, 0x63, 0x87, 0x12, 0xdb, 0x36, 0xe6, 0x29, 0xfe, 0x7a, 1957 0x9a, 0xc1, 0x51, 0x25, 0xc6, 0xd4, 0x36, 0xe0, 0x6d, 0x65, 0x0c, 0x5e, 0x4b, 0xa3, 0x63, 0xa8, 1958 0x4f, 0xd2, 0xd4, 0x6c, 0x72, 0x68, 0x4f, 0x42, 0xa5, 0x2b, 0x4f, 0xf1, 0xd9, 0x16, 0x9d, 0x95, 1959 0xcd, 0xd0, 0x79, 0x6c, 0x5f, 0xc6, 0xaa, 0x5e, 0x7a, 0x8a, 0xac, 0xcb, 0x58, 0x97, 0x2d, 0x18, 1960 0x1f, 0xbd, 0x2f, 0x2d, 0xf5, 0x63, 0x69, 0xa9, 0x9f, 0x4b, 0x4b, 0x7d, 0xfb, 0xb2, 0x94, 0x07, 1961 0x5d, 0xb6, 0x3c, 0x68, 0xf2, 0x82, 0xbb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x4a, 0xb7, 1962 0x71, 0x25, 0x03, 0x00, 0x00, 1963 }