backup.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: backup.proto
  3. /*
  4. Package protos is a generated protocol buffer package.
  5. It is generated from these files:
  6. backup.proto
  7. manifest.proto
  8. It has these top-level messages:
  9. KVPair
  10. ManifestChangeSet
  11. ManifestChange
  12. */
  13. package protos
  14. import proto "github.com/golang/protobuf/proto"
  15. import fmt "fmt"
  16. import math "math"
  17. import io "io"
  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. // This is a compile-time assertion to ensure that this generated file
  23. // is compatible with the proto package it is being compiled against.
  24. // A compilation error at this line likely means your copy of the
  25. // proto package needs to be updated.
  26. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  27. type KVPair struct {
  28. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  29. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  30. UserMeta []byte `protobuf:"bytes,3,opt,name=userMeta,proto3" json:"userMeta,omitempty"`
  31. Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
  32. ExpiresAt uint64 `protobuf:"varint,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
  33. }
  34. func (m *KVPair) Reset() { *m = KVPair{} }
  35. func (m *KVPair) String() string { return proto.CompactTextString(m) }
  36. func (*KVPair) ProtoMessage() {}
  37. func (*KVPair) Descriptor() ([]byte, []int) { return fileDescriptorBackup, []int{0} }
  38. func (m *KVPair) GetKey() []byte {
  39. if m != nil {
  40. return m.Key
  41. }
  42. return nil
  43. }
  44. func (m *KVPair) GetValue() []byte {
  45. if m != nil {
  46. return m.Value
  47. }
  48. return nil
  49. }
  50. func (m *KVPair) GetUserMeta() []byte {
  51. if m != nil {
  52. return m.UserMeta
  53. }
  54. return nil
  55. }
  56. func (m *KVPair) GetVersion() uint64 {
  57. if m != nil {
  58. return m.Version
  59. }
  60. return 0
  61. }
  62. func (m *KVPair) GetExpiresAt() uint64 {
  63. if m != nil {
  64. return m.ExpiresAt
  65. }
  66. return 0
  67. }
  68. func init() {
  69. proto.RegisterType((*KVPair)(nil), "protos.KVPair")
  70. }
  71. func (m *KVPair) Marshal() (dAtA []byte, err error) {
  72. size := m.Size()
  73. dAtA = make([]byte, size)
  74. n, err := m.MarshalTo(dAtA)
  75. if err != nil {
  76. return nil, err
  77. }
  78. return dAtA[:n], nil
  79. }
  80. func (m *KVPair) MarshalTo(dAtA []byte) (int, error) {
  81. var i int
  82. _ = i
  83. var l int
  84. _ = l
  85. if len(m.Key) > 0 {
  86. dAtA[i] = 0xa
  87. i++
  88. i = encodeVarintBackup(dAtA, i, uint64(len(m.Key)))
  89. i += copy(dAtA[i:], m.Key)
  90. }
  91. if len(m.Value) > 0 {
  92. dAtA[i] = 0x12
  93. i++
  94. i = encodeVarintBackup(dAtA, i, uint64(len(m.Value)))
  95. i += copy(dAtA[i:], m.Value)
  96. }
  97. if len(m.UserMeta) > 0 {
  98. dAtA[i] = 0x1a
  99. i++
  100. i = encodeVarintBackup(dAtA, i, uint64(len(m.UserMeta)))
  101. i += copy(dAtA[i:], m.UserMeta)
  102. }
  103. if m.Version != 0 {
  104. dAtA[i] = 0x20
  105. i++
  106. i = encodeVarintBackup(dAtA, i, uint64(m.Version))
  107. }
  108. if m.ExpiresAt != 0 {
  109. dAtA[i] = 0x28
  110. i++
  111. i = encodeVarintBackup(dAtA, i, uint64(m.ExpiresAt))
  112. }
  113. return i, nil
  114. }
  115. func encodeFixed64Backup(dAtA []byte, offset int, v uint64) int {
  116. dAtA[offset] = uint8(v)
  117. dAtA[offset+1] = uint8(v >> 8)
  118. dAtA[offset+2] = uint8(v >> 16)
  119. dAtA[offset+3] = uint8(v >> 24)
  120. dAtA[offset+4] = uint8(v >> 32)
  121. dAtA[offset+5] = uint8(v >> 40)
  122. dAtA[offset+6] = uint8(v >> 48)
  123. dAtA[offset+7] = uint8(v >> 56)
  124. return offset + 8
  125. }
  126. func encodeFixed32Backup(dAtA []byte, offset int, v uint32) int {
  127. dAtA[offset] = uint8(v)
  128. dAtA[offset+1] = uint8(v >> 8)
  129. dAtA[offset+2] = uint8(v >> 16)
  130. dAtA[offset+3] = uint8(v >> 24)
  131. return offset + 4
  132. }
  133. func encodeVarintBackup(dAtA []byte, offset int, v uint64) int {
  134. for v >= 1<<7 {
  135. dAtA[offset] = uint8(v&0x7f | 0x80)
  136. v >>= 7
  137. offset++
  138. }
  139. dAtA[offset] = uint8(v)
  140. return offset + 1
  141. }
  142. func (m *KVPair) Size() (n int) {
  143. var l int
  144. _ = l
  145. l = len(m.Key)
  146. if l > 0 {
  147. n += 1 + l + sovBackup(uint64(l))
  148. }
  149. l = len(m.Value)
  150. if l > 0 {
  151. n += 1 + l + sovBackup(uint64(l))
  152. }
  153. l = len(m.UserMeta)
  154. if l > 0 {
  155. n += 1 + l + sovBackup(uint64(l))
  156. }
  157. if m.Version != 0 {
  158. n += 1 + sovBackup(uint64(m.Version))
  159. }
  160. if m.ExpiresAt != 0 {
  161. n += 1 + sovBackup(uint64(m.ExpiresAt))
  162. }
  163. return n
  164. }
  165. func sovBackup(x uint64) (n int) {
  166. for {
  167. n++
  168. x >>= 7
  169. if x == 0 {
  170. break
  171. }
  172. }
  173. return n
  174. }
  175. func sozBackup(x uint64) (n int) {
  176. return sovBackup(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  177. }
  178. func (m *KVPair) Unmarshal(dAtA []byte) error {
  179. l := len(dAtA)
  180. iNdEx := 0
  181. for iNdEx < l {
  182. preIndex := iNdEx
  183. var wire uint64
  184. for shift := uint(0); ; shift += 7 {
  185. if shift >= 64 {
  186. return ErrIntOverflowBackup
  187. }
  188. if iNdEx >= l {
  189. return io.ErrUnexpectedEOF
  190. }
  191. b := dAtA[iNdEx]
  192. iNdEx++
  193. wire |= (uint64(b) & 0x7F) << shift
  194. if b < 0x80 {
  195. break
  196. }
  197. }
  198. fieldNum := int32(wire >> 3)
  199. wireType := int(wire & 0x7)
  200. if wireType == 4 {
  201. return fmt.Errorf("proto: KVPair: wiretype end group for non-group")
  202. }
  203. if fieldNum <= 0 {
  204. return fmt.Errorf("proto: KVPair: illegal tag %d (wire type %d)", fieldNum, wire)
  205. }
  206. switch fieldNum {
  207. case 1:
  208. if wireType != 2 {
  209. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  210. }
  211. var byteLen int
  212. for shift := uint(0); ; shift += 7 {
  213. if shift >= 64 {
  214. return ErrIntOverflowBackup
  215. }
  216. if iNdEx >= l {
  217. return io.ErrUnexpectedEOF
  218. }
  219. b := dAtA[iNdEx]
  220. iNdEx++
  221. byteLen |= (int(b) & 0x7F) << shift
  222. if b < 0x80 {
  223. break
  224. }
  225. }
  226. if byteLen < 0 {
  227. return ErrInvalidLengthBackup
  228. }
  229. postIndex := iNdEx + byteLen
  230. if postIndex > l {
  231. return io.ErrUnexpectedEOF
  232. }
  233. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  234. if m.Key == nil {
  235. m.Key = []byte{}
  236. }
  237. iNdEx = postIndex
  238. case 2:
  239. if wireType != 2 {
  240. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  241. }
  242. var byteLen int
  243. for shift := uint(0); ; shift += 7 {
  244. if shift >= 64 {
  245. return ErrIntOverflowBackup
  246. }
  247. if iNdEx >= l {
  248. return io.ErrUnexpectedEOF
  249. }
  250. b := dAtA[iNdEx]
  251. iNdEx++
  252. byteLen |= (int(b) & 0x7F) << shift
  253. if b < 0x80 {
  254. break
  255. }
  256. }
  257. if byteLen < 0 {
  258. return ErrInvalidLengthBackup
  259. }
  260. postIndex := iNdEx + byteLen
  261. if postIndex > l {
  262. return io.ErrUnexpectedEOF
  263. }
  264. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  265. if m.Value == nil {
  266. m.Value = []byte{}
  267. }
  268. iNdEx = postIndex
  269. case 3:
  270. if wireType != 2 {
  271. return fmt.Errorf("proto: wrong wireType = %d for field UserMeta", wireType)
  272. }
  273. var byteLen int
  274. for shift := uint(0); ; shift += 7 {
  275. if shift >= 64 {
  276. return ErrIntOverflowBackup
  277. }
  278. if iNdEx >= l {
  279. return io.ErrUnexpectedEOF
  280. }
  281. b := dAtA[iNdEx]
  282. iNdEx++
  283. byteLen |= (int(b) & 0x7F) << shift
  284. if b < 0x80 {
  285. break
  286. }
  287. }
  288. if byteLen < 0 {
  289. return ErrInvalidLengthBackup
  290. }
  291. postIndex := iNdEx + byteLen
  292. if postIndex > l {
  293. return io.ErrUnexpectedEOF
  294. }
  295. m.UserMeta = append(m.UserMeta[:0], dAtA[iNdEx:postIndex]...)
  296. if m.UserMeta == nil {
  297. m.UserMeta = []byte{}
  298. }
  299. iNdEx = postIndex
  300. case 4:
  301. if wireType != 0 {
  302. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  303. }
  304. m.Version = 0
  305. for shift := uint(0); ; shift += 7 {
  306. if shift >= 64 {
  307. return ErrIntOverflowBackup
  308. }
  309. if iNdEx >= l {
  310. return io.ErrUnexpectedEOF
  311. }
  312. b := dAtA[iNdEx]
  313. iNdEx++
  314. m.Version |= (uint64(b) & 0x7F) << shift
  315. if b < 0x80 {
  316. break
  317. }
  318. }
  319. case 5:
  320. if wireType != 0 {
  321. return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType)
  322. }
  323. m.ExpiresAt = 0
  324. for shift := uint(0); ; shift += 7 {
  325. if shift >= 64 {
  326. return ErrIntOverflowBackup
  327. }
  328. if iNdEx >= l {
  329. return io.ErrUnexpectedEOF
  330. }
  331. b := dAtA[iNdEx]
  332. iNdEx++
  333. m.ExpiresAt |= (uint64(b) & 0x7F) << shift
  334. if b < 0x80 {
  335. break
  336. }
  337. }
  338. default:
  339. iNdEx = preIndex
  340. skippy, err := skipBackup(dAtA[iNdEx:])
  341. if err != nil {
  342. return err
  343. }
  344. if skippy < 0 {
  345. return ErrInvalidLengthBackup
  346. }
  347. if (iNdEx + skippy) > l {
  348. return io.ErrUnexpectedEOF
  349. }
  350. iNdEx += skippy
  351. }
  352. }
  353. if iNdEx > l {
  354. return io.ErrUnexpectedEOF
  355. }
  356. return nil
  357. }
  358. func skipBackup(dAtA []byte) (n int, err error) {
  359. l := len(dAtA)
  360. iNdEx := 0
  361. for iNdEx < l {
  362. var wire uint64
  363. for shift := uint(0); ; shift += 7 {
  364. if shift >= 64 {
  365. return 0, ErrIntOverflowBackup
  366. }
  367. if iNdEx >= l {
  368. return 0, io.ErrUnexpectedEOF
  369. }
  370. b := dAtA[iNdEx]
  371. iNdEx++
  372. wire |= (uint64(b) & 0x7F) << shift
  373. if b < 0x80 {
  374. break
  375. }
  376. }
  377. wireType := int(wire & 0x7)
  378. switch wireType {
  379. case 0:
  380. for shift := uint(0); ; shift += 7 {
  381. if shift >= 64 {
  382. return 0, ErrIntOverflowBackup
  383. }
  384. if iNdEx >= l {
  385. return 0, io.ErrUnexpectedEOF
  386. }
  387. iNdEx++
  388. if dAtA[iNdEx-1] < 0x80 {
  389. break
  390. }
  391. }
  392. return iNdEx, nil
  393. case 1:
  394. iNdEx += 8
  395. return iNdEx, nil
  396. case 2:
  397. var length int
  398. for shift := uint(0); ; shift += 7 {
  399. if shift >= 64 {
  400. return 0, ErrIntOverflowBackup
  401. }
  402. if iNdEx >= l {
  403. return 0, io.ErrUnexpectedEOF
  404. }
  405. b := dAtA[iNdEx]
  406. iNdEx++
  407. length |= (int(b) & 0x7F) << shift
  408. if b < 0x80 {
  409. break
  410. }
  411. }
  412. iNdEx += length
  413. if length < 0 {
  414. return 0, ErrInvalidLengthBackup
  415. }
  416. return iNdEx, nil
  417. case 3:
  418. for {
  419. var innerWire uint64
  420. var start int = iNdEx
  421. for shift := uint(0); ; shift += 7 {
  422. if shift >= 64 {
  423. return 0, ErrIntOverflowBackup
  424. }
  425. if iNdEx >= l {
  426. return 0, io.ErrUnexpectedEOF
  427. }
  428. b := dAtA[iNdEx]
  429. iNdEx++
  430. innerWire |= (uint64(b) & 0x7F) << shift
  431. if b < 0x80 {
  432. break
  433. }
  434. }
  435. innerWireType := int(innerWire & 0x7)
  436. if innerWireType == 4 {
  437. break
  438. }
  439. next, err := skipBackup(dAtA[start:])
  440. if err != nil {
  441. return 0, err
  442. }
  443. iNdEx = start + next
  444. }
  445. return iNdEx, nil
  446. case 4:
  447. return iNdEx, nil
  448. case 5:
  449. iNdEx += 4
  450. return iNdEx, nil
  451. default:
  452. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  453. }
  454. }
  455. panic("unreachable")
  456. }
  457. var (
  458. ErrInvalidLengthBackup = fmt.Errorf("proto: negative length found during unmarshaling")
  459. ErrIntOverflowBackup = fmt.Errorf("proto: integer overflow")
  460. )
  461. func init() { proto.RegisterFile("backup.proto", fileDescriptorBackup) }
  462. var fileDescriptorBackup = []byte{
  463. // 167 bytes of a gzipped FileDescriptorProto
  464. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x4a, 0x4c, 0xce,
  465. 0x2e, 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x53, 0xc5, 0x4a, 0xad, 0x8c,
  466. 0x5c, 0x6c, 0xde, 0x61, 0x01, 0x89, 0x99, 0x45, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x12,
  467. 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x20, 0xa6, 0x90, 0x08, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69,
  468. 0xaa, 0x04, 0x13, 0x58, 0x0c, 0xc2, 0x11, 0x92, 0xe2, 0xe2, 0x28, 0x2d, 0x4e, 0x2d, 0xf2, 0x4d,
  469. 0x2d, 0x49, 0x94, 0x60, 0x06, 0x4b, 0xc0, 0xf9, 0x42, 0x12, 0x5c, 0xec, 0x65, 0xa9, 0x45, 0xc5,
  470. 0x99, 0xf9, 0x79, 0x12, 0x2c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x30, 0xae, 0x90, 0x2c, 0x17, 0x57,
  471. 0x6a, 0x45, 0x41, 0x66, 0x51, 0x6a, 0x71, 0x7c, 0x62, 0x89, 0x04, 0x2b, 0x58, 0x92, 0x13, 0x2a,
  472. 0xe2, 0x58, 0xe2, 0x24, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9,
  473. 0x31, 0xce, 0x78, 0x2c, 0xc7, 0x90, 0x04, 0x71, 0xa1, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xe7,
  474. 0x3f, 0x3f, 0x95, 0xb8, 0x00, 0x00, 0x00,
  475. }