1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: index.proto 3 4package index 5 6import ( 7 bytes "bytes" 8 fmt "fmt" 9 _ "github.com/gogo/protobuf/gogoproto" 10 proto "github.com/gogo/protobuf/proto" 11 io "io" 12 math "math" 13) 14 15// Reference imports to suppress errors if they are not otherwise used. 16var _ = proto.Marshal 17var _ = fmt.Errorf 18var _ = math.Inf 19 20// This is a compile-time assertion to ensure that this generated file 21// is compatible with the proto package it is being compiled against. 22// A compilation error at this line likely means your copy of the 23// proto package needs to be updated. 24const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 25 26type IndexQuery struct { 27 Key *string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` 28 Value *string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` 29 XXX_NoUnkeyedLiteral struct{} `json:"-"` 30 XXX_unrecognized []byte `json:"-"` 31 XXX_sizecache int32 `json:"-"` 32} 33 34func (m *IndexQuery) Reset() { *m = IndexQuery{} } 35func (m *IndexQuery) String() string { return proto.CompactTextString(m) } 36func (*IndexQuery) ProtoMessage() {} 37func (*IndexQuery) Descriptor() ([]byte, []int) { 38 return fileDescriptor_f750e0f7889345b5, []int{0} 39} 40func (m *IndexQuery) XXX_Unmarshal(b []byte) error { 41 return m.Unmarshal(b) 42} 43func (m *IndexQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 44 if deterministic { 45 return xxx_messageInfo_IndexQuery.Marshal(b, m, deterministic) 46 } else { 47 b = b[:cap(b)] 48 n, err := m.MarshalTo(b) 49 if err != nil { 50 return nil, err 51 } 52 return b[:n], nil 53 } 54} 55func (m *IndexQuery) XXX_Merge(src proto.Message) { 56 xxx_messageInfo_IndexQuery.Merge(m, src) 57} 58func (m *IndexQuery) XXX_Size() int { 59 return m.Size() 60} 61func (m *IndexQuery) XXX_DiscardUnknown() { 62 xxx_messageInfo_IndexQuery.DiscardUnknown(m) 63} 64 65var xxx_messageInfo_IndexQuery proto.InternalMessageInfo 66 67func (m *IndexQuery) GetKey() string { 68 if m != nil && m.Key != nil { 69 return *m.Key 70 } 71 return "" 72} 73 74func (m *IndexQuery) GetValue() string { 75 if m != nil && m.Value != nil { 76 return *m.Value 77 } 78 return "" 79} 80 81func init() { 82 proto.RegisterType((*IndexQuery)(nil), "index.IndexQuery") 83} 84 85func init() { proto.RegisterFile("index.proto", fileDescriptor_f750e0f7889345b5) } 86 87var fileDescriptor_f750e0f7889345b5 = []byte{ 88 // 141 bytes of a gzipped FileDescriptorProto 89 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0xcc, 0x4b, 0x49, 90 0xad, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, 91 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, 92 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0x99, 0x70, 0x71, 0x79, 0x82, 0xf4, 93 0x05, 0x96, 0xa6, 0x16, 0x55, 0x0a, 0x09, 0x70, 0x31, 0x7b, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 94 0x6a, 0x70, 0x06, 0x81, 0x98, 0x42, 0x22, 0x5c, 0xac, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, 95 0x60, 0x31, 0x08, 0xc7, 0x49, 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 96 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x01, 97 0x01, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x3d, 0x8f, 0x44, 0x93, 0x00, 0x00, 0x00, 98} 99 100func (this *IndexQuery) Equal(that interface{}) bool { 101 if that == nil { 102 return this == nil 103 } 104 105 that1, ok := that.(*IndexQuery) 106 if !ok { 107 that2, ok := that.(IndexQuery) 108 if ok { 109 that1 = &that2 110 } else { 111 return false 112 } 113 } 114 if that1 == nil { 115 return this == nil 116 } else if this == nil { 117 return false 118 } 119 if this.Key != nil && that1.Key != nil { 120 if *this.Key != *that1.Key { 121 return false 122 } 123 } else if this.Key != nil { 124 return false 125 } else if that1.Key != nil { 126 return false 127 } 128 if this.Value != nil && that1.Value != nil { 129 if *this.Value != *that1.Value { 130 return false 131 } 132 } else if this.Value != nil { 133 return false 134 } else if that1.Value != nil { 135 return false 136 } 137 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 138 return false 139 } 140 return true 141} 142func (m *IndexQuery) Marshal() (dAtA []byte, err error) { 143 size := m.Size() 144 dAtA = make([]byte, size) 145 n, err := m.MarshalTo(dAtA) 146 if err != nil { 147 return nil, err 148 } 149 return dAtA[:n], nil 150} 151 152func (m *IndexQuery) MarshalTo(dAtA []byte) (int, error) { 153 var i int 154 _ = i 155 var l int 156 _ = l 157 if m.Key != nil { 158 dAtA[i] = 0xa 159 i++ 160 i = encodeVarintIndex(dAtA, i, uint64(len(*m.Key))) 161 i += copy(dAtA[i:], *m.Key) 162 } 163 if m.Value != nil { 164 dAtA[i] = 0x12 165 i++ 166 i = encodeVarintIndex(dAtA, i, uint64(len(*m.Value))) 167 i += copy(dAtA[i:], *m.Value) 168 } 169 if m.XXX_unrecognized != nil { 170 i += copy(dAtA[i:], m.XXX_unrecognized) 171 } 172 return i, nil 173} 174 175func encodeVarintIndex(dAtA []byte, offset int, v uint64) int { 176 for v >= 1<<7 { 177 dAtA[offset] = uint8(v&0x7f | 0x80) 178 v >>= 7 179 offset++ 180 } 181 dAtA[offset] = uint8(v) 182 return offset + 1 183} 184func NewPopulatedIndexQuery(r randyIndex, easy bool) *IndexQuery { 185 this := &IndexQuery{} 186 if r.Intn(10) != 0 { 187 v1 := string(randStringIndex(r)) 188 this.Key = &v1 189 } 190 if r.Intn(10) != 0 { 191 v2 := string(randStringIndex(r)) 192 this.Value = &v2 193 } 194 if !easy && r.Intn(10) != 0 { 195 this.XXX_unrecognized = randUnrecognizedIndex(r, 3) 196 } 197 return this 198} 199 200type randyIndex interface { 201 Float32() float32 202 Float64() float64 203 Int63() int64 204 Int31() int32 205 Uint32() uint32 206 Intn(n int) int 207} 208 209func randUTF8RuneIndex(r randyIndex) rune { 210 ru := r.Intn(62) 211 if ru < 10 { 212 return rune(ru + 48) 213 } else if ru < 36 { 214 return rune(ru + 55) 215 } 216 return rune(ru + 61) 217} 218func randStringIndex(r randyIndex) string { 219 v3 := r.Intn(100) 220 tmps := make([]rune, v3) 221 for i := 0; i < v3; i++ { 222 tmps[i] = randUTF8RuneIndex(r) 223 } 224 return string(tmps) 225} 226func randUnrecognizedIndex(r randyIndex, maxFieldNumber int) (dAtA []byte) { 227 l := r.Intn(5) 228 for i := 0; i < l; i++ { 229 wire := r.Intn(4) 230 if wire == 3 { 231 wire = 5 232 } 233 fieldNumber := maxFieldNumber + r.Intn(100) 234 dAtA = randFieldIndex(dAtA, r, fieldNumber, wire) 235 } 236 return dAtA 237} 238func randFieldIndex(dAtA []byte, r randyIndex, fieldNumber int, wire int) []byte { 239 key := uint32(fieldNumber)<<3 | uint32(wire) 240 switch wire { 241 case 0: 242 dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) 243 v4 := r.Int63() 244 if r.Intn(2) == 0 { 245 v4 *= -1 246 } 247 dAtA = encodeVarintPopulateIndex(dAtA, uint64(v4)) 248 case 1: 249 dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) 250 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 251 case 2: 252 dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) 253 ll := r.Intn(100) 254 dAtA = encodeVarintPopulateIndex(dAtA, uint64(ll)) 255 for j := 0; j < ll; j++ { 256 dAtA = append(dAtA, byte(r.Intn(256))) 257 } 258 default: 259 dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) 260 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 261 } 262 return dAtA 263} 264func encodeVarintPopulateIndex(dAtA []byte, v uint64) []byte { 265 for v >= 1<<7 { 266 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) 267 v >>= 7 268 } 269 dAtA = append(dAtA, uint8(v)) 270 return dAtA 271} 272func (m *IndexQuery) Size() (n int) { 273 if m == nil { 274 return 0 275 } 276 var l int 277 _ = l 278 if m.Key != nil { 279 l = len(*m.Key) 280 n += 1 + l + sovIndex(uint64(l)) 281 } 282 if m.Value != nil { 283 l = len(*m.Value) 284 n += 1 + l + sovIndex(uint64(l)) 285 } 286 if m.XXX_unrecognized != nil { 287 n += len(m.XXX_unrecognized) 288 } 289 return n 290} 291 292func sovIndex(x uint64) (n int) { 293 for { 294 n++ 295 x >>= 7 296 if x == 0 { 297 break 298 } 299 } 300 return n 301} 302func sozIndex(x uint64) (n int) { 303 return sovIndex(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 304} 305func (m *IndexQuery) Unmarshal(dAtA []byte) error { 306 l := len(dAtA) 307 iNdEx := 0 308 for iNdEx < l { 309 preIndex := iNdEx 310 var wire uint64 311 for shift := uint(0); ; shift += 7 { 312 if shift >= 64 { 313 return ErrIntOverflowIndex 314 } 315 if iNdEx >= l { 316 return io.ErrUnexpectedEOF 317 } 318 b := dAtA[iNdEx] 319 iNdEx++ 320 wire |= uint64(b&0x7F) << shift 321 if b < 0x80 { 322 break 323 } 324 } 325 fieldNum := int32(wire >> 3) 326 wireType := int(wire & 0x7) 327 if wireType == 4 { 328 return fmt.Errorf("proto: IndexQuery: wiretype end group for non-group") 329 } 330 if fieldNum <= 0 { 331 return fmt.Errorf("proto: IndexQuery: illegal tag %d (wire type %d)", fieldNum, wire) 332 } 333 switch fieldNum { 334 case 1: 335 if wireType != 2 { 336 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 337 } 338 var stringLen uint64 339 for shift := uint(0); ; shift += 7 { 340 if shift >= 64 { 341 return ErrIntOverflowIndex 342 } 343 if iNdEx >= l { 344 return io.ErrUnexpectedEOF 345 } 346 b := dAtA[iNdEx] 347 iNdEx++ 348 stringLen |= uint64(b&0x7F) << shift 349 if b < 0x80 { 350 break 351 } 352 } 353 intStringLen := int(stringLen) 354 if intStringLen < 0 { 355 return ErrInvalidLengthIndex 356 } 357 postIndex := iNdEx + intStringLen 358 if postIndex < 0 { 359 return ErrInvalidLengthIndex 360 } 361 if postIndex > l { 362 return io.ErrUnexpectedEOF 363 } 364 s := string(dAtA[iNdEx:postIndex]) 365 m.Key = &s 366 iNdEx = postIndex 367 case 2: 368 if wireType != 2 { 369 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 370 } 371 var stringLen uint64 372 for shift := uint(0); ; shift += 7 { 373 if shift >= 64 { 374 return ErrIntOverflowIndex 375 } 376 if iNdEx >= l { 377 return io.ErrUnexpectedEOF 378 } 379 b := dAtA[iNdEx] 380 iNdEx++ 381 stringLen |= uint64(b&0x7F) << shift 382 if b < 0x80 { 383 break 384 } 385 } 386 intStringLen := int(stringLen) 387 if intStringLen < 0 { 388 return ErrInvalidLengthIndex 389 } 390 postIndex := iNdEx + intStringLen 391 if postIndex < 0 { 392 return ErrInvalidLengthIndex 393 } 394 if postIndex > l { 395 return io.ErrUnexpectedEOF 396 } 397 s := string(dAtA[iNdEx:postIndex]) 398 m.Value = &s 399 iNdEx = postIndex 400 default: 401 iNdEx = preIndex 402 skippy, err := skipIndex(dAtA[iNdEx:]) 403 if err != nil { 404 return err 405 } 406 if skippy < 0 { 407 return ErrInvalidLengthIndex 408 } 409 if (iNdEx + skippy) < 0 { 410 return ErrInvalidLengthIndex 411 } 412 if (iNdEx + skippy) > l { 413 return io.ErrUnexpectedEOF 414 } 415 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 416 iNdEx += skippy 417 } 418 } 419 420 if iNdEx > l { 421 return io.ErrUnexpectedEOF 422 } 423 return nil 424} 425func skipIndex(dAtA []byte) (n int, err error) { 426 l := len(dAtA) 427 iNdEx := 0 428 for iNdEx < l { 429 var wire uint64 430 for shift := uint(0); ; shift += 7 { 431 if shift >= 64 { 432 return 0, ErrIntOverflowIndex 433 } 434 if iNdEx >= l { 435 return 0, io.ErrUnexpectedEOF 436 } 437 b := dAtA[iNdEx] 438 iNdEx++ 439 wire |= (uint64(b) & 0x7F) << shift 440 if b < 0x80 { 441 break 442 } 443 } 444 wireType := int(wire & 0x7) 445 switch wireType { 446 case 0: 447 for shift := uint(0); ; shift += 7 { 448 if shift >= 64 { 449 return 0, ErrIntOverflowIndex 450 } 451 if iNdEx >= l { 452 return 0, io.ErrUnexpectedEOF 453 } 454 iNdEx++ 455 if dAtA[iNdEx-1] < 0x80 { 456 break 457 } 458 } 459 return iNdEx, nil 460 case 1: 461 iNdEx += 8 462 return iNdEx, nil 463 case 2: 464 var length int 465 for shift := uint(0); ; shift += 7 { 466 if shift >= 64 { 467 return 0, ErrIntOverflowIndex 468 } 469 if iNdEx >= l { 470 return 0, io.ErrUnexpectedEOF 471 } 472 b := dAtA[iNdEx] 473 iNdEx++ 474 length |= (int(b) & 0x7F) << shift 475 if b < 0x80 { 476 break 477 } 478 } 479 if length < 0 { 480 return 0, ErrInvalidLengthIndex 481 } 482 iNdEx += length 483 if iNdEx < 0 { 484 return 0, ErrInvalidLengthIndex 485 } 486 return iNdEx, nil 487 case 3: 488 for { 489 var innerWire uint64 490 var start int = iNdEx 491 for shift := uint(0); ; shift += 7 { 492 if shift >= 64 { 493 return 0, ErrIntOverflowIndex 494 } 495 if iNdEx >= l { 496 return 0, io.ErrUnexpectedEOF 497 } 498 b := dAtA[iNdEx] 499 iNdEx++ 500 innerWire |= (uint64(b) & 0x7F) << shift 501 if b < 0x80 { 502 break 503 } 504 } 505 innerWireType := int(innerWire & 0x7) 506 if innerWireType == 4 { 507 break 508 } 509 next, err := skipIndex(dAtA[start:]) 510 if err != nil { 511 return 0, err 512 } 513 iNdEx = start + next 514 if iNdEx < 0 { 515 return 0, ErrInvalidLengthIndex 516 } 517 } 518 return iNdEx, nil 519 case 4: 520 return iNdEx, nil 521 case 5: 522 iNdEx += 4 523 return iNdEx, nil 524 default: 525 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 526 } 527 } 528 panic("unreachable") 529} 530 531var ( 532 ErrInvalidLengthIndex = fmt.Errorf("proto: negative length found during unmarshaling") 533 ErrIntOverflowIndex = fmt.Errorf("proto: integer overflow") 534) 535