structs.pb.go 22 KB

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