structs.pb.go 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943
  1. // Code generated by protoc-gen-gogo.
  2. // source: structs.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package db is a generated protocol buffer package.
  6. It is generated from these files:
  7. structs.proto
  8. It has these top-level messages:
  9. FileVersion
  10. VersionList
  11. FileInfoTruncated
  12. */
  13. package db
  14. import proto "github.com/gogo/protobuf/proto"
  15. import fmt "fmt"
  16. import math "math"
  17. import _ "github.com/gogo/protobuf/gogoproto"
  18. import protocol "github.com/syncthing/syncthing/lib/protocol"
  19. import io "io"
  20. // Reference imports to suppress errors if they are not otherwise used.
  21. var _ = proto.Marshal
  22. var _ = fmt.Errorf
  23. var _ = math.Inf
  24. // This is a compile-time assertion to ensure that this generated file
  25. // is compatible with the proto package it is being compiled against.
  26. const _ = proto.GoGoProtoPackageIsVersion1
  27. type FileVersion struct {
  28. Version protocol.Vector `protobuf:"bytes,1,opt,name=version" json:"version"`
  29. Device []byte `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"`
  30. }
  31. func (m *FileVersion) Reset() { *m = FileVersion{} }
  32. func (m *FileVersion) String() string { return proto.CompactTextString(m) }
  33. func (*FileVersion) ProtoMessage() {}
  34. func (*FileVersion) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{0} }
  35. type VersionList struct {
  36. Versions []FileVersion `protobuf:"bytes,1,rep,name=versions" json:"versions"`
  37. }
  38. func (m *VersionList) Reset() { *m = VersionList{} }
  39. func (*VersionList) ProtoMessage() {}
  40. func (*VersionList) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{1} }
  41. // Must be the same as FileInfo but without the blocks field
  42. type FileInfoTruncated struct {
  43. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  44. Type protocol.FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
  45. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  46. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
  47. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
  48. ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
  49. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
  50. Invalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
  51. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
  52. Version protocol.Vector `protobuf:"bytes,9,opt,name=version" json:"version"`
  53. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
  54. }
  55. func (m *FileInfoTruncated) Reset() { *m = FileInfoTruncated{} }
  56. func (*FileInfoTruncated) ProtoMessage() {}
  57. func (*FileInfoTruncated) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{2} }
  58. func init() {
  59. proto.RegisterType((*FileVersion)(nil), "db.FileVersion")
  60. proto.RegisterType((*VersionList)(nil), "db.VersionList")
  61. proto.RegisterType((*FileInfoTruncated)(nil), "db.FileInfoTruncated")
  62. }
  63. func (m *FileVersion) Marshal() (data []byte, err error) {
  64. size := m.ProtoSize()
  65. data = make([]byte, size)
  66. n, err := m.MarshalTo(data)
  67. if err != nil {
  68. return nil, err
  69. }
  70. return data[:n], nil
  71. }
  72. func (m *FileVersion) MarshalTo(data []byte) (int, error) {
  73. var i int
  74. _ = i
  75. var l int
  76. _ = l
  77. data[i] = 0xa
  78. i++
  79. i = encodeVarintStructs(data, i, uint64(m.Version.ProtoSize()))
  80. n1, err := m.Version.MarshalTo(data[i:])
  81. if err != nil {
  82. return 0, err
  83. }
  84. i += n1
  85. if len(m.Device) > 0 {
  86. data[i] = 0x12
  87. i++
  88. i = encodeVarintStructs(data, i, uint64(len(m.Device)))
  89. i += copy(data[i:], m.Device)
  90. }
  91. return i, nil
  92. }
  93. func (m *VersionList) Marshal() (data []byte, err error) {
  94. size := m.ProtoSize()
  95. data = make([]byte, size)
  96. n, err := m.MarshalTo(data)
  97. if err != nil {
  98. return nil, err
  99. }
  100. return data[:n], nil
  101. }
  102. func (m *VersionList) MarshalTo(data []byte) (int, error) {
  103. var i int
  104. _ = i
  105. var l int
  106. _ = l
  107. if len(m.Versions) > 0 {
  108. for _, msg := range m.Versions {
  109. data[i] = 0xa
  110. i++
  111. i = encodeVarintStructs(data, i, uint64(msg.ProtoSize()))
  112. n, err := msg.MarshalTo(data[i:])
  113. if err != nil {
  114. return 0, err
  115. }
  116. i += n
  117. }
  118. }
  119. return i, nil
  120. }
  121. func (m *FileInfoTruncated) Marshal() (data []byte, err error) {
  122. size := m.ProtoSize()
  123. data = make([]byte, size)
  124. n, err := m.MarshalTo(data)
  125. if err != nil {
  126. return nil, err
  127. }
  128. return data[:n], nil
  129. }
  130. func (m *FileInfoTruncated) MarshalTo(data []byte) (int, error) {
  131. var i int
  132. _ = i
  133. var l int
  134. _ = l
  135. if len(m.Name) > 0 {
  136. data[i] = 0xa
  137. i++
  138. i = encodeVarintStructs(data, i, uint64(len(m.Name)))
  139. i += copy(data[i:], m.Name)
  140. }
  141. if m.Type != 0 {
  142. data[i] = 0x10
  143. i++
  144. i = encodeVarintStructs(data, i, uint64(m.Type))
  145. }
  146. if m.Size != 0 {
  147. data[i] = 0x18
  148. i++
  149. i = encodeVarintStructs(data, i, uint64(m.Size))
  150. }
  151. if m.Permissions != 0 {
  152. data[i] = 0x20
  153. i++
  154. i = encodeVarintStructs(data, i, uint64(m.Permissions))
  155. }
  156. if m.ModifiedS != 0 {
  157. data[i] = 0x28
  158. i++
  159. i = encodeVarintStructs(data, i, uint64(m.ModifiedS))
  160. }
  161. if m.Deleted {
  162. data[i] = 0x30
  163. i++
  164. if m.Deleted {
  165. data[i] = 1
  166. } else {
  167. data[i] = 0
  168. }
  169. i++
  170. }
  171. if m.Invalid {
  172. data[i] = 0x38
  173. i++
  174. if m.Invalid {
  175. data[i] = 1
  176. } else {
  177. data[i] = 0
  178. }
  179. i++
  180. }
  181. if m.NoPermissions {
  182. data[i] = 0x40
  183. i++
  184. if m.NoPermissions {
  185. data[i] = 1
  186. } else {
  187. data[i] = 0
  188. }
  189. i++
  190. }
  191. data[i] = 0x4a
  192. i++
  193. i = encodeVarintStructs(data, i, uint64(m.Version.ProtoSize()))
  194. n2, err := m.Version.MarshalTo(data[i:])
  195. if err != nil {
  196. return 0, err
  197. }
  198. i += n2
  199. if m.Sequence != 0 {
  200. data[i] = 0x50
  201. i++
  202. i = encodeVarintStructs(data, i, uint64(m.Sequence))
  203. }
  204. if m.ModifiedNs != 0 {
  205. data[i] = 0x58
  206. i++
  207. i = encodeVarintStructs(data, i, uint64(m.ModifiedNs))
  208. }
  209. return i, nil
  210. }
  211. func encodeFixed64Structs(data []byte, offset int, v uint64) int {
  212. data[offset] = uint8(v)
  213. data[offset+1] = uint8(v >> 8)
  214. data[offset+2] = uint8(v >> 16)
  215. data[offset+3] = uint8(v >> 24)
  216. data[offset+4] = uint8(v >> 32)
  217. data[offset+5] = uint8(v >> 40)
  218. data[offset+6] = uint8(v >> 48)
  219. data[offset+7] = uint8(v >> 56)
  220. return offset + 8
  221. }
  222. func encodeFixed32Structs(data []byte, offset int, v uint32) int {
  223. data[offset] = uint8(v)
  224. data[offset+1] = uint8(v >> 8)
  225. data[offset+2] = uint8(v >> 16)
  226. data[offset+3] = uint8(v >> 24)
  227. return offset + 4
  228. }
  229. func encodeVarintStructs(data []byte, offset int, v uint64) int {
  230. for v >= 1<<7 {
  231. data[offset] = uint8(v&0x7f | 0x80)
  232. v >>= 7
  233. offset++
  234. }
  235. data[offset] = uint8(v)
  236. return offset + 1
  237. }
  238. func (m *FileVersion) ProtoSize() (n int) {
  239. var l int
  240. _ = l
  241. l = m.Version.ProtoSize()
  242. n += 1 + l + sovStructs(uint64(l))
  243. l = len(m.Device)
  244. if l > 0 {
  245. n += 1 + l + sovStructs(uint64(l))
  246. }
  247. return n
  248. }
  249. func (m *VersionList) ProtoSize() (n int) {
  250. var l int
  251. _ = l
  252. if len(m.Versions) > 0 {
  253. for _, e := range m.Versions {
  254. l = e.ProtoSize()
  255. n += 1 + l + sovStructs(uint64(l))
  256. }
  257. }
  258. return n
  259. }
  260. func (m *FileInfoTruncated) ProtoSize() (n int) {
  261. var l int
  262. _ = l
  263. l = len(m.Name)
  264. if l > 0 {
  265. n += 1 + l + sovStructs(uint64(l))
  266. }
  267. if m.Type != 0 {
  268. n += 1 + sovStructs(uint64(m.Type))
  269. }
  270. if m.Size != 0 {
  271. n += 1 + sovStructs(uint64(m.Size))
  272. }
  273. if m.Permissions != 0 {
  274. n += 1 + sovStructs(uint64(m.Permissions))
  275. }
  276. if m.ModifiedS != 0 {
  277. n += 1 + sovStructs(uint64(m.ModifiedS))
  278. }
  279. if m.Deleted {
  280. n += 2
  281. }
  282. if m.Invalid {
  283. n += 2
  284. }
  285. if m.NoPermissions {
  286. n += 2
  287. }
  288. l = m.Version.ProtoSize()
  289. n += 1 + l + sovStructs(uint64(l))
  290. if m.Sequence != 0 {
  291. n += 1 + sovStructs(uint64(m.Sequence))
  292. }
  293. if m.ModifiedNs != 0 {
  294. n += 1 + sovStructs(uint64(m.ModifiedNs))
  295. }
  296. return n
  297. }
  298. func sovStructs(x uint64) (n int) {
  299. for {
  300. n++
  301. x >>= 7
  302. if x == 0 {
  303. break
  304. }
  305. }
  306. return n
  307. }
  308. func sozStructs(x uint64) (n int) {
  309. return sovStructs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  310. }
  311. func (m *FileVersion) Unmarshal(data []byte) error {
  312. l := len(data)
  313. iNdEx := 0
  314. for iNdEx < l {
  315. preIndex := iNdEx
  316. var wire uint64
  317. for shift := uint(0); ; shift += 7 {
  318. if shift >= 64 {
  319. return ErrIntOverflowStructs
  320. }
  321. if iNdEx >= l {
  322. return io.ErrUnexpectedEOF
  323. }
  324. b := data[iNdEx]
  325. iNdEx++
  326. wire |= (uint64(b) & 0x7F) << shift
  327. if b < 0x80 {
  328. break
  329. }
  330. }
  331. fieldNum := int32(wire >> 3)
  332. wireType := int(wire & 0x7)
  333. if wireType == 4 {
  334. return fmt.Errorf("proto: FileVersion: wiretype end group for non-group")
  335. }
  336. if fieldNum <= 0 {
  337. return fmt.Errorf("proto: FileVersion: illegal tag %d (wire type %d)", fieldNum, wire)
  338. }
  339. switch fieldNum {
  340. case 1:
  341. if wireType != 2 {
  342. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  343. }
  344. var msglen int
  345. for shift := uint(0); ; shift += 7 {
  346. if shift >= 64 {
  347. return ErrIntOverflowStructs
  348. }
  349. if iNdEx >= l {
  350. return io.ErrUnexpectedEOF
  351. }
  352. b := data[iNdEx]
  353. iNdEx++
  354. msglen |= (int(b) & 0x7F) << shift
  355. if b < 0x80 {
  356. break
  357. }
  358. }
  359. if msglen < 0 {
  360. return ErrInvalidLengthStructs
  361. }
  362. postIndex := iNdEx + msglen
  363. if postIndex > l {
  364. return io.ErrUnexpectedEOF
  365. }
  366. if err := m.Version.Unmarshal(data[iNdEx:postIndex]); err != nil {
  367. return err
  368. }
  369. iNdEx = postIndex
  370. case 2:
  371. if wireType != 2 {
  372. return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  373. }
  374. var byteLen int
  375. for shift := uint(0); ; shift += 7 {
  376. if shift >= 64 {
  377. return ErrIntOverflowStructs
  378. }
  379. if iNdEx >= l {
  380. return io.ErrUnexpectedEOF
  381. }
  382. b := data[iNdEx]
  383. iNdEx++
  384. byteLen |= (int(b) & 0x7F) << shift
  385. if b < 0x80 {
  386. break
  387. }
  388. }
  389. if byteLen < 0 {
  390. return ErrInvalidLengthStructs
  391. }
  392. postIndex := iNdEx + byteLen
  393. if postIndex > l {
  394. return io.ErrUnexpectedEOF
  395. }
  396. m.Device = append(m.Device[:0], data[iNdEx:postIndex]...)
  397. if m.Device == nil {
  398. m.Device = []byte{}
  399. }
  400. iNdEx = postIndex
  401. default:
  402. iNdEx = preIndex
  403. skippy, err := skipStructs(data[iNdEx:])
  404. if err != nil {
  405. return err
  406. }
  407. if skippy < 0 {
  408. return ErrInvalidLengthStructs
  409. }
  410. if (iNdEx + skippy) > l {
  411. return io.ErrUnexpectedEOF
  412. }
  413. iNdEx += skippy
  414. }
  415. }
  416. if iNdEx > l {
  417. return io.ErrUnexpectedEOF
  418. }
  419. return nil
  420. }
  421. func (m *VersionList) Unmarshal(data []byte) error {
  422. l := len(data)
  423. iNdEx := 0
  424. for iNdEx < l {
  425. preIndex := iNdEx
  426. var wire uint64
  427. for shift := uint(0); ; shift += 7 {
  428. if shift >= 64 {
  429. return ErrIntOverflowStructs
  430. }
  431. if iNdEx >= l {
  432. return io.ErrUnexpectedEOF
  433. }
  434. b := data[iNdEx]
  435. iNdEx++
  436. wire |= (uint64(b) & 0x7F) << shift
  437. if b < 0x80 {
  438. break
  439. }
  440. }
  441. fieldNum := int32(wire >> 3)
  442. wireType := int(wire & 0x7)
  443. if wireType == 4 {
  444. return fmt.Errorf("proto: VersionList: wiretype end group for non-group")
  445. }
  446. if fieldNum <= 0 {
  447. return fmt.Errorf("proto: VersionList: illegal tag %d (wire type %d)", fieldNum, wire)
  448. }
  449. switch fieldNum {
  450. case 1:
  451. if wireType != 2 {
  452. return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
  453. }
  454. var msglen int
  455. for shift := uint(0); ; shift += 7 {
  456. if shift >= 64 {
  457. return ErrIntOverflowStructs
  458. }
  459. if iNdEx >= l {
  460. return io.ErrUnexpectedEOF
  461. }
  462. b := data[iNdEx]
  463. iNdEx++
  464. msglen |= (int(b) & 0x7F) << shift
  465. if b < 0x80 {
  466. break
  467. }
  468. }
  469. if msglen < 0 {
  470. return ErrInvalidLengthStructs
  471. }
  472. postIndex := iNdEx + msglen
  473. if postIndex > l {
  474. return io.ErrUnexpectedEOF
  475. }
  476. m.Versions = append(m.Versions, FileVersion{})
  477. if err := m.Versions[len(m.Versions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  478. return err
  479. }
  480. iNdEx = postIndex
  481. default:
  482. iNdEx = preIndex
  483. skippy, err := skipStructs(data[iNdEx:])
  484. if err != nil {
  485. return err
  486. }
  487. if skippy < 0 {
  488. return ErrInvalidLengthStructs
  489. }
  490. if (iNdEx + skippy) > l {
  491. return io.ErrUnexpectedEOF
  492. }
  493. iNdEx += skippy
  494. }
  495. }
  496. if iNdEx > l {
  497. return io.ErrUnexpectedEOF
  498. }
  499. return nil
  500. }
  501. func (m *FileInfoTruncated) Unmarshal(data []byte) error {
  502. l := len(data)
  503. iNdEx := 0
  504. for iNdEx < l {
  505. preIndex := iNdEx
  506. var wire uint64
  507. for shift := uint(0); ; shift += 7 {
  508. if shift >= 64 {
  509. return ErrIntOverflowStructs
  510. }
  511. if iNdEx >= l {
  512. return io.ErrUnexpectedEOF
  513. }
  514. b := data[iNdEx]
  515. iNdEx++
  516. wire |= (uint64(b) & 0x7F) << shift
  517. if b < 0x80 {
  518. break
  519. }
  520. }
  521. fieldNum := int32(wire >> 3)
  522. wireType := int(wire & 0x7)
  523. if wireType == 4 {
  524. return fmt.Errorf("proto: FileInfoTruncated: wiretype end group for non-group")
  525. }
  526. if fieldNum <= 0 {
  527. return fmt.Errorf("proto: FileInfoTruncated: illegal tag %d (wire type %d)", fieldNum, wire)
  528. }
  529. switch fieldNum {
  530. case 1:
  531. if wireType != 2 {
  532. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  533. }
  534. var stringLen uint64
  535. for shift := uint(0); ; shift += 7 {
  536. if shift >= 64 {
  537. return ErrIntOverflowStructs
  538. }
  539. if iNdEx >= l {
  540. return io.ErrUnexpectedEOF
  541. }
  542. b := data[iNdEx]
  543. iNdEx++
  544. stringLen |= (uint64(b) & 0x7F) << shift
  545. if b < 0x80 {
  546. break
  547. }
  548. }
  549. intStringLen := int(stringLen)
  550. if intStringLen < 0 {
  551. return ErrInvalidLengthStructs
  552. }
  553. postIndex := iNdEx + intStringLen
  554. if postIndex > l {
  555. return io.ErrUnexpectedEOF
  556. }
  557. m.Name = string(data[iNdEx:postIndex])
  558. iNdEx = postIndex
  559. case 2:
  560. if wireType != 0 {
  561. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  562. }
  563. m.Type = 0
  564. for shift := uint(0); ; shift += 7 {
  565. if shift >= 64 {
  566. return ErrIntOverflowStructs
  567. }
  568. if iNdEx >= l {
  569. return io.ErrUnexpectedEOF
  570. }
  571. b := data[iNdEx]
  572. iNdEx++
  573. m.Type |= (protocol.FileInfoType(b) & 0x7F) << shift
  574. if b < 0x80 {
  575. break
  576. }
  577. }
  578. case 3:
  579. if wireType != 0 {
  580. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  581. }
  582. m.Size = 0
  583. for shift := uint(0); ; shift += 7 {
  584. if shift >= 64 {
  585. return ErrIntOverflowStructs
  586. }
  587. if iNdEx >= l {
  588. return io.ErrUnexpectedEOF
  589. }
  590. b := data[iNdEx]
  591. iNdEx++
  592. m.Size |= (int64(b) & 0x7F) << shift
  593. if b < 0x80 {
  594. break
  595. }
  596. }
  597. case 4:
  598. if wireType != 0 {
  599. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  600. }
  601. m.Permissions = 0
  602. for shift := uint(0); ; shift += 7 {
  603. if shift >= 64 {
  604. return ErrIntOverflowStructs
  605. }
  606. if iNdEx >= l {
  607. return io.ErrUnexpectedEOF
  608. }
  609. b := data[iNdEx]
  610. iNdEx++
  611. m.Permissions |= (uint32(b) & 0x7F) << shift
  612. if b < 0x80 {
  613. break
  614. }
  615. }
  616. case 5:
  617. if wireType != 0 {
  618. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  619. }
  620. m.ModifiedS = 0
  621. for shift := uint(0); ; shift += 7 {
  622. if shift >= 64 {
  623. return ErrIntOverflowStructs
  624. }
  625. if iNdEx >= l {
  626. return io.ErrUnexpectedEOF
  627. }
  628. b := data[iNdEx]
  629. iNdEx++
  630. m.ModifiedS |= (int64(b) & 0x7F) << shift
  631. if b < 0x80 {
  632. break
  633. }
  634. }
  635. case 6:
  636. if wireType != 0 {
  637. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  638. }
  639. var v int
  640. for shift := uint(0); ; shift += 7 {
  641. if shift >= 64 {
  642. return ErrIntOverflowStructs
  643. }
  644. if iNdEx >= l {
  645. return io.ErrUnexpectedEOF
  646. }
  647. b := data[iNdEx]
  648. iNdEx++
  649. v |= (int(b) & 0x7F) << shift
  650. if b < 0x80 {
  651. break
  652. }
  653. }
  654. m.Deleted = bool(v != 0)
  655. case 7:
  656. if wireType != 0 {
  657. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  658. }
  659. var v int
  660. for shift := uint(0); ; shift += 7 {
  661. if shift >= 64 {
  662. return ErrIntOverflowStructs
  663. }
  664. if iNdEx >= l {
  665. return io.ErrUnexpectedEOF
  666. }
  667. b := data[iNdEx]
  668. iNdEx++
  669. v |= (int(b) & 0x7F) << shift
  670. if b < 0x80 {
  671. break
  672. }
  673. }
  674. m.Invalid = bool(v != 0)
  675. case 8:
  676. if wireType != 0 {
  677. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  678. }
  679. var v int
  680. for shift := uint(0); ; shift += 7 {
  681. if shift >= 64 {
  682. return ErrIntOverflowStructs
  683. }
  684. if iNdEx >= l {
  685. return io.ErrUnexpectedEOF
  686. }
  687. b := data[iNdEx]
  688. iNdEx++
  689. v |= (int(b) & 0x7F) << shift
  690. if b < 0x80 {
  691. break
  692. }
  693. }
  694. m.NoPermissions = bool(v != 0)
  695. case 9:
  696. if wireType != 2 {
  697. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  698. }
  699. var msglen int
  700. for shift := uint(0); ; shift += 7 {
  701. if shift >= 64 {
  702. return ErrIntOverflowStructs
  703. }
  704. if iNdEx >= l {
  705. return io.ErrUnexpectedEOF
  706. }
  707. b := data[iNdEx]
  708. iNdEx++
  709. msglen |= (int(b) & 0x7F) << shift
  710. if b < 0x80 {
  711. break
  712. }
  713. }
  714. if msglen < 0 {
  715. return ErrInvalidLengthStructs
  716. }
  717. postIndex := iNdEx + msglen
  718. if postIndex > l {
  719. return io.ErrUnexpectedEOF
  720. }
  721. if err := m.Version.Unmarshal(data[iNdEx:postIndex]); err != nil {
  722. return err
  723. }
  724. iNdEx = postIndex
  725. case 10:
  726. if wireType != 0 {
  727. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  728. }
  729. m.Sequence = 0
  730. for shift := uint(0); ; shift += 7 {
  731. if shift >= 64 {
  732. return ErrIntOverflowStructs
  733. }
  734. if iNdEx >= l {
  735. return io.ErrUnexpectedEOF
  736. }
  737. b := data[iNdEx]
  738. iNdEx++
  739. m.Sequence |= (int64(b) & 0x7F) << shift
  740. if b < 0x80 {
  741. break
  742. }
  743. }
  744. case 11:
  745. if wireType != 0 {
  746. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  747. }
  748. m.ModifiedNs = 0
  749. for shift := uint(0); ; shift += 7 {
  750. if shift >= 64 {
  751. return ErrIntOverflowStructs
  752. }
  753. if iNdEx >= l {
  754. return io.ErrUnexpectedEOF
  755. }
  756. b := data[iNdEx]
  757. iNdEx++
  758. m.ModifiedNs |= (int32(b) & 0x7F) << shift
  759. if b < 0x80 {
  760. break
  761. }
  762. }
  763. default:
  764. iNdEx = preIndex
  765. skippy, err := skipStructs(data[iNdEx:])
  766. if err != nil {
  767. return err
  768. }
  769. if skippy < 0 {
  770. return ErrInvalidLengthStructs
  771. }
  772. if (iNdEx + skippy) > l {
  773. return io.ErrUnexpectedEOF
  774. }
  775. iNdEx += skippy
  776. }
  777. }
  778. if iNdEx > l {
  779. return io.ErrUnexpectedEOF
  780. }
  781. return nil
  782. }
  783. func skipStructs(data []byte) (n int, err error) {
  784. l := len(data)
  785. iNdEx := 0
  786. for iNdEx < l {
  787. var wire uint64
  788. for shift := uint(0); ; shift += 7 {
  789. if shift >= 64 {
  790. return 0, ErrIntOverflowStructs
  791. }
  792. if iNdEx >= l {
  793. return 0, io.ErrUnexpectedEOF
  794. }
  795. b := data[iNdEx]
  796. iNdEx++
  797. wire |= (uint64(b) & 0x7F) << shift
  798. if b < 0x80 {
  799. break
  800. }
  801. }
  802. wireType := int(wire & 0x7)
  803. switch wireType {
  804. case 0:
  805. for shift := uint(0); ; shift += 7 {
  806. if shift >= 64 {
  807. return 0, ErrIntOverflowStructs
  808. }
  809. if iNdEx >= l {
  810. return 0, io.ErrUnexpectedEOF
  811. }
  812. iNdEx++
  813. if data[iNdEx-1] < 0x80 {
  814. break
  815. }
  816. }
  817. return iNdEx, nil
  818. case 1:
  819. iNdEx += 8
  820. return iNdEx, nil
  821. case 2:
  822. var length int
  823. for shift := uint(0); ; shift += 7 {
  824. if shift >= 64 {
  825. return 0, ErrIntOverflowStructs
  826. }
  827. if iNdEx >= l {
  828. return 0, io.ErrUnexpectedEOF
  829. }
  830. b := data[iNdEx]
  831. iNdEx++
  832. length |= (int(b) & 0x7F) << shift
  833. if b < 0x80 {
  834. break
  835. }
  836. }
  837. iNdEx += length
  838. if length < 0 {
  839. return 0, ErrInvalidLengthStructs
  840. }
  841. return iNdEx, nil
  842. case 3:
  843. for {
  844. var innerWire uint64
  845. var start int = iNdEx
  846. for shift := uint(0); ; shift += 7 {
  847. if shift >= 64 {
  848. return 0, ErrIntOverflowStructs
  849. }
  850. if iNdEx >= l {
  851. return 0, io.ErrUnexpectedEOF
  852. }
  853. b := data[iNdEx]
  854. iNdEx++
  855. innerWire |= (uint64(b) & 0x7F) << shift
  856. if b < 0x80 {
  857. break
  858. }
  859. }
  860. innerWireType := int(innerWire & 0x7)
  861. if innerWireType == 4 {
  862. break
  863. }
  864. next, err := skipStructs(data[start:])
  865. if err != nil {
  866. return 0, err
  867. }
  868. iNdEx = start + next
  869. }
  870. return iNdEx, nil
  871. case 4:
  872. return iNdEx, nil
  873. case 5:
  874. iNdEx += 4
  875. return iNdEx, nil
  876. default:
  877. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  878. }
  879. }
  880. panic("unreachable")
  881. }
  882. var (
  883. ErrInvalidLengthStructs = fmt.Errorf("proto: negative length found during unmarshaling")
  884. ErrIntOverflowStructs = fmt.Errorf("proto: integer overflow")
  885. )
  886. var fileDescriptorStructs = []byte{
  887. // 425 bytes of a gzipped FileDescriptorProto
  888. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x51, 0x4f, 0x8b, 0xd3, 0x40,
  889. 0x1c, 0xed, 0xb4, 0xd9, 0xfe, 0xf9, 0xc5, 0xae, 0x3a, 0xc8, 0x32, 0x14, 0x4c, 0x43, 0x41, 0x08,
  890. 0x82, 0xa9, 0x56, 0xbc, 0x78, 0xdc, 0xc3, 0x82, 0x20, 0x22, 0x51, 0xd6, 0xe3, 0xd2, 0xcc, 0xfc,
  891. 0xda, 0x1d, 0x48, 0x67, 0x62, 0x66, 0x52, 0xa8, 0x9f, 0xc4, 0xe3, 0x7e, 0x9c, 0x1e, 0xfd, 0x04,
  892. 0xa2, 0xf5, 0x4b, 0x78, 0x94, 0x4e, 0xd2, 0x98, 0xe3, 0xde, 0xde, 0x9b, 0xdf, 0x7b, 0xbf, 0xf7,
  893. 0x66, 0x06, 0xc6, 0xc6, 0x16, 0x25, 0xb7, 0x26, 0xce, 0x0b, 0x6d, 0x35, 0xed, 0x8a, 0x74, 0xf2,
  894. 0x62, 0x2d, 0xed, 0x6d, 0x99, 0xc6, 0x5c, 0x6f, 0xe6, 0x6b, 0xbd, 0xd6, 0x73, 0x37, 0x4a, 0xcb,
  895. 0x95, 0x63, 0x8e, 0x38, 0x54, 0x59, 0x26, 0x6f, 0x5a, 0x72, 0xb3, 0x53, 0xdc, 0xde, 0x4a, 0xb5,
  896. 0x6e, 0xa1, 0x4c, 0xa6, 0xd5, 0x06, 0xae, 0xb3, 0x79, 0x8a, 0x79, 0x65, 0x9b, 0x7d, 0x01, 0xff,
  897. 0x4a, 0x66, 0x78, 0x8d, 0x85, 0x91, 0x5a, 0xd1, 0x97, 0x30, 0xd8, 0x56, 0x90, 0x91, 0x90, 0x44,
  898. 0xfe, 0xe2, 0x51, 0x7c, 0x32, 0xc5, 0xd7, 0xc8, 0xad, 0x2e, 0x2e, 0xbd, 0xfd, 0xcf, 0x69, 0x27,
  899. 0x39, 0xc9, 0xe8, 0x05, 0xf4, 0x05, 0x6e, 0x25, 0x47, 0xd6, 0x0d, 0x49, 0xf4, 0x20, 0xa9, 0xd9,
  900. 0xec, 0x0a, 0xfc, 0x7a, 0xe9, 0x7b, 0x69, 0x2c, 0x7d, 0x05, 0xc3, 0xda, 0x61, 0x18, 0x09, 0x7b,
  901. 0x91, 0xbf, 0x78, 0x18, 0x8b, 0x34, 0x6e, 0x65, 0xd7, 0x8b, 0x1b, 0xd9, 0x5b, 0xef, 0xfb, 0xdd,
  902. 0xb4, 0x33, 0xfb, 0xdb, 0x85, 0xc7, 0x47, 0xd5, 0x3b, 0xb5, 0xd2, 0x9f, 0x8b, 0x52, 0xf1, 0xa5,
  903. 0x45, 0x41, 0x29, 0x78, 0x6a, 0xb9, 0x41, 0x57, 0x72, 0x94, 0x38, 0x4c, 0x9f, 0x83, 0x67, 0x77,
  904. 0x79, 0xd5, 0xe3, 0x7c, 0x71, 0xf1, 0xbf, 0x78, 0x63, 0xdf, 0xe5, 0x98, 0x38, 0xcd, 0xd1, 0x6f,
  905. 0xe4, 0x37, 0x64, 0xbd, 0x90, 0x44, 0xbd, 0xc4, 0x61, 0x1a, 0x82, 0x9f, 0x63, 0xb1, 0x91, 0xa6,
  906. 0x6a, 0xe9, 0x85, 0x24, 0x1a, 0x27, 0xed, 0x23, 0xfa, 0x14, 0x60, 0xa3, 0x85, 0x5c, 0x49, 0x14,
  907. 0x37, 0x86, 0x9d, 0x39, 0xef, 0xe8, 0x74, 0xf2, 0x89, 0x32, 0x18, 0x08, 0xcc, 0xd0, 0xa2, 0x60,
  908. 0xfd, 0x90, 0x44, 0xc3, 0xe4, 0x44, 0x8f, 0x13, 0xa9, 0xb6, 0xcb, 0x4c, 0x0a, 0x36, 0xa8, 0x26,
  909. 0x35, 0xa5, 0xcf, 0xe0, 0x5c, 0xe9, 0x9b, 0x76, 0xee, 0xd0, 0x09, 0xc6, 0x4a, 0x7f, 0x6c, 0x25,
  910. 0xb7, 0xfe, 0x65, 0x74, 0xbf, 0x7f, 0x99, 0xc0, 0xd0, 0xe0, 0xd7, 0x12, 0x15, 0x47, 0x06, 0xae,
  911. 0x69, 0xc3, 0xe9, 0x14, 0xfc, 0xe6, 0x1e, 0xca, 0x30, 0x3f, 0x24, 0xd1, 0x59, 0xd2, 0x5c, 0xed,
  912. 0x43, 0xfd, 0xf4, 0x97, 0x4f, 0xf6, 0xbf, 0x83, 0xce, 0xfe, 0x10, 0x90, 0x1f, 0x87, 0x80, 0xfc,
  913. 0x3a, 0x04, 0x9d, 0xbb, 0x3f, 0x01, 0x49, 0xfb, 0x2e, 0xf8, 0xf5, 0xbf, 0x00, 0x00, 0x00, 0xff,
  914. 0xff, 0x2a, 0xae, 0x24, 0x77, 0xb3, 0x02, 0x00, 0x00,
  915. }