github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/kv/kvserver/protectedts/ptpb/protectedts.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: kv/kvserver/protectedts/ptpb/protectedts.proto 3 4 package ptpb 5 6 import proto "github.com/gogo/protobuf/proto" 7 import fmt "fmt" 8 import math "math" 9 import roachpb "github.com/cockroachdb/cockroach/pkg/roachpb" 10 import hlc "github.com/cockroachdb/cockroach/pkg/util/hlc" 11 12 import github_com_cockroachdb_cockroach_pkg_util_uuid "github.com/cockroachdb/cockroach/pkg/util/uuid" 13 14 import io "io" 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 26 27 // ProtectionMode defines the semantics of a Record. 28 type ProtectionMode int32 29 30 const ( 31 // PROTECT_AFTER ensures that all data values live at or after the specified 32 // timestamp will be protected from GC. 33 PROTECT_AFTER ProtectionMode = 0 34 ) 35 36 var ProtectionMode_name = map[int32]string{ 37 0: "PROTECT_AFTER", 38 } 39 var ProtectionMode_value = map[string]int32{ 40 "PROTECT_AFTER": 0, 41 } 42 43 func (x ProtectionMode) String() string { 44 return proto.EnumName(ProtectionMode_name, int32(x)) 45 } 46 func (ProtectionMode) EnumDescriptor() ([]byte, []int) { 47 return fileDescriptor_protectedts_5535080d2f6ed5b9, []int{0} 48 } 49 50 // Metadata is the system metadata. The metadata is stored explicitly and all 51 // operations which create or release Records increment the version and update 52 // the metadata fields accordingly. 53 // 54 // The version provides a mechanism for cheap caching and forms the basis of 55 // the implementation of the Tracker. The Tracker needs to provide a recent 56 // view of the protectedts subsystem for GC to proceed. The protectedts 57 // state changes rarely. The timestamp of cached state can by updated by 58 // merely observing that the version has not changed. 59 type Metadata struct { 60 // Version is incremented whenever a Record is created or removed. 61 Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` 62 // NumRecords is the number of records which exist in the subsystem. 63 NumRecords uint64 `protobuf:"varint,2,opt,name=num_records,json=numRecords,proto3" json:"num_records,omitempty"` 64 // NumSpans is the number of spans currently being protected by the 65 // protectedts subsystem. 66 NumSpans uint64 `protobuf:"varint,3,opt,name=num_spans,json=numSpans,proto3" json:"num_spans,omitempty"` 67 // TotalBytes is the number of bytes currently in use by records 68 // to store their spans and metadata. 69 TotalBytes uint64 `protobuf:"varint,4,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"` 70 } 71 72 func (m *Metadata) Reset() { *m = Metadata{} } 73 func (m *Metadata) String() string { return proto.CompactTextString(m) } 74 func (*Metadata) ProtoMessage() {} 75 func (*Metadata) Descriptor() ([]byte, []int) { 76 return fileDescriptor_protectedts_5535080d2f6ed5b9, []int{0} 77 } 78 func (m *Metadata) XXX_Unmarshal(b []byte) error { 79 return m.Unmarshal(b) 80 } 81 func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 82 b = b[:cap(b)] 83 n, err := m.MarshalTo(b) 84 if err != nil { 85 return nil, err 86 } 87 return b[:n], nil 88 } 89 func (dst *Metadata) XXX_Merge(src proto.Message) { 90 xxx_messageInfo_Metadata.Merge(dst, src) 91 } 92 func (m *Metadata) XXX_Size() int { 93 return m.Size() 94 } 95 func (m *Metadata) XXX_DiscardUnknown() { 96 xxx_messageInfo_Metadata.DiscardUnknown(m) 97 } 98 99 var xxx_messageInfo_Metadata proto.InternalMessageInfo 100 101 // Record corresponds to a protected timestamp. 102 type Record struct { 103 // ID uniquely identifies this row. 104 ID github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `protobuf:"bytes,1,opt,name=id,proto3,customtype=github.com/cockroachdb/cockroach/pkg/util/uuid.UUID" json:"id"` 105 // Timestamp is the timestamp which is protected. 106 Timestamp hlc.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp"` 107 // Mode specifies whether this record protects all values live at timestamp 108 // or all values live at or after that timestamp. 109 Mode ProtectionMode `protobuf:"varint,3,opt,name=mode,proto3,enum=cockroach.protectedts.ProtectionMode" json:"mode,omitempty"` 110 // MetaType is used to interpret the data stored in Meta. 111 // Users of Meta should set a unique value for MetaType which provides enough 112 // information to interpret the data in Meta. See the comment on Meta for how 113 // these two fields should be used in tandem. 114 MetaType string `protobuf:"bytes,4,opt,name=meta_type,json=metaType,proto3" json:"meta_type,omitempty"` 115 // Meta is client-provided metadata about the record. 116 // This data allows the Record to be correlated with data from another 117 // subsystem. For example, this field may contain the ID of a job which 118 // created this record. The metadata allows an out-of-band reconciliation 119 // process to discover and remove records which no longer correspond to 120 // running jobs. Such a mechanism acts as a failsafe against unreliable 121 // jobs infrastructure. 122 Meta []byte `protobuf:"bytes,5,opt,name=meta,proto3" json:"meta,omitempty"` 123 // Verified marks that this Record is known to have successfully provided 124 // protection. It is updated after Verification. Updates to this field do not 125 // change the Version of the subsystem. 126 Verified bool `protobuf:"varint,6,opt,name=verified,proto3" json:"verified,omitempty"` 127 // Spans are the spans which this Record protects. 128 Spans []roachpb.Span `protobuf:"bytes,7,rep,name=spans,proto3" json:"spans"` 129 } 130 131 func (m *Record) Reset() { *m = Record{} } 132 func (m *Record) String() string { return proto.CompactTextString(m) } 133 func (*Record) ProtoMessage() {} 134 func (*Record) Descriptor() ([]byte, []int) { 135 return fileDescriptor_protectedts_5535080d2f6ed5b9, []int{1} 136 } 137 func (m *Record) XXX_Unmarshal(b []byte) error { 138 return m.Unmarshal(b) 139 } 140 func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 141 b = b[:cap(b)] 142 n, err := m.MarshalTo(b) 143 if err != nil { 144 return nil, err 145 } 146 return b[:n], nil 147 } 148 func (dst *Record) XXX_Merge(src proto.Message) { 149 xxx_messageInfo_Record.Merge(dst, src) 150 } 151 func (m *Record) XXX_Size() int { 152 return m.Size() 153 } 154 func (m *Record) XXX_DiscardUnknown() { 155 xxx_messageInfo_Record.DiscardUnknown(m) 156 } 157 158 var xxx_messageInfo_Record proto.InternalMessageInfo 159 160 // State is the complete system state. 161 type State struct { 162 Metadata `protobuf:"bytes,1,opt,name=metadata,proto3,embedded=metadata" json:"metadata"` 163 Records []Record `protobuf:"bytes,2,rep,name=records,proto3" json:"records"` 164 } 165 166 func (m *State) Reset() { *m = State{} } 167 func (m *State) String() string { return proto.CompactTextString(m) } 168 func (*State) ProtoMessage() {} 169 func (*State) Descriptor() ([]byte, []int) { 170 return fileDescriptor_protectedts_5535080d2f6ed5b9, []int{2} 171 } 172 func (m *State) XXX_Unmarshal(b []byte) error { 173 return m.Unmarshal(b) 174 } 175 func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 176 b = b[:cap(b)] 177 n, err := m.MarshalTo(b) 178 if err != nil { 179 return nil, err 180 } 181 return b[:n], nil 182 } 183 func (dst *State) XXX_Merge(src proto.Message) { 184 xxx_messageInfo_State.Merge(dst, src) 185 } 186 func (m *State) XXX_Size() int { 187 return m.Size() 188 } 189 func (m *State) XXX_DiscardUnknown() { 190 xxx_messageInfo_State.DiscardUnknown(m) 191 } 192 193 var xxx_messageInfo_State proto.InternalMessageInfo 194 195 func init() { 196 proto.RegisterType((*Metadata)(nil), "cockroach.protectedts.Metadata") 197 proto.RegisterType((*Record)(nil), "cockroach.protectedts.Record") 198 proto.RegisterType((*State)(nil), "cockroach.protectedts.State") 199 proto.RegisterEnum("cockroach.protectedts.ProtectionMode", ProtectionMode_name, ProtectionMode_value) 200 } 201 func (m *Metadata) Marshal() (dAtA []byte, err error) { 202 size := m.Size() 203 dAtA = make([]byte, size) 204 n, err := m.MarshalTo(dAtA) 205 if err != nil { 206 return nil, err 207 } 208 return dAtA[:n], nil 209 } 210 211 func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { 212 var i int 213 _ = i 214 var l int 215 _ = l 216 if m.Version != 0 { 217 dAtA[i] = 0x8 218 i++ 219 i = encodeVarintProtectedts(dAtA, i, uint64(m.Version)) 220 } 221 if m.NumRecords != 0 { 222 dAtA[i] = 0x10 223 i++ 224 i = encodeVarintProtectedts(dAtA, i, uint64(m.NumRecords)) 225 } 226 if m.NumSpans != 0 { 227 dAtA[i] = 0x18 228 i++ 229 i = encodeVarintProtectedts(dAtA, i, uint64(m.NumSpans)) 230 } 231 if m.TotalBytes != 0 { 232 dAtA[i] = 0x20 233 i++ 234 i = encodeVarintProtectedts(dAtA, i, uint64(m.TotalBytes)) 235 } 236 return i, nil 237 } 238 239 func (m *Record) Marshal() (dAtA []byte, err error) { 240 size := m.Size() 241 dAtA = make([]byte, size) 242 n, err := m.MarshalTo(dAtA) 243 if err != nil { 244 return nil, err 245 } 246 return dAtA[:n], nil 247 } 248 249 func (m *Record) MarshalTo(dAtA []byte) (int, error) { 250 var i int 251 _ = i 252 var l int 253 _ = l 254 dAtA[i] = 0xa 255 i++ 256 i = encodeVarintProtectedts(dAtA, i, uint64(m.ID.Size())) 257 n1, err := m.ID.MarshalTo(dAtA[i:]) 258 if err != nil { 259 return 0, err 260 } 261 i += n1 262 dAtA[i] = 0x12 263 i++ 264 i = encodeVarintProtectedts(dAtA, i, uint64(m.Timestamp.Size())) 265 n2, err := m.Timestamp.MarshalTo(dAtA[i:]) 266 if err != nil { 267 return 0, err 268 } 269 i += n2 270 if m.Mode != 0 { 271 dAtA[i] = 0x18 272 i++ 273 i = encodeVarintProtectedts(dAtA, i, uint64(m.Mode)) 274 } 275 if len(m.MetaType) > 0 { 276 dAtA[i] = 0x22 277 i++ 278 i = encodeVarintProtectedts(dAtA, i, uint64(len(m.MetaType))) 279 i += copy(dAtA[i:], m.MetaType) 280 } 281 if len(m.Meta) > 0 { 282 dAtA[i] = 0x2a 283 i++ 284 i = encodeVarintProtectedts(dAtA, i, uint64(len(m.Meta))) 285 i += copy(dAtA[i:], m.Meta) 286 } 287 if m.Verified { 288 dAtA[i] = 0x30 289 i++ 290 if m.Verified { 291 dAtA[i] = 1 292 } else { 293 dAtA[i] = 0 294 } 295 i++ 296 } 297 if len(m.Spans) > 0 { 298 for _, msg := range m.Spans { 299 dAtA[i] = 0x3a 300 i++ 301 i = encodeVarintProtectedts(dAtA, i, uint64(msg.Size())) 302 n, err := msg.MarshalTo(dAtA[i:]) 303 if err != nil { 304 return 0, err 305 } 306 i += n 307 } 308 } 309 return i, nil 310 } 311 312 func (m *State) Marshal() (dAtA []byte, err error) { 313 size := m.Size() 314 dAtA = make([]byte, size) 315 n, err := m.MarshalTo(dAtA) 316 if err != nil { 317 return nil, err 318 } 319 return dAtA[:n], nil 320 } 321 322 func (m *State) MarshalTo(dAtA []byte) (int, error) { 323 var i int 324 _ = i 325 var l int 326 _ = l 327 dAtA[i] = 0xa 328 i++ 329 i = encodeVarintProtectedts(dAtA, i, uint64(m.Metadata.Size())) 330 n3, err := m.Metadata.MarshalTo(dAtA[i:]) 331 if err != nil { 332 return 0, err 333 } 334 i += n3 335 if len(m.Records) > 0 { 336 for _, msg := range m.Records { 337 dAtA[i] = 0x12 338 i++ 339 i = encodeVarintProtectedts(dAtA, i, uint64(msg.Size())) 340 n, err := msg.MarshalTo(dAtA[i:]) 341 if err != nil { 342 return 0, err 343 } 344 i += n 345 } 346 } 347 return i, nil 348 } 349 350 func encodeVarintProtectedts(dAtA []byte, offset int, v uint64) int { 351 for v >= 1<<7 { 352 dAtA[offset] = uint8(v&0x7f | 0x80) 353 v >>= 7 354 offset++ 355 } 356 dAtA[offset] = uint8(v) 357 return offset + 1 358 } 359 func (m *Metadata) Size() (n int) { 360 if m == nil { 361 return 0 362 } 363 var l int 364 _ = l 365 if m.Version != 0 { 366 n += 1 + sovProtectedts(uint64(m.Version)) 367 } 368 if m.NumRecords != 0 { 369 n += 1 + sovProtectedts(uint64(m.NumRecords)) 370 } 371 if m.NumSpans != 0 { 372 n += 1 + sovProtectedts(uint64(m.NumSpans)) 373 } 374 if m.TotalBytes != 0 { 375 n += 1 + sovProtectedts(uint64(m.TotalBytes)) 376 } 377 return n 378 } 379 380 func (m *Record) Size() (n int) { 381 if m == nil { 382 return 0 383 } 384 var l int 385 _ = l 386 l = m.ID.Size() 387 n += 1 + l + sovProtectedts(uint64(l)) 388 l = m.Timestamp.Size() 389 n += 1 + l + sovProtectedts(uint64(l)) 390 if m.Mode != 0 { 391 n += 1 + sovProtectedts(uint64(m.Mode)) 392 } 393 l = len(m.MetaType) 394 if l > 0 { 395 n += 1 + l + sovProtectedts(uint64(l)) 396 } 397 l = len(m.Meta) 398 if l > 0 { 399 n += 1 + l + sovProtectedts(uint64(l)) 400 } 401 if m.Verified { 402 n += 2 403 } 404 if len(m.Spans) > 0 { 405 for _, e := range m.Spans { 406 l = e.Size() 407 n += 1 + l + sovProtectedts(uint64(l)) 408 } 409 } 410 return n 411 } 412 413 func (m *State) Size() (n int) { 414 if m == nil { 415 return 0 416 } 417 var l int 418 _ = l 419 l = m.Metadata.Size() 420 n += 1 + l + sovProtectedts(uint64(l)) 421 if len(m.Records) > 0 { 422 for _, e := range m.Records { 423 l = e.Size() 424 n += 1 + l + sovProtectedts(uint64(l)) 425 } 426 } 427 return n 428 } 429 430 func sovProtectedts(x uint64) (n int) { 431 for { 432 n++ 433 x >>= 7 434 if x == 0 { 435 break 436 } 437 } 438 return n 439 } 440 func sozProtectedts(x uint64) (n int) { 441 return sovProtectedts(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 442 } 443 func (m *Metadata) Unmarshal(dAtA []byte) error { 444 l := len(dAtA) 445 iNdEx := 0 446 for iNdEx < l { 447 preIndex := iNdEx 448 var wire uint64 449 for shift := uint(0); ; shift += 7 { 450 if shift >= 64 { 451 return ErrIntOverflowProtectedts 452 } 453 if iNdEx >= l { 454 return io.ErrUnexpectedEOF 455 } 456 b := dAtA[iNdEx] 457 iNdEx++ 458 wire |= (uint64(b) & 0x7F) << shift 459 if b < 0x80 { 460 break 461 } 462 } 463 fieldNum := int32(wire >> 3) 464 wireType := int(wire & 0x7) 465 if wireType == 4 { 466 return fmt.Errorf("proto: Metadata: wiretype end group for non-group") 467 } 468 if fieldNum <= 0 { 469 return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) 470 } 471 switch fieldNum { 472 case 1: 473 if wireType != 0 { 474 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 475 } 476 m.Version = 0 477 for shift := uint(0); ; shift += 7 { 478 if shift >= 64 { 479 return ErrIntOverflowProtectedts 480 } 481 if iNdEx >= l { 482 return io.ErrUnexpectedEOF 483 } 484 b := dAtA[iNdEx] 485 iNdEx++ 486 m.Version |= (uint64(b) & 0x7F) << shift 487 if b < 0x80 { 488 break 489 } 490 } 491 case 2: 492 if wireType != 0 { 493 return fmt.Errorf("proto: wrong wireType = %d for field NumRecords", wireType) 494 } 495 m.NumRecords = 0 496 for shift := uint(0); ; shift += 7 { 497 if shift >= 64 { 498 return ErrIntOverflowProtectedts 499 } 500 if iNdEx >= l { 501 return io.ErrUnexpectedEOF 502 } 503 b := dAtA[iNdEx] 504 iNdEx++ 505 m.NumRecords |= (uint64(b) & 0x7F) << shift 506 if b < 0x80 { 507 break 508 } 509 } 510 case 3: 511 if wireType != 0 { 512 return fmt.Errorf("proto: wrong wireType = %d for field NumSpans", wireType) 513 } 514 m.NumSpans = 0 515 for shift := uint(0); ; shift += 7 { 516 if shift >= 64 { 517 return ErrIntOverflowProtectedts 518 } 519 if iNdEx >= l { 520 return io.ErrUnexpectedEOF 521 } 522 b := dAtA[iNdEx] 523 iNdEx++ 524 m.NumSpans |= (uint64(b) & 0x7F) << shift 525 if b < 0x80 { 526 break 527 } 528 } 529 case 4: 530 if wireType != 0 { 531 return fmt.Errorf("proto: wrong wireType = %d for field TotalBytes", wireType) 532 } 533 m.TotalBytes = 0 534 for shift := uint(0); ; shift += 7 { 535 if shift >= 64 { 536 return ErrIntOverflowProtectedts 537 } 538 if iNdEx >= l { 539 return io.ErrUnexpectedEOF 540 } 541 b := dAtA[iNdEx] 542 iNdEx++ 543 m.TotalBytes |= (uint64(b) & 0x7F) << shift 544 if b < 0x80 { 545 break 546 } 547 } 548 default: 549 iNdEx = preIndex 550 skippy, err := skipProtectedts(dAtA[iNdEx:]) 551 if err != nil { 552 return err 553 } 554 if skippy < 0 { 555 return ErrInvalidLengthProtectedts 556 } 557 if (iNdEx + skippy) > l { 558 return io.ErrUnexpectedEOF 559 } 560 iNdEx += skippy 561 } 562 } 563 564 if iNdEx > l { 565 return io.ErrUnexpectedEOF 566 } 567 return nil 568 } 569 func (m *Record) Unmarshal(dAtA []byte) error { 570 l := len(dAtA) 571 iNdEx := 0 572 for iNdEx < l { 573 preIndex := iNdEx 574 var wire uint64 575 for shift := uint(0); ; shift += 7 { 576 if shift >= 64 { 577 return ErrIntOverflowProtectedts 578 } 579 if iNdEx >= l { 580 return io.ErrUnexpectedEOF 581 } 582 b := dAtA[iNdEx] 583 iNdEx++ 584 wire |= (uint64(b) & 0x7F) << shift 585 if b < 0x80 { 586 break 587 } 588 } 589 fieldNum := int32(wire >> 3) 590 wireType := int(wire & 0x7) 591 if wireType == 4 { 592 return fmt.Errorf("proto: Record: wiretype end group for non-group") 593 } 594 if fieldNum <= 0 { 595 return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) 596 } 597 switch fieldNum { 598 case 1: 599 if wireType != 2 { 600 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 601 } 602 var byteLen int 603 for shift := uint(0); ; shift += 7 { 604 if shift >= 64 { 605 return ErrIntOverflowProtectedts 606 } 607 if iNdEx >= l { 608 return io.ErrUnexpectedEOF 609 } 610 b := dAtA[iNdEx] 611 iNdEx++ 612 byteLen |= (int(b) & 0x7F) << shift 613 if b < 0x80 { 614 break 615 } 616 } 617 if byteLen < 0 { 618 return ErrInvalidLengthProtectedts 619 } 620 postIndex := iNdEx + byteLen 621 if postIndex > l { 622 return io.ErrUnexpectedEOF 623 } 624 if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 625 return err 626 } 627 iNdEx = postIndex 628 case 2: 629 if wireType != 2 { 630 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 631 } 632 var msglen int 633 for shift := uint(0); ; shift += 7 { 634 if shift >= 64 { 635 return ErrIntOverflowProtectedts 636 } 637 if iNdEx >= l { 638 return io.ErrUnexpectedEOF 639 } 640 b := dAtA[iNdEx] 641 iNdEx++ 642 msglen |= (int(b) & 0x7F) << shift 643 if b < 0x80 { 644 break 645 } 646 } 647 if msglen < 0 { 648 return ErrInvalidLengthProtectedts 649 } 650 postIndex := iNdEx + msglen 651 if postIndex > l { 652 return io.ErrUnexpectedEOF 653 } 654 if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 655 return err 656 } 657 iNdEx = postIndex 658 case 3: 659 if wireType != 0 { 660 return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) 661 } 662 m.Mode = 0 663 for shift := uint(0); ; shift += 7 { 664 if shift >= 64 { 665 return ErrIntOverflowProtectedts 666 } 667 if iNdEx >= l { 668 return io.ErrUnexpectedEOF 669 } 670 b := dAtA[iNdEx] 671 iNdEx++ 672 m.Mode |= (ProtectionMode(b) & 0x7F) << shift 673 if b < 0x80 { 674 break 675 } 676 } 677 case 4: 678 if wireType != 2 { 679 return fmt.Errorf("proto: wrong wireType = %d for field MetaType", wireType) 680 } 681 var stringLen uint64 682 for shift := uint(0); ; shift += 7 { 683 if shift >= 64 { 684 return ErrIntOverflowProtectedts 685 } 686 if iNdEx >= l { 687 return io.ErrUnexpectedEOF 688 } 689 b := dAtA[iNdEx] 690 iNdEx++ 691 stringLen |= (uint64(b) & 0x7F) << shift 692 if b < 0x80 { 693 break 694 } 695 } 696 intStringLen := int(stringLen) 697 if intStringLen < 0 { 698 return ErrInvalidLengthProtectedts 699 } 700 postIndex := iNdEx + intStringLen 701 if postIndex > l { 702 return io.ErrUnexpectedEOF 703 } 704 m.MetaType = string(dAtA[iNdEx:postIndex]) 705 iNdEx = postIndex 706 case 5: 707 if wireType != 2 { 708 return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType) 709 } 710 var byteLen int 711 for shift := uint(0); ; shift += 7 { 712 if shift >= 64 { 713 return ErrIntOverflowProtectedts 714 } 715 if iNdEx >= l { 716 return io.ErrUnexpectedEOF 717 } 718 b := dAtA[iNdEx] 719 iNdEx++ 720 byteLen |= (int(b) & 0x7F) << shift 721 if b < 0x80 { 722 break 723 } 724 } 725 if byteLen < 0 { 726 return ErrInvalidLengthProtectedts 727 } 728 postIndex := iNdEx + byteLen 729 if postIndex > l { 730 return io.ErrUnexpectedEOF 731 } 732 m.Meta = append(m.Meta[:0], dAtA[iNdEx:postIndex]...) 733 if m.Meta == nil { 734 m.Meta = []byte{} 735 } 736 iNdEx = postIndex 737 case 6: 738 if wireType != 0 { 739 return fmt.Errorf("proto: wrong wireType = %d for field Verified", wireType) 740 } 741 var v int 742 for shift := uint(0); ; shift += 7 { 743 if shift >= 64 { 744 return ErrIntOverflowProtectedts 745 } 746 if iNdEx >= l { 747 return io.ErrUnexpectedEOF 748 } 749 b := dAtA[iNdEx] 750 iNdEx++ 751 v |= (int(b) & 0x7F) << shift 752 if b < 0x80 { 753 break 754 } 755 } 756 m.Verified = bool(v != 0) 757 case 7: 758 if wireType != 2 { 759 return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) 760 } 761 var msglen int 762 for shift := uint(0); ; shift += 7 { 763 if shift >= 64 { 764 return ErrIntOverflowProtectedts 765 } 766 if iNdEx >= l { 767 return io.ErrUnexpectedEOF 768 } 769 b := dAtA[iNdEx] 770 iNdEx++ 771 msglen |= (int(b) & 0x7F) << shift 772 if b < 0x80 { 773 break 774 } 775 } 776 if msglen < 0 { 777 return ErrInvalidLengthProtectedts 778 } 779 postIndex := iNdEx + msglen 780 if postIndex > l { 781 return io.ErrUnexpectedEOF 782 } 783 m.Spans = append(m.Spans, roachpb.Span{}) 784 if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 785 return err 786 } 787 iNdEx = postIndex 788 default: 789 iNdEx = preIndex 790 skippy, err := skipProtectedts(dAtA[iNdEx:]) 791 if err != nil { 792 return err 793 } 794 if skippy < 0 { 795 return ErrInvalidLengthProtectedts 796 } 797 if (iNdEx + skippy) > l { 798 return io.ErrUnexpectedEOF 799 } 800 iNdEx += skippy 801 } 802 } 803 804 if iNdEx > l { 805 return io.ErrUnexpectedEOF 806 } 807 return nil 808 } 809 func (m *State) Unmarshal(dAtA []byte) error { 810 l := len(dAtA) 811 iNdEx := 0 812 for iNdEx < l { 813 preIndex := iNdEx 814 var wire uint64 815 for shift := uint(0); ; shift += 7 { 816 if shift >= 64 { 817 return ErrIntOverflowProtectedts 818 } 819 if iNdEx >= l { 820 return io.ErrUnexpectedEOF 821 } 822 b := dAtA[iNdEx] 823 iNdEx++ 824 wire |= (uint64(b) & 0x7F) << shift 825 if b < 0x80 { 826 break 827 } 828 } 829 fieldNum := int32(wire >> 3) 830 wireType := int(wire & 0x7) 831 if wireType == 4 { 832 return fmt.Errorf("proto: State: wiretype end group for non-group") 833 } 834 if fieldNum <= 0 { 835 return fmt.Errorf("proto: State: illegal tag %d (wire type %d)", fieldNum, wire) 836 } 837 switch fieldNum { 838 case 1: 839 if wireType != 2 { 840 return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) 841 } 842 var msglen int 843 for shift := uint(0); ; shift += 7 { 844 if shift >= 64 { 845 return ErrIntOverflowProtectedts 846 } 847 if iNdEx >= l { 848 return io.ErrUnexpectedEOF 849 } 850 b := dAtA[iNdEx] 851 iNdEx++ 852 msglen |= (int(b) & 0x7F) << shift 853 if b < 0x80 { 854 break 855 } 856 } 857 if msglen < 0 { 858 return ErrInvalidLengthProtectedts 859 } 860 postIndex := iNdEx + msglen 861 if postIndex > l { 862 return io.ErrUnexpectedEOF 863 } 864 if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 865 return err 866 } 867 iNdEx = postIndex 868 case 2: 869 if wireType != 2 { 870 return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) 871 } 872 var msglen int 873 for shift := uint(0); ; shift += 7 { 874 if shift >= 64 { 875 return ErrIntOverflowProtectedts 876 } 877 if iNdEx >= l { 878 return io.ErrUnexpectedEOF 879 } 880 b := dAtA[iNdEx] 881 iNdEx++ 882 msglen |= (int(b) & 0x7F) << shift 883 if b < 0x80 { 884 break 885 } 886 } 887 if msglen < 0 { 888 return ErrInvalidLengthProtectedts 889 } 890 postIndex := iNdEx + msglen 891 if postIndex > l { 892 return io.ErrUnexpectedEOF 893 } 894 m.Records = append(m.Records, Record{}) 895 if err := m.Records[len(m.Records)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 896 return err 897 } 898 iNdEx = postIndex 899 default: 900 iNdEx = preIndex 901 skippy, err := skipProtectedts(dAtA[iNdEx:]) 902 if err != nil { 903 return err 904 } 905 if skippy < 0 { 906 return ErrInvalidLengthProtectedts 907 } 908 if (iNdEx + skippy) > l { 909 return io.ErrUnexpectedEOF 910 } 911 iNdEx += skippy 912 } 913 } 914 915 if iNdEx > l { 916 return io.ErrUnexpectedEOF 917 } 918 return nil 919 } 920 func skipProtectedts(dAtA []byte) (n int, err error) { 921 l := len(dAtA) 922 iNdEx := 0 923 for iNdEx < l { 924 var wire uint64 925 for shift := uint(0); ; shift += 7 { 926 if shift >= 64 { 927 return 0, ErrIntOverflowProtectedts 928 } 929 if iNdEx >= l { 930 return 0, io.ErrUnexpectedEOF 931 } 932 b := dAtA[iNdEx] 933 iNdEx++ 934 wire |= (uint64(b) & 0x7F) << shift 935 if b < 0x80 { 936 break 937 } 938 } 939 wireType := int(wire & 0x7) 940 switch wireType { 941 case 0: 942 for shift := uint(0); ; shift += 7 { 943 if shift >= 64 { 944 return 0, ErrIntOverflowProtectedts 945 } 946 if iNdEx >= l { 947 return 0, io.ErrUnexpectedEOF 948 } 949 iNdEx++ 950 if dAtA[iNdEx-1] < 0x80 { 951 break 952 } 953 } 954 return iNdEx, nil 955 case 1: 956 iNdEx += 8 957 return iNdEx, nil 958 case 2: 959 var length int 960 for shift := uint(0); ; shift += 7 { 961 if shift >= 64 { 962 return 0, ErrIntOverflowProtectedts 963 } 964 if iNdEx >= l { 965 return 0, io.ErrUnexpectedEOF 966 } 967 b := dAtA[iNdEx] 968 iNdEx++ 969 length |= (int(b) & 0x7F) << shift 970 if b < 0x80 { 971 break 972 } 973 } 974 iNdEx += length 975 if length < 0 { 976 return 0, ErrInvalidLengthProtectedts 977 } 978 return iNdEx, nil 979 case 3: 980 for { 981 var innerWire uint64 982 var start int = iNdEx 983 for shift := uint(0); ; shift += 7 { 984 if shift >= 64 { 985 return 0, ErrIntOverflowProtectedts 986 } 987 if iNdEx >= l { 988 return 0, io.ErrUnexpectedEOF 989 } 990 b := dAtA[iNdEx] 991 iNdEx++ 992 innerWire |= (uint64(b) & 0x7F) << shift 993 if b < 0x80 { 994 break 995 } 996 } 997 innerWireType := int(innerWire & 0x7) 998 if innerWireType == 4 { 999 break 1000 } 1001 next, err := skipProtectedts(dAtA[start:]) 1002 if err != nil { 1003 return 0, err 1004 } 1005 iNdEx = start + next 1006 } 1007 return iNdEx, nil 1008 case 4: 1009 return iNdEx, nil 1010 case 5: 1011 iNdEx += 4 1012 return iNdEx, nil 1013 default: 1014 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1015 } 1016 } 1017 panic("unreachable") 1018 } 1019 1020 var ( 1021 ErrInvalidLengthProtectedts = fmt.Errorf("proto: negative length found during unmarshaling") 1022 ErrIntOverflowProtectedts = fmt.Errorf("proto: integer overflow") 1023 ) 1024 1025 func init() { 1026 proto.RegisterFile("kv/kvserver/protectedts/ptpb/protectedts.proto", fileDescriptor_protectedts_5535080d2f6ed5b9) 1027 } 1028 1029 var fileDescriptor_protectedts_5535080d2f6ed5b9 = []byte{ 1030 // 555 bytes of a gzipped FileDescriptorProto 1031 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xcf, 0x8f, 0xd2, 0x40, 1032 0x14, 0x6e, 0xa1, 0x40, 0x19, 0x74, 0xa3, 0x13, 0x8d, 0x0d, 0x6a, 0x4b, 0x48, 0x34, 0xe8, 0xa1, 1033 0x93, 0xc0, 0xc9, 0x83, 0x07, 0x70, 0x31, 0xd9, 0xc3, 0xc6, 0x75, 0x96, 0xbd, 0x78, 0x21, 0xd3, 1034 0x76, 0x2c, 0x13, 0x68, 0xa7, 0x69, 0xa7, 0x24, 0x9c, 0xbd, 0x78, 0x31, 0xf1, 0x7f, 0xf0, 0x9f, 1035 0xe1, 0xc8, 0x71, 0xa3, 0x09, 0x51, 0xf8, 0x47, 0xcc, 0x4c, 0xf9, 0xa5, 0xd1, 0xdb, 0x9b, 0xf7, 1036 0xbe, 0xef, 0xcd, 0x7c, 0xdf, 0x7b, 0x03, 0xdc, 0xe9, 0x1c, 0x4d, 0xe7, 0x19, 0x4d, 0xe7, 0x34, 1037 0x45, 0x49, 0xca, 0x05, 0xf5, 0x05, 0x0d, 0x44, 0x86, 0x12, 0x91, 0x78, 0xa7, 0x09, 0x57, 0xc6, 1038 0x1c, 0x3e, 0xf4, 0xb9, 0x3f, 0x4d, 0x39, 0xf1, 0x27, 0xee, 0x49, 0xb1, 0xf9, 0x20, 0xe4, 0x21, 1039 0x57, 0x08, 0x24, 0xa3, 0x02, 0xdc, 0x7c, 0x12, 0x72, 0x1e, 0xce, 0x28, 0x22, 0x09, 0x43, 0x24, 1040 0x8e, 0xb9, 0x20, 0x82, 0xf1, 0x78, 0xd7, 0xaa, 0x09, 0x55, 0x9b, 0xc4, 0x43, 0x01, 0x11, 0x64, 1041 0x97, 0xb3, 0x72, 0xc1, 0x66, 0x68, 0x32, 0xf3, 0x91, 0x60, 0x11, 0xcd, 0x04, 0x89, 0x92, 0xa2, 1042 0xd2, 0xfe, 0xa4, 0x03, 0xf3, 0x92, 0x0a, 0x22, 0xc1, 0x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