structs.pb.go 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617
  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. Counts
  12. CountsSet
  13. */
  14. package db
  15. import proto "github.com/gogo/protobuf/proto"
  16. import fmt "fmt"
  17. import math "math"
  18. import _ "github.com/gogo/protobuf/gogoproto"
  19. import protocol "github.com/syncthing/syncthing/lib/protocol"
  20. import github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
  21. import io "io"
  22. // Reference imports to suppress errors if they are not otherwise used.
  23. var _ = proto.Marshal
  24. var _ = fmt.Errorf
  25. var _ = math.Inf
  26. // This is a compile-time assertion to ensure that this generated file
  27. // is compatible with the proto package it is being compiled against.
  28. // A compilation error at this line likely means your copy of the
  29. // proto package needs to be updated.
  30. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  31. type FileVersion struct {
  32. Version protocol.Vector `protobuf:"bytes,1,opt,name=version" json:"version"`
  33. Device []byte `protobuf:"bytes,2,opt,name=device,proto3" json:"device,omitempty"`
  34. Invalid bool `protobuf:"varint,3,opt,name=invalid,proto3" json:"invalid,omitempty"`
  35. }
  36. func (m *FileVersion) Reset() { *m = FileVersion{} }
  37. func (m *FileVersion) String() string { return proto.CompactTextString(m) }
  38. func (*FileVersion) ProtoMessage() {}
  39. func (*FileVersion) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{0} }
  40. type VersionList struct {
  41. Versions []FileVersion `protobuf:"bytes,1,rep,name=versions" json:"versions"`
  42. }
  43. func (m *VersionList) Reset() { *m = VersionList{} }
  44. func (*VersionList) ProtoMessage() {}
  45. func (*VersionList) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{1} }
  46. // Must be the same as FileInfo but without the blocks field
  47. type FileInfoTruncated struct {
  48. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  49. Type protocol.FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
  50. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  51. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
  52. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
  53. ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
  54. 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"`
  55. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
  56. RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
  57. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
  58. Version protocol.Vector `protobuf:"bytes,9,opt,name=version" json:"version"`
  59. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
  60. RawBlockSize int32 `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
  61. // repeated BlockInfo Blocks = 16
  62. SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlink_target,omitempty"`
  63. // see bep.proto
  64. LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"local_flags,omitempty"`
  65. }
  66. func (m *FileInfoTruncated) Reset() { *m = FileInfoTruncated{} }
  67. func (*FileInfoTruncated) ProtoMessage() {}
  68. func (*FileInfoTruncated) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{2} }
  69. // For each folder and device we keep one of these to track the current
  70. // counts and sequence. We also keep one for the global state of the folder.
  71. type Counts struct {
  72. Files int32 `protobuf:"varint,1,opt,name=files,proto3" json:"files,omitempty"`
  73. Directories int32 `protobuf:"varint,2,opt,name=directories,proto3" json:"directories,omitempty"`
  74. Symlinks int32 `protobuf:"varint,3,opt,name=symlinks,proto3" json:"symlinks,omitempty"`
  75. Deleted int32 `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"`
  76. Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes,omitempty"`
  77. Sequence int64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence,omitempty"`
  78. DeviceID []byte `protobuf:"bytes,17,opt,name=deviceID,proto3" json:"deviceID,omitempty"`
  79. LocalFlags uint32 `protobuf:"varint,18,opt,name=localFlags,proto3" json:"localFlags,omitempty"`
  80. }
  81. func (m *Counts) Reset() { *m = Counts{} }
  82. func (m *Counts) String() string { return proto.CompactTextString(m) }
  83. func (*Counts) ProtoMessage() {}
  84. func (*Counts) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{3} }
  85. type CountsSet struct {
  86. Counts []Counts `protobuf:"bytes,1,rep,name=counts" json:"counts"`
  87. Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created,omitempty"`
  88. }
  89. func (m *CountsSet) Reset() { *m = CountsSet{} }
  90. func (m *CountsSet) String() string { return proto.CompactTextString(m) }
  91. func (*CountsSet) ProtoMessage() {}
  92. func (*CountsSet) Descriptor() ([]byte, []int) { return fileDescriptorStructs, []int{4} }
  93. func init() {
  94. proto.RegisterType((*FileVersion)(nil), "db.FileVersion")
  95. proto.RegisterType((*VersionList)(nil), "db.VersionList")
  96. proto.RegisterType((*FileInfoTruncated)(nil), "db.FileInfoTruncated")
  97. proto.RegisterType((*Counts)(nil), "db.Counts")
  98. proto.RegisterType((*CountsSet)(nil), "db.CountsSet")
  99. }
  100. func (m *FileVersion) Marshal() (dAtA []byte, err error) {
  101. size := m.ProtoSize()
  102. dAtA = make([]byte, size)
  103. n, err := m.MarshalTo(dAtA)
  104. if err != nil {
  105. return nil, err
  106. }
  107. return dAtA[:n], nil
  108. }
  109. func (m *FileVersion) MarshalTo(dAtA []byte) (int, error) {
  110. var i int
  111. _ = i
  112. var l int
  113. _ = l
  114. dAtA[i] = 0xa
  115. i++
  116. i = encodeVarintStructs(dAtA, i, uint64(m.Version.ProtoSize()))
  117. n1, err := m.Version.MarshalTo(dAtA[i:])
  118. if err != nil {
  119. return 0, err
  120. }
  121. i += n1
  122. if len(m.Device) > 0 {
  123. dAtA[i] = 0x12
  124. i++
  125. i = encodeVarintStructs(dAtA, i, uint64(len(m.Device)))
  126. i += copy(dAtA[i:], m.Device)
  127. }
  128. if m.Invalid {
  129. dAtA[i] = 0x18
  130. i++
  131. if m.Invalid {
  132. dAtA[i] = 1
  133. } else {
  134. dAtA[i] = 0
  135. }
  136. i++
  137. }
  138. return i, nil
  139. }
  140. func (m *VersionList) Marshal() (dAtA []byte, err error) {
  141. size := m.ProtoSize()
  142. dAtA = make([]byte, size)
  143. n, err := m.MarshalTo(dAtA)
  144. if err != nil {
  145. return nil, err
  146. }
  147. return dAtA[:n], nil
  148. }
  149. func (m *VersionList) MarshalTo(dAtA []byte) (int, error) {
  150. var i int
  151. _ = i
  152. var l int
  153. _ = l
  154. if len(m.Versions) > 0 {
  155. for _, msg := range m.Versions {
  156. dAtA[i] = 0xa
  157. i++
  158. i = encodeVarintStructs(dAtA, i, uint64(msg.ProtoSize()))
  159. n, err := msg.MarshalTo(dAtA[i:])
  160. if err != nil {
  161. return 0, err
  162. }
  163. i += n
  164. }
  165. }
  166. return i, nil
  167. }
  168. func (m *FileInfoTruncated) Marshal() (dAtA []byte, err error) {
  169. size := m.ProtoSize()
  170. dAtA = make([]byte, size)
  171. n, err := m.MarshalTo(dAtA)
  172. if err != nil {
  173. return nil, err
  174. }
  175. return dAtA[:n], nil
  176. }
  177. func (m *FileInfoTruncated) MarshalTo(dAtA []byte) (int, error) {
  178. var i int
  179. _ = i
  180. var l int
  181. _ = l
  182. if len(m.Name) > 0 {
  183. dAtA[i] = 0xa
  184. i++
  185. i = encodeVarintStructs(dAtA, i, uint64(len(m.Name)))
  186. i += copy(dAtA[i:], m.Name)
  187. }
  188. if m.Type != 0 {
  189. dAtA[i] = 0x10
  190. i++
  191. i = encodeVarintStructs(dAtA, i, uint64(m.Type))
  192. }
  193. if m.Size != 0 {
  194. dAtA[i] = 0x18
  195. i++
  196. i = encodeVarintStructs(dAtA, i, uint64(m.Size))
  197. }
  198. if m.Permissions != 0 {
  199. dAtA[i] = 0x20
  200. i++
  201. i = encodeVarintStructs(dAtA, i, uint64(m.Permissions))
  202. }
  203. if m.ModifiedS != 0 {
  204. dAtA[i] = 0x28
  205. i++
  206. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedS))
  207. }
  208. if m.Deleted {
  209. dAtA[i] = 0x30
  210. i++
  211. if m.Deleted {
  212. dAtA[i] = 1
  213. } else {
  214. dAtA[i] = 0
  215. }
  216. i++
  217. }
  218. if m.RawInvalid {
  219. dAtA[i] = 0x38
  220. i++
  221. if m.RawInvalid {
  222. dAtA[i] = 1
  223. } else {
  224. dAtA[i] = 0
  225. }
  226. i++
  227. }
  228. if m.NoPermissions {
  229. dAtA[i] = 0x40
  230. i++
  231. if m.NoPermissions {
  232. dAtA[i] = 1
  233. } else {
  234. dAtA[i] = 0
  235. }
  236. i++
  237. }
  238. dAtA[i] = 0x4a
  239. i++
  240. i = encodeVarintStructs(dAtA, i, uint64(m.Version.ProtoSize()))
  241. n2, err := m.Version.MarshalTo(dAtA[i:])
  242. if err != nil {
  243. return 0, err
  244. }
  245. i += n2
  246. if m.Sequence != 0 {
  247. dAtA[i] = 0x50
  248. i++
  249. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  250. }
  251. if m.ModifiedNs != 0 {
  252. dAtA[i] = 0x58
  253. i++
  254. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedNs))
  255. }
  256. if m.ModifiedBy != 0 {
  257. dAtA[i] = 0x60
  258. i++
  259. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedBy))
  260. }
  261. if m.RawBlockSize != 0 {
  262. dAtA[i] = 0x68
  263. i++
  264. i = encodeVarintStructs(dAtA, i, uint64(m.RawBlockSize))
  265. }
  266. if len(m.SymlinkTarget) > 0 {
  267. dAtA[i] = 0x8a
  268. i++
  269. dAtA[i] = 0x1
  270. i++
  271. i = encodeVarintStructs(dAtA, i, uint64(len(m.SymlinkTarget)))
  272. i += copy(dAtA[i:], m.SymlinkTarget)
  273. }
  274. if m.LocalFlags != 0 {
  275. dAtA[i] = 0xc0
  276. i++
  277. dAtA[i] = 0x3e
  278. i++
  279. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  280. }
  281. return i, nil
  282. }
  283. func (m *Counts) Marshal() (dAtA []byte, err error) {
  284. size := m.ProtoSize()
  285. dAtA = make([]byte, size)
  286. n, err := m.MarshalTo(dAtA)
  287. if err != nil {
  288. return nil, err
  289. }
  290. return dAtA[:n], nil
  291. }
  292. func (m *Counts) MarshalTo(dAtA []byte) (int, error) {
  293. var i int
  294. _ = i
  295. var l int
  296. _ = l
  297. if m.Files != 0 {
  298. dAtA[i] = 0x8
  299. i++
  300. i = encodeVarintStructs(dAtA, i, uint64(m.Files))
  301. }
  302. if m.Directories != 0 {
  303. dAtA[i] = 0x10
  304. i++
  305. i = encodeVarintStructs(dAtA, i, uint64(m.Directories))
  306. }
  307. if m.Symlinks != 0 {
  308. dAtA[i] = 0x18
  309. i++
  310. i = encodeVarintStructs(dAtA, i, uint64(m.Symlinks))
  311. }
  312. if m.Deleted != 0 {
  313. dAtA[i] = 0x20
  314. i++
  315. i = encodeVarintStructs(dAtA, i, uint64(m.Deleted))
  316. }
  317. if m.Bytes != 0 {
  318. dAtA[i] = 0x28
  319. i++
  320. i = encodeVarintStructs(dAtA, i, uint64(m.Bytes))
  321. }
  322. if m.Sequence != 0 {
  323. dAtA[i] = 0x30
  324. i++
  325. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  326. }
  327. if len(m.DeviceID) > 0 {
  328. dAtA[i] = 0x8a
  329. i++
  330. dAtA[i] = 0x1
  331. i++
  332. i = encodeVarintStructs(dAtA, i, uint64(len(m.DeviceID)))
  333. i += copy(dAtA[i:], m.DeviceID)
  334. }
  335. if m.LocalFlags != 0 {
  336. dAtA[i] = 0x90
  337. i++
  338. dAtA[i] = 0x1
  339. i++
  340. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  341. }
  342. return i, nil
  343. }
  344. func (m *CountsSet) Marshal() (dAtA []byte, err error) {
  345. size := m.ProtoSize()
  346. dAtA = make([]byte, size)
  347. n, err := m.MarshalTo(dAtA)
  348. if err != nil {
  349. return nil, err
  350. }
  351. return dAtA[:n], nil
  352. }
  353. func (m *CountsSet) MarshalTo(dAtA []byte) (int, error) {
  354. var i int
  355. _ = i
  356. var l int
  357. _ = l
  358. if len(m.Counts) > 0 {
  359. for _, msg := range m.Counts {
  360. dAtA[i] = 0xa
  361. i++
  362. i = encodeVarintStructs(dAtA, i, uint64(msg.ProtoSize()))
  363. n, err := msg.MarshalTo(dAtA[i:])
  364. if err != nil {
  365. return 0, err
  366. }
  367. i += n
  368. }
  369. }
  370. if m.Created != 0 {
  371. dAtA[i] = 0x10
  372. i++
  373. i = encodeVarintStructs(dAtA, i, uint64(m.Created))
  374. }
  375. return i, nil
  376. }
  377. func encodeFixed64Structs(dAtA []byte, offset int, v uint64) int {
  378. dAtA[offset] = uint8(v)
  379. dAtA[offset+1] = uint8(v >> 8)
  380. dAtA[offset+2] = uint8(v >> 16)
  381. dAtA[offset+3] = uint8(v >> 24)
  382. dAtA[offset+4] = uint8(v >> 32)
  383. dAtA[offset+5] = uint8(v >> 40)
  384. dAtA[offset+6] = uint8(v >> 48)
  385. dAtA[offset+7] = uint8(v >> 56)
  386. return offset + 8
  387. }
  388. func encodeFixed32Structs(dAtA []byte, offset int, v uint32) int {
  389. dAtA[offset] = uint8(v)
  390. dAtA[offset+1] = uint8(v >> 8)
  391. dAtA[offset+2] = uint8(v >> 16)
  392. dAtA[offset+3] = uint8(v >> 24)
  393. return offset + 4
  394. }
  395. func encodeVarintStructs(dAtA []byte, offset int, v uint64) int {
  396. for v >= 1<<7 {
  397. dAtA[offset] = uint8(v&0x7f | 0x80)
  398. v >>= 7
  399. offset++
  400. }
  401. dAtA[offset] = uint8(v)
  402. return offset + 1
  403. }
  404. func (m *FileVersion) ProtoSize() (n int) {
  405. var l int
  406. _ = l
  407. l = m.Version.ProtoSize()
  408. n += 1 + l + sovStructs(uint64(l))
  409. l = len(m.Device)
  410. if l > 0 {
  411. n += 1 + l + sovStructs(uint64(l))
  412. }
  413. if m.Invalid {
  414. n += 2
  415. }
  416. return n
  417. }
  418. func (m *VersionList) ProtoSize() (n int) {
  419. var l int
  420. _ = l
  421. if len(m.Versions) > 0 {
  422. for _, e := range m.Versions {
  423. l = e.ProtoSize()
  424. n += 1 + l + sovStructs(uint64(l))
  425. }
  426. }
  427. return n
  428. }
  429. func (m *FileInfoTruncated) ProtoSize() (n int) {
  430. var l int
  431. _ = l
  432. l = len(m.Name)
  433. if l > 0 {
  434. n += 1 + l + sovStructs(uint64(l))
  435. }
  436. if m.Type != 0 {
  437. n += 1 + sovStructs(uint64(m.Type))
  438. }
  439. if m.Size != 0 {
  440. n += 1 + sovStructs(uint64(m.Size))
  441. }
  442. if m.Permissions != 0 {
  443. n += 1 + sovStructs(uint64(m.Permissions))
  444. }
  445. if m.ModifiedS != 0 {
  446. n += 1 + sovStructs(uint64(m.ModifiedS))
  447. }
  448. if m.Deleted {
  449. n += 2
  450. }
  451. if m.RawInvalid {
  452. n += 2
  453. }
  454. if m.NoPermissions {
  455. n += 2
  456. }
  457. l = m.Version.ProtoSize()
  458. n += 1 + l + sovStructs(uint64(l))
  459. if m.Sequence != 0 {
  460. n += 1 + sovStructs(uint64(m.Sequence))
  461. }
  462. if m.ModifiedNs != 0 {
  463. n += 1 + sovStructs(uint64(m.ModifiedNs))
  464. }
  465. if m.ModifiedBy != 0 {
  466. n += 1 + sovStructs(uint64(m.ModifiedBy))
  467. }
  468. if m.RawBlockSize != 0 {
  469. n += 1 + sovStructs(uint64(m.RawBlockSize))
  470. }
  471. l = len(m.SymlinkTarget)
  472. if l > 0 {
  473. n += 2 + l + sovStructs(uint64(l))
  474. }
  475. if m.LocalFlags != 0 {
  476. n += 2 + sovStructs(uint64(m.LocalFlags))
  477. }
  478. return n
  479. }
  480. func (m *Counts) ProtoSize() (n int) {
  481. var l int
  482. _ = l
  483. if m.Files != 0 {
  484. n += 1 + sovStructs(uint64(m.Files))
  485. }
  486. if m.Directories != 0 {
  487. n += 1 + sovStructs(uint64(m.Directories))
  488. }
  489. if m.Symlinks != 0 {
  490. n += 1 + sovStructs(uint64(m.Symlinks))
  491. }
  492. if m.Deleted != 0 {
  493. n += 1 + sovStructs(uint64(m.Deleted))
  494. }
  495. if m.Bytes != 0 {
  496. n += 1 + sovStructs(uint64(m.Bytes))
  497. }
  498. if m.Sequence != 0 {
  499. n += 1 + sovStructs(uint64(m.Sequence))
  500. }
  501. l = len(m.DeviceID)
  502. if l > 0 {
  503. n += 2 + l + sovStructs(uint64(l))
  504. }
  505. if m.LocalFlags != 0 {
  506. n += 2 + sovStructs(uint64(m.LocalFlags))
  507. }
  508. return n
  509. }
  510. func (m *CountsSet) ProtoSize() (n int) {
  511. var l int
  512. _ = l
  513. if len(m.Counts) > 0 {
  514. for _, e := range m.Counts {
  515. l = e.ProtoSize()
  516. n += 1 + l + sovStructs(uint64(l))
  517. }
  518. }
  519. if m.Created != 0 {
  520. n += 1 + sovStructs(uint64(m.Created))
  521. }
  522. return n
  523. }
  524. func sovStructs(x uint64) (n int) {
  525. for {
  526. n++
  527. x >>= 7
  528. if x == 0 {
  529. break
  530. }
  531. }
  532. return n
  533. }
  534. func sozStructs(x uint64) (n int) {
  535. return sovStructs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  536. }
  537. func (m *FileVersion) Unmarshal(dAtA []byte) error {
  538. l := len(dAtA)
  539. iNdEx := 0
  540. for iNdEx < l {
  541. preIndex := iNdEx
  542. var wire uint64
  543. for shift := uint(0); ; shift += 7 {
  544. if shift >= 64 {
  545. return ErrIntOverflowStructs
  546. }
  547. if iNdEx >= l {
  548. return io.ErrUnexpectedEOF
  549. }
  550. b := dAtA[iNdEx]
  551. iNdEx++
  552. wire |= (uint64(b) & 0x7F) << shift
  553. if b < 0x80 {
  554. break
  555. }
  556. }
  557. fieldNum := int32(wire >> 3)
  558. wireType := int(wire & 0x7)
  559. if wireType == 4 {
  560. return fmt.Errorf("proto: FileVersion: wiretype end group for non-group")
  561. }
  562. if fieldNum <= 0 {
  563. return fmt.Errorf("proto: FileVersion: illegal tag %d (wire type %d)", fieldNum, wire)
  564. }
  565. switch fieldNum {
  566. case 1:
  567. if wireType != 2 {
  568. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  569. }
  570. var msglen int
  571. for shift := uint(0); ; shift += 7 {
  572. if shift >= 64 {
  573. return ErrIntOverflowStructs
  574. }
  575. if iNdEx >= l {
  576. return io.ErrUnexpectedEOF
  577. }
  578. b := dAtA[iNdEx]
  579. iNdEx++
  580. msglen |= (int(b) & 0x7F) << shift
  581. if b < 0x80 {
  582. break
  583. }
  584. }
  585. if msglen < 0 {
  586. return ErrInvalidLengthStructs
  587. }
  588. postIndex := iNdEx + msglen
  589. if postIndex > l {
  590. return io.ErrUnexpectedEOF
  591. }
  592. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  593. return err
  594. }
  595. iNdEx = postIndex
  596. case 2:
  597. if wireType != 2 {
  598. return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  599. }
  600. var byteLen int
  601. for shift := uint(0); ; shift += 7 {
  602. if shift >= 64 {
  603. return ErrIntOverflowStructs
  604. }
  605. if iNdEx >= l {
  606. return io.ErrUnexpectedEOF
  607. }
  608. b := dAtA[iNdEx]
  609. iNdEx++
  610. byteLen |= (int(b) & 0x7F) << shift
  611. if b < 0x80 {
  612. break
  613. }
  614. }
  615. if byteLen < 0 {
  616. return ErrInvalidLengthStructs
  617. }
  618. postIndex := iNdEx + byteLen
  619. if postIndex > l {
  620. return io.ErrUnexpectedEOF
  621. }
  622. m.Device = append(m.Device[:0], dAtA[iNdEx:postIndex]...)
  623. if m.Device == nil {
  624. m.Device = []byte{}
  625. }
  626. iNdEx = postIndex
  627. case 3:
  628. if wireType != 0 {
  629. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  630. }
  631. var v int
  632. for shift := uint(0); ; shift += 7 {
  633. if shift >= 64 {
  634. return ErrIntOverflowStructs
  635. }
  636. if iNdEx >= l {
  637. return io.ErrUnexpectedEOF
  638. }
  639. b := dAtA[iNdEx]
  640. iNdEx++
  641. v |= (int(b) & 0x7F) << shift
  642. if b < 0x80 {
  643. break
  644. }
  645. }
  646. m.Invalid = bool(v != 0)
  647. default:
  648. iNdEx = preIndex
  649. skippy, err := skipStructs(dAtA[iNdEx:])
  650. if err != nil {
  651. return err
  652. }
  653. if skippy < 0 {
  654. return ErrInvalidLengthStructs
  655. }
  656. if (iNdEx + skippy) > l {
  657. return io.ErrUnexpectedEOF
  658. }
  659. iNdEx += skippy
  660. }
  661. }
  662. if iNdEx > l {
  663. return io.ErrUnexpectedEOF
  664. }
  665. return nil
  666. }
  667. func (m *VersionList) Unmarshal(dAtA []byte) error {
  668. l := len(dAtA)
  669. iNdEx := 0
  670. for iNdEx < l {
  671. preIndex := iNdEx
  672. var wire uint64
  673. for shift := uint(0); ; shift += 7 {
  674. if shift >= 64 {
  675. return ErrIntOverflowStructs
  676. }
  677. if iNdEx >= l {
  678. return io.ErrUnexpectedEOF
  679. }
  680. b := dAtA[iNdEx]
  681. iNdEx++
  682. wire |= (uint64(b) & 0x7F) << shift
  683. if b < 0x80 {
  684. break
  685. }
  686. }
  687. fieldNum := int32(wire >> 3)
  688. wireType := int(wire & 0x7)
  689. if wireType == 4 {
  690. return fmt.Errorf("proto: VersionList: wiretype end group for non-group")
  691. }
  692. if fieldNum <= 0 {
  693. return fmt.Errorf("proto: VersionList: illegal tag %d (wire type %d)", fieldNum, wire)
  694. }
  695. switch fieldNum {
  696. case 1:
  697. if wireType != 2 {
  698. return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
  699. }
  700. var msglen int
  701. for shift := uint(0); ; shift += 7 {
  702. if shift >= 64 {
  703. return ErrIntOverflowStructs
  704. }
  705. if iNdEx >= l {
  706. return io.ErrUnexpectedEOF
  707. }
  708. b := dAtA[iNdEx]
  709. iNdEx++
  710. msglen |= (int(b) & 0x7F) << shift
  711. if b < 0x80 {
  712. break
  713. }
  714. }
  715. if msglen < 0 {
  716. return ErrInvalidLengthStructs
  717. }
  718. postIndex := iNdEx + msglen
  719. if postIndex > l {
  720. return io.ErrUnexpectedEOF
  721. }
  722. m.Versions = append(m.Versions, FileVersion{})
  723. if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  724. return err
  725. }
  726. iNdEx = postIndex
  727. default:
  728. iNdEx = preIndex
  729. skippy, err := skipStructs(dAtA[iNdEx:])
  730. if err != nil {
  731. return err
  732. }
  733. if skippy < 0 {
  734. return ErrInvalidLengthStructs
  735. }
  736. if (iNdEx + skippy) > l {
  737. return io.ErrUnexpectedEOF
  738. }
  739. iNdEx += skippy
  740. }
  741. }
  742. if iNdEx > l {
  743. return io.ErrUnexpectedEOF
  744. }
  745. return nil
  746. }
  747. func (m *FileInfoTruncated) Unmarshal(dAtA []byte) error {
  748. l := len(dAtA)
  749. iNdEx := 0
  750. for iNdEx < l {
  751. preIndex := iNdEx
  752. var wire uint64
  753. for shift := uint(0); ; shift += 7 {
  754. if shift >= 64 {
  755. return ErrIntOverflowStructs
  756. }
  757. if iNdEx >= l {
  758. return io.ErrUnexpectedEOF
  759. }
  760. b := dAtA[iNdEx]
  761. iNdEx++
  762. wire |= (uint64(b) & 0x7F) << shift
  763. if b < 0x80 {
  764. break
  765. }
  766. }
  767. fieldNum := int32(wire >> 3)
  768. wireType := int(wire & 0x7)
  769. if wireType == 4 {
  770. return fmt.Errorf("proto: FileInfoTruncated: wiretype end group for non-group")
  771. }
  772. if fieldNum <= 0 {
  773. return fmt.Errorf("proto: FileInfoTruncated: illegal tag %d (wire type %d)", fieldNum, wire)
  774. }
  775. switch fieldNum {
  776. case 1:
  777. if wireType != 2 {
  778. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  779. }
  780. var stringLen uint64
  781. for shift := uint(0); ; shift += 7 {
  782. if shift >= 64 {
  783. return ErrIntOverflowStructs
  784. }
  785. if iNdEx >= l {
  786. return io.ErrUnexpectedEOF
  787. }
  788. b := dAtA[iNdEx]
  789. iNdEx++
  790. stringLen |= (uint64(b) & 0x7F) << shift
  791. if b < 0x80 {
  792. break
  793. }
  794. }
  795. intStringLen := int(stringLen)
  796. if intStringLen < 0 {
  797. return ErrInvalidLengthStructs
  798. }
  799. postIndex := iNdEx + intStringLen
  800. if postIndex > l {
  801. return io.ErrUnexpectedEOF
  802. }
  803. m.Name = string(dAtA[iNdEx:postIndex])
  804. iNdEx = postIndex
  805. case 2:
  806. if wireType != 0 {
  807. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  808. }
  809. m.Type = 0
  810. for shift := uint(0); ; shift += 7 {
  811. if shift >= 64 {
  812. return ErrIntOverflowStructs
  813. }
  814. if iNdEx >= l {
  815. return io.ErrUnexpectedEOF
  816. }
  817. b := dAtA[iNdEx]
  818. iNdEx++
  819. m.Type |= (protocol.FileInfoType(b) & 0x7F) << shift
  820. if b < 0x80 {
  821. break
  822. }
  823. }
  824. case 3:
  825. if wireType != 0 {
  826. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  827. }
  828. m.Size = 0
  829. for shift := uint(0); ; shift += 7 {
  830. if shift >= 64 {
  831. return ErrIntOverflowStructs
  832. }
  833. if iNdEx >= l {
  834. return io.ErrUnexpectedEOF
  835. }
  836. b := dAtA[iNdEx]
  837. iNdEx++
  838. m.Size |= (int64(b) & 0x7F) << shift
  839. if b < 0x80 {
  840. break
  841. }
  842. }
  843. case 4:
  844. if wireType != 0 {
  845. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  846. }
  847. m.Permissions = 0
  848. for shift := uint(0); ; shift += 7 {
  849. if shift >= 64 {
  850. return ErrIntOverflowStructs
  851. }
  852. if iNdEx >= l {
  853. return io.ErrUnexpectedEOF
  854. }
  855. b := dAtA[iNdEx]
  856. iNdEx++
  857. m.Permissions |= (uint32(b) & 0x7F) << shift
  858. if b < 0x80 {
  859. break
  860. }
  861. }
  862. case 5:
  863. if wireType != 0 {
  864. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  865. }
  866. m.ModifiedS = 0
  867. for shift := uint(0); ; shift += 7 {
  868. if shift >= 64 {
  869. return ErrIntOverflowStructs
  870. }
  871. if iNdEx >= l {
  872. return io.ErrUnexpectedEOF
  873. }
  874. b := dAtA[iNdEx]
  875. iNdEx++
  876. m.ModifiedS |= (int64(b) & 0x7F) << shift
  877. if b < 0x80 {
  878. break
  879. }
  880. }
  881. case 6:
  882. if wireType != 0 {
  883. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  884. }
  885. var v int
  886. for shift := uint(0); ; shift += 7 {
  887. if shift >= 64 {
  888. return ErrIntOverflowStructs
  889. }
  890. if iNdEx >= l {
  891. return io.ErrUnexpectedEOF
  892. }
  893. b := dAtA[iNdEx]
  894. iNdEx++
  895. v |= (int(b) & 0x7F) << shift
  896. if b < 0x80 {
  897. break
  898. }
  899. }
  900. m.Deleted = bool(v != 0)
  901. case 7:
  902. if wireType != 0 {
  903. return fmt.Errorf("proto: wrong wireType = %d for field RawInvalid", wireType)
  904. }
  905. var v int
  906. for shift := uint(0); ; shift += 7 {
  907. if shift >= 64 {
  908. return ErrIntOverflowStructs
  909. }
  910. if iNdEx >= l {
  911. return io.ErrUnexpectedEOF
  912. }
  913. b := dAtA[iNdEx]
  914. iNdEx++
  915. v |= (int(b) & 0x7F) << shift
  916. if b < 0x80 {
  917. break
  918. }
  919. }
  920. m.RawInvalid = bool(v != 0)
  921. case 8:
  922. if wireType != 0 {
  923. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  924. }
  925. var v int
  926. for shift := uint(0); ; shift += 7 {
  927. if shift >= 64 {
  928. return ErrIntOverflowStructs
  929. }
  930. if iNdEx >= l {
  931. return io.ErrUnexpectedEOF
  932. }
  933. b := dAtA[iNdEx]
  934. iNdEx++
  935. v |= (int(b) & 0x7F) << shift
  936. if b < 0x80 {
  937. break
  938. }
  939. }
  940. m.NoPermissions = bool(v != 0)
  941. case 9:
  942. if wireType != 2 {
  943. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  944. }
  945. var msglen int
  946. for shift := uint(0); ; shift += 7 {
  947. if shift >= 64 {
  948. return ErrIntOverflowStructs
  949. }
  950. if iNdEx >= l {
  951. return io.ErrUnexpectedEOF
  952. }
  953. b := dAtA[iNdEx]
  954. iNdEx++
  955. msglen |= (int(b) & 0x7F) << shift
  956. if b < 0x80 {
  957. break
  958. }
  959. }
  960. if msglen < 0 {
  961. return ErrInvalidLengthStructs
  962. }
  963. postIndex := iNdEx + msglen
  964. if postIndex > l {
  965. return io.ErrUnexpectedEOF
  966. }
  967. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  968. return err
  969. }
  970. iNdEx = postIndex
  971. case 10:
  972. if wireType != 0 {
  973. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  974. }
  975. m.Sequence = 0
  976. for shift := uint(0); ; shift += 7 {
  977. if shift >= 64 {
  978. return ErrIntOverflowStructs
  979. }
  980. if iNdEx >= l {
  981. return io.ErrUnexpectedEOF
  982. }
  983. b := dAtA[iNdEx]
  984. iNdEx++
  985. m.Sequence |= (int64(b) & 0x7F) << shift
  986. if b < 0x80 {
  987. break
  988. }
  989. }
  990. case 11:
  991. if wireType != 0 {
  992. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  993. }
  994. m.ModifiedNs = 0
  995. for shift := uint(0); ; shift += 7 {
  996. if shift >= 64 {
  997. return ErrIntOverflowStructs
  998. }
  999. if iNdEx >= l {
  1000. return io.ErrUnexpectedEOF
  1001. }
  1002. b := dAtA[iNdEx]
  1003. iNdEx++
  1004. m.ModifiedNs |= (int32(b) & 0x7F) << shift
  1005. if b < 0x80 {
  1006. break
  1007. }
  1008. }
  1009. case 12:
  1010. if wireType != 0 {
  1011. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedBy", wireType)
  1012. }
  1013. m.ModifiedBy = 0
  1014. for shift := uint(0); ; shift += 7 {
  1015. if shift >= 64 {
  1016. return ErrIntOverflowStructs
  1017. }
  1018. if iNdEx >= l {
  1019. return io.ErrUnexpectedEOF
  1020. }
  1021. b := dAtA[iNdEx]
  1022. iNdEx++
  1023. m.ModifiedBy |= (github_com_syncthing_syncthing_lib_protocol.ShortID(b) & 0x7F) << shift
  1024. if b < 0x80 {
  1025. break
  1026. }
  1027. }
  1028. case 13:
  1029. if wireType != 0 {
  1030. return fmt.Errorf("proto: wrong wireType = %d for field RawBlockSize", wireType)
  1031. }
  1032. m.RawBlockSize = 0
  1033. for shift := uint(0); ; shift += 7 {
  1034. if shift >= 64 {
  1035. return ErrIntOverflowStructs
  1036. }
  1037. if iNdEx >= l {
  1038. return io.ErrUnexpectedEOF
  1039. }
  1040. b := dAtA[iNdEx]
  1041. iNdEx++
  1042. m.RawBlockSize |= (int32(b) & 0x7F) << shift
  1043. if b < 0x80 {
  1044. break
  1045. }
  1046. }
  1047. case 17:
  1048. if wireType != 2 {
  1049. return fmt.Errorf("proto: wrong wireType = %d for field SymlinkTarget", wireType)
  1050. }
  1051. var stringLen uint64
  1052. for shift := uint(0); ; shift += 7 {
  1053. if shift >= 64 {
  1054. return ErrIntOverflowStructs
  1055. }
  1056. if iNdEx >= l {
  1057. return io.ErrUnexpectedEOF
  1058. }
  1059. b := dAtA[iNdEx]
  1060. iNdEx++
  1061. stringLen |= (uint64(b) & 0x7F) << shift
  1062. if b < 0x80 {
  1063. break
  1064. }
  1065. }
  1066. intStringLen := int(stringLen)
  1067. if intStringLen < 0 {
  1068. return ErrInvalidLengthStructs
  1069. }
  1070. postIndex := iNdEx + intStringLen
  1071. if postIndex > l {
  1072. return io.ErrUnexpectedEOF
  1073. }
  1074. m.SymlinkTarget = string(dAtA[iNdEx:postIndex])
  1075. iNdEx = postIndex
  1076. case 1000:
  1077. if wireType != 0 {
  1078. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  1079. }
  1080. m.LocalFlags = 0
  1081. for shift := uint(0); ; shift += 7 {
  1082. if shift >= 64 {
  1083. return ErrIntOverflowStructs
  1084. }
  1085. if iNdEx >= l {
  1086. return io.ErrUnexpectedEOF
  1087. }
  1088. b := dAtA[iNdEx]
  1089. iNdEx++
  1090. m.LocalFlags |= (uint32(b) & 0x7F) << shift
  1091. if b < 0x80 {
  1092. break
  1093. }
  1094. }
  1095. default:
  1096. iNdEx = preIndex
  1097. skippy, err := skipStructs(dAtA[iNdEx:])
  1098. if err != nil {
  1099. return err
  1100. }
  1101. if skippy < 0 {
  1102. return ErrInvalidLengthStructs
  1103. }
  1104. if (iNdEx + skippy) > l {
  1105. return io.ErrUnexpectedEOF
  1106. }
  1107. iNdEx += skippy
  1108. }
  1109. }
  1110. if iNdEx > l {
  1111. return io.ErrUnexpectedEOF
  1112. }
  1113. return nil
  1114. }
  1115. func (m *Counts) Unmarshal(dAtA []byte) error {
  1116. l := len(dAtA)
  1117. iNdEx := 0
  1118. for iNdEx < l {
  1119. preIndex := iNdEx
  1120. var wire uint64
  1121. for shift := uint(0); ; shift += 7 {
  1122. if shift >= 64 {
  1123. return ErrIntOverflowStructs
  1124. }
  1125. if iNdEx >= l {
  1126. return io.ErrUnexpectedEOF
  1127. }
  1128. b := dAtA[iNdEx]
  1129. iNdEx++
  1130. wire |= (uint64(b) & 0x7F) << shift
  1131. if b < 0x80 {
  1132. break
  1133. }
  1134. }
  1135. fieldNum := int32(wire >> 3)
  1136. wireType := int(wire & 0x7)
  1137. if wireType == 4 {
  1138. return fmt.Errorf("proto: Counts: wiretype end group for non-group")
  1139. }
  1140. if fieldNum <= 0 {
  1141. return fmt.Errorf("proto: Counts: illegal tag %d (wire type %d)", fieldNum, wire)
  1142. }
  1143. switch fieldNum {
  1144. case 1:
  1145. if wireType != 0 {
  1146. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  1147. }
  1148. m.Files = 0
  1149. for shift := uint(0); ; shift += 7 {
  1150. if shift >= 64 {
  1151. return ErrIntOverflowStructs
  1152. }
  1153. if iNdEx >= l {
  1154. return io.ErrUnexpectedEOF
  1155. }
  1156. b := dAtA[iNdEx]
  1157. iNdEx++
  1158. m.Files |= (int32(b) & 0x7F) << shift
  1159. if b < 0x80 {
  1160. break
  1161. }
  1162. }
  1163. case 2:
  1164. if wireType != 0 {
  1165. return fmt.Errorf("proto: wrong wireType = %d for field Directories", wireType)
  1166. }
  1167. m.Directories = 0
  1168. for shift := uint(0); ; shift += 7 {
  1169. if shift >= 64 {
  1170. return ErrIntOverflowStructs
  1171. }
  1172. if iNdEx >= l {
  1173. return io.ErrUnexpectedEOF
  1174. }
  1175. b := dAtA[iNdEx]
  1176. iNdEx++
  1177. m.Directories |= (int32(b) & 0x7F) << shift
  1178. if b < 0x80 {
  1179. break
  1180. }
  1181. }
  1182. case 3:
  1183. if wireType != 0 {
  1184. return fmt.Errorf("proto: wrong wireType = %d for field Symlinks", wireType)
  1185. }
  1186. m.Symlinks = 0
  1187. for shift := uint(0); ; shift += 7 {
  1188. if shift >= 64 {
  1189. return ErrIntOverflowStructs
  1190. }
  1191. if iNdEx >= l {
  1192. return io.ErrUnexpectedEOF
  1193. }
  1194. b := dAtA[iNdEx]
  1195. iNdEx++
  1196. m.Symlinks |= (int32(b) & 0x7F) << shift
  1197. if b < 0x80 {
  1198. break
  1199. }
  1200. }
  1201. case 4:
  1202. if wireType != 0 {
  1203. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1204. }
  1205. m.Deleted = 0
  1206. for shift := uint(0); ; shift += 7 {
  1207. if shift >= 64 {
  1208. return ErrIntOverflowStructs
  1209. }
  1210. if iNdEx >= l {
  1211. return io.ErrUnexpectedEOF
  1212. }
  1213. b := dAtA[iNdEx]
  1214. iNdEx++
  1215. m.Deleted |= (int32(b) & 0x7F) << shift
  1216. if b < 0x80 {
  1217. break
  1218. }
  1219. }
  1220. case 5:
  1221. if wireType != 0 {
  1222. return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
  1223. }
  1224. m.Bytes = 0
  1225. for shift := uint(0); ; shift += 7 {
  1226. if shift >= 64 {
  1227. return ErrIntOverflowStructs
  1228. }
  1229. if iNdEx >= l {
  1230. return io.ErrUnexpectedEOF
  1231. }
  1232. b := dAtA[iNdEx]
  1233. iNdEx++
  1234. m.Bytes |= (int64(b) & 0x7F) << shift
  1235. if b < 0x80 {
  1236. break
  1237. }
  1238. }
  1239. case 6:
  1240. if wireType != 0 {
  1241. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  1242. }
  1243. m.Sequence = 0
  1244. for shift := uint(0); ; shift += 7 {
  1245. if shift >= 64 {
  1246. return ErrIntOverflowStructs
  1247. }
  1248. if iNdEx >= l {
  1249. return io.ErrUnexpectedEOF
  1250. }
  1251. b := dAtA[iNdEx]
  1252. iNdEx++
  1253. m.Sequence |= (int64(b) & 0x7F) << shift
  1254. if b < 0x80 {
  1255. break
  1256. }
  1257. }
  1258. case 17:
  1259. if wireType != 2 {
  1260. return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
  1261. }
  1262. var byteLen int
  1263. for shift := uint(0); ; shift += 7 {
  1264. if shift >= 64 {
  1265. return ErrIntOverflowStructs
  1266. }
  1267. if iNdEx >= l {
  1268. return io.ErrUnexpectedEOF
  1269. }
  1270. b := dAtA[iNdEx]
  1271. iNdEx++
  1272. byteLen |= (int(b) & 0x7F) << shift
  1273. if b < 0x80 {
  1274. break
  1275. }
  1276. }
  1277. if byteLen < 0 {
  1278. return ErrInvalidLengthStructs
  1279. }
  1280. postIndex := iNdEx + byteLen
  1281. if postIndex > l {
  1282. return io.ErrUnexpectedEOF
  1283. }
  1284. m.DeviceID = append(m.DeviceID[:0], dAtA[iNdEx:postIndex]...)
  1285. if m.DeviceID == nil {
  1286. m.DeviceID = []byte{}
  1287. }
  1288. iNdEx = postIndex
  1289. case 18:
  1290. if wireType != 0 {
  1291. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  1292. }
  1293. m.LocalFlags = 0
  1294. for shift := uint(0); ; shift += 7 {
  1295. if shift >= 64 {
  1296. return ErrIntOverflowStructs
  1297. }
  1298. if iNdEx >= l {
  1299. return io.ErrUnexpectedEOF
  1300. }
  1301. b := dAtA[iNdEx]
  1302. iNdEx++
  1303. m.LocalFlags |= (uint32(b) & 0x7F) << shift
  1304. if b < 0x80 {
  1305. break
  1306. }
  1307. }
  1308. default:
  1309. iNdEx = preIndex
  1310. skippy, err := skipStructs(dAtA[iNdEx:])
  1311. if err != nil {
  1312. return err
  1313. }
  1314. if skippy < 0 {
  1315. return ErrInvalidLengthStructs
  1316. }
  1317. if (iNdEx + skippy) > l {
  1318. return io.ErrUnexpectedEOF
  1319. }
  1320. iNdEx += skippy
  1321. }
  1322. }
  1323. if iNdEx > l {
  1324. return io.ErrUnexpectedEOF
  1325. }
  1326. return nil
  1327. }
  1328. func (m *CountsSet) Unmarshal(dAtA []byte) error {
  1329. l := len(dAtA)
  1330. iNdEx := 0
  1331. for iNdEx < l {
  1332. preIndex := iNdEx
  1333. var wire uint64
  1334. for shift := uint(0); ; shift += 7 {
  1335. if shift >= 64 {
  1336. return ErrIntOverflowStructs
  1337. }
  1338. if iNdEx >= l {
  1339. return io.ErrUnexpectedEOF
  1340. }
  1341. b := dAtA[iNdEx]
  1342. iNdEx++
  1343. wire |= (uint64(b) & 0x7F) << shift
  1344. if b < 0x80 {
  1345. break
  1346. }
  1347. }
  1348. fieldNum := int32(wire >> 3)
  1349. wireType := int(wire & 0x7)
  1350. if wireType == 4 {
  1351. return fmt.Errorf("proto: CountsSet: wiretype end group for non-group")
  1352. }
  1353. if fieldNum <= 0 {
  1354. return fmt.Errorf("proto: CountsSet: illegal tag %d (wire type %d)", fieldNum, wire)
  1355. }
  1356. switch fieldNum {
  1357. case 1:
  1358. if wireType != 2 {
  1359. return fmt.Errorf("proto: wrong wireType = %d for field Counts", wireType)
  1360. }
  1361. var msglen int
  1362. for shift := uint(0); ; shift += 7 {
  1363. if shift >= 64 {
  1364. return ErrIntOverflowStructs
  1365. }
  1366. if iNdEx >= l {
  1367. return io.ErrUnexpectedEOF
  1368. }
  1369. b := dAtA[iNdEx]
  1370. iNdEx++
  1371. msglen |= (int(b) & 0x7F) << shift
  1372. if b < 0x80 {
  1373. break
  1374. }
  1375. }
  1376. if msglen < 0 {
  1377. return ErrInvalidLengthStructs
  1378. }
  1379. postIndex := iNdEx + msglen
  1380. if postIndex > l {
  1381. return io.ErrUnexpectedEOF
  1382. }
  1383. m.Counts = append(m.Counts, Counts{})
  1384. if err := m.Counts[len(m.Counts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1385. return err
  1386. }
  1387. iNdEx = postIndex
  1388. case 2:
  1389. if wireType != 0 {
  1390. return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
  1391. }
  1392. m.Created = 0
  1393. for shift := uint(0); ; shift += 7 {
  1394. if shift >= 64 {
  1395. return ErrIntOverflowStructs
  1396. }
  1397. if iNdEx >= l {
  1398. return io.ErrUnexpectedEOF
  1399. }
  1400. b := dAtA[iNdEx]
  1401. iNdEx++
  1402. m.Created |= (int64(b) & 0x7F) << shift
  1403. if b < 0x80 {
  1404. break
  1405. }
  1406. }
  1407. default:
  1408. iNdEx = preIndex
  1409. skippy, err := skipStructs(dAtA[iNdEx:])
  1410. if err != nil {
  1411. return err
  1412. }
  1413. if skippy < 0 {
  1414. return ErrInvalidLengthStructs
  1415. }
  1416. if (iNdEx + skippy) > l {
  1417. return io.ErrUnexpectedEOF
  1418. }
  1419. iNdEx += skippy
  1420. }
  1421. }
  1422. if iNdEx > l {
  1423. return io.ErrUnexpectedEOF
  1424. }
  1425. return nil
  1426. }
  1427. func skipStructs(dAtA []byte) (n int, err error) {
  1428. l := len(dAtA)
  1429. iNdEx := 0
  1430. for iNdEx < l {
  1431. var wire uint64
  1432. for shift := uint(0); ; shift += 7 {
  1433. if shift >= 64 {
  1434. return 0, ErrIntOverflowStructs
  1435. }
  1436. if iNdEx >= l {
  1437. return 0, io.ErrUnexpectedEOF
  1438. }
  1439. b := dAtA[iNdEx]
  1440. iNdEx++
  1441. wire |= (uint64(b) & 0x7F) << shift
  1442. if b < 0x80 {
  1443. break
  1444. }
  1445. }
  1446. wireType := int(wire & 0x7)
  1447. switch wireType {
  1448. case 0:
  1449. for shift := uint(0); ; shift += 7 {
  1450. if shift >= 64 {
  1451. return 0, ErrIntOverflowStructs
  1452. }
  1453. if iNdEx >= l {
  1454. return 0, io.ErrUnexpectedEOF
  1455. }
  1456. iNdEx++
  1457. if dAtA[iNdEx-1] < 0x80 {
  1458. break
  1459. }
  1460. }
  1461. return iNdEx, nil
  1462. case 1:
  1463. iNdEx += 8
  1464. return iNdEx, nil
  1465. case 2:
  1466. var length int
  1467. for shift := uint(0); ; shift += 7 {
  1468. if shift >= 64 {
  1469. return 0, ErrIntOverflowStructs
  1470. }
  1471. if iNdEx >= l {
  1472. return 0, io.ErrUnexpectedEOF
  1473. }
  1474. b := dAtA[iNdEx]
  1475. iNdEx++
  1476. length |= (int(b) & 0x7F) << shift
  1477. if b < 0x80 {
  1478. break
  1479. }
  1480. }
  1481. iNdEx += length
  1482. if length < 0 {
  1483. return 0, ErrInvalidLengthStructs
  1484. }
  1485. return iNdEx, nil
  1486. case 3:
  1487. for {
  1488. var innerWire uint64
  1489. var start int = iNdEx
  1490. for shift := uint(0); ; shift += 7 {
  1491. if shift >= 64 {
  1492. return 0, ErrIntOverflowStructs
  1493. }
  1494. if iNdEx >= l {
  1495. return 0, io.ErrUnexpectedEOF
  1496. }
  1497. b := dAtA[iNdEx]
  1498. iNdEx++
  1499. innerWire |= (uint64(b) & 0x7F) << shift
  1500. if b < 0x80 {
  1501. break
  1502. }
  1503. }
  1504. innerWireType := int(innerWire & 0x7)
  1505. if innerWireType == 4 {
  1506. break
  1507. }
  1508. next, err := skipStructs(dAtA[start:])
  1509. if err != nil {
  1510. return 0, err
  1511. }
  1512. iNdEx = start + next
  1513. }
  1514. return iNdEx, nil
  1515. case 4:
  1516. return iNdEx, nil
  1517. case 5:
  1518. iNdEx += 4
  1519. return iNdEx, nil
  1520. default:
  1521. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1522. }
  1523. }
  1524. panic("unreachable")
  1525. }
  1526. var (
  1527. ErrInvalidLengthStructs = fmt.Errorf("proto: negative length found during unmarshaling")
  1528. ErrIntOverflowStructs = fmt.Errorf("proto: integer overflow")
  1529. )
  1530. func init() { proto.RegisterFile("structs.proto", fileDescriptorStructs) }
  1531. var fileDescriptorStructs = []byte{
  1532. // 671 bytes of a gzipped FileDescriptorProto
  1533. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4d, 0x6b, 0xdb, 0x4c,
  1534. 0x10, 0xb6, 0x62, 0xf9, 0x6b, 0x6c, 0xe7, 0x4d, 0x96, 0x10, 0x84, 0xe1, 0xb5, 0x85, 0xa1, 0x20,
  1535. 0x0a, 0xb5, 0xdb, 0x84, 0x5e, 0xda, 0x9b, 0x1a, 0x02, 0x86, 0xd2, 0x96, 0x75, 0xc8, 0xa9, 0x60,
  1536. 0xf4, 0xb1, 0x76, 0x96, 0xc8, 0x5a, 0x47, 0xbb, 0x4e, 0x50, 0x7e, 0x49, 0x8f, 0xf9, 0x39, 0x39,
  1537. 0xf6, 0xdc, 0x83, 0x49, 0xdd, 0x1e, 0xfa, 0x33, 0xca, 0xee, 0x4a, 0x8a, 0x9a, 0x53, 0x7b, 0x9b,
  1538. 0x67, 0x3e, 0x76, 0x9e, 0x99, 0x79, 0x16, 0xba, 0x5c, 0x24, 0xeb, 0x40, 0xf0, 0xd1, 0x2a, 0x61,
  1539. 0x82, 0xa1, 0x9d, 0xd0, 0xef, 0xbd, 0x58, 0x50, 0x71, 0xb1, 0xf6, 0x47, 0x01, 0x5b, 0x8e, 0x17,
  1540. 0x6c, 0xc1, 0xc6, 0x2a, 0xe4, 0xaf, 0xe7, 0x0a, 0x29, 0xa0, 0x2c, 0x5d, 0xd2, 0x7b, 0x5d, 0x4a,
  1541. 0xe7, 0x69, 0x1c, 0x88, 0x0b, 0x1a, 0x2f, 0x4a, 0x56, 0x44, 0x7d, 0xfd, 0x42, 0xc0, 0xa2, 0xb1,
  1542. 0x4f, 0x56, 0xba, 0x6c, 0x78, 0x05, 0xed, 0x53, 0x1a, 0x91, 0x73, 0x92, 0x70, 0xca, 0x62, 0xf4,
  1543. 0x12, 0x1a, 0xd7, 0xda, 0xb4, 0x0c, 0xdb, 0x70, 0xda, 0x47, 0x7b, 0xa3, 0xbc, 0x68, 0x74, 0x4e,
  1544. 0x02, 0xc1, 0x12, 0xd7, 0xbc, 0xdf, 0x0c, 0x2a, 0x38, 0x4f, 0x43, 0x87, 0x50, 0x0f, 0xc9, 0x35,
  1545. 0x0d, 0x88, 0xb5, 0x63, 0x1b, 0x4e, 0x07, 0x67, 0x08, 0x59, 0xd0, 0xa0, 0xf1, 0xb5, 0x17, 0xd1,
  1546. 0xd0, 0xaa, 0xda, 0x86, 0xd3, 0xc4, 0x39, 0x1c, 0x9e, 0x42, 0x3b, 0x6b, 0xf7, 0x9e, 0x72, 0x81,
  1547. 0x5e, 0x41, 0x33, 0x7b, 0x8b, 0x5b, 0x86, 0x5d, 0x75, 0xda, 0x47, 0xff, 0x8d, 0x42, 0x7f, 0x54,
  1548. 0x62, 0x95, 0xb5, 0x2c, 0xd2, 0xde, 0x98, 0x5f, 0xee, 0x06, 0x95, 0xe1, 0x83, 0x09, 0xfb, 0x32,
  1549. 0x6b, 0x12, 0xcf, 0xd9, 0x59, 0xb2, 0x8e, 0x03, 0x4f, 0x90, 0x10, 0x21, 0x30, 0x63, 0x6f, 0x49,
  1550. 0x14, 0xfd, 0x16, 0x56, 0x36, 0x7a, 0x0e, 0xa6, 0x48, 0x57, 0x9a, 0xe1, 0xee, 0xd1, 0xe1, 0xe3,
  1551. 0x48, 0x45, 0x79, 0xba, 0x22, 0x58, 0xe5, 0xc8, 0x7a, 0x4e, 0x6f, 0x89, 0x22, 0x5d, 0xc5, 0xca,
  1552. 0x46, 0x36, 0xb4, 0x57, 0x24, 0x59, 0x52, 0xae, 0x59, 0x9a, 0xb6, 0xe1, 0x74, 0x71, 0xd9, 0x85,
  1553. 0xfe, 0x07, 0x58, 0xb2, 0x90, 0xce, 0x29, 0x09, 0x67, 0xdc, 0xaa, 0xa9, 0xda, 0x56, 0xee, 0x99,
  1554. 0xca, 0x65, 0x84, 0x24, 0x22, 0x82, 0x84, 0x56, 0x5d, 0x2f, 0x23, 0x83, 0xc8, 0x79, 0x5c, 0x53,
  1555. 0x43, 0x46, 0xdc, 0xdd, 0xed, 0x66, 0x00, 0xd8, 0xbb, 0x99, 0x68, 0x6f, 0xb1, 0x36, 0xf4, 0x0c,
  1556. 0x76, 0x63, 0x36, 0x2b, 0xf3, 0x68, 0xaa, 0xa7, 0xba, 0x31, 0xfb, 0x54, 0x62, 0x52, 0xba, 0x60,
  1557. 0xeb, 0xef, 0x2e, 0xd8, 0x83, 0x26, 0x27, 0x57, 0x6b, 0x12, 0x07, 0xc4, 0x02, 0xc5, 0xbc, 0xc0,
  1558. 0x68, 0x00, 0xed, 0x62, 0xae, 0x98, 0x5b, 0x6d, 0xdb, 0x70, 0x6a, 0xb8, 0x18, 0xf5, 0x03, 0x47,
  1559. 0x9f, 0x4b, 0x09, 0x7e, 0x6a, 0x75, 0x6c, 0xc3, 0x31, 0xdd, 0xb7, 0xb2, 0xc1, 0xb7, 0xcd, 0xe0,
  1560. 0xf8, 0x1f, 0x34, 0x39, 0x9a, 0x5e, 0xb0, 0x44, 0x4c, 0x4e, 0x1e, 0x5f, 0x77, 0x53, 0x34, 0x06,
  1561. 0xf0, 0x23, 0x16, 0x5c, 0xce, 0xd4, 0x49, 0xba, 0xb2, 0xbb, 0xbb, 0xb7, 0xdd, 0x0c, 0x3a, 0xd8,
  1562. 0xbb, 0x71, 0x65, 0x60, 0x4a, 0x6f, 0x09, 0x6e, 0xf9, 0xb9, 0x29, 0x97, 0xc4, 0xd3, 0x65, 0x44,
  1563. 0xe3, 0xcb, 0x99, 0xf0, 0x92, 0x05, 0x11, 0xd6, 0xbe, 0xd2, 0x41, 0x37, 0xf3, 0x9e, 0x29, 0xa7,
  1564. 0x3c, 0x68, 0xc4, 0x02, 0x2f, 0x9a, 0xcd, 0x23, 0x6f, 0xc1, 0xad, 0x5f, 0x0d, 0x75, 0x51, 0x50,
  1565. 0xbe, 0x53, 0xe9, 0xca, 0x24, 0xf6, 0xd3, 0x80, 0xfa, 0x3b, 0xb6, 0x8e, 0x05, 0x47, 0x07, 0x50,
  1566. 0x9b, 0xd3, 0x88, 0x70, 0x25, 0xac, 0x1a, 0xd6, 0x40, 0x3e, 0x14, 0xd2, 0x44, 0xad, 0x95, 0x12,
  1567. 0xae, 0x04, 0x56, 0xc3, 0x65, 0x97, 0xda, 0xae, 0xee, 0xcd, 0x95, 0xa6, 0x6a, 0xb8, 0xc0, 0x65,
  1568. 0x59, 0x98, 0x2a, 0x54, 0xc8, 0xe2, 0x00, 0x6a, 0x7e, 0x2a, 0x48, 0x2e, 0x25, 0x0d, 0xfe, 0xb8,
  1569. 0x54, 0xfd, 0xc9, 0xa5, 0x7a, 0xd0, 0xd4, 0x3f, 0x6f, 0x72, 0xa2, 0x66, 0xee, 0xe0, 0x02, 0xa3,
  1570. 0x3e, 0x94, 0x46, 0xb3, 0xd0, 0xd3, 0x61, 0x87, 0x1f, 0xa1, 0xa5, 0xa7, 0x9c, 0x12, 0x81, 0x1c,
  1571. 0xa8, 0x07, 0x0a, 0x64, 0xbf, 0x11, 0xe4, 0x6f, 0xd4, 0xe1, 0x4c, 0x39, 0x59, 0x5c, 0xd2, 0x0f,
  1572. 0x12, 0x22, 0x7f, 0x9d, 0x1a, 0xbc, 0x8a, 0x73, 0xe8, 0x1e, 0xdc, 0x7f, 0xef, 0x57, 0xee, 0xb7,
  1573. 0x7d, 0xe3, 0xeb, 0xb6, 0x6f, 0x3c, 0x6c, 0xfb, 0x95, 0xbb, 0x1f, 0x7d, 0xc3, 0xaf, 0xab, 0x5b,
  1574. 0x1f, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x4d, 0xd7, 0x14, 0xed, 0x04, 0x00, 0x00,
  1575. }