structs.pb.go 26 KB

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