github.com/m3db/m3@v1.5.0/src/dbnode/generated/proto/snapshot/snapshot_metadata.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/m3db/m3/src/dbnode/generated/proto/snapshot/snapshot_metadata.proto 3 4 // Copyright (c) 2019 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 /* 25 Package snapshot is a generated protocol buffer package. 26 27 It is generated from these files: 28 github.com/m3db/m3/src/dbnode/generated/proto/snapshot/snapshot_metadata.proto 29 30 It has these top-level messages: 31 Metadata 32 CommitLogID 33 */ 34 package snapshot 35 36 import proto "github.com/gogo/protobuf/proto" 37 import fmt "fmt" 38 import math "math" 39 40 import io "io" 41 42 // Reference imports to suppress errors if they are not otherwise used. 43 var _ = proto.Marshal 44 var _ = fmt.Errorf 45 var _ = math.Inf 46 47 // This is a compile-time assertion to ensure that this generated file 48 // is compatible with the proto package it is being compiled against. 49 // A compilation error at this line likely means your copy of the 50 // proto package needs to be updated. 51 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 52 53 type Metadata struct { 54 SnapshotIndex int64 `protobuf:"varint,1,opt,name=snapshotIndex,proto3" json:"snapshotIndex,omitempty"` 55 SnapshotUUID []byte `protobuf:"bytes,2,opt,name=snapshotUUID,proto3" json:"snapshotUUID,omitempty"` 56 CommitlogID *CommitLogID `protobuf:"bytes,3,opt,name=commitlogID" json:"commitlogID,omitempty"` 57 } 58 59 func (m *Metadata) Reset() { *m = Metadata{} } 60 func (m *Metadata) String() string { return proto.CompactTextString(m) } 61 func (*Metadata) ProtoMessage() {} 62 func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptorSnapshotMetadata, []int{0} } 63 64 func (m *Metadata) GetSnapshotIndex() int64 { 65 if m != nil { 66 return m.SnapshotIndex 67 } 68 return 0 69 } 70 71 func (m *Metadata) GetSnapshotUUID() []byte { 72 if m != nil { 73 return m.SnapshotUUID 74 } 75 return nil 76 } 77 78 func (m *Metadata) GetCommitlogID() *CommitLogID { 79 if m != nil { 80 return m.CommitlogID 81 } 82 return nil 83 } 84 85 type CommitLogID struct { 86 FilePath string `protobuf:"bytes,1,opt,name=filePath,proto3" json:"filePath,omitempty"` 87 Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` 88 } 89 90 func (m *CommitLogID) Reset() { *m = CommitLogID{} } 91 func (m *CommitLogID) String() string { return proto.CompactTextString(m) } 92 func (*CommitLogID) ProtoMessage() {} 93 func (*CommitLogID) Descriptor() ([]byte, []int) { return fileDescriptorSnapshotMetadata, []int{1} } 94 95 func (m *CommitLogID) GetFilePath() string { 96 if m != nil { 97 return m.FilePath 98 } 99 return "" 100 } 101 102 func (m *CommitLogID) GetIndex() int64 { 103 if m != nil { 104 return m.Index 105 } 106 return 0 107 } 108 109 func init() { 110 proto.RegisterType((*Metadata)(nil), "snapshot.Metadata") 111 proto.RegisterType((*CommitLogID)(nil), "snapshot.CommitLogID") 112 } 113 func (m *Metadata) Marshal() (dAtA []byte, err error) { 114 size := m.Size() 115 dAtA = make([]byte, size) 116 n, err := m.MarshalTo(dAtA) 117 if err != nil { 118 return nil, err 119 } 120 return dAtA[:n], nil 121 } 122 123 func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { 124 var i int 125 _ = i 126 var l int 127 _ = l 128 if m.SnapshotIndex != 0 { 129 dAtA[i] = 0x8 130 i++ 131 i = encodeVarintSnapshotMetadata(dAtA, i, uint64(m.SnapshotIndex)) 132 } 133 if len(m.SnapshotUUID) > 0 { 134 dAtA[i] = 0x12 135 i++ 136 i = encodeVarintSnapshotMetadata(dAtA, i, uint64(len(m.SnapshotUUID))) 137 i += copy(dAtA[i:], m.SnapshotUUID) 138 } 139 if m.CommitlogID != nil { 140 dAtA[i] = 0x1a 141 i++ 142 i = encodeVarintSnapshotMetadata(dAtA, i, uint64(m.CommitlogID.Size())) 143 n1, err := m.CommitlogID.MarshalTo(dAtA[i:]) 144 if err != nil { 145 return 0, err 146 } 147 i += n1 148 } 149 return i, nil 150 } 151 152 func (m *CommitLogID) Marshal() (dAtA []byte, err error) { 153 size := m.Size() 154 dAtA = make([]byte, size) 155 n, err := m.MarshalTo(dAtA) 156 if err != nil { 157 return nil, err 158 } 159 return dAtA[:n], nil 160 } 161 162 func (m *CommitLogID) MarshalTo(dAtA []byte) (int, error) { 163 var i int 164 _ = i 165 var l int 166 _ = l 167 if len(m.FilePath) > 0 { 168 dAtA[i] = 0xa 169 i++ 170 i = encodeVarintSnapshotMetadata(dAtA, i, uint64(len(m.FilePath))) 171 i += copy(dAtA[i:], m.FilePath) 172 } 173 if m.Index != 0 { 174 dAtA[i] = 0x10 175 i++ 176 i = encodeVarintSnapshotMetadata(dAtA, i, uint64(m.Index)) 177 } 178 return i, nil 179 } 180 181 func encodeVarintSnapshotMetadata(dAtA []byte, offset int, v uint64) int { 182 for v >= 1<<7 { 183 dAtA[offset] = uint8(v&0x7f | 0x80) 184 v >>= 7 185 offset++ 186 } 187 dAtA[offset] = uint8(v) 188 return offset + 1 189 } 190 func (m *Metadata) Size() (n int) { 191 var l int 192 _ = l 193 if m.SnapshotIndex != 0 { 194 n += 1 + sovSnapshotMetadata(uint64(m.SnapshotIndex)) 195 } 196 l = len(m.SnapshotUUID) 197 if l > 0 { 198 n += 1 + l + sovSnapshotMetadata(uint64(l)) 199 } 200 if m.CommitlogID != nil { 201 l = m.CommitlogID.Size() 202 n += 1 + l + sovSnapshotMetadata(uint64(l)) 203 } 204 return n 205 } 206 207 func (m *CommitLogID) Size() (n int) { 208 var l int 209 _ = l 210 l = len(m.FilePath) 211 if l > 0 { 212 n += 1 + l + sovSnapshotMetadata(uint64(l)) 213 } 214 if m.Index != 0 { 215 n += 1 + sovSnapshotMetadata(uint64(m.Index)) 216 } 217 return n 218 } 219 220 func sovSnapshotMetadata(x uint64) (n int) { 221 for { 222 n++ 223 x >>= 7 224 if x == 0 { 225 break 226 } 227 } 228 return n 229 } 230 func sozSnapshotMetadata(x uint64) (n int) { 231 return sovSnapshotMetadata(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 232 } 233 func (m *Metadata) Unmarshal(dAtA []byte) error { 234 l := len(dAtA) 235 iNdEx := 0 236 for iNdEx < l { 237 preIndex := iNdEx 238 var wire uint64 239 for shift := uint(0); ; shift += 7 { 240 if shift >= 64 { 241 return ErrIntOverflowSnapshotMetadata 242 } 243 if iNdEx >= l { 244 return io.ErrUnexpectedEOF 245 } 246 b := dAtA[iNdEx] 247 iNdEx++ 248 wire |= (uint64(b) & 0x7F) << shift 249 if b < 0x80 { 250 break 251 } 252 } 253 fieldNum := int32(wire >> 3) 254 wireType := int(wire & 0x7) 255 if wireType == 4 { 256 return fmt.Errorf("proto: Metadata: wiretype end group for non-group") 257 } 258 if fieldNum <= 0 { 259 return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) 260 } 261 switch fieldNum { 262 case 1: 263 if wireType != 0 { 264 return fmt.Errorf("proto: wrong wireType = %d for field SnapshotIndex", wireType) 265 } 266 m.SnapshotIndex = 0 267 for shift := uint(0); ; shift += 7 { 268 if shift >= 64 { 269 return ErrIntOverflowSnapshotMetadata 270 } 271 if iNdEx >= l { 272 return io.ErrUnexpectedEOF 273 } 274 b := dAtA[iNdEx] 275 iNdEx++ 276 m.SnapshotIndex |= (int64(b) & 0x7F) << shift 277 if b < 0x80 { 278 break 279 } 280 } 281 case 2: 282 if wireType != 2 { 283 return fmt.Errorf("proto: wrong wireType = %d for field SnapshotUUID", wireType) 284 } 285 var byteLen int 286 for shift := uint(0); ; shift += 7 { 287 if shift >= 64 { 288 return ErrIntOverflowSnapshotMetadata 289 } 290 if iNdEx >= l { 291 return io.ErrUnexpectedEOF 292 } 293 b := dAtA[iNdEx] 294 iNdEx++ 295 byteLen |= (int(b) & 0x7F) << shift 296 if b < 0x80 { 297 break 298 } 299 } 300 if byteLen < 0 { 301 return ErrInvalidLengthSnapshotMetadata 302 } 303 postIndex := iNdEx + byteLen 304 if postIndex > l { 305 return io.ErrUnexpectedEOF 306 } 307 m.SnapshotUUID = append(m.SnapshotUUID[:0], dAtA[iNdEx:postIndex]...) 308 if m.SnapshotUUID == nil { 309 m.SnapshotUUID = []byte{} 310 } 311 iNdEx = postIndex 312 case 3: 313 if wireType != 2 { 314 return fmt.Errorf("proto: wrong wireType = %d for field CommitlogID", wireType) 315 } 316 var msglen int 317 for shift := uint(0); ; shift += 7 { 318 if shift >= 64 { 319 return ErrIntOverflowSnapshotMetadata 320 } 321 if iNdEx >= l { 322 return io.ErrUnexpectedEOF 323 } 324 b := dAtA[iNdEx] 325 iNdEx++ 326 msglen |= (int(b) & 0x7F) << shift 327 if b < 0x80 { 328 break 329 } 330 } 331 if msglen < 0 { 332 return ErrInvalidLengthSnapshotMetadata 333 } 334 postIndex := iNdEx + msglen 335 if postIndex > l { 336 return io.ErrUnexpectedEOF 337 } 338 if m.CommitlogID == nil { 339 m.CommitlogID = &CommitLogID{} 340 } 341 if err := m.CommitlogID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 342 return err 343 } 344 iNdEx = postIndex 345 default: 346 iNdEx = preIndex 347 skippy, err := skipSnapshotMetadata(dAtA[iNdEx:]) 348 if err != nil { 349 return err 350 } 351 if skippy < 0 { 352 return ErrInvalidLengthSnapshotMetadata 353 } 354 if (iNdEx + skippy) > l { 355 return io.ErrUnexpectedEOF 356 } 357 iNdEx += skippy 358 } 359 } 360 361 if iNdEx > l { 362 return io.ErrUnexpectedEOF 363 } 364 return nil 365 } 366 func (m *CommitLogID) Unmarshal(dAtA []byte) error { 367 l := len(dAtA) 368 iNdEx := 0 369 for iNdEx < l { 370 preIndex := iNdEx 371 var wire uint64 372 for shift := uint(0); ; shift += 7 { 373 if shift >= 64 { 374 return ErrIntOverflowSnapshotMetadata 375 } 376 if iNdEx >= l { 377 return io.ErrUnexpectedEOF 378 } 379 b := dAtA[iNdEx] 380 iNdEx++ 381 wire |= (uint64(b) & 0x7F) << shift 382 if b < 0x80 { 383 break 384 } 385 } 386 fieldNum := int32(wire >> 3) 387 wireType := int(wire & 0x7) 388 if wireType == 4 { 389 return fmt.Errorf("proto: CommitLogID: wiretype end group for non-group") 390 } 391 if fieldNum <= 0 { 392 return fmt.Errorf("proto: CommitLogID: illegal tag %d (wire type %d)", fieldNum, wire) 393 } 394 switch fieldNum { 395 case 1: 396 if wireType != 2 { 397 return fmt.Errorf("proto: wrong wireType = %d for field FilePath", wireType) 398 } 399 var stringLen uint64 400 for shift := uint(0); ; shift += 7 { 401 if shift >= 64 { 402 return ErrIntOverflowSnapshotMetadata 403 } 404 if iNdEx >= l { 405 return io.ErrUnexpectedEOF 406 } 407 b := dAtA[iNdEx] 408 iNdEx++ 409 stringLen |= (uint64(b) & 0x7F) << shift 410 if b < 0x80 { 411 break 412 } 413 } 414 intStringLen := int(stringLen) 415 if intStringLen < 0 { 416 return ErrInvalidLengthSnapshotMetadata 417 } 418 postIndex := iNdEx + intStringLen 419 if postIndex > l { 420 return io.ErrUnexpectedEOF 421 } 422 m.FilePath = string(dAtA[iNdEx:postIndex]) 423 iNdEx = postIndex 424 case 2: 425 if wireType != 0 { 426 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 427 } 428 m.Index = 0 429 for shift := uint(0); ; shift += 7 { 430 if shift >= 64 { 431 return ErrIntOverflowSnapshotMetadata 432 } 433 if iNdEx >= l { 434 return io.ErrUnexpectedEOF 435 } 436 b := dAtA[iNdEx] 437 iNdEx++ 438 m.Index |= (int64(b) & 0x7F) << shift 439 if b < 0x80 { 440 break 441 } 442 } 443 default: 444 iNdEx = preIndex 445 skippy, err := skipSnapshotMetadata(dAtA[iNdEx:]) 446 if err != nil { 447 return err 448 } 449 if skippy < 0 { 450 return ErrInvalidLengthSnapshotMetadata 451 } 452 if (iNdEx + skippy) > l { 453 return io.ErrUnexpectedEOF 454 } 455 iNdEx += skippy 456 } 457 } 458 459 if iNdEx > l { 460 return io.ErrUnexpectedEOF 461 } 462 return nil 463 } 464 func skipSnapshotMetadata(dAtA []byte) (n int, err error) { 465 l := len(dAtA) 466 iNdEx := 0 467 for iNdEx < l { 468 var wire uint64 469 for shift := uint(0); ; shift += 7 { 470 if shift >= 64 { 471 return 0, ErrIntOverflowSnapshotMetadata 472 } 473 if iNdEx >= l { 474 return 0, io.ErrUnexpectedEOF 475 } 476 b := dAtA[iNdEx] 477 iNdEx++ 478 wire |= (uint64(b) & 0x7F) << shift 479 if b < 0x80 { 480 break 481 } 482 } 483 wireType := int(wire & 0x7) 484 switch wireType { 485 case 0: 486 for shift := uint(0); ; shift += 7 { 487 if shift >= 64 { 488 return 0, ErrIntOverflowSnapshotMetadata 489 } 490 if iNdEx >= l { 491 return 0, io.ErrUnexpectedEOF 492 } 493 iNdEx++ 494 if dAtA[iNdEx-1] < 0x80 { 495 break 496 } 497 } 498 return iNdEx, nil 499 case 1: 500 iNdEx += 8 501 return iNdEx, nil 502 case 2: 503 var length int 504 for shift := uint(0); ; shift += 7 { 505 if shift >= 64 { 506 return 0, ErrIntOverflowSnapshotMetadata 507 } 508 if iNdEx >= l { 509 return 0, io.ErrUnexpectedEOF 510 } 511 b := dAtA[iNdEx] 512 iNdEx++ 513 length |= (int(b) & 0x7F) << shift 514 if b < 0x80 { 515 break 516 } 517 } 518 iNdEx += length 519 if length < 0 { 520 return 0, ErrInvalidLengthSnapshotMetadata 521 } 522 return iNdEx, nil 523 case 3: 524 for { 525 var innerWire uint64 526 var start int = iNdEx 527 for shift := uint(0); ; shift += 7 { 528 if shift >= 64 { 529 return 0, ErrIntOverflowSnapshotMetadata 530 } 531 if iNdEx >= l { 532 return 0, io.ErrUnexpectedEOF 533 } 534 b := dAtA[iNdEx] 535 iNdEx++ 536 innerWire |= (uint64(b) & 0x7F) << shift 537 if b < 0x80 { 538 break 539 } 540 } 541 innerWireType := int(innerWire & 0x7) 542 if innerWireType == 4 { 543 break 544 } 545 next, err := skipSnapshotMetadata(dAtA[start:]) 546 if err != nil { 547 return 0, err 548 } 549 iNdEx = start + next 550 } 551 return iNdEx, nil 552 case 4: 553 return iNdEx, nil 554 case 5: 555 iNdEx += 4 556 return iNdEx, nil 557 default: 558 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 559 } 560 } 561 panic("unreachable") 562 } 563 564 var ( 565 ErrInvalidLengthSnapshotMetadata = fmt.Errorf("proto: negative length found during unmarshaling") 566 ErrIntOverflowSnapshotMetadata = fmt.Errorf("proto: integer overflow") 567 ) 568 569 func init() { 570 proto.RegisterFile("github.com/m3db/m3/src/dbnode/generated/proto/snapshot/snapshot_metadata.proto", fileDescriptorSnapshotMetadata) 571 } 572 573 var fileDescriptorSnapshotMetadata = []byte{ 574 // 241 bytes of a gzipped FileDescriptorProto 575 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xf2, 0x4b, 0xcf, 0x2c, 0xc9, 576 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0x35, 0x4e, 0x49, 0xd2, 0xcf, 0x35, 0xd6, 0x2f, 577 0x2e, 0x4a, 0xd6, 0x4f, 0x49, 0xca, 0xcb, 0x4f, 0x49, 0xd5, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 578 0x2c, 0x49, 0x4d, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0xce, 0x4b, 0x2c, 0x28, 0xce, 579 0xc8, 0x2f, 0x81, 0x33, 0xe2, 0x73, 0x53, 0x4b, 0x12, 0x53, 0x12, 0x4b, 0x12, 0xf5, 0xc0, 0x0a, 580 0x84, 0x38, 0x60, 0x12, 0x4a, 0xbd, 0x8c, 0x5c, 0x1c, 0xbe, 0x50, 0x49, 0x21, 0x15, 0x2e, 0x5e, 581 0x98, 0x84, 0x67, 0x5e, 0x4a, 0x6a, 0x85, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0xaa, 0xa0, 582 0x90, 0x12, 0x17, 0x0f, 0x4c, 0x20, 0x34, 0xd4, 0xd3, 0x45, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 583 0x08, 0x45, 0x4c, 0xc8, 0x9c, 0x8b, 0x3b, 0x39, 0x3f, 0x37, 0x37, 0xb3, 0x24, 0x27, 0x3f, 0xdd, 584 0xd3, 0x45, 0x82, 0x59, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x54, 0x0f, 0xa6, 0x46, 0xcf, 0x19, 0x2c, 585 0xe9, 0x03, 0x92, 0x0c, 0x42, 0x56, 0xa9, 0x64, 0xcf, 0xc5, 0x8d, 0x24, 0x27, 0x24, 0xc5, 0xc5, 586 0x91, 0x96, 0x99, 0x93, 0x1a, 0x90, 0x58, 0x92, 0x01, 0x76, 0x0c, 0x67, 0x10, 0x9c, 0x2f, 0x24, 587 0xc2, 0xc5, 0x9a, 0x09, 0x76, 0x25, 0x13, 0xd8, 0x95, 0x10, 0x8e, 0x93, 0xc0, 0x89, 0x47, 0x72, 588 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x12, 0x1b, 589 0xd8, 0xcf, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x66, 0xf1, 0x77, 0x45, 0x01, 0x00, 590 0x00, 591 }