structs.pb.go 26 KB

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