github.com/matrixorigin/matrixone@v0.7.0/pkg/pb/api/api.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: api.proto 3 4 package api 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 12 _ "github.com/gogo/protobuf/gogoproto" 13 proto "github.com/gogo/protobuf/proto" 14 plan "github.com/matrixorigin/matrixone/pkg/pb/plan" 15 timestamp "github.com/matrixorigin/matrixone/pkg/pb/timestamp" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 28 29 type OpCode int32 30 31 const ( 32 OpCode_Nop OpCode = 0 33 OpCode_OpGetLogTail OpCode = 1000 34 OpCode_OpWrite OpCode = 1001 35 OpCode_OpPreCommit OpCode = 1002 36 ) 37 38 var OpCode_name = map[int32]string{ 39 0: "Nop", 40 1000: "OpGetLogTail", 41 1001: "OpWrite", 42 1002: "OpPreCommit", 43 } 44 45 var OpCode_value = map[string]int32{ 46 "Nop": 0, 47 "OpGetLogTail": 1000, 48 "OpWrite": 1001, 49 "OpPreCommit": 1002, 50 } 51 52 func (x OpCode) String() string { 53 return proto.EnumName(OpCode_name, int32(x)) 54 } 55 56 func (OpCode) EnumDescriptor() ([]byte, []int) { 57 return fileDescriptor_00212fb1f9d3bf1c, []int{0} 58 } 59 60 type Entry_EntryType int32 61 62 const ( 63 Entry_Insert Entry_EntryType = 0 64 Entry_Delete Entry_EntryType = 1 65 Entry_Update Entry_EntryType = 2 66 ) 67 68 var Entry_EntryType_name = map[int32]string{ 69 0: "Insert", 70 1: "Delete", 71 2: "Update", 72 } 73 74 var Entry_EntryType_value = map[string]int32{ 75 "Insert": 0, 76 "Delete": 1, 77 "Update": 2, 78 } 79 80 func (x Entry_EntryType) String() string { 81 return proto.EnumName(Entry_EntryType_name, int32(x)) 82 } 83 84 func (Entry_EntryType) EnumDescriptor() ([]byte, []int) { 85 return fileDescriptor_00212fb1f9d3bf1c, []int{6, 0} 86 } 87 88 type Vector struct { 89 Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` 90 Type *plan.Type `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` 91 Nullable bool `protobuf:"varint,3,opt,name=nullable,proto3" json:"nullable,omitempty"` 92 Nsp []byte `protobuf:"bytes,4,opt,name=nsp,proto3" json:"nsp,omitempty"` 93 IsConst bool `protobuf:"varint,5,opt,name=is_const,json=isConst,proto3" json:"is_const,omitempty"` 94 Len uint32 `protobuf:"varint,6,opt,name=len,proto3" json:"len,omitempty"` 95 Area []byte `protobuf:"bytes,7,opt,name=area,proto3" json:"area,omitempty"` 96 XXX_NoUnkeyedLiteral struct{} `json:"-"` 97 XXX_unrecognized []byte `json:"-"` 98 XXX_sizecache int32 `json:"-"` 99 } 100 101 func (m *Vector) Reset() { *m = Vector{} } 102 func (m *Vector) String() string { return proto.CompactTextString(m) } 103 func (*Vector) ProtoMessage() {} 104 func (*Vector) Descriptor() ([]byte, []int) { 105 return fileDescriptor_00212fb1f9d3bf1c, []int{0} 106 } 107 func (m *Vector) XXX_Unmarshal(b []byte) error { 108 return m.Unmarshal(b) 109 } 110 func (m *Vector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 111 if deterministic { 112 return xxx_messageInfo_Vector.Marshal(b, m, deterministic) 113 } else { 114 b = b[:cap(b)] 115 n, err := m.MarshalToSizedBuffer(b) 116 if err != nil { 117 return nil, err 118 } 119 return b[:n], nil 120 } 121 } 122 func (m *Vector) XXX_Merge(src proto.Message) { 123 xxx_messageInfo_Vector.Merge(m, src) 124 } 125 func (m *Vector) XXX_Size() int { 126 return m.ProtoSize() 127 } 128 func (m *Vector) XXX_DiscardUnknown() { 129 xxx_messageInfo_Vector.DiscardUnknown(m) 130 } 131 132 var xxx_messageInfo_Vector proto.InternalMessageInfo 133 134 func (m *Vector) GetData() []byte { 135 if m != nil { 136 return m.Data 137 } 138 return nil 139 } 140 141 func (m *Vector) GetType() *plan.Type { 142 if m != nil { 143 return m.Type 144 } 145 return nil 146 } 147 148 func (m *Vector) GetNullable() bool { 149 if m != nil { 150 return m.Nullable 151 } 152 return false 153 } 154 155 func (m *Vector) GetNsp() []byte { 156 if m != nil { 157 return m.Nsp 158 } 159 return nil 160 } 161 162 func (m *Vector) GetIsConst() bool { 163 if m != nil { 164 return m.IsConst 165 } 166 return false 167 } 168 169 func (m *Vector) GetLen() uint32 { 170 if m != nil { 171 return m.Len 172 } 173 return 0 174 } 175 176 func (m *Vector) GetArea() []byte { 177 if m != nil { 178 return m.Area 179 } 180 return nil 181 } 182 183 type Batch struct { 184 Attrs []string `protobuf:"bytes,1,rep,name=attrs,proto3" json:"attrs,omitempty"` 185 Vecs []*Vector `protobuf:"bytes,2,rep,name=vecs,proto3" json:"vecs,omitempty"` 186 XXX_NoUnkeyedLiteral struct{} `json:"-"` 187 XXX_unrecognized []byte `json:"-"` 188 XXX_sizecache int32 `json:"-"` 189 } 190 191 func (m *Batch) Reset() { *m = Batch{} } 192 func (m *Batch) String() string { return proto.CompactTextString(m) } 193 func (*Batch) ProtoMessage() {} 194 func (*Batch) Descriptor() ([]byte, []int) { 195 return fileDescriptor_00212fb1f9d3bf1c, []int{1} 196 } 197 func (m *Batch) XXX_Unmarshal(b []byte) error { 198 return m.Unmarshal(b) 199 } 200 func (m *Batch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 201 if deterministic { 202 return xxx_messageInfo_Batch.Marshal(b, m, deterministic) 203 } else { 204 b = b[:cap(b)] 205 n, err := m.MarshalToSizedBuffer(b) 206 if err != nil { 207 return nil, err 208 } 209 return b[:n], nil 210 } 211 } 212 func (m *Batch) XXX_Merge(src proto.Message) { 213 xxx_messageInfo_Batch.Merge(m, src) 214 } 215 func (m *Batch) XXX_Size() int { 216 return m.ProtoSize() 217 } 218 func (m *Batch) XXX_DiscardUnknown() { 219 xxx_messageInfo_Batch.DiscardUnknown(m) 220 } 221 222 var xxx_messageInfo_Batch proto.InternalMessageInfo 223 224 func (m *Batch) GetAttrs() []string { 225 if m != nil { 226 return m.Attrs 227 } 228 return nil 229 } 230 231 func (m *Batch) GetVecs() []*Vector { 232 if m != nil { 233 return m.Vecs 234 } 235 return nil 236 } 237 238 type TableID struct { 239 DbId uint64 `protobuf:"varint,1,opt,name=db_id,json=dbId,proto3" json:"db_id,omitempty"` 240 TbId uint64 `protobuf:"varint,2,opt,name=tb_id,json=tbId,proto3" json:"tb_id,omitempty"` 241 PartitionId uint64 `protobuf:"varint,3,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"` 242 XXX_NoUnkeyedLiteral struct{} `json:"-"` 243 XXX_unrecognized []byte `json:"-"` 244 XXX_sizecache int32 `json:"-"` 245 } 246 247 func (m *TableID) Reset() { *m = TableID{} } 248 func (m *TableID) String() string { return proto.CompactTextString(m) } 249 func (*TableID) ProtoMessage() {} 250 func (*TableID) Descriptor() ([]byte, []int) { 251 return fileDescriptor_00212fb1f9d3bf1c, []int{2} 252 } 253 func (m *TableID) XXX_Unmarshal(b []byte) error { 254 return m.Unmarshal(b) 255 } 256 func (m *TableID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 257 if deterministic { 258 return xxx_messageInfo_TableID.Marshal(b, m, deterministic) 259 } else { 260 b = b[:cap(b)] 261 n, err := m.MarshalToSizedBuffer(b) 262 if err != nil { 263 return nil, err 264 } 265 return b[:n], nil 266 } 267 } 268 func (m *TableID) XXX_Merge(src proto.Message) { 269 xxx_messageInfo_TableID.Merge(m, src) 270 } 271 func (m *TableID) XXX_Size() int { 272 return m.ProtoSize() 273 } 274 func (m *TableID) XXX_DiscardUnknown() { 275 xxx_messageInfo_TableID.DiscardUnknown(m) 276 } 277 278 var xxx_messageInfo_TableID proto.InternalMessageInfo 279 280 func (m *TableID) GetDbId() uint64 { 281 if m != nil { 282 return m.DbId 283 } 284 return 0 285 } 286 287 func (m *TableID) GetTbId() uint64 { 288 if m != nil { 289 return m.TbId 290 } 291 return 0 292 } 293 294 func (m *TableID) GetPartitionId() uint64 { 295 if m != nil { 296 return m.PartitionId 297 } 298 return 0 299 } 300 301 // CN pull the log tail of table from DN. 302 type SyncLogTailReq struct { 303 CnHave *timestamp.Timestamp `protobuf:"bytes,1,opt,name=cn_have,json=cnHave,proto3" json:"cn_have,omitempty"` 304 CnWant *timestamp.Timestamp `protobuf:"bytes,2,opt,name=cn_want,json=cnWant,proto3" json:"cn_want,omitempty"` 305 Table *TableID `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` 306 XXX_NoUnkeyedLiteral struct{} `json:"-"` 307 XXX_unrecognized []byte `json:"-"` 308 XXX_sizecache int32 `json:"-"` 309 } 310 311 func (m *SyncLogTailReq) Reset() { *m = SyncLogTailReq{} } 312 func (m *SyncLogTailReq) String() string { return proto.CompactTextString(m) } 313 func (*SyncLogTailReq) ProtoMessage() {} 314 func (*SyncLogTailReq) Descriptor() ([]byte, []int) { 315 return fileDescriptor_00212fb1f9d3bf1c, []int{3} 316 } 317 func (m *SyncLogTailReq) XXX_Unmarshal(b []byte) error { 318 return m.Unmarshal(b) 319 } 320 func (m *SyncLogTailReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 321 if deterministic { 322 return xxx_messageInfo_SyncLogTailReq.Marshal(b, m, deterministic) 323 } else { 324 b = b[:cap(b)] 325 n, err := m.MarshalToSizedBuffer(b) 326 if err != nil { 327 return nil, err 328 } 329 return b[:n], nil 330 } 331 } 332 func (m *SyncLogTailReq) XXX_Merge(src proto.Message) { 333 xxx_messageInfo_SyncLogTailReq.Merge(m, src) 334 } 335 func (m *SyncLogTailReq) XXX_Size() int { 336 return m.ProtoSize() 337 } 338 func (m *SyncLogTailReq) XXX_DiscardUnknown() { 339 xxx_messageInfo_SyncLogTailReq.DiscardUnknown(m) 340 } 341 342 var xxx_messageInfo_SyncLogTailReq proto.InternalMessageInfo 343 344 func (m *SyncLogTailReq) GetCnHave() *timestamp.Timestamp { 345 if m != nil { 346 return m.CnHave 347 } 348 return nil 349 } 350 351 func (m *SyncLogTailReq) GetCnWant() *timestamp.Timestamp { 352 if m != nil { 353 return m.CnWant 354 } 355 return nil 356 } 357 358 func (m *SyncLogTailReq) GetTable() *TableID { 359 if m != nil { 360 return m.Table 361 } 362 return nil 363 } 364 365 type SyncLogTailResp struct { 366 // ckp_location is a checkpoint location list. 367 // How to get checkpoint data on S3 by the ckp_location , 368 // pls ref to disttae/logtail.go/consumeLogTail function. 369 CkpLocation string `protobuf:"bytes,1,opt,name=ckp_location,json=ckpLocation,proto3" json:"ckp_location,omitempty"` 370 // commands is log tail for a system or user table, 371 // pls ref to tae/logtail/handle.go/HandleSyncLogTailReq function. 372 Commands []*Entry `protobuf:"bytes,2,rep,name=commands,proto3" json:"commands,omitempty"` 373 XXX_NoUnkeyedLiteral struct{} `json:"-"` 374 XXX_unrecognized []byte `json:"-"` 375 XXX_sizecache int32 `json:"-"` 376 } 377 378 func (m *SyncLogTailResp) Reset() { *m = SyncLogTailResp{} } 379 func (m *SyncLogTailResp) String() string { return proto.CompactTextString(m) } 380 func (*SyncLogTailResp) ProtoMessage() {} 381 func (*SyncLogTailResp) Descriptor() ([]byte, []int) { 382 return fileDescriptor_00212fb1f9d3bf1c, []int{4} 383 } 384 func (m *SyncLogTailResp) XXX_Unmarshal(b []byte) error { 385 return m.Unmarshal(b) 386 } 387 func (m *SyncLogTailResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 388 if deterministic { 389 return xxx_messageInfo_SyncLogTailResp.Marshal(b, m, deterministic) 390 } else { 391 b = b[:cap(b)] 392 n, err := m.MarshalToSizedBuffer(b) 393 if err != nil { 394 return nil, err 395 } 396 return b[:n], nil 397 } 398 } 399 func (m *SyncLogTailResp) XXX_Merge(src proto.Message) { 400 xxx_messageInfo_SyncLogTailResp.Merge(m, src) 401 } 402 func (m *SyncLogTailResp) XXX_Size() int { 403 return m.ProtoSize() 404 } 405 func (m *SyncLogTailResp) XXX_DiscardUnknown() { 406 xxx_messageInfo_SyncLogTailResp.DiscardUnknown(m) 407 } 408 409 var xxx_messageInfo_SyncLogTailResp proto.InternalMessageInfo 410 411 func (m *SyncLogTailResp) GetCkpLocation() string { 412 if m != nil { 413 return m.CkpLocation 414 } 415 return "" 416 } 417 418 func (m *SyncLogTailResp) GetCommands() []*Entry { 419 if m != nil { 420 return m.Commands 421 } 422 return nil 423 } 424 425 // How to parse and handle PrecommiWriteCmd , pls ref to tae/rpc/handle.go/HandlePreCommit function 426 type PrecommitWriteCmd struct { 427 UserId uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` 428 RoleId uint32 `protobuf:"varint,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` 429 AccountId uint32 `protobuf:"varint,3,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` 430 EntryList []*Entry `protobuf:"bytes,4,rep,name=entry_list,json=entryList,proto3" json:"entry_list,omitempty"` 431 XXX_NoUnkeyedLiteral struct{} `json:"-"` 432 XXX_unrecognized []byte `json:"-"` 433 XXX_sizecache int32 `json:"-"` 434 } 435 436 func (m *PrecommitWriteCmd) Reset() { *m = PrecommitWriteCmd{} } 437 func (m *PrecommitWriteCmd) String() string { return proto.CompactTextString(m) } 438 func (*PrecommitWriteCmd) ProtoMessage() {} 439 func (*PrecommitWriteCmd) Descriptor() ([]byte, []int) { 440 return fileDescriptor_00212fb1f9d3bf1c, []int{5} 441 } 442 func (m *PrecommitWriteCmd) XXX_Unmarshal(b []byte) error { 443 return m.Unmarshal(b) 444 } 445 func (m *PrecommitWriteCmd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 446 if deterministic { 447 return xxx_messageInfo_PrecommitWriteCmd.Marshal(b, m, deterministic) 448 } else { 449 b = b[:cap(b)] 450 n, err := m.MarshalToSizedBuffer(b) 451 if err != nil { 452 return nil, err 453 } 454 return b[:n], nil 455 } 456 } 457 func (m *PrecommitWriteCmd) XXX_Merge(src proto.Message) { 458 xxx_messageInfo_PrecommitWriteCmd.Merge(m, src) 459 } 460 func (m *PrecommitWriteCmd) XXX_Size() int { 461 return m.ProtoSize() 462 } 463 func (m *PrecommitWriteCmd) XXX_DiscardUnknown() { 464 xxx_messageInfo_PrecommitWriteCmd.DiscardUnknown(m) 465 } 466 467 var xxx_messageInfo_PrecommitWriteCmd proto.InternalMessageInfo 468 469 func (m *PrecommitWriteCmd) GetUserId() uint32 { 470 if m != nil { 471 return m.UserId 472 } 473 return 0 474 } 475 476 func (m *PrecommitWriteCmd) GetRoleId() uint32 { 477 if m != nil { 478 return m.RoleId 479 } 480 return 0 481 } 482 483 func (m *PrecommitWriteCmd) GetAccountId() uint32 { 484 if m != nil { 485 return m.AccountId 486 } 487 return 0 488 } 489 490 func (m *PrecommitWriteCmd) GetEntryList() []*Entry { 491 if m != nil { 492 return m.EntryList 493 } 494 return nil 495 } 496 497 type Entry struct { 498 EntryType Entry_EntryType `protobuf:"varint,1,opt,name=entry_type,json=entryType,proto3,enum=api.Entry_EntryType" json:"entry_type,omitempty"` 499 TableId uint64 `protobuf:"varint,2,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` 500 DatabaseId uint64 `protobuf:"varint,3,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` 501 TableName string `protobuf:"bytes,4,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` 502 DatabaseName string `protobuf:"bytes,5,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"` 503 FileName string `protobuf:"bytes,6,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` 504 Bat *Batch `protobuf:"bytes,8,opt,name=bat,proto3" json:"bat,omitempty"` 505 XXX_NoUnkeyedLiteral struct{} `json:"-"` 506 XXX_unrecognized []byte `json:"-"` 507 XXX_sizecache int32 `json:"-"` 508 } 509 510 func (m *Entry) Reset() { *m = Entry{} } 511 func (m *Entry) String() string { return proto.CompactTextString(m) } 512 func (*Entry) ProtoMessage() {} 513 func (*Entry) Descriptor() ([]byte, []int) { 514 return fileDescriptor_00212fb1f9d3bf1c, []int{6} 515 } 516 func (m *Entry) XXX_Unmarshal(b []byte) error { 517 return m.Unmarshal(b) 518 } 519 func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 520 if deterministic { 521 return xxx_messageInfo_Entry.Marshal(b, m, deterministic) 522 } else { 523 b = b[:cap(b)] 524 n, err := m.MarshalToSizedBuffer(b) 525 if err != nil { 526 return nil, err 527 } 528 return b[:n], nil 529 } 530 } 531 func (m *Entry) XXX_Merge(src proto.Message) { 532 xxx_messageInfo_Entry.Merge(m, src) 533 } 534 func (m *Entry) XXX_Size() int { 535 return m.ProtoSize() 536 } 537 func (m *Entry) XXX_DiscardUnknown() { 538 xxx_messageInfo_Entry.DiscardUnknown(m) 539 } 540 541 var xxx_messageInfo_Entry proto.InternalMessageInfo 542 543 func (m *Entry) GetEntryType() Entry_EntryType { 544 if m != nil { 545 return m.EntryType 546 } 547 return Entry_Insert 548 } 549 550 func (m *Entry) GetTableId() uint64 { 551 if m != nil { 552 return m.TableId 553 } 554 return 0 555 } 556 557 func (m *Entry) GetDatabaseId() uint64 { 558 if m != nil { 559 return m.DatabaseId 560 } 561 return 0 562 } 563 564 func (m *Entry) GetTableName() string { 565 if m != nil { 566 return m.TableName 567 } 568 return "" 569 } 570 571 func (m *Entry) GetDatabaseName() string { 572 if m != nil { 573 return m.DatabaseName 574 } 575 return "" 576 } 577 578 func (m *Entry) GetFileName() string { 579 if m != nil { 580 return m.FileName 581 } 582 return "" 583 } 584 585 func (m *Entry) GetBat() *Batch { 586 if m != nil { 587 return m.Bat 588 } 589 return nil 590 } 591 592 // CatalogCkp contains information about database and tables in the system,and 593 // MetadataCkp contains information about blocks. 594 type Checkpoint struct { 595 //min_ts DN is the lower bounds of the checkpoint 596 // CN maybe don't care about it. 597 MinTs *timestamp.Timestamp `protobuf:"bytes,1,opt,name=min_ts,json=minTs,proto3" json:"min_ts,omitempty"` 598 //max_ts is the upper bounds of the checkpoint. 599 // CN maybe don't care about it. 600 MaxTs *timestamp.Timestamp `protobuf:"bytes,2,opt,name=max_ts,json=maxTs,proto3" json:"max_ts,omitempty"` 601 Bat *Batch `protobuf:"bytes,3,opt,name=bat,proto3" json:"bat,omitempty"` 602 XXX_NoUnkeyedLiteral struct{} `json:"-"` 603 XXX_unrecognized []byte `json:"-"` 604 XXX_sizecache int32 `json:"-"` 605 } 606 607 func (m *Checkpoint) Reset() { *m = Checkpoint{} } 608 func (m *Checkpoint) String() string { return proto.CompactTextString(m) } 609 func (*Checkpoint) ProtoMessage() {} 610 func (*Checkpoint) Descriptor() ([]byte, []int) { 611 return fileDescriptor_00212fb1f9d3bf1c, []int{7} 612 } 613 func (m *Checkpoint) XXX_Unmarshal(b []byte) error { 614 return m.Unmarshal(b) 615 } 616 func (m *Checkpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 617 if deterministic { 618 return xxx_messageInfo_Checkpoint.Marshal(b, m, deterministic) 619 } else { 620 b = b[:cap(b)] 621 n, err := m.MarshalToSizedBuffer(b) 622 if err != nil { 623 return nil, err 624 } 625 return b[:n], nil 626 } 627 } 628 func (m *Checkpoint) XXX_Merge(src proto.Message) { 629 xxx_messageInfo_Checkpoint.Merge(m, src) 630 } 631 func (m *Checkpoint) XXX_Size() int { 632 return m.ProtoSize() 633 } 634 func (m *Checkpoint) XXX_DiscardUnknown() { 635 xxx_messageInfo_Checkpoint.DiscardUnknown(m) 636 } 637 638 var xxx_messageInfo_Checkpoint proto.InternalMessageInfo 639 640 func (m *Checkpoint) GetMinTs() *timestamp.Timestamp { 641 if m != nil { 642 return m.MinTs 643 } 644 return nil 645 } 646 647 func (m *Checkpoint) GetMaxTs() *timestamp.Timestamp { 648 if m != nil { 649 return m.MaxTs 650 } 651 return nil 652 } 653 654 func (m *Checkpoint) GetBat() *Batch { 655 if m != nil { 656 return m.Bat 657 } 658 return nil 659 } 660 661 // catalog checkpoint: 662 // one Batch represents a table, such as : mo_databases, mo_tables, mo_columns,... etc. 663 // knowing more about system tables, pls ref to pkg/vm/engine/tae/catalog/model.go 664 type CatalogCkp struct { 665 MinTs *timestamp.Timestamp `protobuf:"bytes,1,opt,name=min_ts,json=minTs,proto3" json:"min_ts,omitempty"` 666 MaxTs *timestamp.Timestamp `protobuf:"bytes,2,opt,name=max_ts,json=maxTs,proto3" json:"max_ts,omitempty"` 667 Bat *Batch `protobuf:"bytes,3,opt,name=bat,proto3" json:"bat,omitempty"` 668 XXX_NoUnkeyedLiteral struct{} `json:"-"` 669 XXX_unrecognized []byte `json:"-"` 670 XXX_sizecache int32 `json:"-"` 671 } 672 673 func (m *CatalogCkp) Reset() { *m = CatalogCkp{} } 674 func (m *CatalogCkp) String() string { return proto.CompactTextString(m) } 675 func (*CatalogCkp) ProtoMessage() {} 676 func (*CatalogCkp) Descriptor() ([]byte, []int) { 677 return fileDescriptor_00212fb1f9d3bf1c, []int{8} 678 } 679 func (m *CatalogCkp) XXX_Unmarshal(b []byte) error { 680 return m.Unmarshal(b) 681 } 682 func (m *CatalogCkp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 683 if deterministic { 684 return xxx_messageInfo_CatalogCkp.Marshal(b, m, deterministic) 685 } else { 686 b = b[:cap(b)] 687 n, err := m.MarshalToSizedBuffer(b) 688 if err != nil { 689 return nil, err 690 } 691 return b[:n], nil 692 } 693 } 694 func (m *CatalogCkp) XXX_Merge(src proto.Message) { 695 xxx_messageInfo_CatalogCkp.Merge(m, src) 696 } 697 func (m *CatalogCkp) XXX_Size() int { 698 return m.ProtoSize() 699 } 700 func (m *CatalogCkp) XXX_DiscardUnknown() { 701 xxx_messageInfo_CatalogCkp.DiscardUnknown(m) 702 } 703 704 var xxx_messageInfo_CatalogCkp proto.InternalMessageInfo 705 706 func (m *CatalogCkp) GetMinTs() *timestamp.Timestamp { 707 if m != nil { 708 return m.MinTs 709 } 710 return nil 711 } 712 713 func (m *CatalogCkp) GetMaxTs() *timestamp.Timestamp { 714 if m != nil { 715 return m.MaxTs 716 } 717 return nil 718 } 719 720 func (m *CatalogCkp) GetBat() *Batch { 721 if m != nil { 722 return m.Bat 723 } 724 return nil 725 } 726 727 // metadata checkpoint: 728 // Batch is a batch of block metadata for a table, 729 // one row of Batch represents a block meta data. 730 // TODO:: 731 // knowing more about block meta data , pls ref to ... 732 type MetadataCkp struct { 733 MinTs *timestamp.Timestamp `protobuf:"bytes,1,opt,name=min_ts,json=minTs,proto3" json:"min_ts,omitempty"` 734 MaxTs *timestamp.Timestamp `protobuf:"bytes,2,opt,name=max_ts,json=maxTs,proto3" json:"max_ts,omitempty"` 735 //block meta data for a table; 736 Bat *Batch `protobuf:"bytes,3,opt,name=bat,proto3" json:"bat,omitempty"` 737 XXX_NoUnkeyedLiteral struct{} `json:"-"` 738 XXX_unrecognized []byte `json:"-"` 739 XXX_sizecache int32 `json:"-"` 740 } 741 742 func (m *MetadataCkp) Reset() { *m = MetadataCkp{} } 743 func (m *MetadataCkp) String() string { return proto.CompactTextString(m) } 744 func (*MetadataCkp) ProtoMessage() {} 745 func (*MetadataCkp) Descriptor() ([]byte, []int) { 746 return fileDescriptor_00212fb1f9d3bf1c, []int{9} 747 } 748 func (m *MetadataCkp) XXX_Unmarshal(b []byte) error { 749 return m.Unmarshal(b) 750 } 751 func (m *MetadataCkp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 752 if deterministic { 753 return xxx_messageInfo_MetadataCkp.Marshal(b, m, deterministic) 754 } else { 755 b = b[:cap(b)] 756 n, err := m.MarshalToSizedBuffer(b) 757 if err != nil { 758 return nil, err 759 } 760 return b[:n], nil 761 } 762 } 763 func (m *MetadataCkp) XXX_Merge(src proto.Message) { 764 xxx_messageInfo_MetadataCkp.Merge(m, src) 765 } 766 func (m *MetadataCkp) XXX_Size() int { 767 return m.ProtoSize() 768 } 769 func (m *MetadataCkp) XXX_DiscardUnknown() { 770 xxx_messageInfo_MetadataCkp.DiscardUnknown(m) 771 } 772 773 var xxx_messageInfo_MetadataCkp proto.InternalMessageInfo 774 775 func (m *MetadataCkp) GetMinTs() *timestamp.Timestamp { 776 if m != nil { 777 return m.MinTs 778 } 779 return nil 780 } 781 782 func (m *MetadataCkp) GetMaxTs() *timestamp.Timestamp { 783 if m != nil { 784 return m.MaxTs 785 } 786 return nil 787 } 788 789 func (m *MetadataCkp) GetBat() *Batch { 790 if m != nil { 791 return m.Bat 792 } 793 return nil 794 } 795 796 func init() { 797 proto.RegisterEnum("api.OpCode", OpCode_name, OpCode_value) 798 proto.RegisterEnum("api.Entry_EntryType", Entry_EntryType_name, Entry_EntryType_value) 799 proto.RegisterType((*Vector)(nil), "api.Vector") 800 proto.RegisterType((*Batch)(nil), "api.Batch") 801 proto.RegisterType((*TableID)(nil), "api.TableID") 802 proto.RegisterType((*SyncLogTailReq)(nil), "api.SyncLogTailReq") 803 proto.RegisterType((*SyncLogTailResp)(nil), "api.SyncLogTailResp") 804 proto.RegisterType((*PrecommitWriteCmd)(nil), "api.PrecommitWriteCmd") 805 proto.RegisterType((*Entry)(nil), "api.Entry") 806 proto.RegisterType((*Checkpoint)(nil), "api.Checkpoint") 807 proto.RegisterType((*CatalogCkp)(nil), "api.CatalogCkp") 808 proto.RegisterType((*MetadataCkp)(nil), "api.MetadataCkp") 809 } 810 811 func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } 812 813 var fileDescriptor_00212fb1f9d3bf1c = []byte{ 814 // 822 bytes of a gzipped FileDescriptorProto 815 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xcf, 0x8e, 0xe3, 0xc4, 816 0x13, 0x1e, 0xc7, 0x89, 0x1d, 0x97, 0x93, 0x5d, 0x6f, 0xff, 0x46, 0xfa, 0x99, 0x01, 0xb2, 0xc1, 817 0x48, 0x28, 0xfc, 0xd9, 0x44, 0xca, 0xde, 0xf7, 0xb0, 0x19, 0x04, 0x91, 0x86, 0x9d, 0x55, 0x13, 818 0x76, 0x25, 0x84, 0x14, 0xb5, 0xed, 0xde, 0x4c, 0x2b, 0x76, 0x77, 0x63, 0x77, 0x86, 0x99, 0x3b, 819 0x9c, 0x91, 0x78, 0x02, 0x8e, 0x48, 0xbc, 0x08, 0x47, 0x1e, 0x01, 0x0d, 0x17, 0xe0, 0x29, 0x50, 820 0x97, 0xe3, 0x0c, 0x08, 0xd8, 0xeb, 0x5e, 0xac, 0xaa, 0xaf, 0xbe, 0x6a, 0x7f, 0x55, 0x5d, 0xa5, 821 0x86, 0x80, 0x69, 0x31, 0xd5, 0x95, 0x32, 0x8a, 0xb8, 0x4c, 0x8b, 0x93, 0x07, 0x1b, 0x61, 0x2e, 822 0x76, 0xe9, 0x34, 0x53, 0xe5, 0x6c, 0xa3, 0x36, 0x6a, 0x86, 0xb1, 0x74, 0xf7, 0x02, 0x3d, 0x74, 823 0xd0, 0x6a, 0x72, 0x4e, 0xee, 0x1a, 0x51, 0xf2, 0xda, 0xb0, 0x52, 0xef, 0x01, 0xd0, 0x05, 0x93, 824 0x8d, 0x9d, 0xfc, 0xe8, 0x80, 0xf7, 0x8c, 0x67, 0x46, 0x55, 0x84, 0x40, 0x37, 0x67, 0x86, 0xc5, 825 0xce, 0xd8, 0x99, 0x0c, 0x28, 0xda, 0x64, 0x04, 0x5d, 0x73, 0xad, 0x79, 0xdc, 0x19, 0x3b, 0x93, 826 0x70, 0x0e, 0x53, 0xcc, 0x5c, 0x5d, 0x6b, 0x4e, 0x11, 0x27, 0x27, 0xd0, 0x97, 0xbb, 0xa2, 0x60, 827 0x69, 0xc1, 0x63, 0x77, 0xec, 0x4c, 0xfa, 0xf4, 0xe0, 0x93, 0x08, 0x5c, 0x59, 0xeb, 0xb8, 0x8b, 828 0xc7, 0x59, 0x93, 0xbc, 0x06, 0x7d, 0x51, 0xaf, 0x33, 0x25, 0x6b, 0x13, 0xf7, 0x90, 0xed, 0x8b, 829 0x7a, 0x61, 0x5d, 0x4b, 0x2e, 0xb8, 0x8c, 0xbd, 0xb1, 0x33, 0x19, 0x52, 0x6b, 0x5a, 0x39, 0xac, 830 0xe2, 0x2c, 0xf6, 0x1b, 0x39, 0xd6, 0x4e, 0x1e, 0x41, 0xef, 0x31, 0x33, 0xd9, 0x05, 0x39, 0x86, 831 0x1e, 0x33, 0xa6, 0xaa, 0x63, 0x67, 0xec, 0x4e, 0x02, 0xda, 0x38, 0xe4, 0x3e, 0x74, 0x2f, 0x79, 832 0x56, 0xc7, 0x9d, 0xb1, 0x3b, 0x09, 0xe7, 0xe1, 0xd4, 0xf6, 0xad, 0x29, 0x8e, 0x62, 0x20, 0x79, 833 0x06, 0xfe, 0xca, 0x6a, 0x5b, 0x9e, 0x92, 0xff, 0x41, 0x2f, 0x4f, 0xd7, 0x22, 0xc7, 0x72, 0xbb, 834 0xb4, 0x9b, 0xa7, 0xcb, 0xdc, 0x82, 0x06, 0xc1, 0x4e, 0x03, 0x1a, 0x0b, 0xbe, 0x05, 0x03, 0xcd, 835 0x2a, 0x23, 0x8c, 0x50, 0xd2, 0xc6, 0x5c, 0x8c, 0x85, 0x07, 0x6c, 0x99, 0x27, 0xdf, 0x39, 0x70, 836 0xe7, 0xd3, 0x6b, 0x99, 0x9d, 0xa9, 0xcd, 0x8a, 0x89, 0x82, 0xf2, 0x2f, 0xc9, 0x03, 0xf0, 0x33, 837 0xb9, 0xbe, 0x60, 0x97, 0x1c, 0xff, 0x10, 0xce, 0x8f, 0xa7, 0xb7, 0xf7, 0xb0, 0x6a, 0x2d, 0xea, 838 0x65, 0xf2, 0x63, 0x76, 0xc9, 0xf7, 0xf4, 0xaf, 0x98, 0x34, 0xfb, 0x5e, 0xff, 0x27, 0xfd, 0x39, 839 0x93, 0x86, 0x24, 0xd0, 0x33, 0x87, 0xa6, 0x87, 0xf3, 0x01, 0x96, 0xba, 0x2f, 0x8d, 0x36, 0xa1, 840 0xe4, 0x0b, 0xb8, 0xfb, 0x37, 0x4d, 0xb5, 0xb6, 0xa5, 0x64, 0x5b, 0xbd, 0x2e, 0x54, 0xc6, 0xac, 841 0x72, 0x54, 0x16, 0xd0, 0x30, 0xdb, 0xea, 0xb3, 0x3d, 0x44, 0xde, 0x81, 0x7e, 0xa6, 0xca, 0x92, 842 0xc9, 0xbc, 0xed, 0x23, 0xe0, 0xe1, 0x1f, 0x4a, 0x53, 0x5d, 0xd3, 0x43, 0x2c, 0xf9, 0xd6, 0x81, 843 0x7b, 0x4f, 0x2b, 0x6e, 0x7d, 0x61, 0x9e, 0x57, 0xc2, 0xf0, 0x45, 0x99, 0x93, 0xff, 0x83, 0xbf, 844 0xab, 0x79, 0xd5, 0xf6, 0x75, 0x48, 0x3d, 0xeb, 0x2e, 0x31, 0x50, 0xa9, 0x82, 0xb7, 0xbd, 0x1d, 845 0x52, 0xcf, 0xba, 0xcb, 0x9c, 0xbc, 0x09, 0xc0, 0xb2, 0x4c, 0xed, 0xa4, 0x69, 0x7b, 0x3b, 0xa4, 846 0xc1, 0x1e, 0x59, 0xe6, 0xe4, 0x5d, 0x00, 0x6e, 0xff, 0xbc, 0x2e, 0x44, 0x6d, 0xe2, 0xee, 0x3f, 847 0x04, 0x05, 0x18, 0x3d, 0x13, 0xb5, 0x49, 0x7e, 0xe8, 0x40, 0x0f, 0x41, 0xf2, 0xb0, 0x4d, 0xc2, 848 0xd9, 0xb5, 0x42, 0xee, 0xcc, 0x8f, 0x6f, 0x93, 0x9a, 0x2f, 0x4e, 0x71, 0x93, 0x6e, 0x4d, 0x3b, 849 0x9c, 0xd8, 0xb7, 0xdb, 0xeb, 0xf7, 0xd1, 0x5f, 0xe6, 0xe4, 0x3e, 0x84, 0x76, 0x1b, 0x52, 0x56, 850 0xf3, 0xdb, 0x01, 0x80, 0x16, 0x6a, 0x8a, 0x68, 0x72, 0x25, 0x2b, 0x39, 0x4e, 0x7c, 0x40, 0x03, 851 0x44, 0x9e, 0xb0, 0x92, 0x93, 0xb7, 0x61, 0x78, 0xc8, 0x47, 0x46, 0x0f, 0x19, 0x83, 0x16, 0x44, 852 0xd2, 0xeb, 0x10, 0xbc, 0x10, 0xed, 0x11, 0x1e, 0x12, 0xfa, 0x16, 0xc0, 0xe0, 0x1b, 0xe0, 0xa6, 853 0xcc, 0xc4, 0xfd, 0xfd, 0x1a, 0xda, 0x52, 0x70, 0x11, 0xa8, 0x85, 0x93, 0x19, 0x04, 0x87, 0x92, 854 0x08, 0x80, 0xb7, 0x94, 0x35, 0xaf, 0x4c, 0x74, 0x64, 0xed, 0x53, 0x5e, 0x70, 0xc3, 0x23, 0xc7, 855 0xda, 0x9f, 0xe9, 0x9c, 0x19, 0x1e, 0x75, 0x92, 0xaf, 0x1d, 0x80, 0xc5, 0x05, 0xcf, 0xb6, 0x5a, 856 0x09, 0x69, 0xc8, 0xfb, 0xe0, 0x95, 0x42, 0xae, 0x4d, 0xfd, 0xd2, 0x51, 0xed, 0x95, 0x42, 0xae, 857 0x6a, 0x24, 0xb3, 0x2b, 0x4b, 0xee, 0xbc, 0x94, 0xcc, 0xae, 0x56, 0x75, 0xab, 0xdb, 0xfd, 0x77, 858 0xdd, 0x28, 0x83, 0x19, 0x56, 0xa8, 0xcd, 0x62, 0xab, 0x5f, 0x99, 0x8c, 0x6f, 0x1c, 0x08, 0x3f, 859 0xe1, 0x86, 0xd9, 0xeb, 0x78, 0x85, 0x3a, 0xde, 0x3b, 0x05, 0xef, 0x5c, 0x2f, 0x54, 0xce, 0x89, 860 0x0f, 0xee, 0x13, 0xa5, 0xa3, 0x23, 0x72, 0x0f, 0x06, 0xe7, 0xfa, 0x23, 0x6e, 0xf6, 0x4b, 0x1c, 861 0xfd, 0xe6, 0x93, 0x01, 0xf8, 0xe7, 0x1a, 0x17, 0x2e, 0xfa, 0xdd, 0x27, 0x11, 0x84, 0xe7, 0xfa, 862 0x69, 0xc5, 0x17, 0xb8, 0x87, 0xd1, 0x1f, 0xfe, 0xe3, 0x47, 0x3f, 0xdd, 0x8c, 0x9c, 0x9f, 0x6f, 863 0x46, 0xce, 0x2f, 0x37, 0xa3, 0xa3, 0xef, 0x7f, 0x1d, 0x39, 0x9f, 0x7f, 0xf0, 0x97, 0xf7, 0xa2, 864 0x64, 0xa6, 0x12, 0x57, 0xaa, 0x12, 0x1b, 0x21, 0x5b, 0x47, 0xf2, 0x99, 0xde, 0x6e, 0x66, 0x3a, 865 0x9d, 0x31, 0x2d, 0x52, 0x0f, 0x1f, 0x86, 0x87, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd4, 0xd9, 866 0x8e, 0x5a, 0x76, 0x06, 0x00, 0x00, 867 } 868 869 func (m *Vector) Marshal() (dAtA []byte, err error) { 870 size := m.ProtoSize() 871 dAtA = make([]byte, size) 872 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 873 if err != nil { 874 return nil, err 875 } 876 return dAtA[:n], nil 877 } 878 879 func (m *Vector) MarshalTo(dAtA []byte) (int, error) { 880 size := m.ProtoSize() 881 return m.MarshalToSizedBuffer(dAtA[:size]) 882 } 883 884 func (m *Vector) MarshalToSizedBuffer(dAtA []byte) (int, error) { 885 i := len(dAtA) 886 _ = i 887 var l int 888 _ = l 889 if m.XXX_unrecognized != nil { 890 i -= len(m.XXX_unrecognized) 891 copy(dAtA[i:], m.XXX_unrecognized) 892 } 893 if len(m.Area) > 0 { 894 i -= len(m.Area) 895 copy(dAtA[i:], m.Area) 896 i = encodeVarintApi(dAtA, i, uint64(len(m.Area))) 897 i-- 898 dAtA[i] = 0x3a 899 } 900 if m.Len != 0 { 901 i = encodeVarintApi(dAtA, i, uint64(m.Len)) 902 i-- 903 dAtA[i] = 0x30 904 } 905 if m.IsConst { 906 i-- 907 if m.IsConst { 908 dAtA[i] = 1 909 } else { 910 dAtA[i] = 0 911 } 912 i-- 913 dAtA[i] = 0x28 914 } 915 if len(m.Nsp) > 0 { 916 i -= len(m.Nsp) 917 copy(dAtA[i:], m.Nsp) 918 i = encodeVarintApi(dAtA, i, uint64(len(m.Nsp))) 919 i-- 920 dAtA[i] = 0x22 921 } 922 if m.Nullable { 923 i-- 924 if m.Nullable { 925 dAtA[i] = 1 926 } else { 927 dAtA[i] = 0 928 } 929 i-- 930 dAtA[i] = 0x18 931 } 932 if m.Type != nil { 933 { 934 size, err := m.Type.MarshalToSizedBuffer(dAtA[:i]) 935 if err != nil { 936 return 0, err 937 } 938 i -= size 939 i = encodeVarintApi(dAtA, i, uint64(size)) 940 } 941 i-- 942 dAtA[i] = 0x12 943 } 944 if len(m.Data) > 0 { 945 i -= len(m.Data) 946 copy(dAtA[i:], m.Data) 947 i = encodeVarintApi(dAtA, i, uint64(len(m.Data))) 948 i-- 949 dAtA[i] = 0xa 950 } 951 return len(dAtA) - i, nil 952 } 953 954 func (m *Batch) Marshal() (dAtA []byte, err error) { 955 size := m.ProtoSize() 956 dAtA = make([]byte, size) 957 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 958 if err != nil { 959 return nil, err 960 } 961 return dAtA[:n], nil 962 } 963 964 func (m *Batch) MarshalTo(dAtA []byte) (int, error) { 965 size := m.ProtoSize() 966 return m.MarshalToSizedBuffer(dAtA[:size]) 967 } 968 969 func (m *Batch) MarshalToSizedBuffer(dAtA []byte) (int, error) { 970 i := len(dAtA) 971 _ = i 972 var l int 973 _ = l 974 if m.XXX_unrecognized != nil { 975 i -= len(m.XXX_unrecognized) 976 copy(dAtA[i:], m.XXX_unrecognized) 977 } 978 if len(m.Vecs) > 0 { 979 for iNdEx := len(m.Vecs) - 1; iNdEx >= 0; iNdEx-- { 980 { 981 size, err := m.Vecs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 982 if err != nil { 983 return 0, err 984 } 985 i -= size 986 i = encodeVarintApi(dAtA, i, uint64(size)) 987 } 988 i-- 989 dAtA[i] = 0x12 990 } 991 } 992 if len(m.Attrs) > 0 { 993 for iNdEx := len(m.Attrs) - 1; iNdEx >= 0; iNdEx-- { 994 i -= len(m.Attrs[iNdEx]) 995 copy(dAtA[i:], m.Attrs[iNdEx]) 996 i = encodeVarintApi(dAtA, i, uint64(len(m.Attrs[iNdEx]))) 997 i-- 998 dAtA[i] = 0xa 999 } 1000 } 1001 return len(dAtA) - i, nil 1002 } 1003 1004 func (m *TableID) Marshal() (dAtA []byte, err error) { 1005 size := m.ProtoSize() 1006 dAtA = make([]byte, size) 1007 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1008 if err != nil { 1009 return nil, err 1010 } 1011 return dAtA[:n], nil 1012 } 1013 1014 func (m *TableID) MarshalTo(dAtA []byte) (int, error) { 1015 size := m.ProtoSize() 1016 return m.MarshalToSizedBuffer(dAtA[:size]) 1017 } 1018 1019 func (m *TableID) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1020 i := len(dAtA) 1021 _ = i 1022 var l int 1023 _ = l 1024 if m.XXX_unrecognized != nil { 1025 i -= len(m.XXX_unrecognized) 1026 copy(dAtA[i:], m.XXX_unrecognized) 1027 } 1028 if m.PartitionId != 0 { 1029 i = encodeVarintApi(dAtA, i, uint64(m.PartitionId)) 1030 i-- 1031 dAtA[i] = 0x18 1032 } 1033 if m.TbId != 0 { 1034 i = encodeVarintApi(dAtA, i, uint64(m.TbId)) 1035 i-- 1036 dAtA[i] = 0x10 1037 } 1038 if m.DbId != 0 { 1039 i = encodeVarintApi(dAtA, i, uint64(m.DbId)) 1040 i-- 1041 dAtA[i] = 0x8 1042 } 1043 return len(dAtA) - i, nil 1044 } 1045 1046 func (m *SyncLogTailReq) Marshal() (dAtA []byte, err error) { 1047 size := m.ProtoSize() 1048 dAtA = make([]byte, size) 1049 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1050 if err != nil { 1051 return nil, err 1052 } 1053 return dAtA[:n], nil 1054 } 1055 1056 func (m *SyncLogTailReq) MarshalTo(dAtA []byte) (int, error) { 1057 size := m.ProtoSize() 1058 return m.MarshalToSizedBuffer(dAtA[:size]) 1059 } 1060 1061 func (m *SyncLogTailReq) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1062 i := len(dAtA) 1063 _ = i 1064 var l int 1065 _ = l 1066 if m.XXX_unrecognized != nil { 1067 i -= len(m.XXX_unrecognized) 1068 copy(dAtA[i:], m.XXX_unrecognized) 1069 } 1070 if m.Table != nil { 1071 { 1072 size, err := m.Table.MarshalToSizedBuffer(dAtA[:i]) 1073 if err != nil { 1074 return 0, err 1075 } 1076 i -= size 1077 i = encodeVarintApi(dAtA, i, uint64(size)) 1078 } 1079 i-- 1080 dAtA[i] = 0x1a 1081 } 1082 if m.CnWant != nil { 1083 { 1084 size, err := m.CnWant.MarshalToSizedBuffer(dAtA[:i]) 1085 if err != nil { 1086 return 0, err 1087 } 1088 i -= size 1089 i = encodeVarintApi(dAtA, i, uint64(size)) 1090 } 1091 i-- 1092 dAtA[i] = 0x12 1093 } 1094 if m.CnHave != nil { 1095 { 1096 size, err := m.CnHave.MarshalToSizedBuffer(dAtA[:i]) 1097 if err != nil { 1098 return 0, err 1099 } 1100 i -= size 1101 i = encodeVarintApi(dAtA, i, uint64(size)) 1102 } 1103 i-- 1104 dAtA[i] = 0xa 1105 } 1106 return len(dAtA) - i, nil 1107 } 1108 1109 func (m *SyncLogTailResp) Marshal() (dAtA []byte, err error) { 1110 size := m.ProtoSize() 1111 dAtA = make([]byte, size) 1112 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1113 if err != nil { 1114 return nil, err 1115 } 1116 return dAtA[:n], nil 1117 } 1118 1119 func (m *SyncLogTailResp) MarshalTo(dAtA []byte) (int, error) { 1120 size := m.ProtoSize() 1121 return m.MarshalToSizedBuffer(dAtA[:size]) 1122 } 1123 1124 func (m *SyncLogTailResp) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1125 i := len(dAtA) 1126 _ = i 1127 var l int 1128 _ = l 1129 if m.XXX_unrecognized != nil { 1130 i -= len(m.XXX_unrecognized) 1131 copy(dAtA[i:], m.XXX_unrecognized) 1132 } 1133 if len(m.Commands) > 0 { 1134 for iNdEx := len(m.Commands) - 1; iNdEx >= 0; iNdEx-- { 1135 { 1136 size, err := m.Commands[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1137 if err != nil { 1138 return 0, err 1139 } 1140 i -= size 1141 i = encodeVarintApi(dAtA, i, uint64(size)) 1142 } 1143 i-- 1144 dAtA[i] = 0x12 1145 } 1146 } 1147 if len(m.CkpLocation) > 0 { 1148 i -= len(m.CkpLocation) 1149 copy(dAtA[i:], m.CkpLocation) 1150 i = encodeVarintApi(dAtA, i, uint64(len(m.CkpLocation))) 1151 i-- 1152 dAtA[i] = 0xa 1153 } 1154 return len(dAtA) - i, nil 1155 } 1156 1157 func (m *PrecommitWriteCmd) Marshal() (dAtA []byte, err error) { 1158 size := m.ProtoSize() 1159 dAtA = make([]byte, size) 1160 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1161 if err != nil { 1162 return nil, err 1163 } 1164 return dAtA[:n], nil 1165 } 1166 1167 func (m *PrecommitWriteCmd) MarshalTo(dAtA []byte) (int, error) { 1168 size := m.ProtoSize() 1169 return m.MarshalToSizedBuffer(dAtA[:size]) 1170 } 1171 1172 func (m *PrecommitWriteCmd) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1173 i := len(dAtA) 1174 _ = i 1175 var l int 1176 _ = l 1177 if m.XXX_unrecognized != nil { 1178 i -= len(m.XXX_unrecognized) 1179 copy(dAtA[i:], m.XXX_unrecognized) 1180 } 1181 if len(m.EntryList) > 0 { 1182 for iNdEx := len(m.EntryList) - 1; iNdEx >= 0; iNdEx-- { 1183 { 1184 size, err := m.EntryList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1185 if err != nil { 1186 return 0, err 1187 } 1188 i -= size 1189 i = encodeVarintApi(dAtA, i, uint64(size)) 1190 } 1191 i-- 1192 dAtA[i] = 0x22 1193 } 1194 } 1195 if m.AccountId != 0 { 1196 i = encodeVarintApi(dAtA, i, uint64(m.AccountId)) 1197 i-- 1198 dAtA[i] = 0x18 1199 } 1200 if m.RoleId != 0 { 1201 i = encodeVarintApi(dAtA, i, uint64(m.RoleId)) 1202 i-- 1203 dAtA[i] = 0x10 1204 } 1205 if m.UserId != 0 { 1206 i = encodeVarintApi(dAtA, i, uint64(m.UserId)) 1207 i-- 1208 dAtA[i] = 0x8 1209 } 1210 return len(dAtA) - i, nil 1211 } 1212 1213 func (m *Entry) Marshal() (dAtA []byte, err error) { 1214 size := m.ProtoSize() 1215 dAtA = make([]byte, size) 1216 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1217 if err != nil { 1218 return nil, err 1219 } 1220 return dAtA[:n], nil 1221 } 1222 1223 func (m *Entry) MarshalTo(dAtA []byte) (int, error) { 1224 size := m.ProtoSize() 1225 return m.MarshalToSizedBuffer(dAtA[:size]) 1226 } 1227 1228 func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1229 i := len(dAtA) 1230 _ = i 1231 var l int 1232 _ = l 1233 if m.XXX_unrecognized != nil { 1234 i -= len(m.XXX_unrecognized) 1235 copy(dAtA[i:], m.XXX_unrecognized) 1236 } 1237 if m.Bat != nil { 1238 { 1239 size, err := m.Bat.MarshalToSizedBuffer(dAtA[:i]) 1240 if err != nil { 1241 return 0, err 1242 } 1243 i -= size 1244 i = encodeVarintApi(dAtA, i, uint64(size)) 1245 } 1246 i-- 1247 dAtA[i] = 0x42 1248 } 1249 if len(m.FileName) > 0 { 1250 i -= len(m.FileName) 1251 copy(dAtA[i:], m.FileName) 1252 i = encodeVarintApi(dAtA, i, uint64(len(m.FileName))) 1253 i-- 1254 dAtA[i] = 0x32 1255 } 1256 if len(m.DatabaseName) > 0 { 1257 i -= len(m.DatabaseName) 1258 copy(dAtA[i:], m.DatabaseName) 1259 i = encodeVarintApi(dAtA, i, uint64(len(m.DatabaseName))) 1260 i-- 1261 dAtA[i] = 0x2a 1262 } 1263 if len(m.TableName) > 0 { 1264 i -= len(m.TableName) 1265 copy(dAtA[i:], m.TableName) 1266 i = encodeVarintApi(dAtA, i, uint64(len(m.TableName))) 1267 i-- 1268 dAtA[i] = 0x22 1269 } 1270 if m.DatabaseId != 0 { 1271 i = encodeVarintApi(dAtA, i, uint64(m.DatabaseId)) 1272 i-- 1273 dAtA[i] = 0x18 1274 } 1275 if m.TableId != 0 { 1276 i = encodeVarintApi(dAtA, i, uint64(m.TableId)) 1277 i-- 1278 dAtA[i] = 0x10 1279 } 1280 if m.EntryType != 0 { 1281 i = encodeVarintApi(dAtA, i, uint64(m.EntryType)) 1282 i-- 1283 dAtA[i] = 0x8 1284 } 1285 return len(dAtA) - i, nil 1286 } 1287 1288 func (m *Checkpoint) Marshal() (dAtA []byte, err error) { 1289 size := m.ProtoSize() 1290 dAtA = make([]byte, size) 1291 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1292 if err != nil { 1293 return nil, err 1294 } 1295 return dAtA[:n], nil 1296 } 1297 1298 func (m *Checkpoint) MarshalTo(dAtA []byte) (int, error) { 1299 size := m.ProtoSize() 1300 return m.MarshalToSizedBuffer(dAtA[:size]) 1301 } 1302 1303 func (m *Checkpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1304 i := len(dAtA) 1305 _ = i 1306 var l int 1307 _ = l 1308 if m.XXX_unrecognized != nil { 1309 i -= len(m.XXX_unrecognized) 1310 copy(dAtA[i:], m.XXX_unrecognized) 1311 } 1312 if m.Bat != nil { 1313 { 1314 size, err := m.Bat.MarshalToSizedBuffer(dAtA[:i]) 1315 if err != nil { 1316 return 0, err 1317 } 1318 i -= size 1319 i = encodeVarintApi(dAtA, i, uint64(size)) 1320 } 1321 i-- 1322 dAtA[i] = 0x1a 1323 } 1324 if m.MaxTs != nil { 1325 { 1326 size, err := m.MaxTs.MarshalToSizedBuffer(dAtA[:i]) 1327 if err != nil { 1328 return 0, err 1329 } 1330 i -= size 1331 i = encodeVarintApi(dAtA, i, uint64(size)) 1332 } 1333 i-- 1334 dAtA[i] = 0x12 1335 } 1336 if m.MinTs != nil { 1337 { 1338 size, err := m.MinTs.MarshalToSizedBuffer(dAtA[:i]) 1339 if err != nil { 1340 return 0, err 1341 } 1342 i -= size 1343 i = encodeVarintApi(dAtA, i, uint64(size)) 1344 } 1345 i-- 1346 dAtA[i] = 0xa 1347 } 1348 return len(dAtA) - i, nil 1349 } 1350 1351 func (m *CatalogCkp) Marshal() (dAtA []byte, err error) { 1352 size := m.ProtoSize() 1353 dAtA = make([]byte, size) 1354 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1355 if err != nil { 1356 return nil, err 1357 } 1358 return dAtA[:n], nil 1359 } 1360 1361 func (m *CatalogCkp) MarshalTo(dAtA []byte) (int, error) { 1362 size := m.ProtoSize() 1363 return m.MarshalToSizedBuffer(dAtA[:size]) 1364 } 1365 1366 func (m *CatalogCkp) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1367 i := len(dAtA) 1368 _ = i 1369 var l int 1370 _ = l 1371 if m.XXX_unrecognized != nil { 1372 i -= len(m.XXX_unrecognized) 1373 copy(dAtA[i:], m.XXX_unrecognized) 1374 } 1375 if m.Bat != nil { 1376 { 1377 size, err := m.Bat.MarshalToSizedBuffer(dAtA[:i]) 1378 if err != nil { 1379 return 0, err 1380 } 1381 i -= size 1382 i = encodeVarintApi(dAtA, i, uint64(size)) 1383 } 1384 i-- 1385 dAtA[i] = 0x1a 1386 } 1387 if m.MaxTs != nil { 1388 { 1389 size, err := m.MaxTs.MarshalToSizedBuffer(dAtA[:i]) 1390 if err != nil { 1391 return 0, err 1392 } 1393 i -= size 1394 i = encodeVarintApi(dAtA, i, uint64(size)) 1395 } 1396 i-- 1397 dAtA[i] = 0x12 1398 } 1399 if m.MinTs != nil { 1400 { 1401 size, err := m.MinTs.MarshalToSizedBuffer(dAtA[:i]) 1402 if err != nil { 1403 return 0, err 1404 } 1405 i -= size 1406 i = encodeVarintApi(dAtA, i, uint64(size)) 1407 } 1408 i-- 1409 dAtA[i] = 0xa 1410 } 1411 return len(dAtA) - i, nil 1412 } 1413 1414 func (m *MetadataCkp) Marshal() (dAtA []byte, err error) { 1415 size := m.ProtoSize() 1416 dAtA = make([]byte, size) 1417 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1418 if err != nil { 1419 return nil, err 1420 } 1421 return dAtA[:n], nil 1422 } 1423 1424 func (m *MetadataCkp) MarshalTo(dAtA []byte) (int, error) { 1425 size := m.ProtoSize() 1426 return m.MarshalToSizedBuffer(dAtA[:size]) 1427 } 1428 1429 func (m *MetadataCkp) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1430 i := len(dAtA) 1431 _ = i 1432 var l int 1433 _ = l 1434 if m.XXX_unrecognized != nil { 1435 i -= len(m.XXX_unrecognized) 1436 copy(dAtA[i:], m.XXX_unrecognized) 1437 } 1438 if m.Bat != nil { 1439 { 1440 size, err := m.Bat.MarshalToSizedBuffer(dAtA[:i]) 1441 if err != nil { 1442 return 0, err 1443 } 1444 i -= size 1445 i = encodeVarintApi(dAtA, i, uint64(size)) 1446 } 1447 i-- 1448 dAtA[i] = 0x1a 1449 } 1450 if m.MaxTs != nil { 1451 { 1452 size, err := m.MaxTs.MarshalToSizedBuffer(dAtA[:i]) 1453 if err != nil { 1454 return 0, err 1455 } 1456 i -= size 1457 i = encodeVarintApi(dAtA, i, uint64(size)) 1458 } 1459 i-- 1460 dAtA[i] = 0x12 1461 } 1462 if m.MinTs != nil { 1463 { 1464 size, err := m.MinTs.MarshalToSizedBuffer(dAtA[:i]) 1465 if err != nil { 1466 return 0, err 1467 } 1468 i -= size 1469 i = encodeVarintApi(dAtA, i, uint64(size)) 1470 } 1471 i-- 1472 dAtA[i] = 0xa 1473 } 1474 return len(dAtA) - i, nil 1475 } 1476 1477 func encodeVarintApi(dAtA []byte, offset int, v uint64) int { 1478 offset -= sovApi(v) 1479 base := offset 1480 for v >= 1<<7 { 1481 dAtA[offset] = uint8(v&0x7f | 0x80) 1482 v >>= 7 1483 offset++ 1484 } 1485 dAtA[offset] = uint8(v) 1486 return base 1487 } 1488 func (m *Vector) ProtoSize() (n int) { 1489 if m == nil { 1490 return 0 1491 } 1492 var l int 1493 _ = l 1494 l = len(m.Data) 1495 if l > 0 { 1496 n += 1 + l + sovApi(uint64(l)) 1497 } 1498 if m.Type != nil { 1499 l = m.Type.ProtoSize() 1500 n += 1 + l + sovApi(uint64(l)) 1501 } 1502 if m.Nullable { 1503 n += 2 1504 } 1505 l = len(m.Nsp) 1506 if l > 0 { 1507 n += 1 + l + sovApi(uint64(l)) 1508 } 1509 if m.IsConst { 1510 n += 2 1511 } 1512 if m.Len != 0 { 1513 n += 1 + sovApi(uint64(m.Len)) 1514 } 1515 l = len(m.Area) 1516 if l > 0 { 1517 n += 1 + l + sovApi(uint64(l)) 1518 } 1519 if m.XXX_unrecognized != nil { 1520 n += len(m.XXX_unrecognized) 1521 } 1522 return n 1523 } 1524 1525 func (m *Batch) ProtoSize() (n int) { 1526 if m == nil { 1527 return 0 1528 } 1529 var l int 1530 _ = l 1531 if len(m.Attrs) > 0 { 1532 for _, s := range m.Attrs { 1533 l = len(s) 1534 n += 1 + l + sovApi(uint64(l)) 1535 } 1536 } 1537 if len(m.Vecs) > 0 { 1538 for _, e := range m.Vecs { 1539 l = e.ProtoSize() 1540 n += 1 + l + sovApi(uint64(l)) 1541 } 1542 } 1543 if m.XXX_unrecognized != nil { 1544 n += len(m.XXX_unrecognized) 1545 } 1546 return n 1547 } 1548 1549 func (m *TableID) ProtoSize() (n int) { 1550 if m == nil { 1551 return 0 1552 } 1553 var l int 1554 _ = l 1555 if m.DbId != 0 { 1556 n += 1 + sovApi(uint64(m.DbId)) 1557 } 1558 if m.TbId != 0 { 1559 n += 1 + sovApi(uint64(m.TbId)) 1560 } 1561 if m.PartitionId != 0 { 1562 n += 1 + sovApi(uint64(m.PartitionId)) 1563 } 1564 if m.XXX_unrecognized != nil { 1565 n += len(m.XXX_unrecognized) 1566 } 1567 return n 1568 } 1569 1570 func (m *SyncLogTailReq) ProtoSize() (n int) { 1571 if m == nil { 1572 return 0 1573 } 1574 var l int 1575 _ = l 1576 if m.CnHave != nil { 1577 l = m.CnHave.ProtoSize() 1578 n += 1 + l + sovApi(uint64(l)) 1579 } 1580 if m.CnWant != nil { 1581 l = m.CnWant.ProtoSize() 1582 n += 1 + l + sovApi(uint64(l)) 1583 } 1584 if m.Table != nil { 1585 l = m.Table.ProtoSize() 1586 n += 1 + l + sovApi(uint64(l)) 1587 } 1588 if m.XXX_unrecognized != nil { 1589 n += len(m.XXX_unrecognized) 1590 } 1591 return n 1592 } 1593 1594 func (m *SyncLogTailResp) ProtoSize() (n int) { 1595 if m == nil { 1596 return 0 1597 } 1598 var l int 1599 _ = l 1600 l = len(m.CkpLocation) 1601 if l > 0 { 1602 n += 1 + l + sovApi(uint64(l)) 1603 } 1604 if len(m.Commands) > 0 { 1605 for _, e := range m.Commands { 1606 l = e.ProtoSize() 1607 n += 1 + l + sovApi(uint64(l)) 1608 } 1609 } 1610 if m.XXX_unrecognized != nil { 1611 n += len(m.XXX_unrecognized) 1612 } 1613 return n 1614 } 1615 1616 func (m *PrecommitWriteCmd) ProtoSize() (n int) { 1617 if m == nil { 1618 return 0 1619 } 1620 var l int 1621 _ = l 1622 if m.UserId != 0 { 1623 n += 1 + sovApi(uint64(m.UserId)) 1624 } 1625 if m.RoleId != 0 { 1626 n += 1 + sovApi(uint64(m.RoleId)) 1627 } 1628 if m.AccountId != 0 { 1629 n += 1 + sovApi(uint64(m.AccountId)) 1630 } 1631 if len(m.EntryList) > 0 { 1632 for _, e := range m.EntryList { 1633 l = e.ProtoSize() 1634 n += 1 + l + sovApi(uint64(l)) 1635 } 1636 } 1637 if m.XXX_unrecognized != nil { 1638 n += len(m.XXX_unrecognized) 1639 } 1640 return n 1641 } 1642 1643 func (m *Entry) ProtoSize() (n int) { 1644 if m == nil { 1645 return 0 1646 } 1647 var l int 1648 _ = l 1649 if m.EntryType != 0 { 1650 n += 1 + sovApi(uint64(m.EntryType)) 1651 } 1652 if m.TableId != 0 { 1653 n += 1 + sovApi(uint64(m.TableId)) 1654 } 1655 if m.DatabaseId != 0 { 1656 n += 1 + sovApi(uint64(m.DatabaseId)) 1657 } 1658 l = len(m.TableName) 1659 if l > 0 { 1660 n += 1 + l + sovApi(uint64(l)) 1661 } 1662 l = len(m.DatabaseName) 1663 if l > 0 { 1664 n += 1 + l + sovApi(uint64(l)) 1665 } 1666 l = len(m.FileName) 1667 if l > 0 { 1668 n += 1 + l + sovApi(uint64(l)) 1669 } 1670 if m.Bat != nil { 1671 l = m.Bat.ProtoSize() 1672 n += 1 + l + sovApi(uint64(l)) 1673 } 1674 if m.XXX_unrecognized != nil { 1675 n += len(m.XXX_unrecognized) 1676 } 1677 return n 1678 } 1679 1680 func (m *Checkpoint) ProtoSize() (n int) { 1681 if m == nil { 1682 return 0 1683 } 1684 var l int 1685 _ = l 1686 if m.MinTs != nil { 1687 l = m.MinTs.ProtoSize() 1688 n += 1 + l + sovApi(uint64(l)) 1689 } 1690 if m.MaxTs != nil { 1691 l = m.MaxTs.ProtoSize() 1692 n += 1 + l + sovApi(uint64(l)) 1693 } 1694 if m.Bat != nil { 1695 l = m.Bat.ProtoSize() 1696 n += 1 + l + sovApi(uint64(l)) 1697 } 1698 if m.XXX_unrecognized != nil { 1699 n += len(m.XXX_unrecognized) 1700 } 1701 return n 1702 } 1703 1704 func (m *CatalogCkp) ProtoSize() (n int) { 1705 if m == nil { 1706 return 0 1707 } 1708 var l int 1709 _ = l 1710 if m.MinTs != nil { 1711 l = m.MinTs.ProtoSize() 1712 n += 1 + l + sovApi(uint64(l)) 1713 } 1714 if m.MaxTs != nil { 1715 l = m.MaxTs.ProtoSize() 1716 n += 1 + l + sovApi(uint64(l)) 1717 } 1718 if m.Bat != nil { 1719 l = m.Bat.ProtoSize() 1720 n += 1 + l + sovApi(uint64(l)) 1721 } 1722 if m.XXX_unrecognized != nil { 1723 n += len(m.XXX_unrecognized) 1724 } 1725 return n 1726 } 1727 1728 func (m *MetadataCkp) ProtoSize() (n int) { 1729 if m == nil { 1730 return 0 1731 } 1732 var l int 1733 _ = l 1734 if m.MinTs != nil { 1735 l = m.MinTs.ProtoSize() 1736 n += 1 + l + sovApi(uint64(l)) 1737 } 1738 if m.MaxTs != nil { 1739 l = m.MaxTs.ProtoSize() 1740 n += 1 + l + sovApi(uint64(l)) 1741 } 1742 if m.Bat != nil { 1743 l = m.Bat.ProtoSize() 1744 n += 1 + l + sovApi(uint64(l)) 1745 } 1746 if m.XXX_unrecognized != nil { 1747 n += len(m.XXX_unrecognized) 1748 } 1749 return n 1750 } 1751 1752 func sovApi(x uint64) (n int) { 1753 return (math_bits.Len64(x|1) + 6) / 7 1754 } 1755 func sozApi(x uint64) (n int) { 1756 return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1757 } 1758 func (m *Vector) Unmarshal(dAtA []byte) error { 1759 l := len(dAtA) 1760 iNdEx := 0 1761 for iNdEx < l { 1762 preIndex := iNdEx 1763 var wire uint64 1764 for shift := uint(0); ; shift += 7 { 1765 if shift >= 64 { 1766 return ErrIntOverflowApi 1767 } 1768 if iNdEx >= l { 1769 return io.ErrUnexpectedEOF 1770 } 1771 b := dAtA[iNdEx] 1772 iNdEx++ 1773 wire |= uint64(b&0x7F) << shift 1774 if b < 0x80 { 1775 break 1776 } 1777 } 1778 fieldNum := int32(wire >> 3) 1779 wireType := int(wire & 0x7) 1780 if wireType == 4 { 1781 return fmt.Errorf("proto: Vector: wiretype end group for non-group") 1782 } 1783 if fieldNum <= 0 { 1784 return fmt.Errorf("proto: Vector: illegal tag %d (wire type %d)", fieldNum, wire) 1785 } 1786 switch fieldNum { 1787 case 1: 1788 if wireType != 2 { 1789 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 1790 } 1791 var byteLen int 1792 for shift := uint(0); ; shift += 7 { 1793 if shift >= 64 { 1794 return ErrIntOverflowApi 1795 } 1796 if iNdEx >= l { 1797 return io.ErrUnexpectedEOF 1798 } 1799 b := dAtA[iNdEx] 1800 iNdEx++ 1801 byteLen |= int(b&0x7F) << shift 1802 if b < 0x80 { 1803 break 1804 } 1805 } 1806 if byteLen < 0 { 1807 return ErrInvalidLengthApi 1808 } 1809 postIndex := iNdEx + byteLen 1810 if postIndex < 0 { 1811 return ErrInvalidLengthApi 1812 } 1813 if postIndex > l { 1814 return io.ErrUnexpectedEOF 1815 } 1816 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 1817 if m.Data == nil { 1818 m.Data = []byte{} 1819 } 1820 iNdEx = postIndex 1821 case 2: 1822 if wireType != 2 { 1823 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 1824 } 1825 var msglen int 1826 for shift := uint(0); ; shift += 7 { 1827 if shift >= 64 { 1828 return ErrIntOverflowApi 1829 } 1830 if iNdEx >= l { 1831 return io.ErrUnexpectedEOF 1832 } 1833 b := dAtA[iNdEx] 1834 iNdEx++ 1835 msglen |= int(b&0x7F) << shift 1836 if b < 0x80 { 1837 break 1838 } 1839 } 1840 if msglen < 0 { 1841 return ErrInvalidLengthApi 1842 } 1843 postIndex := iNdEx + msglen 1844 if postIndex < 0 { 1845 return ErrInvalidLengthApi 1846 } 1847 if postIndex > l { 1848 return io.ErrUnexpectedEOF 1849 } 1850 if m.Type == nil { 1851 m.Type = &plan.Type{} 1852 } 1853 if err := m.Type.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1854 return err 1855 } 1856 iNdEx = postIndex 1857 case 3: 1858 if wireType != 0 { 1859 return fmt.Errorf("proto: wrong wireType = %d for field Nullable", wireType) 1860 } 1861 var v int 1862 for shift := uint(0); ; shift += 7 { 1863 if shift >= 64 { 1864 return ErrIntOverflowApi 1865 } 1866 if iNdEx >= l { 1867 return io.ErrUnexpectedEOF 1868 } 1869 b := dAtA[iNdEx] 1870 iNdEx++ 1871 v |= int(b&0x7F) << shift 1872 if b < 0x80 { 1873 break 1874 } 1875 } 1876 m.Nullable = bool(v != 0) 1877 case 4: 1878 if wireType != 2 { 1879 return fmt.Errorf("proto: wrong wireType = %d for field Nsp", wireType) 1880 } 1881 var byteLen int 1882 for shift := uint(0); ; shift += 7 { 1883 if shift >= 64 { 1884 return ErrIntOverflowApi 1885 } 1886 if iNdEx >= l { 1887 return io.ErrUnexpectedEOF 1888 } 1889 b := dAtA[iNdEx] 1890 iNdEx++ 1891 byteLen |= int(b&0x7F) << shift 1892 if b < 0x80 { 1893 break 1894 } 1895 } 1896 if byteLen < 0 { 1897 return ErrInvalidLengthApi 1898 } 1899 postIndex := iNdEx + byteLen 1900 if postIndex < 0 { 1901 return ErrInvalidLengthApi 1902 } 1903 if postIndex > l { 1904 return io.ErrUnexpectedEOF 1905 } 1906 m.Nsp = append(m.Nsp[:0], dAtA[iNdEx:postIndex]...) 1907 if m.Nsp == nil { 1908 m.Nsp = []byte{} 1909 } 1910 iNdEx = postIndex 1911 case 5: 1912 if wireType != 0 { 1913 return fmt.Errorf("proto: wrong wireType = %d for field IsConst", wireType) 1914 } 1915 var v int 1916 for shift := uint(0); ; shift += 7 { 1917 if shift >= 64 { 1918 return ErrIntOverflowApi 1919 } 1920 if iNdEx >= l { 1921 return io.ErrUnexpectedEOF 1922 } 1923 b := dAtA[iNdEx] 1924 iNdEx++ 1925 v |= int(b&0x7F) << shift 1926 if b < 0x80 { 1927 break 1928 } 1929 } 1930 m.IsConst = bool(v != 0) 1931 case 6: 1932 if wireType != 0 { 1933 return fmt.Errorf("proto: wrong wireType = %d for field Len", wireType) 1934 } 1935 m.Len = 0 1936 for shift := uint(0); ; shift += 7 { 1937 if shift >= 64 { 1938 return ErrIntOverflowApi 1939 } 1940 if iNdEx >= l { 1941 return io.ErrUnexpectedEOF 1942 } 1943 b := dAtA[iNdEx] 1944 iNdEx++ 1945 m.Len |= uint32(b&0x7F) << shift 1946 if b < 0x80 { 1947 break 1948 } 1949 } 1950 case 7: 1951 if wireType != 2 { 1952 return fmt.Errorf("proto: wrong wireType = %d for field Area", wireType) 1953 } 1954 var byteLen int 1955 for shift := uint(0); ; shift += 7 { 1956 if shift >= 64 { 1957 return ErrIntOverflowApi 1958 } 1959 if iNdEx >= l { 1960 return io.ErrUnexpectedEOF 1961 } 1962 b := dAtA[iNdEx] 1963 iNdEx++ 1964 byteLen |= int(b&0x7F) << shift 1965 if b < 0x80 { 1966 break 1967 } 1968 } 1969 if byteLen < 0 { 1970 return ErrInvalidLengthApi 1971 } 1972 postIndex := iNdEx + byteLen 1973 if postIndex < 0 { 1974 return ErrInvalidLengthApi 1975 } 1976 if postIndex > l { 1977 return io.ErrUnexpectedEOF 1978 } 1979 m.Area = append(m.Area[:0], dAtA[iNdEx:postIndex]...) 1980 if m.Area == nil { 1981 m.Area = []byte{} 1982 } 1983 iNdEx = postIndex 1984 default: 1985 iNdEx = preIndex 1986 skippy, err := skipApi(dAtA[iNdEx:]) 1987 if err != nil { 1988 return err 1989 } 1990 if (skippy < 0) || (iNdEx+skippy) < 0 { 1991 return ErrInvalidLengthApi 1992 } 1993 if (iNdEx + skippy) > l { 1994 return io.ErrUnexpectedEOF 1995 } 1996 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1997 iNdEx += skippy 1998 } 1999 } 2000 2001 if iNdEx > l { 2002 return io.ErrUnexpectedEOF 2003 } 2004 return nil 2005 } 2006 func (m *Batch) Unmarshal(dAtA []byte) error { 2007 l := len(dAtA) 2008 iNdEx := 0 2009 for iNdEx < l { 2010 preIndex := iNdEx 2011 var wire uint64 2012 for shift := uint(0); ; shift += 7 { 2013 if shift >= 64 { 2014 return ErrIntOverflowApi 2015 } 2016 if iNdEx >= l { 2017 return io.ErrUnexpectedEOF 2018 } 2019 b := dAtA[iNdEx] 2020 iNdEx++ 2021 wire |= uint64(b&0x7F) << shift 2022 if b < 0x80 { 2023 break 2024 } 2025 } 2026 fieldNum := int32(wire >> 3) 2027 wireType := int(wire & 0x7) 2028 if wireType == 4 { 2029 return fmt.Errorf("proto: Batch: wiretype end group for non-group") 2030 } 2031 if fieldNum <= 0 { 2032 return fmt.Errorf("proto: Batch: illegal tag %d (wire type %d)", fieldNum, wire) 2033 } 2034 switch fieldNum { 2035 case 1: 2036 if wireType != 2 { 2037 return fmt.Errorf("proto: wrong wireType = %d for field Attrs", wireType) 2038 } 2039 var stringLen uint64 2040 for shift := uint(0); ; shift += 7 { 2041 if shift >= 64 { 2042 return ErrIntOverflowApi 2043 } 2044 if iNdEx >= l { 2045 return io.ErrUnexpectedEOF 2046 } 2047 b := dAtA[iNdEx] 2048 iNdEx++ 2049 stringLen |= uint64(b&0x7F) << shift 2050 if b < 0x80 { 2051 break 2052 } 2053 } 2054 intStringLen := int(stringLen) 2055 if intStringLen < 0 { 2056 return ErrInvalidLengthApi 2057 } 2058 postIndex := iNdEx + intStringLen 2059 if postIndex < 0 { 2060 return ErrInvalidLengthApi 2061 } 2062 if postIndex > l { 2063 return io.ErrUnexpectedEOF 2064 } 2065 m.Attrs = append(m.Attrs, string(dAtA[iNdEx:postIndex])) 2066 iNdEx = postIndex 2067 case 2: 2068 if wireType != 2 { 2069 return fmt.Errorf("proto: wrong wireType = %d for field Vecs", wireType) 2070 } 2071 var msglen int 2072 for shift := uint(0); ; shift += 7 { 2073 if shift >= 64 { 2074 return ErrIntOverflowApi 2075 } 2076 if iNdEx >= l { 2077 return io.ErrUnexpectedEOF 2078 } 2079 b := dAtA[iNdEx] 2080 iNdEx++ 2081 msglen |= int(b&0x7F) << shift 2082 if b < 0x80 { 2083 break 2084 } 2085 } 2086 if msglen < 0 { 2087 return ErrInvalidLengthApi 2088 } 2089 postIndex := iNdEx + msglen 2090 if postIndex < 0 { 2091 return ErrInvalidLengthApi 2092 } 2093 if postIndex > l { 2094 return io.ErrUnexpectedEOF 2095 } 2096 m.Vecs = append(m.Vecs, &Vector{}) 2097 if err := m.Vecs[len(m.Vecs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2098 return err 2099 } 2100 iNdEx = postIndex 2101 default: 2102 iNdEx = preIndex 2103 skippy, err := skipApi(dAtA[iNdEx:]) 2104 if err != nil { 2105 return err 2106 } 2107 if (skippy < 0) || (iNdEx+skippy) < 0 { 2108 return ErrInvalidLengthApi 2109 } 2110 if (iNdEx + skippy) > l { 2111 return io.ErrUnexpectedEOF 2112 } 2113 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2114 iNdEx += skippy 2115 } 2116 } 2117 2118 if iNdEx > l { 2119 return io.ErrUnexpectedEOF 2120 } 2121 return nil 2122 } 2123 func (m *TableID) Unmarshal(dAtA []byte) error { 2124 l := len(dAtA) 2125 iNdEx := 0 2126 for iNdEx < l { 2127 preIndex := iNdEx 2128 var wire uint64 2129 for shift := uint(0); ; shift += 7 { 2130 if shift >= 64 { 2131 return ErrIntOverflowApi 2132 } 2133 if iNdEx >= l { 2134 return io.ErrUnexpectedEOF 2135 } 2136 b := dAtA[iNdEx] 2137 iNdEx++ 2138 wire |= uint64(b&0x7F) << shift 2139 if b < 0x80 { 2140 break 2141 } 2142 } 2143 fieldNum := int32(wire >> 3) 2144 wireType := int(wire & 0x7) 2145 if wireType == 4 { 2146 return fmt.Errorf("proto: TableID: wiretype end group for non-group") 2147 } 2148 if fieldNum <= 0 { 2149 return fmt.Errorf("proto: TableID: illegal tag %d (wire type %d)", fieldNum, wire) 2150 } 2151 switch fieldNum { 2152 case 1: 2153 if wireType != 0 { 2154 return fmt.Errorf("proto: wrong wireType = %d for field DbId", wireType) 2155 } 2156 m.DbId = 0 2157 for shift := uint(0); ; shift += 7 { 2158 if shift >= 64 { 2159 return ErrIntOverflowApi 2160 } 2161 if iNdEx >= l { 2162 return io.ErrUnexpectedEOF 2163 } 2164 b := dAtA[iNdEx] 2165 iNdEx++ 2166 m.DbId |= uint64(b&0x7F) << shift 2167 if b < 0x80 { 2168 break 2169 } 2170 } 2171 case 2: 2172 if wireType != 0 { 2173 return fmt.Errorf("proto: wrong wireType = %d for field TbId", wireType) 2174 } 2175 m.TbId = 0 2176 for shift := uint(0); ; shift += 7 { 2177 if shift >= 64 { 2178 return ErrIntOverflowApi 2179 } 2180 if iNdEx >= l { 2181 return io.ErrUnexpectedEOF 2182 } 2183 b := dAtA[iNdEx] 2184 iNdEx++ 2185 m.TbId |= uint64(b&0x7F) << shift 2186 if b < 0x80 { 2187 break 2188 } 2189 } 2190 case 3: 2191 if wireType != 0 { 2192 return fmt.Errorf("proto: wrong wireType = %d for field PartitionId", wireType) 2193 } 2194 m.PartitionId = 0 2195 for shift := uint(0); ; shift += 7 { 2196 if shift >= 64 { 2197 return ErrIntOverflowApi 2198 } 2199 if iNdEx >= l { 2200 return io.ErrUnexpectedEOF 2201 } 2202 b := dAtA[iNdEx] 2203 iNdEx++ 2204 m.PartitionId |= uint64(b&0x7F) << shift 2205 if b < 0x80 { 2206 break 2207 } 2208 } 2209 default: 2210 iNdEx = preIndex 2211 skippy, err := skipApi(dAtA[iNdEx:]) 2212 if err != nil { 2213 return err 2214 } 2215 if (skippy < 0) || (iNdEx+skippy) < 0 { 2216 return ErrInvalidLengthApi 2217 } 2218 if (iNdEx + skippy) > l { 2219 return io.ErrUnexpectedEOF 2220 } 2221 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2222 iNdEx += skippy 2223 } 2224 } 2225 2226 if iNdEx > l { 2227 return io.ErrUnexpectedEOF 2228 } 2229 return nil 2230 } 2231 func (m *SyncLogTailReq) Unmarshal(dAtA []byte) error { 2232 l := len(dAtA) 2233 iNdEx := 0 2234 for iNdEx < l { 2235 preIndex := iNdEx 2236 var wire uint64 2237 for shift := uint(0); ; shift += 7 { 2238 if shift >= 64 { 2239 return ErrIntOverflowApi 2240 } 2241 if iNdEx >= l { 2242 return io.ErrUnexpectedEOF 2243 } 2244 b := dAtA[iNdEx] 2245 iNdEx++ 2246 wire |= uint64(b&0x7F) << shift 2247 if b < 0x80 { 2248 break 2249 } 2250 } 2251 fieldNum := int32(wire >> 3) 2252 wireType := int(wire & 0x7) 2253 if wireType == 4 { 2254 return fmt.Errorf("proto: SyncLogTailReq: wiretype end group for non-group") 2255 } 2256 if fieldNum <= 0 { 2257 return fmt.Errorf("proto: SyncLogTailReq: illegal tag %d (wire type %d)", fieldNum, wire) 2258 } 2259 switch fieldNum { 2260 case 1: 2261 if wireType != 2 { 2262 return fmt.Errorf("proto: wrong wireType = %d for field CnHave", wireType) 2263 } 2264 var msglen int 2265 for shift := uint(0); ; shift += 7 { 2266 if shift >= 64 { 2267 return ErrIntOverflowApi 2268 } 2269 if iNdEx >= l { 2270 return io.ErrUnexpectedEOF 2271 } 2272 b := dAtA[iNdEx] 2273 iNdEx++ 2274 msglen |= int(b&0x7F) << shift 2275 if b < 0x80 { 2276 break 2277 } 2278 } 2279 if msglen < 0 { 2280 return ErrInvalidLengthApi 2281 } 2282 postIndex := iNdEx + msglen 2283 if postIndex < 0 { 2284 return ErrInvalidLengthApi 2285 } 2286 if postIndex > l { 2287 return io.ErrUnexpectedEOF 2288 } 2289 if m.CnHave == nil { 2290 m.CnHave = ×tamp.Timestamp{} 2291 } 2292 if err := m.CnHave.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2293 return err 2294 } 2295 iNdEx = postIndex 2296 case 2: 2297 if wireType != 2 { 2298 return fmt.Errorf("proto: wrong wireType = %d for field CnWant", wireType) 2299 } 2300 var msglen int 2301 for shift := uint(0); ; shift += 7 { 2302 if shift >= 64 { 2303 return ErrIntOverflowApi 2304 } 2305 if iNdEx >= l { 2306 return io.ErrUnexpectedEOF 2307 } 2308 b := dAtA[iNdEx] 2309 iNdEx++ 2310 msglen |= int(b&0x7F) << shift 2311 if b < 0x80 { 2312 break 2313 } 2314 } 2315 if msglen < 0 { 2316 return ErrInvalidLengthApi 2317 } 2318 postIndex := iNdEx + msglen 2319 if postIndex < 0 { 2320 return ErrInvalidLengthApi 2321 } 2322 if postIndex > l { 2323 return io.ErrUnexpectedEOF 2324 } 2325 if m.CnWant == nil { 2326 m.CnWant = ×tamp.Timestamp{} 2327 } 2328 if err := m.CnWant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2329 return err 2330 } 2331 iNdEx = postIndex 2332 case 3: 2333 if wireType != 2 { 2334 return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) 2335 } 2336 var msglen int 2337 for shift := uint(0); ; shift += 7 { 2338 if shift >= 64 { 2339 return ErrIntOverflowApi 2340 } 2341 if iNdEx >= l { 2342 return io.ErrUnexpectedEOF 2343 } 2344 b := dAtA[iNdEx] 2345 iNdEx++ 2346 msglen |= int(b&0x7F) << shift 2347 if b < 0x80 { 2348 break 2349 } 2350 } 2351 if msglen < 0 { 2352 return ErrInvalidLengthApi 2353 } 2354 postIndex := iNdEx + msglen 2355 if postIndex < 0 { 2356 return ErrInvalidLengthApi 2357 } 2358 if postIndex > l { 2359 return io.ErrUnexpectedEOF 2360 } 2361 if m.Table == nil { 2362 m.Table = &TableID{} 2363 } 2364 if err := m.Table.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2365 return err 2366 } 2367 iNdEx = postIndex 2368 default: 2369 iNdEx = preIndex 2370 skippy, err := skipApi(dAtA[iNdEx:]) 2371 if err != nil { 2372 return err 2373 } 2374 if (skippy < 0) || (iNdEx+skippy) < 0 { 2375 return ErrInvalidLengthApi 2376 } 2377 if (iNdEx + skippy) > l { 2378 return io.ErrUnexpectedEOF 2379 } 2380 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2381 iNdEx += skippy 2382 } 2383 } 2384 2385 if iNdEx > l { 2386 return io.ErrUnexpectedEOF 2387 } 2388 return nil 2389 } 2390 func (m *SyncLogTailResp) Unmarshal(dAtA []byte) error { 2391 l := len(dAtA) 2392 iNdEx := 0 2393 for iNdEx < l { 2394 preIndex := iNdEx 2395 var wire uint64 2396 for shift := uint(0); ; shift += 7 { 2397 if shift >= 64 { 2398 return ErrIntOverflowApi 2399 } 2400 if iNdEx >= l { 2401 return io.ErrUnexpectedEOF 2402 } 2403 b := dAtA[iNdEx] 2404 iNdEx++ 2405 wire |= uint64(b&0x7F) << shift 2406 if b < 0x80 { 2407 break 2408 } 2409 } 2410 fieldNum := int32(wire >> 3) 2411 wireType := int(wire & 0x7) 2412 if wireType == 4 { 2413 return fmt.Errorf("proto: SyncLogTailResp: wiretype end group for non-group") 2414 } 2415 if fieldNum <= 0 { 2416 return fmt.Errorf("proto: SyncLogTailResp: illegal tag %d (wire type %d)", fieldNum, wire) 2417 } 2418 switch fieldNum { 2419 case 1: 2420 if wireType != 2 { 2421 return fmt.Errorf("proto: wrong wireType = %d for field CkpLocation", wireType) 2422 } 2423 var stringLen uint64 2424 for shift := uint(0); ; shift += 7 { 2425 if shift >= 64 { 2426 return ErrIntOverflowApi 2427 } 2428 if iNdEx >= l { 2429 return io.ErrUnexpectedEOF 2430 } 2431 b := dAtA[iNdEx] 2432 iNdEx++ 2433 stringLen |= uint64(b&0x7F) << shift 2434 if b < 0x80 { 2435 break 2436 } 2437 } 2438 intStringLen := int(stringLen) 2439 if intStringLen < 0 { 2440 return ErrInvalidLengthApi 2441 } 2442 postIndex := iNdEx + intStringLen 2443 if postIndex < 0 { 2444 return ErrInvalidLengthApi 2445 } 2446 if postIndex > l { 2447 return io.ErrUnexpectedEOF 2448 } 2449 m.CkpLocation = string(dAtA[iNdEx:postIndex]) 2450 iNdEx = postIndex 2451 case 2: 2452 if wireType != 2 { 2453 return fmt.Errorf("proto: wrong wireType = %d for field Commands", wireType) 2454 } 2455 var msglen int 2456 for shift := uint(0); ; shift += 7 { 2457 if shift >= 64 { 2458 return ErrIntOverflowApi 2459 } 2460 if iNdEx >= l { 2461 return io.ErrUnexpectedEOF 2462 } 2463 b := dAtA[iNdEx] 2464 iNdEx++ 2465 msglen |= int(b&0x7F) << shift 2466 if b < 0x80 { 2467 break 2468 } 2469 } 2470 if msglen < 0 { 2471 return ErrInvalidLengthApi 2472 } 2473 postIndex := iNdEx + msglen 2474 if postIndex < 0 { 2475 return ErrInvalidLengthApi 2476 } 2477 if postIndex > l { 2478 return io.ErrUnexpectedEOF 2479 } 2480 m.Commands = append(m.Commands, &Entry{}) 2481 if err := m.Commands[len(m.Commands)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2482 return err 2483 } 2484 iNdEx = postIndex 2485 default: 2486 iNdEx = preIndex 2487 skippy, err := skipApi(dAtA[iNdEx:]) 2488 if err != nil { 2489 return err 2490 } 2491 if (skippy < 0) || (iNdEx+skippy) < 0 { 2492 return ErrInvalidLengthApi 2493 } 2494 if (iNdEx + skippy) > l { 2495 return io.ErrUnexpectedEOF 2496 } 2497 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2498 iNdEx += skippy 2499 } 2500 } 2501 2502 if iNdEx > l { 2503 return io.ErrUnexpectedEOF 2504 } 2505 return nil 2506 } 2507 func (m *PrecommitWriteCmd) Unmarshal(dAtA []byte) error { 2508 l := len(dAtA) 2509 iNdEx := 0 2510 for iNdEx < l { 2511 preIndex := iNdEx 2512 var wire uint64 2513 for shift := uint(0); ; shift += 7 { 2514 if shift >= 64 { 2515 return ErrIntOverflowApi 2516 } 2517 if iNdEx >= l { 2518 return io.ErrUnexpectedEOF 2519 } 2520 b := dAtA[iNdEx] 2521 iNdEx++ 2522 wire |= uint64(b&0x7F) << shift 2523 if b < 0x80 { 2524 break 2525 } 2526 } 2527 fieldNum := int32(wire >> 3) 2528 wireType := int(wire & 0x7) 2529 if wireType == 4 { 2530 return fmt.Errorf("proto: PrecommitWriteCmd: wiretype end group for non-group") 2531 } 2532 if fieldNum <= 0 { 2533 return fmt.Errorf("proto: PrecommitWriteCmd: illegal tag %d (wire type %d)", fieldNum, wire) 2534 } 2535 switch fieldNum { 2536 case 1: 2537 if wireType != 0 { 2538 return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) 2539 } 2540 m.UserId = 0 2541 for shift := uint(0); ; shift += 7 { 2542 if shift >= 64 { 2543 return ErrIntOverflowApi 2544 } 2545 if iNdEx >= l { 2546 return io.ErrUnexpectedEOF 2547 } 2548 b := dAtA[iNdEx] 2549 iNdEx++ 2550 m.UserId |= uint32(b&0x7F) << shift 2551 if b < 0x80 { 2552 break 2553 } 2554 } 2555 case 2: 2556 if wireType != 0 { 2557 return fmt.Errorf("proto: wrong wireType = %d for field RoleId", wireType) 2558 } 2559 m.RoleId = 0 2560 for shift := uint(0); ; shift += 7 { 2561 if shift >= 64 { 2562 return ErrIntOverflowApi 2563 } 2564 if iNdEx >= l { 2565 return io.ErrUnexpectedEOF 2566 } 2567 b := dAtA[iNdEx] 2568 iNdEx++ 2569 m.RoleId |= uint32(b&0x7F) << shift 2570 if b < 0x80 { 2571 break 2572 } 2573 } 2574 case 3: 2575 if wireType != 0 { 2576 return fmt.Errorf("proto: wrong wireType = %d for field AccountId", wireType) 2577 } 2578 m.AccountId = 0 2579 for shift := uint(0); ; shift += 7 { 2580 if shift >= 64 { 2581 return ErrIntOverflowApi 2582 } 2583 if iNdEx >= l { 2584 return io.ErrUnexpectedEOF 2585 } 2586 b := dAtA[iNdEx] 2587 iNdEx++ 2588 m.AccountId |= uint32(b&0x7F) << shift 2589 if b < 0x80 { 2590 break 2591 } 2592 } 2593 case 4: 2594 if wireType != 2 { 2595 return fmt.Errorf("proto: wrong wireType = %d for field EntryList", wireType) 2596 } 2597 var msglen int 2598 for shift := uint(0); ; shift += 7 { 2599 if shift >= 64 { 2600 return ErrIntOverflowApi 2601 } 2602 if iNdEx >= l { 2603 return io.ErrUnexpectedEOF 2604 } 2605 b := dAtA[iNdEx] 2606 iNdEx++ 2607 msglen |= int(b&0x7F) << shift 2608 if b < 0x80 { 2609 break 2610 } 2611 } 2612 if msglen < 0 { 2613 return ErrInvalidLengthApi 2614 } 2615 postIndex := iNdEx + msglen 2616 if postIndex < 0 { 2617 return ErrInvalidLengthApi 2618 } 2619 if postIndex > l { 2620 return io.ErrUnexpectedEOF 2621 } 2622 m.EntryList = append(m.EntryList, &Entry{}) 2623 if err := m.EntryList[len(m.EntryList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2624 return err 2625 } 2626 iNdEx = postIndex 2627 default: 2628 iNdEx = preIndex 2629 skippy, err := skipApi(dAtA[iNdEx:]) 2630 if err != nil { 2631 return err 2632 } 2633 if (skippy < 0) || (iNdEx+skippy) < 0 { 2634 return ErrInvalidLengthApi 2635 } 2636 if (iNdEx + skippy) > l { 2637 return io.ErrUnexpectedEOF 2638 } 2639 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2640 iNdEx += skippy 2641 } 2642 } 2643 2644 if iNdEx > l { 2645 return io.ErrUnexpectedEOF 2646 } 2647 return nil 2648 } 2649 func (m *Entry) Unmarshal(dAtA []byte) error { 2650 l := len(dAtA) 2651 iNdEx := 0 2652 for iNdEx < l { 2653 preIndex := iNdEx 2654 var wire uint64 2655 for shift := uint(0); ; shift += 7 { 2656 if shift >= 64 { 2657 return ErrIntOverflowApi 2658 } 2659 if iNdEx >= l { 2660 return io.ErrUnexpectedEOF 2661 } 2662 b := dAtA[iNdEx] 2663 iNdEx++ 2664 wire |= uint64(b&0x7F) << shift 2665 if b < 0x80 { 2666 break 2667 } 2668 } 2669 fieldNum := int32(wire >> 3) 2670 wireType := int(wire & 0x7) 2671 if wireType == 4 { 2672 return fmt.Errorf("proto: Entry: wiretype end group for non-group") 2673 } 2674 if fieldNum <= 0 { 2675 return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire) 2676 } 2677 switch fieldNum { 2678 case 1: 2679 if wireType != 0 { 2680 return fmt.Errorf("proto: wrong wireType = %d for field EntryType", wireType) 2681 } 2682 m.EntryType = 0 2683 for shift := uint(0); ; shift += 7 { 2684 if shift >= 64 { 2685 return ErrIntOverflowApi 2686 } 2687 if iNdEx >= l { 2688 return io.ErrUnexpectedEOF 2689 } 2690 b := dAtA[iNdEx] 2691 iNdEx++ 2692 m.EntryType |= Entry_EntryType(b&0x7F) << shift 2693 if b < 0x80 { 2694 break 2695 } 2696 } 2697 case 2: 2698 if wireType != 0 { 2699 return fmt.Errorf("proto: wrong wireType = %d for field TableId", wireType) 2700 } 2701 m.TableId = 0 2702 for shift := uint(0); ; shift += 7 { 2703 if shift >= 64 { 2704 return ErrIntOverflowApi 2705 } 2706 if iNdEx >= l { 2707 return io.ErrUnexpectedEOF 2708 } 2709 b := dAtA[iNdEx] 2710 iNdEx++ 2711 m.TableId |= uint64(b&0x7F) << shift 2712 if b < 0x80 { 2713 break 2714 } 2715 } 2716 case 3: 2717 if wireType != 0 { 2718 return fmt.Errorf("proto: wrong wireType = %d for field DatabaseId", wireType) 2719 } 2720 m.DatabaseId = 0 2721 for shift := uint(0); ; shift += 7 { 2722 if shift >= 64 { 2723 return ErrIntOverflowApi 2724 } 2725 if iNdEx >= l { 2726 return io.ErrUnexpectedEOF 2727 } 2728 b := dAtA[iNdEx] 2729 iNdEx++ 2730 m.DatabaseId |= uint64(b&0x7F) << shift 2731 if b < 0x80 { 2732 break 2733 } 2734 } 2735 case 4: 2736 if wireType != 2 { 2737 return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) 2738 } 2739 var stringLen uint64 2740 for shift := uint(0); ; shift += 7 { 2741 if shift >= 64 { 2742 return ErrIntOverflowApi 2743 } 2744 if iNdEx >= l { 2745 return io.ErrUnexpectedEOF 2746 } 2747 b := dAtA[iNdEx] 2748 iNdEx++ 2749 stringLen |= uint64(b&0x7F) << shift 2750 if b < 0x80 { 2751 break 2752 } 2753 } 2754 intStringLen := int(stringLen) 2755 if intStringLen < 0 { 2756 return ErrInvalidLengthApi 2757 } 2758 postIndex := iNdEx + intStringLen 2759 if postIndex < 0 { 2760 return ErrInvalidLengthApi 2761 } 2762 if postIndex > l { 2763 return io.ErrUnexpectedEOF 2764 } 2765 m.TableName = string(dAtA[iNdEx:postIndex]) 2766 iNdEx = postIndex 2767 case 5: 2768 if wireType != 2 { 2769 return fmt.Errorf("proto: wrong wireType = %d for field DatabaseName", wireType) 2770 } 2771 var stringLen uint64 2772 for shift := uint(0); ; shift += 7 { 2773 if shift >= 64 { 2774 return ErrIntOverflowApi 2775 } 2776 if iNdEx >= l { 2777 return io.ErrUnexpectedEOF 2778 } 2779 b := dAtA[iNdEx] 2780 iNdEx++ 2781 stringLen |= uint64(b&0x7F) << shift 2782 if b < 0x80 { 2783 break 2784 } 2785 } 2786 intStringLen := int(stringLen) 2787 if intStringLen < 0 { 2788 return ErrInvalidLengthApi 2789 } 2790 postIndex := iNdEx + intStringLen 2791 if postIndex < 0 { 2792 return ErrInvalidLengthApi 2793 } 2794 if postIndex > l { 2795 return io.ErrUnexpectedEOF 2796 } 2797 m.DatabaseName = string(dAtA[iNdEx:postIndex]) 2798 iNdEx = postIndex 2799 case 6: 2800 if wireType != 2 { 2801 return fmt.Errorf("proto: wrong wireType = %d for field FileName", wireType) 2802 } 2803 var stringLen uint64 2804 for shift := uint(0); ; shift += 7 { 2805 if shift >= 64 { 2806 return ErrIntOverflowApi 2807 } 2808 if iNdEx >= l { 2809 return io.ErrUnexpectedEOF 2810 } 2811 b := dAtA[iNdEx] 2812 iNdEx++ 2813 stringLen |= uint64(b&0x7F) << shift 2814 if b < 0x80 { 2815 break 2816 } 2817 } 2818 intStringLen := int(stringLen) 2819 if intStringLen < 0 { 2820 return ErrInvalidLengthApi 2821 } 2822 postIndex := iNdEx + intStringLen 2823 if postIndex < 0 { 2824 return ErrInvalidLengthApi 2825 } 2826 if postIndex > l { 2827 return io.ErrUnexpectedEOF 2828 } 2829 m.FileName = string(dAtA[iNdEx:postIndex]) 2830 iNdEx = postIndex 2831 case 8: 2832 if wireType != 2 { 2833 return fmt.Errorf("proto: wrong wireType = %d for field Bat", wireType) 2834 } 2835 var msglen int 2836 for shift := uint(0); ; shift += 7 { 2837 if shift >= 64 { 2838 return ErrIntOverflowApi 2839 } 2840 if iNdEx >= l { 2841 return io.ErrUnexpectedEOF 2842 } 2843 b := dAtA[iNdEx] 2844 iNdEx++ 2845 msglen |= int(b&0x7F) << shift 2846 if b < 0x80 { 2847 break 2848 } 2849 } 2850 if msglen < 0 { 2851 return ErrInvalidLengthApi 2852 } 2853 postIndex := iNdEx + msglen 2854 if postIndex < 0 { 2855 return ErrInvalidLengthApi 2856 } 2857 if postIndex > l { 2858 return io.ErrUnexpectedEOF 2859 } 2860 if m.Bat == nil { 2861 m.Bat = &Batch{} 2862 } 2863 if err := m.Bat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2864 return err 2865 } 2866 iNdEx = postIndex 2867 default: 2868 iNdEx = preIndex 2869 skippy, err := skipApi(dAtA[iNdEx:]) 2870 if err != nil { 2871 return err 2872 } 2873 if (skippy < 0) || (iNdEx+skippy) < 0 { 2874 return ErrInvalidLengthApi 2875 } 2876 if (iNdEx + skippy) > l { 2877 return io.ErrUnexpectedEOF 2878 } 2879 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2880 iNdEx += skippy 2881 } 2882 } 2883 2884 if iNdEx > l { 2885 return io.ErrUnexpectedEOF 2886 } 2887 return nil 2888 } 2889 func (m *Checkpoint) Unmarshal(dAtA []byte) error { 2890 l := len(dAtA) 2891 iNdEx := 0 2892 for iNdEx < l { 2893 preIndex := iNdEx 2894 var wire uint64 2895 for shift := uint(0); ; shift += 7 { 2896 if shift >= 64 { 2897 return ErrIntOverflowApi 2898 } 2899 if iNdEx >= l { 2900 return io.ErrUnexpectedEOF 2901 } 2902 b := dAtA[iNdEx] 2903 iNdEx++ 2904 wire |= uint64(b&0x7F) << shift 2905 if b < 0x80 { 2906 break 2907 } 2908 } 2909 fieldNum := int32(wire >> 3) 2910 wireType := int(wire & 0x7) 2911 if wireType == 4 { 2912 return fmt.Errorf("proto: Checkpoint: wiretype end group for non-group") 2913 } 2914 if fieldNum <= 0 { 2915 return fmt.Errorf("proto: Checkpoint: illegal tag %d (wire type %d)", fieldNum, wire) 2916 } 2917 switch fieldNum { 2918 case 1: 2919 if wireType != 2 { 2920 return fmt.Errorf("proto: wrong wireType = %d for field MinTs", wireType) 2921 } 2922 var msglen int 2923 for shift := uint(0); ; shift += 7 { 2924 if shift >= 64 { 2925 return ErrIntOverflowApi 2926 } 2927 if iNdEx >= l { 2928 return io.ErrUnexpectedEOF 2929 } 2930 b := dAtA[iNdEx] 2931 iNdEx++ 2932 msglen |= int(b&0x7F) << shift 2933 if b < 0x80 { 2934 break 2935 } 2936 } 2937 if msglen < 0 { 2938 return ErrInvalidLengthApi 2939 } 2940 postIndex := iNdEx + msglen 2941 if postIndex < 0 { 2942 return ErrInvalidLengthApi 2943 } 2944 if postIndex > l { 2945 return io.ErrUnexpectedEOF 2946 } 2947 if m.MinTs == nil { 2948 m.MinTs = ×tamp.Timestamp{} 2949 } 2950 if err := m.MinTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2951 return err 2952 } 2953 iNdEx = postIndex 2954 case 2: 2955 if wireType != 2 { 2956 return fmt.Errorf("proto: wrong wireType = %d for field MaxTs", wireType) 2957 } 2958 var msglen int 2959 for shift := uint(0); ; shift += 7 { 2960 if shift >= 64 { 2961 return ErrIntOverflowApi 2962 } 2963 if iNdEx >= l { 2964 return io.ErrUnexpectedEOF 2965 } 2966 b := dAtA[iNdEx] 2967 iNdEx++ 2968 msglen |= int(b&0x7F) << shift 2969 if b < 0x80 { 2970 break 2971 } 2972 } 2973 if msglen < 0 { 2974 return ErrInvalidLengthApi 2975 } 2976 postIndex := iNdEx + msglen 2977 if postIndex < 0 { 2978 return ErrInvalidLengthApi 2979 } 2980 if postIndex > l { 2981 return io.ErrUnexpectedEOF 2982 } 2983 if m.MaxTs == nil { 2984 m.MaxTs = ×tamp.Timestamp{} 2985 } 2986 if err := m.MaxTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2987 return err 2988 } 2989 iNdEx = postIndex 2990 case 3: 2991 if wireType != 2 { 2992 return fmt.Errorf("proto: wrong wireType = %d for field Bat", wireType) 2993 } 2994 var msglen int 2995 for shift := uint(0); ; shift += 7 { 2996 if shift >= 64 { 2997 return ErrIntOverflowApi 2998 } 2999 if iNdEx >= l { 3000 return io.ErrUnexpectedEOF 3001 } 3002 b := dAtA[iNdEx] 3003 iNdEx++ 3004 msglen |= int(b&0x7F) << shift 3005 if b < 0x80 { 3006 break 3007 } 3008 } 3009 if msglen < 0 { 3010 return ErrInvalidLengthApi 3011 } 3012 postIndex := iNdEx + msglen 3013 if postIndex < 0 { 3014 return ErrInvalidLengthApi 3015 } 3016 if postIndex > l { 3017 return io.ErrUnexpectedEOF 3018 } 3019 if m.Bat == nil { 3020 m.Bat = &Batch{} 3021 } 3022 if err := m.Bat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3023 return err 3024 } 3025 iNdEx = postIndex 3026 default: 3027 iNdEx = preIndex 3028 skippy, err := skipApi(dAtA[iNdEx:]) 3029 if err != nil { 3030 return err 3031 } 3032 if (skippy < 0) || (iNdEx+skippy) < 0 { 3033 return ErrInvalidLengthApi 3034 } 3035 if (iNdEx + skippy) > l { 3036 return io.ErrUnexpectedEOF 3037 } 3038 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3039 iNdEx += skippy 3040 } 3041 } 3042 3043 if iNdEx > l { 3044 return io.ErrUnexpectedEOF 3045 } 3046 return nil 3047 } 3048 func (m *CatalogCkp) Unmarshal(dAtA []byte) error { 3049 l := len(dAtA) 3050 iNdEx := 0 3051 for iNdEx < l { 3052 preIndex := iNdEx 3053 var wire uint64 3054 for shift := uint(0); ; shift += 7 { 3055 if shift >= 64 { 3056 return ErrIntOverflowApi 3057 } 3058 if iNdEx >= l { 3059 return io.ErrUnexpectedEOF 3060 } 3061 b := dAtA[iNdEx] 3062 iNdEx++ 3063 wire |= uint64(b&0x7F) << shift 3064 if b < 0x80 { 3065 break 3066 } 3067 } 3068 fieldNum := int32(wire >> 3) 3069 wireType := int(wire & 0x7) 3070 if wireType == 4 { 3071 return fmt.Errorf("proto: CatalogCkp: wiretype end group for non-group") 3072 } 3073 if fieldNum <= 0 { 3074 return fmt.Errorf("proto: CatalogCkp: illegal tag %d (wire type %d)", fieldNum, wire) 3075 } 3076 switch fieldNum { 3077 case 1: 3078 if wireType != 2 { 3079 return fmt.Errorf("proto: wrong wireType = %d for field MinTs", wireType) 3080 } 3081 var msglen int 3082 for shift := uint(0); ; shift += 7 { 3083 if shift >= 64 { 3084 return ErrIntOverflowApi 3085 } 3086 if iNdEx >= l { 3087 return io.ErrUnexpectedEOF 3088 } 3089 b := dAtA[iNdEx] 3090 iNdEx++ 3091 msglen |= int(b&0x7F) << shift 3092 if b < 0x80 { 3093 break 3094 } 3095 } 3096 if msglen < 0 { 3097 return ErrInvalidLengthApi 3098 } 3099 postIndex := iNdEx + msglen 3100 if postIndex < 0 { 3101 return ErrInvalidLengthApi 3102 } 3103 if postIndex > l { 3104 return io.ErrUnexpectedEOF 3105 } 3106 if m.MinTs == nil { 3107 m.MinTs = ×tamp.Timestamp{} 3108 } 3109 if err := m.MinTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3110 return err 3111 } 3112 iNdEx = postIndex 3113 case 2: 3114 if wireType != 2 { 3115 return fmt.Errorf("proto: wrong wireType = %d for field MaxTs", wireType) 3116 } 3117 var msglen int 3118 for shift := uint(0); ; shift += 7 { 3119 if shift >= 64 { 3120 return ErrIntOverflowApi 3121 } 3122 if iNdEx >= l { 3123 return io.ErrUnexpectedEOF 3124 } 3125 b := dAtA[iNdEx] 3126 iNdEx++ 3127 msglen |= int(b&0x7F) << shift 3128 if b < 0x80 { 3129 break 3130 } 3131 } 3132 if msglen < 0 { 3133 return ErrInvalidLengthApi 3134 } 3135 postIndex := iNdEx + msglen 3136 if postIndex < 0 { 3137 return ErrInvalidLengthApi 3138 } 3139 if postIndex > l { 3140 return io.ErrUnexpectedEOF 3141 } 3142 if m.MaxTs == nil { 3143 m.MaxTs = ×tamp.Timestamp{} 3144 } 3145 if err := m.MaxTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3146 return err 3147 } 3148 iNdEx = postIndex 3149 case 3: 3150 if wireType != 2 { 3151 return fmt.Errorf("proto: wrong wireType = %d for field Bat", wireType) 3152 } 3153 var msglen int 3154 for shift := uint(0); ; shift += 7 { 3155 if shift >= 64 { 3156 return ErrIntOverflowApi 3157 } 3158 if iNdEx >= l { 3159 return io.ErrUnexpectedEOF 3160 } 3161 b := dAtA[iNdEx] 3162 iNdEx++ 3163 msglen |= int(b&0x7F) << shift 3164 if b < 0x80 { 3165 break 3166 } 3167 } 3168 if msglen < 0 { 3169 return ErrInvalidLengthApi 3170 } 3171 postIndex := iNdEx + msglen 3172 if postIndex < 0 { 3173 return ErrInvalidLengthApi 3174 } 3175 if postIndex > l { 3176 return io.ErrUnexpectedEOF 3177 } 3178 if m.Bat == nil { 3179 m.Bat = &Batch{} 3180 } 3181 if err := m.Bat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3182 return err 3183 } 3184 iNdEx = postIndex 3185 default: 3186 iNdEx = preIndex 3187 skippy, err := skipApi(dAtA[iNdEx:]) 3188 if err != nil { 3189 return err 3190 } 3191 if (skippy < 0) || (iNdEx+skippy) < 0 { 3192 return ErrInvalidLengthApi 3193 } 3194 if (iNdEx + skippy) > l { 3195 return io.ErrUnexpectedEOF 3196 } 3197 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3198 iNdEx += skippy 3199 } 3200 } 3201 3202 if iNdEx > l { 3203 return io.ErrUnexpectedEOF 3204 } 3205 return nil 3206 } 3207 func (m *MetadataCkp) Unmarshal(dAtA []byte) error { 3208 l := len(dAtA) 3209 iNdEx := 0 3210 for iNdEx < l { 3211 preIndex := iNdEx 3212 var wire uint64 3213 for shift := uint(0); ; shift += 7 { 3214 if shift >= 64 { 3215 return ErrIntOverflowApi 3216 } 3217 if iNdEx >= l { 3218 return io.ErrUnexpectedEOF 3219 } 3220 b := dAtA[iNdEx] 3221 iNdEx++ 3222 wire |= uint64(b&0x7F) << shift 3223 if b < 0x80 { 3224 break 3225 } 3226 } 3227 fieldNum := int32(wire >> 3) 3228 wireType := int(wire & 0x7) 3229 if wireType == 4 { 3230 return fmt.Errorf("proto: MetadataCkp: wiretype end group for non-group") 3231 } 3232 if fieldNum <= 0 { 3233 return fmt.Errorf("proto: MetadataCkp: illegal tag %d (wire type %d)", fieldNum, wire) 3234 } 3235 switch fieldNum { 3236 case 1: 3237 if wireType != 2 { 3238 return fmt.Errorf("proto: wrong wireType = %d for field MinTs", wireType) 3239 } 3240 var msglen int 3241 for shift := uint(0); ; shift += 7 { 3242 if shift >= 64 { 3243 return ErrIntOverflowApi 3244 } 3245 if iNdEx >= l { 3246 return io.ErrUnexpectedEOF 3247 } 3248 b := dAtA[iNdEx] 3249 iNdEx++ 3250 msglen |= int(b&0x7F) << shift 3251 if b < 0x80 { 3252 break 3253 } 3254 } 3255 if msglen < 0 { 3256 return ErrInvalidLengthApi 3257 } 3258 postIndex := iNdEx + msglen 3259 if postIndex < 0 { 3260 return ErrInvalidLengthApi 3261 } 3262 if postIndex > l { 3263 return io.ErrUnexpectedEOF 3264 } 3265 if m.MinTs == nil { 3266 m.MinTs = ×tamp.Timestamp{} 3267 } 3268 if err := m.MinTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3269 return err 3270 } 3271 iNdEx = postIndex 3272 case 2: 3273 if wireType != 2 { 3274 return fmt.Errorf("proto: wrong wireType = %d for field MaxTs", wireType) 3275 } 3276 var msglen int 3277 for shift := uint(0); ; shift += 7 { 3278 if shift >= 64 { 3279 return ErrIntOverflowApi 3280 } 3281 if iNdEx >= l { 3282 return io.ErrUnexpectedEOF 3283 } 3284 b := dAtA[iNdEx] 3285 iNdEx++ 3286 msglen |= int(b&0x7F) << shift 3287 if b < 0x80 { 3288 break 3289 } 3290 } 3291 if msglen < 0 { 3292 return ErrInvalidLengthApi 3293 } 3294 postIndex := iNdEx + msglen 3295 if postIndex < 0 { 3296 return ErrInvalidLengthApi 3297 } 3298 if postIndex > l { 3299 return io.ErrUnexpectedEOF 3300 } 3301 if m.MaxTs == nil { 3302 m.MaxTs = ×tamp.Timestamp{} 3303 } 3304 if err := m.MaxTs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3305 return err 3306 } 3307 iNdEx = postIndex 3308 case 3: 3309 if wireType != 2 { 3310 return fmt.Errorf("proto: wrong wireType = %d for field Bat", wireType) 3311 } 3312 var msglen int 3313 for shift := uint(0); ; shift += 7 { 3314 if shift >= 64 { 3315 return ErrIntOverflowApi 3316 } 3317 if iNdEx >= l { 3318 return io.ErrUnexpectedEOF 3319 } 3320 b := dAtA[iNdEx] 3321 iNdEx++ 3322 msglen |= int(b&0x7F) << shift 3323 if b < 0x80 { 3324 break 3325 } 3326 } 3327 if msglen < 0 { 3328 return ErrInvalidLengthApi 3329 } 3330 postIndex := iNdEx + msglen 3331 if postIndex < 0 { 3332 return ErrInvalidLengthApi 3333 } 3334 if postIndex > l { 3335 return io.ErrUnexpectedEOF 3336 } 3337 if m.Bat == nil { 3338 m.Bat = &Batch{} 3339 } 3340 if err := m.Bat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3341 return err 3342 } 3343 iNdEx = postIndex 3344 default: 3345 iNdEx = preIndex 3346 skippy, err := skipApi(dAtA[iNdEx:]) 3347 if err != nil { 3348 return err 3349 } 3350 if (skippy < 0) || (iNdEx+skippy) < 0 { 3351 return ErrInvalidLengthApi 3352 } 3353 if (iNdEx + skippy) > l { 3354 return io.ErrUnexpectedEOF 3355 } 3356 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3357 iNdEx += skippy 3358 } 3359 } 3360 3361 if iNdEx > l { 3362 return io.ErrUnexpectedEOF 3363 } 3364 return nil 3365 } 3366 func skipApi(dAtA []byte) (n int, err error) { 3367 l := len(dAtA) 3368 iNdEx := 0 3369 depth := 0 3370 for iNdEx < l { 3371 var wire uint64 3372 for shift := uint(0); ; shift += 7 { 3373 if shift >= 64 { 3374 return 0, ErrIntOverflowApi 3375 } 3376 if iNdEx >= l { 3377 return 0, io.ErrUnexpectedEOF 3378 } 3379 b := dAtA[iNdEx] 3380 iNdEx++ 3381 wire |= (uint64(b) & 0x7F) << shift 3382 if b < 0x80 { 3383 break 3384 } 3385 } 3386 wireType := int(wire & 0x7) 3387 switch wireType { 3388 case 0: 3389 for shift := uint(0); ; shift += 7 { 3390 if shift >= 64 { 3391 return 0, ErrIntOverflowApi 3392 } 3393 if iNdEx >= l { 3394 return 0, io.ErrUnexpectedEOF 3395 } 3396 iNdEx++ 3397 if dAtA[iNdEx-1] < 0x80 { 3398 break 3399 } 3400 } 3401 case 1: 3402 iNdEx += 8 3403 case 2: 3404 var length int 3405 for shift := uint(0); ; shift += 7 { 3406 if shift >= 64 { 3407 return 0, ErrIntOverflowApi 3408 } 3409 if iNdEx >= l { 3410 return 0, io.ErrUnexpectedEOF 3411 } 3412 b := dAtA[iNdEx] 3413 iNdEx++ 3414 length |= (int(b) & 0x7F) << shift 3415 if b < 0x80 { 3416 break 3417 } 3418 } 3419 if length < 0 { 3420 return 0, ErrInvalidLengthApi 3421 } 3422 iNdEx += length 3423 case 3: 3424 depth++ 3425 case 4: 3426 if depth == 0 { 3427 return 0, ErrUnexpectedEndOfGroupApi 3428 } 3429 depth-- 3430 case 5: 3431 iNdEx += 4 3432 default: 3433 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3434 } 3435 if iNdEx < 0 { 3436 return 0, ErrInvalidLengthApi 3437 } 3438 if depth == 0 { 3439 return iNdEx, nil 3440 } 3441 } 3442 return 0, io.ErrUnexpectedEOF 3443 } 3444 3445 var ( 3446 ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") 3447 ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") 3448 ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group") 3449 )