1
0

structs.pb.go 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: lib/db/structs.proto
  3. package db
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
  9. protocol "github.com/syncthing/syncthing/lib/protocol"
  10. _ "github.com/syncthing/syncthing/proto/ext"
  11. io "io"
  12. math "math"
  13. math_bits "math/bits"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  24. type FileVersion struct {
  25. Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version" xml:"version"`
  26. Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
  27. Devices [][]byte `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices" xml:"device"`
  28. InvalidDevices [][]byte `protobuf:"bytes,4,rep,name=invalid_devices,json=invalidDevices,proto3" json:"invalidDevices" xml:"invalidDevice"`
  29. }
  30. func (m *FileVersion) Reset() { *m = FileVersion{} }
  31. func (m *FileVersion) String() string { return proto.CompactTextString(m) }
  32. func (*FileVersion) ProtoMessage() {}
  33. func (*FileVersion) Descriptor() ([]byte, []int) {
  34. return fileDescriptor_5465d80e8cba02e3, []int{0}
  35. }
  36. func (m *FileVersion) XXX_Unmarshal(b []byte) error {
  37. return m.Unmarshal(b)
  38. }
  39. func (m *FileVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  40. if deterministic {
  41. return xxx_messageInfo_FileVersion.Marshal(b, m, deterministic)
  42. } else {
  43. b = b[:cap(b)]
  44. n, err := m.MarshalToSizedBuffer(b)
  45. if err != nil {
  46. return nil, err
  47. }
  48. return b[:n], nil
  49. }
  50. }
  51. func (m *FileVersion) XXX_Merge(src proto.Message) {
  52. xxx_messageInfo_FileVersion.Merge(m, src)
  53. }
  54. func (m *FileVersion) XXX_Size() int {
  55. return m.ProtoSize()
  56. }
  57. func (m *FileVersion) XXX_DiscardUnknown() {
  58. xxx_messageInfo_FileVersion.DiscardUnknown(m)
  59. }
  60. var xxx_messageInfo_FileVersion proto.InternalMessageInfo
  61. type VersionList struct {
  62. RawVersions []FileVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions" xml:"version"`
  63. }
  64. func (m *VersionList) Reset() { *m = VersionList{} }
  65. func (*VersionList) ProtoMessage() {}
  66. func (*VersionList) Descriptor() ([]byte, []int) {
  67. return fileDescriptor_5465d80e8cba02e3, []int{1}
  68. }
  69. func (m *VersionList) XXX_Unmarshal(b []byte) error {
  70. return m.Unmarshal(b)
  71. }
  72. func (m *VersionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  73. if deterministic {
  74. return xxx_messageInfo_VersionList.Marshal(b, m, deterministic)
  75. } else {
  76. b = b[:cap(b)]
  77. n, err := m.MarshalToSizedBuffer(b)
  78. if err != nil {
  79. return nil, err
  80. }
  81. return b[:n], nil
  82. }
  83. }
  84. func (m *VersionList) XXX_Merge(src proto.Message) {
  85. xxx_messageInfo_VersionList.Merge(m, src)
  86. }
  87. func (m *VersionList) XXX_Size() int {
  88. return m.ProtoSize()
  89. }
  90. func (m *VersionList) XXX_DiscardUnknown() {
  91. xxx_messageInfo_VersionList.DiscardUnknown(m)
  92. }
  93. var xxx_messageInfo_VersionList proto.InternalMessageInfo
  94. // Must be the same as FileInfo but without the blocks field
  95. type FileInfoTruncated struct {
  96. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" xml:"name"`
  97. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size" xml:"size"`
  98. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modifiedS" xml:"modifiedS"`
  99. 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:"modifiedBy" xml:"modifiedBy"`
  100. Version protocol.Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version" xml:"version"`
  101. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence" xml:"sequence"`
  102. // repeated BlockInfo Blocks = 16
  103. SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlinkTarget" xml:"symlinkTarget"`
  104. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocksHash" xml:"blocksHash"`
  105. Type protocol.FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type" xml:"type"`
  106. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions" xml:"permissions"`
  107. ModifiedNs int `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3,casttype=int" json:"modifiedNs" xml:"modifiedNs"`
  108. RawBlockSize int `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3,casttype=int" json:"blockSize" xml:"blockSize"`
  109. // see bep.proto
  110. LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"localFlags" xml:"localFlags"`
  111. VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"versionHash" xml:"versionHash"`
  112. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
  113. RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid" xml:"invalid"`
  114. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"noPermissions" xml:"noPermissions"`
  115. }
  116. func (m *FileInfoTruncated) Reset() { *m = FileInfoTruncated{} }
  117. func (*FileInfoTruncated) ProtoMessage() {}
  118. func (*FileInfoTruncated) Descriptor() ([]byte, []int) {
  119. return fileDescriptor_5465d80e8cba02e3, []int{2}
  120. }
  121. func (m *FileInfoTruncated) XXX_Unmarshal(b []byte) error {
  122. return m.Unmarshal(b)
  123. }
  124. func (m *FileInfoTruncated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  125. if deterministic {
  126. return xxx_messageInfo_FileInfoTruncated.Marshal(b, m, deterministic)
  127. } else {
  128. b = b[:cap(b)]
  129. n, err := m.MarshalToSizedBuffer(b)
  130. if err != nil {
  131. return nil, err
  132. }
  133. return b[:n], nil
  134. }
  135. }
  136. func (m *FileInfoTruncated) XXX_Merge(src proto.Message) {
  137. xxx_messageInfo_FileInfoTruncated.Merge(m, src)
  138. }
  139. func (m *FileInfoTruncated) XXX_Size() int {
  140. return m.ProtoSize()
  141. }
  142. func (m *FileInfoTruncated) XXX_DiscardUnknown() {
  143. xxx_messageInfo_FileInfoTruncated.DiscardUnknown(m)
  144. }
  145. var xxx_messageInfo_FileInfoTruncated proto.InternalMessageInfo
  146. // BlockList is the structure used to store block lists
  147. type BlockList struct {
  148. Blocks []protocol.BlockInfo `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks" xml:"block"`
  149. }
  150. func (m *BlockList) Reset() { *m = BlockList{} }
  151. func (m *BlockList) String() string { return proto.CompactTextString(m) }
  152. func (*BlockList) ProtoMessage() {}
  153. func (*BlockList) Descriptor() ([]byte, []int) {
  154. return fileDescriptor_5465d80e8cba02e3, []int{3}
  155. }
  156. func (m *BlockList) XXX_Unmarshal(b []byte) error {
  157. return m.Unmarshal(b)
  158. }
  159. func (m *BlockList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  160. if deterministic {
  161. return xxx_messageInfo_BlockList.Marshal(b, m, deterministic)
  162. } else {
  163. b = b[:cap(b)]
  164. n, err := m.MarshalToSizedBuffer(b)
  165. if err != nil {
  166. return nil, err
  167. }
  168. return b[:n], nil
  169. }
  170. }
  171. func (m *BlockList) XXX_Merge(src proto.Message) {
  172. xxx_messageInfo_BlockList.Merge(m, src)
  173. }
  174. func (m *BlockList) XXX_Size() int {
  175. return m.ProtoSize()
  176. }
  177. func (m *BlockList) XXX_DiscardUnknown() {
  178. xxx_messageInfo_BlockList.DiscardUnknown(m)
  179. }
  180. var xxx_messageInfo_BlockList proto.InternalMessageInfo
  181. // IndirectionHashesOnly is used to only unmarshal the indirection hashes
  182. // from a FileInfo
  183. type IndirectionHashesOnly struct {
  184. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocksHash" xml:"blocksHash"`
  185. VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"versionHash" xml:"versionHash"`
  186. }
  187. func (m *IndirectionHashesOnly) Reset() { *m = IndirectionHashesOnly{} }
  188. func (m *IndirectionHashesOnly) String() string { return proto.CompactTextString(m) }
  189. func (*IndirectionHashesOnly) ProtoMessage() {}
  190. func (*IndirectionHashesOnly) Descriptor() ([]byte, []int) {
  191. return fileDescriptor_5465d80e8cba02e3, []int{4}
  192. }
  193. func (m *IndirectionHashesOnly) XXX_Unmarshal(b []byte) error {
  194. return m.Unmarshal(b)
  195. }
  196. func (m *IndirectionHashesOnly) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  197. if deterministic {
  198. return xxx_messageInfo_IndirectionHashesOnly.Marshal(b, m, deterministic)
  199. } else {
  200. b = b[:cap(b)]
  201. n, err := m.MarshalToSizedBuffer(b)
  202. if err != nil {
  203. return nil, err
  204. }
  205. return b[:n], nil
  206. }
  207. }
  208. func (m *IndirectionHashesOnly) XXX_Merge(src proto.Message) {
  209. xxx_messageInfo_IndirectionHashesOnly.Merge(m, src)
  210. }
  211. func (m *IndirectionHashesOnly) XXX_Size() int {
  212. return m.ProtoSize()
  213. }
  214. func (m *IndirectionHashesOnly) XXX_DiscardUnknown() {
  215. xxx_messageInfo_IndirectionHashesOnly.DiscardUnknown(m)
  216. }
  217. var xxx_messageInfo_IndirectionHashesOnly proto.InternalMessageInfo
  218. // For each folder and device we keep one of these to track the current
  219. // counts and sequence. We also keep one for the global state of the folder.
  220. type Counts struct {
  221. Files int `protobuf:"varint,1,opt,name=files,proto3,casttype=int" json:"files" xml:"files"`
  222. Directories int `protobuf:"varint,2,opt,name=directories,proto3,casttype=int" json:"directories" xml:"directories"`
  223. Symlinks int `protobuf:"varint,3,opt,name=symlinks,proto3,casttype=int" json:"symlinks" xml:"symlinks"`
  224. Deleted int `protobuf:"varint,4,opt,name=deleted,proto3,casttype=int" json:"deleted" xml:"deleted"`
  225. Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes" xml:"bytes"`
  226. Sequence int64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence" xml:"sequence"`
  227. DeviceID []byte `protobuf:"bytes,17,opt,name=device_id,json=deviceId,proto3" json:"deviceId" xml:"deviceId"`
  228. LocalFlags uint32 `protobuf:"varint,18,opt,name=local_flags,json=localFlags,proto3" json:"localFlags" xml:"localFlags"`
  229. }
  230. func (m *Counts) Reset() { *m = Counts{} }
  231. func (*Counts) ProtoMessage() {}
  232. func (*Counts) Descriptor() ([]byte, []int) {
  233. return fileDescriptor_5465d80e8cba02e3, []int{5}
  234. }
  235. func (m *Counts) XXX_Unmarshal(b []byte) error {
  236. return m.Unmarshal(b)
  237. }
  238. func (m *Counts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  239. if deterministic {
  240. return xxx_messageInfo_Counts.Marshal(b, m, deterministic)
  241. } else {
  242. b = b[:cap(b)]
  243. n, err := m.MarshalToSizedBuffer(b)
  244. if err != nil {
  245. return nil, err
  246. }
  247. return b[:n], nil
  248. }
  249. }
  250. func (m *Counts) XXX_Merge(src proto.Message) {
  251. xxx_messageInfo_Counts.Merge(m, src)
  252. }
  253. func (m *Counts) XXX_Size() int {
  254. return m.ProtoSize()
  255. }
  256. func (m *Counts) XXX_DiscardUnknown() {
  257. xxx_messageInfo_Counts.DiscardUnknown(m)
  258. }
  259. var xxx_messageInfo_Counts proto.InternalMessageInfo
  260. type CountsSet struct {
  261. Counts []Counts `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts" xml:"count"`
  262. Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created" xml:"created"`
  263. }
  264. func (m *CountsSet) Reset() { *m = CountsSet{} }
  265. func (m *CountsSet) String() string { return proto.CompactTextString(m) }
  266. func (*CountsSet) ProtoMessage() {}
  267. func (*CountsSet) Descriptor() ([]byte, []int) {
  268. return fileDescriptor_5465d80e8cba02e3, []int{6}
  269. }
  270. func (m *CountsSet) XXX_Unmarshal(b []byte) error {
  271. return m.Unmarshal(b)
  272. }
  273. func (m *CountsSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  274. if deterministic {
  275. return xxx_messageInfo_CountsSet.Marshal(b, m, deterministic)
  276. } else {
  277. b = b[:cap(b)]
  278. n, err := m.MarshalToSizedBuffer(b)
  279. if err != nil {
  280. return nil, err
  281. }
  282. return b[:n], nil
  283. }
  284. }
  285. func (m *CountsSet) XXX_Merge(src proto.Message) {
  286. xxx_messageInfo_CountsSet.Merge(m, src)
  287. }
  288. func (m *CountsSet) XXX_Size() int {
  289. return m.ProtoSize()
  290. }
  291. func (m *CountsSet) XXX_DiscardUnknown() {
  292. xxx_messageInfo_CountsSet.DiscardUnknown(m)
  293. }
  294. var xxx_messageInfo_CountsSet proto.InternalMessageInfo
  295. type FileVersionDeprecated struct {
  296. Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version" xml:"version"`
  297. Device []byte `protobuf:"bytes,2,opt,name=device,proto3" json:"device" xml:"device"`
  298. Invalid bool `protobuf:"varint,3,opt,name=invalid,proto3" json:"invalid" xml:"invalid"`
  299. Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
  300. }
  301. func (m *FileVersionDeprecated) Reset() { *m = FileVersionDeprecated{} }
  302. func (m *FileVersionDeprecated) String() string { return proto.CompactTextString(m) }
  303. func (*FileVersionDeprecated) ProtoMessage() {}
  304. func (*FileVersionDeprecated) Descriptor() ([]byte, []int) {
  305. return fileDescriptor_5465d80e8cba02e3, []int{7}
  306. }
  307. func (m *FileVersionDeprecated) XXX_Unmarshal(b []byte) error {
  308. return m.Unmarshal(b)
  309. }
  310. func (m *FileVersionDeprecated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  311. if deterministic {
  312. return xxx_messageInfo_FileVersionDeprecated.Marshal(b, m, deterministic)
  313. } else {
  314. b = b[:cap(b)]
  315. n, err := m.MarshalToSizedBuffer(b)
  316. if err != nil {
  317. return nil, err
  318. }
  319. return b[:n], nil
  320. }
  321. }
  322. func (m *FileVersionDeprecated) XXX_Merge(src proto.Message) {
  323. xxx_messageInfo_FileVersionDeprecated.Merge(m, src)
  324. }
  325. func (m *FileVersionDeprecated) XXX_Size() int {
  326. return m.ProtoSize()
  327. }
  328. func (m *FileVersionDeprecated) XXX_DiscardUnknown() {
  329. xxx_messageInfo_FileVersionDeprecated.DiscardUnknown(m)
  330. }
  331. var xxx_messageInfo_FileVersionDeprecated proto.InternalMessageInfo
  332. type VersionListDeprecated struct {
  333. Versions []FileVersionDeprecated `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions" xml:"version"`
  334. }
  335. func (m *VersionListDeprecated) Reset() { *m = VersionListDeprecated{} }
  336. func (*VersionListDeprecated) ProtoMessage() {}
  337. func (*VersionListDeprecated) Descriptor() ([]byte, []int) {
  338. return fileDescriptor_5465d80e8cba02e3, []int{8}
  339. }
  340. func (m *VersionListDeprecated) XXX_Unmarshal(b []byte) error {
  341. return m.Unmarshal(b)
  342. }
  343. func (m *VersionListDeprecated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  344. if deterministic {
  345. return xxx_messageInfo_VersionListDeprecated.Marshal(b, m, deterministic)
  346. } else {
  347. b = b[:cap(b)]
  348. n, err := m.MarshalToSizedBuffer(b)
  349. if err != nil {
  350. return nil, err
  351. }
  352. return b[:n], nil
  353. }
  354. }
  355. func (m *VersionListDeprecated) XXX_Merge(src proto.Message) {
  356. xxx_messageInfo_VersionListDeprecated.Merge(m, src)
  357. }
  358. func (m *VersionListDeprecated) XXX_Size() int {
  359. return m.ProtoSize()
  360. }
  361. func (m *VersionListDeprecated) XXX_DiscardUnknown() {
  362. xxx_messageInfo_VersionListDeprecated.DiscardUnknown(m)
  363. }
  364. var xxx_messageInfo_VersionListDeprecated proto.InternalMessageInfo
  365. func init() {
  366. proto.RegisterType((*FileVersion)(nil), "db.FileVersion")
  367. proto.RegisterType((*VersionList)(nil), "db.VersionList")
  368. proto.RegisterType((*FileInfoTruncated)(nil), "db.FileInfoTruncated")
  369. proto.RegisterType((*BlockList)(nil), "db.BlockList")
  370. proto.RegisterType((*IndirectionHashesOnly)(nil), "db.IndirectionHashesOnly")
  371. proto.RegisterType((*Counts)(nil), "db.Counts")
  372. proto.RegisterType((*CountsSet)(nil), "db.CountsSet")
  373. proto.RegisterType((*FileVersionDeprecated)(nil), "db.FileVersionDeprecated")
  374. proto.RegisterType((*VersionListDeprecated)(nil), "db.VersionListDeprecated")
  375. }
  376. func init() { proto.RegisterFile("lib/db/structs.proto", fileDescriptor_5465d80e8cba02e3) }
  377. var fileDescriptor_5465d80e8cba02e3 = []byte{
  378. // 1267 bytes of a gzipped FileDescriptorProto
  379. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x13, 0xc7,
  380. 0x17, 0xf7, 0xc6, 0x3f, 0x62, 0x8f, 0x9d, 0x40, 0x96, 0x2f, 0x68, 0xbf, 0xb4, 0xf5, 0xb8, 0x43,
  381. 0x90, 0xdc, 0x56, 0x72, 0xa4, 0x20, 0x50, 0x85, 0x54, 0x21, 0x96, 0x08, 0x08, 0xa2, 0x50, 0x4d,
  382. 0x10, 0xad, 0x7a, 0xb1, 0xbc, 0xeb, 0x49, 0xb2, 0x62, 0xb3, 0xeb, 0xee, 0x6c, 0x08, 0xe6, 0xd6,
  383. 0x4b, 0xa5, 0xde, 0x2a, 0xd4, 0x43, 0x55, 0x55, 0x15, 0xa7, 0xfe, 0x09, 0x55, 0xff, 0x04, 0x8e,
  384. 0x39, 0x56, 0x3d, 0xac, 0x84, 0x73, 0x69, 0x7d, 0xf4, 0xb1, 0xa7, 0x6a, 0xde, 0xcc, 0xce, 0x8e,
  385. 0x89, 0xa8, 0x80, 0x72, 0xdb, 0xf7, 0x79, 0x9f, 0xf7, 0xbc, 0xfb, 0xde, 0xe7, 0x3d, 0x3f, 0xf4,
  386. 0xbf, 0x30, 0xf0, 0xd6, 0x86, 0xde, 0x1a, 0x4f, 0x93, 0x7d, 0x3f, 0xe5, 0xbd, 0x51, 0x12, 0xa7,
  387. 0xb1, 0xbd, 0x30, 0xf4, 0xce, 0x9e, 0x4b, 0xd8, 0x28, 0xe6, 0x6b, 0x00, 0x78, 0xfb, 0xdb, 0x6b,
  388. 0x3b, 0xf1, 0x4e, 0x0c, 0x06, 0x3c, 0x49, 0xe2, 0xd9, 0x33, 0x22, 0x1c, 0x1e, 0xfd, 0x38, 0x5c,
  389. 0xf3, 0xd8, 0x48, 0xe1, 0x0d, 0xf6, 0x28, 0x95, 0x8f, 0xe4, 0xe7, 0x05, 0xd4, 0xbc, 0x1e, 0x84,
  390. 0xec, 0x3e, 0x4b, 0x78, 0x10, 0x47, 0xf6, 0x6d, 0xb4, 0xf8, 0x50, 0x3e, 0x3a, 0x56, 0xc7, 0xea,
  391. 0x36, 0xd7, 0x4f, 0xf6, 0xf2, 0x04, 0xbd, 0xfb, 0xcc, 0x4f, 0xe3, 0xc4, 0xed, 0x3c, 0xcb, 0x70,
  392. 0x69, 0x9a, 0xe1, 0x9c, 0x38, 0xcb, 0xf0, 0xd2, 0xa3, 0xbd, 0xf0, 0x32, 0x51, 0x36, 0xa1, 0xb9,
  393. 0xc7, 0xbe, 0x84, 0x16, 0x87, 0x2c, 0x64, 0x29, 0x1b, 0x3a, 0x0b, 0x1d, 0xab, 0x5b, 0x77, 0xdf,
  394. 0x15, 0x71, 0x0a, 0xd2, 0x71, 0xca, 0x26, 0x34, 0xf7, 0xd8, 0x17, 0x45, 0xdc, 0xc3, 0xc0, 0x67,
  395. 0xdc, 0x29, 0x77, 0xca, 0xdd, 0x96, 0xfb, 0x8e, 0x8c, 0x03, 0x68, 0x96, 0xe1, 0x96, 0x8a, 0x13,
  396. 0x36, 0x84, 0x81, 0xc3, 0xa6, 0xe8, 0x44, 0x10, 0x3d, 0x1c, 0x84, 0xc1, 0xb0, 0x9f, 0x87, 0x57,
  397. 0x20, 0xfc, 0x83, 0x69, 0x86, 0x97, 0x95, 0x6b, 0x43, 0x67, 0x39, 0x05, 0x59, 0xe6, 0x60, 0x42,
  398. 0x5f, 0xa0, 0x91, 0xaf, 0x2d, 0xd4, 0x54, 0xc5, 0xb9, 0x1d, 0xf0, 0xd4, 0x0e, 0x51, 0x5d, 0x7d,
  399. 0x1d, 0x77, 0xac, 0x4e, 0xb9, 0xdb, 0x5c, 0x3f, 0xd1, 0x1b, 0x7a, 0x3d, 0xa3, 0x86, 0xee, 0x15,
  400. 0x51, 0xa0, 0x49, 0x86, 0x9b, 0x74, 0x70, 0xa0, 0x30, 0x3e, 0xcd, 0xb0, 0x8e, 0x3b, 0x56, 0xb0,
  401. 0x27, 0x87, 0xab, 0x26, 0x97, 0x6a, 0xe6, 0xe5, 0xca, 0x0f, 0x4f, 0x71, 0x89, 0xfc, 0x86, 0xd0,
  402. 0x8a, 0xf8, 0x81, 0xcd, 0x68, 0x3b, 0xbe, 0x97, 0xec, 0x47, 0xfe, 0x40, 0x14, 0xe9, 0x43, 0x54,
  403. 0x89, 0x06, 0x7b, 0x0c, 0xfa, 0xd4, 0x70, 0xcf, 0x4c, 0x33, 0x0c, 0xf6, 0x2c, 0xc3, 0x08, 0xb2,
  404. 0x0b, 0x83, 0x50, 0xc0, 0x04, 0x97, 0x07, 0x8f, 0x99, 0x53, 0xee, 0x58, 0xdd, 0xb2, 0xe4, 0x0a,
  405. 0x5b, 0x73, 0x85, 0x41, 0x28, 0x60, 0xf6, 0x15, 0x84, 0xf6, 0xe2, 0x61, 0xb0, 0x1d, 0xb0, 0x61,
  406. 0x9f, 0x3b, 0x55, 0x88, 0xe8, 0x4c, 0x33, 0xdc, 0xc8, 0xd1, 0xad, 0x59, 0x86, 0x4f, 0x40, 0x98,
  407. 0x46, 0x08, 0x2d, 0xbc, 0xf6, 0xaf, 0x16, 0x6a, 0xea, 0x0c, 0xde, 0xd8, 0x69, 0x75, 0xac, 0x6e,
  408. 0xc5, 0xfd, 0xde, 0x12, 0x65, 0xf9, 0x23, 0xc3, 0x17, 0x76, 0x82, 0x74, 0x77, 0xdf, 0xeb, 0xf9,
  409. 0xf1, 0xde, 0x1a, 0x1f, 0x47, 0x7e, 0xba, 0x1b, 0x44, 0x3b, 0xc6, 0x93, 0x29, 0xda, 0xde, 0xd6,
  410. 0x6e, 0x9c, 0xa4, 0x9b, 0x1b, 0xd3, 0x0c, 0xeb, 0x97, 0x72, 0xc7, 0xb3, 0x0c, 0x9f, 0x9c, 0xfb,
  411. 0x7d, 0x77, 0x4c, 0x7e, 0x3c, 0x5c, 0x7d, 0x93, 0xc4, 0xd4, 0x48, 0x6b, 0x8a, 0xbf, 0xf1, 0xdf,
  412. 0xc5, 0x7f, 0x19, 0xd5, 0x39, 0xfb, 0x6a, 0x9f, 0x45, 0x3e, 0x73, 0x10, 0x54, 0xb1, 0x2d, 0x54,
  413. 0x90, 0x63, 0xb3, 0x0c, 0x2f, 0xcb, 0xda, 0x2b, 0x80, 0x50, 0xed, 0xb3, 0xef, 0xa2, 0x65, 0x3e,
  414. 0xde, 0x0b, 0x83, 0xe8, 0x41, 0x3f, 0x1d, 0x24, 0x3b, 0x2c, 0x75, 0x56, 0xa0, 0xcb, 0xdd, 0x69,
  415. 0x86, 0x97, 0x94, 0xe7, 0x1e, 0x38, 0xb4, 0x8e, 0xe7, 0x50, 0x42, 0xe7, 0x59, 0xf6, 0x35, 0xd4,
  416. 0xf4, 0xc2, 0xd8, 0x7f, 0xc0, 0xfb, 0xbb, 0x03, 0xbe, 0xeb, 0xd8, 0x1d, 0xab, 0xdb, 0x72, 0x89,
  417. 0x28, 0xab, 0x84, 0x6f, 0x0e, 0xf8, 0xae, 0x2e, 0x6b, 0x01, 0x11, 0x6a, 0xf8, 0x6d, 0x17, 0x55,
  418. 0xd2, 0xf1, 0x88, 0xc1, 0x2c, 0x2f, 0xaf, 0x9f, 0x29, 0x8a, 0xa3, 0xc5, 0x39, 0x1e, 0x31, 0xa9,
  419. 0x2e, 0xc1, 0xd3, 0xea, 0x12, 0x06, 0xa1, 0x80, 0xd9, 0xd7, 0x51, 0x73, 0xc4, 0x92, 0xbd, 0x80,
  420. 0xcb, 0x11, 0xaa, 0x74, 0xac, 0xee, 0x92, 0xbb, 0x3a, 0xcd, 0xb0, 0x09, 0xcf, 0x32, 0xbc, 0x02,
  421. 0x91, 0x06, 0x46, 0xa8, 0xc9, 0xb0, 0x6f, 0x19, 0x1a, 0x8b, 0xb8, 0xd3, 0xec, 0x58, 0xdd, 0x2a,
  422. 0xcc, 0xb9, 0x6e, 0xe8, 0x1d, 0x7e, 0x4c, 0x27, 0x77, 0x38, 0xf9, 0x3b, 0xc3, 0xe5, 0x20, 0x4a,
  423. 0xa9, 0x41, 0xb3, 0xb7, 0x91, 0xfc, 0xca, 0x3e, 0xcc, 0xc8, 0x12, 0xa4, 0xba, 0x31, 0xc9, 0x70,
  424. 0x8b, 0x0e, 0x0e, 0x5c, 0xe1, 0xd8, 0x0a, 0x1e, 0x33, 0x31, 0x01, 0x5e, 0x6e, 0xe8, 0x09, 0xd0,
  425. 0x48, 0x9e, 0xf8, 0xc9, 0xe1, 0xea, 0x5c, 0x18, 0x2d, 0x82, 0xec, 0x0d, 0xd4, 0x0c, 0x63, 0x7f,
  426. 0x10, 0xf6, 0xb7, 0xc3, 0xc1, 0x0e, 0x77, 0xfe, 0x5c, 0x84, 0x8f, 0x87, 0x2e, 0x00, 0x7e, 0x5d,
  427. 0xc0, 0xfa, 0xa5, 0x0b, 0x88, 0x50, 0xc3, 0x6f, 0xdf, 0x44, 0x2d, 0x25, 0x31, 0xd9, 0xcb, 0xbf,
  428. 0x16, 0xa1, 0x99, 0x50, 0x43, 0xe5, 0x50, 0xdd, 0x5c, 0x31, 0x95, 0x29, 0xdb, 0x69, 0x32, 0xcc,
  429. 0xf5, 0x5c, 0x7b, 0x9d, 0xf5, 0x4c, 0xd1, 0xa2, 0xda, 0x92, 0xce, 0x22, 0xc4, 0x7d, 0x3c, 0xc9,
  430. 0x30, 0xa2, 0x83, 0x83, 0x4d, 0x89, 0x8a, 0x2c, 0x8a, 0xa0, 0xb3, 0x28, 0x5b, 0xec, 0x3a, 0x83,
  431. 0x49, 0x73, 0x9e, 0x50, 0x7c, 0x14, 0xf7, 0x4d, 0x69, 0xd4, 0x21, 0x35, 0x28, 0x3e, 0x8a, 0x3f,
  432. 0x9b, 0x13, 0x87, 0x54, 0xfc, 0x1c, 0x4a, 0xe8, 0x3c, 0x4b, 0xad, 0xce, 0xcf, 0x51, 0x03, 0x5a,
  433. 0x01, 0xbb, 0xfb, 0x16, 0xaa, 0x49, 0x35, 0xab, 0xcd, 0x7d, 0xaa, 0x50, 0x30, 0x90, 0x84, 0x84,
  434. 0xdd, 0xf7, 0xd4, 0x84, 0x2b, 0xea, 0x2c, 0xc3, 0xcd, 0xa2, 0xd3, 0x84, 0x2a, 0x98, 0xfc, 0x62,
  435. 0xa1, 0xd3, 0x9b, 0xd1, 0x30, 0x48, 0x98, 0x9f, 0xaa, 0x7a, 0x32, 0x7e, 0x37, 0x0a, 0xc7, 0x6f,
  436. 0x67, 0xd4, 0xde, 0x5a, 0x93, 0xc9, 0x4f, 0x15, 0x54, 0xbb, 0x16, 0xef, 0x47, 0x29, 0xb7, 0x2f,
  437. 0xa2, 0xea, 0x76, 0x10, 0x32, 0x0e, 0x7f, 0x19, 0x55, 0x17, 0x4f, 0x33, 0x2c, 0x01, 0xfd, 0x91,
  438. 0x60, 0xe9, 0x19, 0x91, 0x4e, 0xfb, 0x53, 0xd4, 0x94, 0xdf, 0x19, 0x27, 0x01, 0xe3, 0x30, 0xfd,
  439. 0x55, 0xf7, 0x23, 0xf1, 0x26, 0x06, 0xac, 0xdf, 0xc4, 0xc0, 0x74, 0x22, 0x93, 0x68, 0x5f, 0x45,
  440. 0x75, 0xb5, 0x9b, 0x38, 0xfc, 0x1f, 0x55, 0xdd, 0xf3, 0xb0, 0x17, 0x15, 0x56, 0xec, 0x45, 0x05,
  441. 0xe8, 0x2c, 0x9a, 0x62, 0x7f, 0x52, 0x08, 0xb7, 0x02, 0x19, 0xce, 0xfd, 0x9b, 0x70, 0xf3, 0x78,
  442. 0xad, 0xdf, 0x1e, 0xaa, 0x7a, 0xe3, 0x94, 0xe5, 0x7f, 0x6e, 0x8e, 0xa8, 0x03, 0x00, 0x45, 0xb3,
  443. 0x85, 0x45, 0xa8, 0x44, 0xe7, 0x36, 0x79, 0xed, 0x35, 0x37, 0xf9, 0x16, 0x6a, 0xc8, 0x5b, 0xa4,
  444. 0x1f, 0x0c, 0x61, 0x89, 0xb7, 0xdc, 0x4b, 0x93, 0x0c, 0xd7, 0xe5, 0x7d, 0x01, 0xff, 0x6c, 0x75,
  445. 0x49, 0xd8, 0x1c, 0xea, 0x44, 0x39, 0x20, 0xa6, 0x45, 0x33, 0xa9, 0xe6, 0x09, 0x89, 0x99, 0x8b,
  446. 0xc4, 0x7e, 0x93, 0x3d, 0xa2, 0x06, 0xe4, 0x1b, 0x0b, 0x35, 0xa4, 0x3c, 0xb6, 0x58, 0x6a, 0x5f,
  447. 0x45, 0x35, 0x1f, 0x0c, 0x35, 0x21, 0x48, 0xdc, 0x36, 0xd2, 0x5d, 0x0c, 0x86, 0x64, 0xe8, 0x5a,
  448. 0x81, 0x49, 0xa8, 0x82, 0xc5, 0x52, 0xf1, 0x13, 0x36, 0xc8, 0x6f, 0xbe, 0xb2, 0x5c, 0x2a, 0x0a,
  449. 0xd2, 0xbd, 0x51, 0x36, 0xa1, 0xb9, 0x87, 0x7c, 0xbb, 0x80, 0x4e, 0x1b, 0x57, 0xd4, 0x06, 0x1b,
  450. 0x25, 0x4c, 0x1e, 0x3a, 0x6f, 0xf7, 0x26, 0x5d, 0x47, 0x35, 0x59, 0x47, 0x78, 0xbd, 0x96, 0x7b,
  451. 0x56, 0x7c, 0x92, 0x44, 0x8e, 0x5d, 0x96, 0x0a, 0x17, 0xdf, 0x94, 0x2f, 0xbc, 0x72, 0xb1, 0x28,
  452. 0x5f, 0xb6, 0xe2, 0x8a, 0xa5, 0x76, 0x69, 0x5e, 0xa7, 0xaf, 0xba, 0x60, 0xc9, 0x01, 0x3a, 0x6d,
  453. 0xdc, 0x9c, 0x46, 0x29, 0xbe, 0x38, 0x76, 0x7d, 0xfe, 0xff, 0x85, 0xeb, 0xb3, 0x20, 0xbb, 0xef,
  454. 0xab, 0xa2, 0xbc, 0xfc, 0xf0, 0x7c, 0xf1, 0xd2, 0x74, 0x6f, 0x3c, 0x7b, 0xde, 0x2e, 0x1d, 0x3e,
  455. 0x6f, 0x97, 0x9e, 0x4d, 0xda, 0xd6, 0xe1, 0xa4, 0x6d, 0x7d, 0x77, 0xd4, 0x2e, 0x3d, 0x3d, 0x6a,
  456. 0x5b, 0x87, 0x47, 0xed, 0xd2, 0xef, 0x47, 0xed, 0xd2, 0x97, 0xe7, 0x5f, 0xe1, 0xc8, 0x1a, 0x7a,
  457. 0x5e, 0x0d, 0x3a, 0x74, 0xe1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, 0x5e, 0x6e, 0xcc, 0xc2,
  458. 0x0c, 0x00, 0x00,
  459. }
  460. func (m *FileVersion) Marshal() (dAtA []byte, err error) {
  461. size := m.ProtoSize()
  462. dAtA = make([]byte, size)
  463. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  464. if err != nil {
  465. return nil, err
  466. }
  467. return dAtA[:n], nil
  468. }
  469. func (m *FileVersion) MarshalTo(dAtA []byte) (int, error) {
  470. size := m.ProtoSize()
  471. return m.MarshalToSizedBuffer(dAtA[:size])
  472. }
  473. func (m *FileVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  474. i := len(dAtA)
  475. _ = i
  476. var l int
  477. _ = l
  478. if len(m.InvalidDevices) > 0 {
  479. for iNdEx := len(m.InvalidDevices) - 1; iNdEx >= 0; iNdEx-- {
  480. i -= len(m.InvalidDevices[iNdEx])
  481. copy(dAtA[i:], m.InvalidDevices[iNdEx])
  482. i = encodeVarintStructs(dAtA, i, uint64(len(m.InvalidDevices[iNdEx])))
  483. i--
  484. dAtA[i] = 0x22
  485. }
  486. }
  487. if len(m.Devices) > 0 {
  488. for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  489. i -= len(m.Devices[iNdEx])
  490. copy(dAtA[i:], m.Devices[iNdEx])
  491. i = encodeVarintStructs(dAtA, i, uint64(len(m.Devices[iNdEx])))
  492. i--
  493. dAtA[i] = 0x1a
  494. }
  495. }
  496. if m.Deleted {
  497. i--
  498. if m.Deleted {
  499. dAtA[i] = 1
  500. } else {
  501. dAtA[i] = 0
  502. }
  503. i--
  504. dAtA[i] = 0x10
  505. }
  506. {
  507. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  508. if err != nil {
  509. return 0, err
  510. }
  511. i -= size
  512. i = encodeVarintStructs(dAtA, i, uint64(size))
  513. }
  514. i--
  515. dAtA[i] = 0xa
  516. return len(dAtA) - i, nil
  517. }
  518. func (m *VersionList) Marshal() (dAtA []byte, err error) {
  519. size := m.ProtoSize()
  520. dAtA = make([]byte, size)
  521. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  522. if err != nil {
  523. return nil, err
  524. }
  525. return dAtA[:n], nil
  526. }
  527. func (m *VersionList) MarshalTo(dAtA []byte) (int, error) {
  528. size := m.ProtoSize()
  529. return m.MarshalToSizedBuffer(dAtA[:size])
  530. }
  531. func (m *VersionList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  532. i := len(dAtA)
  533. _ = i
  534. var l int
  535. _ = l
  536. if len(m.RawVersions) > 0 {
  537. for iNdEx := len(m.RawVersions) - 1; iNdEx >= 0; iNdEx-- {
  538. {
  539. size, err := m.RawVersions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  540. if err != nil {
  541. return 0, err
  542. }
  543. i -= size
  544. i = encodeVarintStructs(dAtA, i, uint64(size))
  545. }
  546. i--
  547. dAtA[i] = 0xa
  548. }
  549. }
  550. return len(dAtA) - i, nil
  551. }
  552. func (m *FileInfoTruncated) Marshal() (dAtA []byte, err error) {
  553. size := m.ProtoSize()
  554. dAtA = make([]byte, size)
  555. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  556. if err != nil {
  557. return nil, err
  558. }
  559. return dAtA[:n], nil
  560. }
  561. func (m *FileInfoTruncated) MarshalTo(dAtA []byte) (int, error) {
  562. size := m.ProtoSize()
  563. return m.MarshalToSizedBuffer(dAtA[:size])
  564. }
  565. func (m *FileInfoTruncated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  566. i := len(dAtA)
  567. _ = i
  568. var l int
  569. _ = l
  570. if len(m.VersionHash) > 0 {
  571. i -= len(m.VersionHash)
  572. copy(dAtA[i:], m.VersionHash)
  573. i = encodeVarintStructs(dAtA, i, uint64(len(m.VersionHash)))
  574. i--
  575. dAtA[i] = 0x3e
  576. i--
  577. dAtA[i] = 0xca
  578. }
  579. if m.LocalFlags != 0 {
  580. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  581. i--
  582. dAtA[i] = 0x3e
  583. i--
  584. dAtA[i] = 0xc0
  585. }
  586. if len(m.BlocksHash) > 0 {
  587. i -= len(m.BlocksHash)
  588. copy(dAtA[i:], m.BlocksHash)
  589. i = encodeVarintStructs(dAtA, i, uint64(len(m.BlocksHash)))
  590. i--
  591. dAtA[i] = 0x1
  592. i--
  593. dAtA[i] = 0x92
  594. }
  595. if len(m.SymlinkTarget) > 0 {
  596. i -= len(m.SymlinkTarget)
  597. copy(dAtA[i:], m.SymlinkTarget)
  598. i = encodeVarintStructs(dAtA, i, uint64(len(m.SymlinkTarget)))
  599. i--
  600. dAtA[i] = 0x1
  601. i--
  602. dAtA[i] = 0x8a
  603. }
  604. if m.RawBlockSize != 0 {
  605. i = encodeVarintStructs(dAtA, i, uint64(m.RawBlockSize))
  606. i--
  607. dAtA[i] = 0x68
  608. }
  609. if m.ModifiedBy != 0 {
  610. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedBy))
  611. i--
  612. dAtA[i] = 0x60
  613. }
  614. if m.ModifiedNs != 0 {
  615. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedNs))
  616. i--
  617. dAtA[i] = 0x58
  618. }
  619. if m.Sequence != 0 {
  620. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  621. i--
  622. dAtA[i] = 0x50
  623. }
  624. {
  625. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  626. if err != nil {
  627. return 0, err
  628. }
  629. i -= size
  630. i = encodeVarintStructs(dAtA, i, uint64(size))
  631. }
  632. i--
  633. dAtA[i] = 0x4a
  634. if m.NoPermissions {
  635. i--
  636. if m.NoPermissions {
  637. dAtA[i] = 1
  638. } else {
  639. dAtA[i] = 0
  640. }
  641. i--
  642. dAtA[i] = 0x40
  643. }
  644. if m.RawInvalid {
  645. i--
  646. if m.RawInvalid {
  647. dAtA[i] = 1
  648. } else {
  649. dAtA[i] = 0
  650. }
  651. i--
  652. dAtA[i] = 0x38
  653. }
  654. if m.Deleted {
  655. i--
  656. if m.Deleted {
  657. dAtA[i] = 1
  658. } else {
  659. dAtA[i] = 0
  660. }
  661. i--
  662. dAtA[i] = 0x30
  663. }
  664. if m.ModifiedS != 0 {
  665. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedS))
  666. i--
  667. dAtA[i] = 0x28
  668. }
  669. if m.Permissions != 0 {
  670. i = encodeVarintStructs(dAtA, i, uint64(m.Permissions))
  671. i--
  672. dAtA[i] = 0x20
  673. }
  674. if m.Size != 0 {
  675. i = encodeVarintStructs(dAtA, i, uint64(m.Size))
  676. i--
  677. dAtA[i] = 0x18
  678. }
  679. if m.Type != 0 {
  680. i = encodeVarintStructs(dAtA, i, uint64(m.Type))
  681. i--
  682. dAtA[i] = 0x10
  683. }
  684. if len(m.Name) > 0 {
  685. i -= len(m.Name)
  686. copy(dAtA[i:], m.Name)
  687. i = encodeVarintStructs(dAtA, i, uint64(len(m.Name)))
  688. i--
  689. dAtA[i] = 0xa
  690. }
  691. return len(dAtA) - i, nil
  692. }
  693. func (m *BlockList) Marshal() (dAtA []byte, err error) {
  694. size := m.ProtoSize()
  695. dAtA = make([]byte, size)
  696. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  697. if err != nil {
  698. return nil, err
  699. }
  700. return dAtA[:n], nil
  701. }
  702. func (m *BlockList) MarshalTo(dAtA []byte) (int, error) {
  703. size := m.ProtoSize()
  704. return m.MarshalToSizedBuffer(dAtA[:size])
  705. }
  706. func (m *BlockList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  707. i := len(dAtA)
  708. _ = i
  709. var l int
  710. _ = l
  711. if len(m.Blocks) > 0 {
  712. for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- {
  713. {
  714. size, err := m.Blocks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  715. if err != nil {
  716. return 0, err
  717. }
  718. i -= size
  719. i = encodeVarintStructs(dAtA, i, uint64(size))
  720. }
  721. i--
  722. dAtA[i] = 0xa
  723. }
  724. }
  725. return len(dAtA) - i, nil
  726. }
  727. func (m *IndirectionHashesOnly) Marshal() (dAtA []byte, err error) {
  728. size := m.ProtoSize()
  729. dAtA = make([]byte, size)
  730. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  731. if err != nil {
  732. return nil, err
  733. }
  734. return dAtA[:n], nil
  735. }
  736. func (m *IndirectionHashesOnly) MarshalTo(dAtA []byte) (int, error) {
  737. size := m.ProtoSize()
  738. return m.MarshalToSizedBuffer(dAtA[:size])
  739. }
  740. func (m *IndirectionHashesOnly) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  741. i := len(dAtA)
  742. _ = i
  743. var l int
  744. _ = l
  745. if len(m.VersionHash) > 0 {
  746. i -= len(m.VersionHash)
  747. copy(dAtA[i:], m.VersionHash)
  748. i = encodeVarintStructs(dAtA, i, uint64(len(m.VersionHash)))
  749. i--
  750. dAtA[i] = 0x3e
  751. i--
  752. dAtA[i] = 0xca
  753. }
  754. if len(m.BlocksHash) > 0 {
  755. i -= len(m.BlocksHash)
  756. copy(dAtA[i:], m.BlocksHash)
  757. i = encodeVarintStructs(dAtA, i, uint64(len(m.BlocksHash)))
  758. i--
  759. dAtA[i] = 0x1
  760. i--
  761. dAtA[i] = 0x92
  762. }
  763. return len(dAtA) - i, nil
  764. }
  765. func (m *Counts) Marshal() (dAtA []byte, err error) {
  766. size := m.ProtoSize()
  767. dAtA = make([]byte, size)
  768. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  769. if err != nil {
  770. return nil, err
  771. }
  772. return dAtA[:n], nil
  773. }
  774. func (m *Counts) MarshalTo(dAtA []byte) (int, error) {
  775. size := m.ProtoSize()
  776. return m.MarshalToSizedBuffer(dAtA[:size])
  777. }
  778. func (m *Counts) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  779. i := len(dAtA)
  780. _ = i
  781. var l int
  782. _ = l
  783. if m.LocalFlags != 0 {
  784. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  785. i--
  786. dAtA[i] = 0x1
  787. i--
  788. dAtA[i] = 0x90
  789. }
  790. if len(m.DeviceID) > 0 {
  791. i -= len(m.DeviceID)
  792. copy(dAtA[i:], m.DeviceID)
  793. i = encodeVarintStructs(dAtA, i, uint64(len(m.DeviceID)))
  794. i--
  795. dAtA[i] = 0x1
  796. i--
  797. dAtA[i] = 0x8a
  798. }
  799. if m.Sequence != 0 {
  800. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  801. i--
  802. dAtA[i] = 0x30
  803. }
  804. if m.Bytes != 0 {
  805. i = encodeVarintStructs(dAtA, i, uint64(m.Bytes))
  806. i--
  807. dAtA[i] = 0x28
  808. }
  809. if m.Deleted != 0 {
  810. i = encodeVarintStructs(dAtA, i, uint64(m.Deleted))
  811. i--
  812. dAtA[i] = 0x20
  813. }
  814. if m.Symlinks != 0 {
  815. i = encodeVarintStructs(dAtA, i, uint64(m.Symlinks))
  816. i--
  817. dAtA[i] = 0x18
  818. }
  819. if m.Directories != 0 {
  820. i = encodeVarintStructs(dAtA, i, uint64(m.Directories))
  821. i--
  822. dAtA[i] = 0x10
  823. }
  824. if m.Files != 0 {
  825. i = encodeVarintStructs(dAtA, i, uint64(m.Files))
  826. i--
  827. dAtA[i] = 0x8
  828. }
  829. return len(dAtA) - i, nil
  830. }
  831. func (m *CountsSet) Marshal() (dAtA []byte, err error) {
  832. size := m.ProtoSize()
  833. dAtA = make([]byte, size)
  834. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  835. if err != nil {
  836. return nil, err
  837. }
  838. return dAtA[:n], nil
  839. }
  840. func (m *CountsSet) MarshalTo(dAtA []byte) (int, error) {
  841. size := m.ProtoSize()
  842. return m.MarshalToSizedBuffer(dAtA[:size])
  843. }
  844. func (m *CountsSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  845. i := len(dAtA)
  846. _ = i
  847. var l int
  848. _ = l
  849. if m.Created != 0 {
  850. i = encodeVarintStructs(dAtA, i, uint64(m.Created))
  851. i--
  852. dAtA[i] = 0x10
  853. }
  854. if len(m.Counts) > 0 {
  855. for iNdEx := len(m.Counts) - 1; iNdEx >= 0; iNdEx-- {
  856. {
  857. size, err := m.Counts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  858. if err != nil {
  859. return 0, err
  860. }
  861. i -= size
  862. i = encodeVarintStructs(dAtA, i, uint64(size))
  863. }
  864. i--
  865. dAtA[i] = 0xa
  866. }
  867. }
  868. return len(dAtA) - i, nil
  869. }
  870. func (m *FileVersionDeprecated) Marshal() (dAtA []byte, err error) {
  871. size := m.ProtoSize()
  872. dAtA = make([]byte, size)
  873. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  874. if err != nil {
  875. return nil, err
  876. }
  877. return dAtA[:n], nil
  878. }
  879. func (m *FileVersionDeprecated) MarshalTo(dAtA []byte) (int, error) {
  880. size := m.ProtoSize()
  881. return m.MarshalToSizedBuffer(dAtA[:size])
  882. }
  883. func (m *FileVersionDeprecated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  884. i := len(dAtA)
  885. _ = i
  886. var l int
  887. _ = l
  888. if m.Deleted {
  889. i--
  890. if m.Deleted {
  891. dAtA[i] = 1
  892. } else {
  893. dAtA[i] = 0
  894. }
  895. i--
  896. dAtA[i] = 0x20
  897. }
  898. if m.Invalid {
  899. i--
  900. if m.Invalid {
  901. dAtA[i] = 1
  902. } else {
  903. dAtA[i] = 0
  904. }
  905. i--
  906. dAtA[i] = 0x18
  907. }
  908. if len(m.Device) > 0 {
  909. i -= len(m.Device)
  910. copy(dAtA[i:], m.Device)
  911. i = encodeVarintStructs(dAtA, i, uint64(len(m.Device)))
  912. i--
  913. dAtA[i] = 0x12
  914. }
  915. {
  916. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  917. if err != nil {
  918. return 0, err
  919. }
  920. i -= size
  921. i = encodeVarintStructs(dAtA, i, uint64(size))
  922. }
  923. i--
  924. dAtA[i] = 0xa
  925. return len(dAtA) - i, nil
  926. }
  927. func (m *VersionListDeprecated) Marshal() (dAtA []byte, err error) {
  928. size := m.ProtoSize()
  929. dAtA = make([]byte, size)
  930. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  931. if err != nil {
  932. return nil, err
  933. }
  934. return dAtA[:n], nil
  935. }
  936. func (m *VersionListDeprecated) MarshalTo(dAtA []byte) (int, error) {
  937. size := m.ProtoSize()
  938. return m.MarshalToSizedBuffer(dAtA[:size])
  939. }
  940. func (m *VersionListDeprecated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  941. i := len(dAtA)
  942. _ = i
  943. var l int
  944. _ = l
  945. if len(m.Versions) > 0 {
  946. for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- {
  947. {
  948. size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  949. if err != nil {
  950. return 0, err
  951. }
  952. i -= size
  953. i = encodeVarintStructs(dAtA, i, uint64(size))
  954. }
  955. i--
  956. dAtA[i] = 0xa
  957. }
  958. }
  959. return len(dAtA) - i, nil
  960. }
  961. func encodeVarintStructs(dAtA []byte, offset int, v uint64) int {
  962. offset -= sovStructs(v)
  963. base := offset
  964. for v >= 1<<7 {
  965. dAtA[offset] = uint8(v&0x7f | 0x80)
  966. v >>= 7
  967. offset++
  968. }
  969. dAtA[offset] = uint8(v)
  970. return base
  971. }
  972. func (m *FileVersion) ProtoSize() (n int) {
  973. if m == nil {
  974. return 0
  975. }
  976. var l int
  977. _ = l
  978. l = m.Version.ProtoSize()
  979. n += 1 + l + sovStructs(uint64(l))
  980. if m.Deleted {
  981. n += 2
  982. }
  983. if len(m.Devices) > 0 {
  984. for _, b := range m.Devices {
  985. l = len(b)
  986. n += 1 + l + sovStructs(uint64(l))
  987. }
  988. }
  989. if len(m.InvalidDevices) > 0 {
  990. for _, b := range m.InvalidDevices {
  991. l = len(b)
  992. n += 1 + l + sovStructs(uint64(l))
  993. }
  994. }
  995. return n
  996. }
  997. func (m *VersionList) ProtoSize() (n int) {
  998. if m == nil {
  999. return 0
  1000. }
  1001. var l int
  1002. _ = l
  1003. if len(m.RawVersions) > 0 {
  1004. for _, e := range m.RawVersions {
  1005. l = e.ProtoSize()
  1006. n += 1 + l + sovStructs(uint64(l))
  1007. }
  1008. }
  1009. return n
  1010. }
  1011. func (m *FileInfoTruncated) ProtoSize() (n int) {
  1012. if m == nil {
  1013. return 0
  1014. }
  1015. var l int
  1016. _ = l
  1017. l = len(m.Name)
  1018. if l > 0 {
  1019. n += 1 + l + sovStructs(uint64(l))
  1020. }
  1021. if m.Type != 0 {
  1022. n += 1 + sovStructs(uint64(m.Type))
  1023. }
  1024. if m.Size != 0 {
  1025. n += 1 + sovStructs(uint64(m.Size))
  1026. }
  1027. if m.Permissions != 0 {
  1028. n += 1 + sovStructs(uint64(m.Permissions))
  1029. }
  1030. if m.ModifiedS != 0 {
  1031. n += 1 + sovStructs(uint64(m.ModifiedS))
  1032. }
  1033. if m.Deleted {
  1034. n += 2
  1035. }
  1036. if m.RawInvalid {
  1037. n += 2
  1038. }
  1039. if m.NoPermissions {
  1040. n += 2
  1041. }
  1042. l = m.Version.ProtoSize()
  1043. n += 1 + l + sovStructs(uint64(l))
  1044. if m.Sequence != 0 {
  1045. n += 1 + sovStructs(uint64(m.Sequence))
  1046. }
  1047. if m.ModifiedNs != 0 {
  1048. n += 1 + sovStructs(uint64(m.ModifiedNs))
  1049. }
  1050. if m.ModifiedBy != 0 {
  1051. n += 1 + sovStructs(uint64(m.ModifiedBy))
  1052. }
  1053. if m.RawBlockSize != 0 {
  1054. n += 1 + sovStructs(uint64(m.RawBlockSize))
  1055. }
  1056. l = len(m.SymlinkTarget)
  1057. if l > 0 {
  1058. n += 2 + l + sovStructs(uint64(l))
  1059. }
  1060. l = len(m.BlocksHash)
  1061. if l > 0 {
  1062. n += 2 + l + sovStructs(uint64(l))
  1063. }
  1064. if m.LocalFlags != 0 {
  1065. n += 2 + sovStructs(uint64(m.LocalFlags))
  1066. }
  1067. l = len(m.VersionHash)
  1068. if l > 0 {
  1069. n += 2 + l + sovStructs(uint64(l))
  1070. }
  1071. return n
  1072. }
  1073. func (m *BlockList) ProtoSize() (n int) {
  1074. if m == nil {
  1075. return 0
  1076. }
  1077. var l int
  1078. _ = l
  1079. if len(m.Blocks) > 0 {
  1080. for _, e := range m.Blocks {
  1081. l = e.ProtoSize()
  1082. n += 1 + l + sovStructs(uint64(l))
  1083. }
  1084. }
  1085. return n
  1086. }
  1087. func (m *IndirectionHashesOnly) ProtoSize() (n int) {
  1088. if m == nil {
  1089. return 0
  1090. }
  1091. var l int
  1092. _ = l
  1093. l = len(m.BlocksHash)
  1094. if l > 0 {
  1095. n += 2 + l + sovStructs(uint64(l))
  1096. }
  1097. l = len(m.VersionHash)
  1098. if l > 0 {
  1099. n += 2 + l + sovStructs(uint64(l))
  1100. }
  1101. return n
  1102. }
  1103. func (m *Counts) ProtoSize() (n int) {
  1104. if m == nil {
  1105. return 0
  1106. }
  1107. var l int
  1108. _ = l
  1109. if m.Files != 0 {
  1110. n += 1 + sovStructs(uint64(m.Files))
  1111. }
  1112. if m.Directories != 0 {
  1113. n += 1 + sovStructs(uint64(m.Directories))
  1114. }
  1115. if m.Symlinks != 0 {
  1116. n += 1 + sovStructs(uint64(m.Symlinks))
  1117. }
  1118. if m.Deleted != 0 {
  1119. n += 1 + sovStructs(uint64(m.Deleted))
  1120. }
  1121. if m.Bytes != 0 {
  1122. n += 1 + sovStructs(uint64(m.Bytes))
  1123. }
  1124. if m.Sequence != 0 {
  1125. n += 1 + sovStructs(uint64(m.Sequence))
  1126. }
  1127. l = len(m.DeviceID)
  1128. if l > 0 {
  1129. n += 2 + l + sovStructs(uint64(l))
  1130. }
  1131. if m.LocalFlags != 0 {
  1132. n += 2 + sovStructs(uint64(m.LocalFlags))
  1133. }
  1134. return n
  1135. }
  1136. func (m *CountsSet) ProtoSize() (n int) {
  1137. if m == nil {
  1138. return 0
  1139. }
  1140. var l int
  1141. _ = l
  1142. if len(m.Counts) > 0 {
  1143. for _, e := range m.Counts {
  1144. l = e.ProtoSize()
  1145. n += 1 + l + sovStructs(uint64(l))
  1146. }
  1147. }
  1148. if m.Created != 0 {
  1149. n += 1 + sovStructs(uint64(m.Created))
  1150. }
  1151. return n
  1152. }
  1153. func (m *FileVersionDeprecated) ProtoSize() (n int) {
  1154. if m == nil {
  1155. return 0
  1156. }
  1157. var l int
  1158. _ = l
  1159. l = m.Version.ProtoSize()
  1160. n += 1 + l + sovStructs(uint64(l))
  1161. l = len(m.Device)
  1162. if l > 0 {
  1163. n += 1 + l + sovStructs(uint64(l))
  1164. }
  1165. if m.Invalid {
  1166. n += 2
  1167. }
  1168. if m.Deleted {
  1169. n += 2
  1170. }
  1171. return n
  1172. }
  1173. func (m *VersionListDeprecated) ProtoSize() (n int) {
  1174. if m == nil {
  1175. return 0
  1176. }
  1177. var l int
  1178. _ = l
  1179. if len(m.Versions) > 0 {
  1180. for _, e := range m.Versions {
  1181. l = e.ProtoSize()
  1182. n += 1 + l + sovStructs(uint64(l))
  1183. }
  1184. }
  1185. return n
  1186. }
  1187. func sovStructs(x uint64) (n int) {
  1188. return (math_bits.Len64(x|1) + 6) / 7
  1189. }
  1190. func sozStructs(x uint64) (n int) {
  1191. return sovStructs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1192. }
  1193. func (m *FileVersion) Unmarshal(dAtA []byte) error {
  1194. l := len(dAtA)
  1195. iNdEx := 0
  1196. for iNdEx < l {
  1197. preIndex := iNdEx
  1198. var wire uint64
  1199. for shift := uint(0); ; shift += 7 {
  1200. if shift >= 64 {
  1201. return ErrIntOverflowStructs
  1202. }
  1203. if iNdEx >= l {
  1204. return io.ErrUnexpectedEOF
  1205. }
  1206. b := dAtA[iNdEx]
  1207. iNdEx++
  1208. wire |= uint64(b&0x7F) << shift
  1209. if b < 0x80 {
  1210. break
  1211. }
  1212. }
  1213. fieldNum := int32(wire >> 3)
  1214. wireType := int(wire & 0x7)
  1215. if wireType == 4 {
  1216. return fmt.Errorf("proto: FileVersion: wiretype end group for non-group")
  1217. }
  1218. if fieldNum <= 0 {
  1219. return fmt.Errorf("proto: FileVersion: illegal tag %d (wire type %d)", fieldNum, wire)
  1220. }
  1221. switch fieldNum {
  1222. case 1:
  1223. if wireType != 2 {
  1224. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1225. }
  1226. var msglen int
  1227. for shift := uint(0); ; shift += 7 {
  1228. if shift >= 64 {
  1229. return ErrIntOverflowStructs
  1230. }
  1231. if iNdEx >= l {
  1232. return io.ErrUnexpectedEOF
  1233. }
  1234. b := dAtA[iNdEx]
  1235. iNdEx++
  1236. msglen |= int(b&0x7F) << shift
  1237. if b < 0x80 {
  1238. break
  1239. }
  1240. }
  1241. if msglen < 0 {
  1242. return ErrInvalidLengthStructs
  1243. }
  1244. postIndex := iNdEx + msglen
  1245. if postIndex < 0 {
  1246. return ErrInvalidLengthStructs
  1247. }
  1248. if postIndex > l {
  1249. return io.ErrUnexpectedEOF
  1250. }
  1251. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1252. return err
  1253. }
  1254. iNdEx = postIndex
  1255. case 2:
  1256. if wireType != 0 {
  1257. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1258. }
  1259. var v int
  1260. for shift := uint(0); ; shift += 7 {
  1261. if shift >= 64 {
  1262. return ErrIntOverflowStructs
  1263. }
  1264. if iNdEx >= l {
  1265. return io.ErrUnexpectedEOF
  1266. }
  1267. b := dAtA[iNdEx]
  1268. iNdEx++
  1269. v |= int(b&0x7F) << shift
  1270. if b < 0x80 {
  1271. break
  1272. }
  1273. }
  1274. m.Deleted = bool(v != 0)
  1275. case 3:
  1276. if wireType != 2 {
  1277. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  1278. }
  1279. var byteLen int
  1280. for shift := uint(0); ; shift += 7 {
  1281. if shift >= 64 {
  1282. return ErrIntOverflowStructs
  1283. }
  1284. if iNdEx >= l {
  1285. return io.ErrUnexpectedEOF
  1286. }
  1287. b := dAtA[iNdEx]
  1288. iNdEx++
  1289. byteLen |= int(b&0x7F) << shift
  1290. if b < 0x80 {
  1291. break
  1292. }
  1293. }
  1294. if byteLen < 0 {
  1295. return ErrInvalidLengthStructs
  1296. }
  1297. postIndex := iNdEx + byteLen
  1298. if postIndex < 0 {
  1299. return ErrInvalidLengthStructs
  1300. }
  1301. if postIndex > l {
  1302. return io.ErrUnexpectedEOF
  1303. }
  1304. m.Devices = append(m.Devices, make([]byte, postIndex-iNdEx))
  1305. copy(m.Devices[len(m.Devices)-1], dAtA[iNdEx:postIndex])
  1306. iNdEx = postIndex
  1307. case 4:
  1308. if wireType != 2 {
  1309. return fmt.Errorf("proto: wrong wireType = %d for field InvalidDevices", wireType)
  1310. }
  1311. var byteLen int
  1312. for shift := uint(0); ; shift += 7 {
  1313. if shift >= 64 {
  1314. return ErrIntOverflowStructs
  1315. }
  1316. if iNdEx >= l {
  1317. return io.ErrUnexpectedEOF
  1318. }
  1319. b := dAtA[iNdEx]
  1320. iNdEx++
  1321. byteLen |= int(b&0x7F) << shift
  1322. if b < 0x80 {
  1323. break
  1324. }
  1325. }
  1326. if byteLen < 0 {
  1327. return ErrInvalidLengthStructs
  1328. }
  1329. postIndex := iNdEx + byteLen
  1330. if postIndex < 0 {
  1331. return ErrInvalidLengthStructs
  1332. }
  1333. if postIndex > l {
  1334. return io.ErrUnexpectedEOF
  1335. }
  1336. m.InvalidDevices = append(m.InvalidDevices, make([]byte, postIndex-iNdEx))
  1337. copy(m.InvalidDevices[len(m.InvalidDevices)-1], dAtA[iNdEx:postIndex])
  1338. iNdEx = postIndex
  1339. default:
  1340. iNdEx = preIndex
  1341. skippy, err := skipStructs(dAtA[iNdEx:])
  1342. if err != nil {
  1343. return err
  1344. }
  1345. if skippy < 0 {
  1346. return ErrInvalidLengthStructs
  1347. }
  1348. if (iNdEx + skippy) < 0 {
  1349. return ErrInvalidLengthStructs
  1350. }
  1351. if (iNdEx + skippy) > l {
  1352. return io.ErrUnexpectedEOF
  1353. }
  1354. iNdEx += skippy
  1355. }
  1356. }
  1357. if iNdEx > l {
  1358. return io.ErrUnexpectedEOF
  1359. }
  1360. return nil
  1361. }
  1362. func (m *VersionList) Unmarshal(dAtA []byte) error {
  1363. l := len(dAtA)
  1364. iNdEx := 0
  1365. for iNdEx < l {
  1366. preIndex := iNdEx
  1367. var wire uint64
  1368. for shift := uint(0); ; shift += 7 {
  1369. if shift >= 64 {
  1370. return ErrIntOverflowStructs
  1371. }
  1372. if iNdEx >= l {
  1373. return io.ErrUnexpectedEOF
  1374. }
  1375. b := dAtA[iNdEx]
  1376. iNdEx++
  1377. wire |= uint64(b&0x7F) << shift
  1378. if b < 0x80 {
  1379. break
  1380. }
  1381. }
  1382. fieldNum := int32(wire >> 3)
  1383. wireType := int(wire & 0x7)
  1384. if wireType == 4 {
  1385. return fmt.Errorf("proto: VersionList: wiretype end group for non-group")
  1386. }
  1387. if fieldNum <= 0 {
  1388. return fmt.Errorf("proto: VersionList: illegal tag %d (wire type %d)", fieldNum, wire)
  1389. }
  1390. switch fieldNum {
  1391. case 1:
  1392. if wireType != 2 {
  1393. return fmt.Errorf("proto: wrong wireType = %d for field RawVersions", wireType)
  1394. }
  1395. var msglen int
  1396. for shift := uint(0); ; shift += 7 {
  1397. if shift >= 64 {
  1398. return ErrIntOverflowStructs
  1399. }
  1400. if iNdEx >= l {
  1401. return io.ErrUnexpectedEOF
  1402. }
  1403. b := dAtA[iNdEx]
  1404. iNdEx++
  1405. msglen |= int(b&0x7F) << shift
  1406. if b < 0x80 {
  1407. break
  1408. }
  1409. }
  1410. if msglen < 0 {
  1411. return ErrInvalidLengthStructs
  1412. }
  1413. postIndex := iNdEx + msglen
  1414. if postIndex < 0 {
  1415. return ErrInvalidLengthStructs
  1416. }
  1417. if postIndex > l {
  1418. return io.ErrUnexpectedEOF
  1419. }
  1420. m.RawVersions = append(m.RawVersions, FileVersion{})
  1421. if err := m.RawVersions[len(m.RawVersions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1422. return err
  1423. }
  1424. iNdEx = postIndex
  1425. default:
  1426. iNdEx = preIndex
  1427. skippy, err := skipStructs(dAtA[iNdEx:])
  1428. if err != nil {
  1429. return err
  1430. }
  1431. if skippy < 0 {
  1432. return ErrInvalidLengthStructs
  1433. }
  1434. if (iNdEx + skippy) < 0 {
  1435. return ErrInvalidLengthStructs
  1436. }
  1437. if (iNdEx + skippy) > l {
  1438. return io.ErrUnexpectedEOF
  1439. }
  1440. iNdEx += skippy
  1441. }
  1442. }
  1443. if iNdEx > l {
  1444. return io.ErrUnexpectedEOF
  1445. }
  1446. return nil
  1447. }
  1448. func (m *FileInfoTruncated) Unmarshal(dAtA []byte) error {
  1449. l := len(dAtA)
  1450. iNdEx := 0
  1451. for iNdEx < l {
  1452. preIndex := iNdEx
  1453. var wire uint64
  1454. for shift := uint(0); ; shift += 7 {
  1455. if shift >= 64 {
  1456. return ErrIntOverflowStructs
  1457. }
  1458. if iNdEx >= l {
  1459. return io.ErrUnexpectedEOF
  1460. }
  1461. b := dAtA[iNdEx]
  1462. iNdEx++
  1463. wire |= uint64(b&0x7F) << shift
  1464. if b < 0x80 {
  1465. break
  1466. }
  1467. }
  1468. fieldNum := int32(wire >> 3)
  1469. wireType := int(wire & 0x7)
  1470. if wireType == 4 {
  1471. return fmt.Errorf("proto: FileInfoTruncated: wiretype end group for non-group")
  1472. }
  1473. if fieldNum <= 0 {
  1474. return fmt.Errorf("proto: FileInfoTruncated: illegal tag %d (wire type %d)", fieldNum, wire)
  1475. }
  1476. switch fieldNum {
  1477. case 1:
  1478. if wireType != 2 {
  1479. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1480. }
  1481. var stringLen uint64
  1482. for shift := uint(0); ; shift += 7 {
  1483. if shift >= 64 {
  1484. return ErrIntOverflowStructs
  1485. }
  1486. if iNdEx >= l {
  1487. return io.ErrUnexpectedEOF
  1488. }
  1489. b := dAtA[iNdEx]
  1490. iNdEx++
  1491. stringLen |= uint64(b&0x7F) << shift
  1492. if b < 0x80 {
  1493. break
  1494. }
  1495. }
  1496. intStringLen := int(stringLen)
  1497. if intStringLen < 0 {
  1498. return ErrInvalidLengthStructs
  1499. }
  1500. postIndex := iNdEx + intStringLen
  1501. if postIndex < 0 {
  1502. return ErrInvalidLengthStructs
  1503. }
  1504. if postIndex > l {
  1505. return io.ErrUnexpectedEOF
  1506. }
  1507. m.Name = string(dAtA[iNdEx:postIndex])
  1508. iNdEx = postIndex
  1509. case 2:
  1510. if wireType != 0 {
  1511. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1512. }
  1513. m.Type = 0
  1514. for shift := uint(0); ; shift += 7 {
  1515. if shift >= 64 {
  1516. return ErrIntOverflowStructs
  1517. }
  1518. if iNdEx >= l {
  1519. return io.ErrUnexpectedEOF
  1520. }
  1521. b := dAtA[iNdEx]
  1522. iNdEx++
  1523. m.Type |= protocol.FileInfoType(b&0x7F) << shift
  1524. if b < 0x80 {
  1525. break
  1526. }
  1527. }
  1528. case 3:
  1529. if wireType != 0 {
  1530. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  1531. }
  1532. m.Size = 0
  1533. for shift := uint(0); ; shift += 7 {
  1534. if shift >= 64 {
  1535. return ErrIntOverflowStructs
  1536. }
  1537. if iNdEx >= l {
  1538. return io.ErrUnexpectedEOF
  1539. }
  1540. b := dAtA[iNdEx]
  1541. iNdEx++
  1542. m.Size |= int64(b&0x7F) << shift
  1543. if b < 0x80 {
  1544. break
  1545. }
  1546. }
  1547. case 4:
  1548. if wireType != 0 {
  1549. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  1550. }
  1551. m.Permissions = 0
  1552. for shift := uint(0); ; shift += 7 {
  1553. if shift >= 64 {
  1554. return ErrIntOverflowStructs
  1555. }
  1556. if iNdEx >= l {
  1557. return io.ErrUnexpectedEOF
  1558. }
  1559. b := dAtA[iNdEx]
  1560. iNdEx++
  1561. m.Permissions |= uint32(b&0x7F) << shift
  1562. if b < 0x80 {
  1563. break
  1564. }
  1565. }
  1566. case 5:
  1567. if wireType != 0 {
  1568. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  1569. }
  1570. m.ModifiedS = 0
  1571. for shift := uint(0); ; shift += 7 {
  1572. if shift >= 64 {
  1573. return ErrIntOverflowStructs
  1574. }
  1575. if iNdEx >= l {
  1576. return io.ErrUnexpectedEOF
  1577. }
  1578. b := dAtA[iNdEx]
  1579. iNdEx++
  1580. m.ModifiedS |= int64(b&0x7F) << shift
  1581. if b < 0x80 {
  1582. break
  1583. }
  1584. }
  1585. case 6:
  1586. if wireType != 0 {
  1587. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1588. }
  1589. var v int
  1590. for shift := uint(0); ; shift += 7 {
  1591. if shift >= 64 {
  1592. return ErrIntOverflowStructs
  1593. }
  1594. if iNdEx >= l {
  1595. return io.ErrUnexpectedEOF
  1596. }
  1597. b := dAtA[iNdEx]
  1598. iNdEx++
  1599. v |= int(b&0x7F) << shift
  1600. if b < 0x80 {
  1601. break
  1602. }
  1603. }
  1604. m.Deleted = bool(v != 0)
  1605. case 7:
  1606. if wireType != 0 {
  1607. return fmt.Errorf("proto: wrong wireType = %d for field RawInvalid", wireType)
  1608. }
  1609. var v int
  1610. for shift := uint(0); ; shift += 7 {
  1611. if shift >= 64 {
  1612. return ErrIntOverflowStructs
  1613. }
  1614. if iNdEx >= l {
  1615. return io.ErrUnexpectedEOF
  1616. }
  1617. b := dAtA[iNdEx]
  1618. iNdEx++
  1619. v |= int(b&0x7F) << shift
  1620. if b < 0x80 {
  1621. break
  1622. }
  1623. }
  1624. m.RawInvalid = bool(v != 0)
  1625. case 8:
  1626. if wireType != 0 {
  1627. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  1628. }
  1629. var v int
  1630. for shift := uint(0); ; shift += 7 {
  1631. if shift >= 64 {
  1632. return ErrIntOverflowStructs
  1633. }
  1634. if iNdEx >= l {
  1635. return io.ErrUnexpectedEOF
  1636. }
  1637. b := dAtA[iNdEx]
  1638. iNdEx++
  1639. v |= int(b&0x7F) << shift
  1640. if b < 0x80 {
  1641. break
  1642. }
  1643. }
  1644. m.NoPermissions = bool(v != 0)
  1645. case 9:
  1646. if wireType != 2 {
  1647. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1648. }
  1649. var msglen int
  1650. for shift := uint(0); ; shift += 7 {
  1651. if shift >= 64 {
  1652. return ErrIntOverflowStructs
  1653. }
  1654. if iNdEx >= l {
  1655. return io.ErrUnexpectedEOF
  1656. }
  1657. b := dAtA[iNdEx]
  1658. iNdEx++
  1659. msglen |= int(b&0x7F) << shift
  1660. if b < 0x80 {
  1661. break
  1662. }
  1663. }
  1664. if msglen < 0 {
  1665. return ErrInvalidLengthStructs
  1666. }
  1667. postIndex := iNdEx + msglen
  1668. if postIndex < 0 {
  1669. return ErrInvalidLengthStructs
  1670. }
  1671. if postIndex > l {
  1672. return io.ErrUnexpectedEOF
  1673. }
  1674. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1675. return err
  1676. }
  1677. iNdEx = postIndex
  1678. case 10:
  1679. if wireType != 0 {
  1680. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  1681. }
  1682. m.Sequence = 0
  1683. for shift := uint(0); ; shift += 7 {
  1684. if shift >= 64 {
  1685. return ErrIntOverflowStructs
  1686. }
  1687. if iNdEx >= l {
  1688. return io.ErrUnexpectedEOF
  1689. }
  1690. b := dAtA[iNdEx]
  1691. iNdEx++
  1692. m.Sequence |= int64(b&0x7F) << shift
  1693. if b < 0x80 {
  1694. break
  1695. }
  1696. }
  1697. case 11:
  1698. if wireType != 0 {
  1699. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  1700. }
  1701. m.ModifiedNs = 0
  1702. for shift := uint(0); ; shift += 7 {
  1703. if shift >= 64 {
  1704. return ErrIntOverflowStructs
  1705. }
  1706. if iNdEx >= l {
  1707. return io.ErrUnexpectedEOF
  1708. }
  1709. b := dAtA[iNdEx]
  1710. iNdEx++
  1711. m.ModifiedNs |= int(b&0x7F) << shift
  1712. if b < 0x80 {
  1713. break
  1714. }
  1715. }
  1716. case 12:
  1717. if wireType != 0 {
  1718. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedBy", wireType)
  1719. }
  1720. m.ModifiedBy = 0
  1721. for shift := uint(0); ; shift += 7 {
  1722. if shift >= 64 {
  1723. return ErrIntOverflowStructs
  1724. }
  1725. if iNdEx >= l {
  1726. return io.ErrUnexpectedEOF
  1727. }
  1728. b := dAtA[iNdEx]
  1729. iNdEx++
  1730. m.ModifiedBy |= github_com_syncthing_syncthing_lib_protocol.ShortID(b&0x7F) << shift
  1731. if b < 0x80 {
  1732. break
  1733. }
  1734. }
  1735. case 13:
  1736. if wireType != 0 {
  1737. return fmt.Errorf("proto: wrong wireType = %d for field RawBlockSize", wireType)
  1738. }
  1739. m.RawBlockSize = 0
  1740. for shift := uint(0); ; shift += 7 {
  1741. if shift >= 64 {
  1742. return ErrIntOverflowStructs
  1743. }
  1744. if iNdEx >= l {
  1745. return io.ErrUnexpectedEOF
  1746. }
  1747. b := dAtA[iNdEx]
  1748. iNdEx++
  1749. m.RawBlockSize |= int(b&0x7F) << shift
  1750. if b < 0x80 {
  1751. break
  1752. }
  1753. }
  1754. case 17:
  1755. if wireType != 2 {
  1756. return fmt.Errorf("proto: wrong wireType = %d for field SymlinkTarget", wireType)
  1757. }
  1758. var stringLen uint64
  1759. for shift := uint(0); ; shift += 7 {
  1760. if shift >= 64 {
  1761. return ErrIntOverflowStructs
  1762. }
  1763. if iNdEx >= l {
  1764. return io.ErrUnexpectedEOF
  1765. }
  1766. b := dAtA[iNdEx]
  1767. iNdEx++
  1768. stringLen |= uint64(b&0x7F) << shift
  1769. if b < 0x80 {
  1770. break
  1771. }
  1772. }
  1773. intStringLen := int(stringLen)
  1774. if intStringLen < 0 {
  1775. return ErrInvalidLengthStructs
  1776. }
  1777. postIndex := iNdEx + intStringLen
  1778. if postIndex < 0 {
  1779. return ErrInvalidLengthStructs
  1780. }
  1781. if postIndex > l {
  1782. return io.ErrUnexpectedEOF
  1783. }
  1784. m.SymlinkTarget = string(dAtA[iNdEx:postIndex])
  1785. iNdEx = postIndex
  1786. case 18:
  1787. if wireType != 2 {
  1788. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  1789. }
  1790. var byteLen int
  1791. for shift := uint(0); ; shift += 7 {
  1792. if shift >= 64 {
  1793. return ErrIntOverflowStructs
  1794. }
  1795. if iNdEx >= l {
  1796. return io.ErrUnexpectedEOF
  1797. }
  1798. b := dAtA[iNdEx]
  1799. iNdEx++
  1800. byteLen |= int(b&0x7F) << shift
  1801. if b < 0x80 {
  1802. break
  1803. }
  1804. }
  1805. if byteLen < 0 {
  1806. return ErrInvalidLengthStructs
  1807. }
  1808. postIndex := iNdEx + byteLen
  1809. if postIndex < 0 {
  1810. return ErrInvalidLengthStructs
  1811. }
  1812. if postIndex > l {
  1813. return io.ErrUnexpectedEOF
  1814. }
  1815. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  1816. if m.BlocksHash == nil {
  1817. m.BlocksHash = []byte{}
  1818. }
  1819. iNdEx = postIndex
  1820. case 1000:
  1821. if wireType != 0 {
  1822. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  1823. }
  1824. m.LocalFlags = 0
  1825. for shift := uint(0); ; shift += 7 {
  1826. if shift >= 64 {
  1827. return ErrIntOverflowStructs
  1828. }
  1829. if iNdEx >= l {
  1830. return io.ErrUnexpectedEOF
  1831. }
  1832. b := dAtA[iNdEx]
  1833. iNdEx++
  1834. m.LocalFlags |= uint32(b&0x7F) << shift
  1835. if b < 0x80 {
  1836. break
  1837. }
  1838. }
  1839. case 1001:
  1840. if wireType != 2 {
  1841. return fmt.Errorf("proto: wrong wireType = %d for field VersionHash", wireType)
  1842. }
  1843. var byteLen int
  1844. for shift := uint(0); ; shift += 7 {
  1845. if shift >= 64 {
  1846. return ErrIntOverflowStructs
  1847. }
  1848. if iNdEx >= l {
  1849. return io.ErrUnexpectedEOF
  1850. }
  1851. b := dAtA[iNdEx]
  1852. iNdEx++
  1853. byteLen |= int(b&0x7F) << shift
  1854. if b < 0x80 {
  1855. break
  1856. }
  1857. }
  1858. if byteLen < 0 {
  1859. return ErrInvalidLengthStructs
  1860. }
  1861. postIndex := iNdEx + byteLen
  1862. if postIndex < 0 {
  1863. return ErrInvalidLengthStructs
  1864. }
  1865. if postIndex > l {
  1866. return io.ErrUnexpectedEOF
  1867. }
  1868. m.VersionHash = append(m.VersionHash[:0], dAtA[iNdEx:postIndex]...)
  1869. if m.VersionHash == nil {
  1870. m.VersionHash = []byte{}
  1871. }
  1872. iNdEx = postIndex
  1873. default:
  1874. iNdEx = preIndex
  1875. skippy, err := skipStructs(dAtA[iNdEx:])
  1876. if err != nil {
  1877. return err
  1878. }
  1879. if skippy < 0 {
  1880. return ErrInvalidLengthStructs
  1881. }
  1882. if (iNdEx + skippy) < 0 {
  1883. return ErrInvalidLengthStructs
  1884. }
  1885. if (iNdEx + skippy) > l {
  1886. return io.ErrUnexpectedEOF
  1887. }
  1888. iNdEx += skippy
  1889. }
  1890. }
  1891. if iNdEx > l {
  1892. return io.ErrUnexpectedEOF
  1893. }
  1894. return nil
  1895. }
  1896. func (m *BlockList) Unmarshal(dAtA []byte) error {
  1897. l := len(dAtA)
  1898. iNdEx := 0
  1899. for iNdEx < l {
  1900. preIndex := iNdEx
  1901. var wire uint64
  1902. for shift := uint(0); ; shift += 7 {
  1903. if shift >= 64 {
  1904. return ErrIntOverflowStructs
  1905. }
  1906. if iNdEx >= l {
  1907. return io.ErrUnexpectedEOF
  1908. }
  1909. b := dAtA[iNdEx]
  1910. iNdEx++
  1911. wire |= uint64(b&0x7F) << shift
  1912. if b < 0x80 {
  1913. break
  1914. }
  1915. }
  1916. fieldNum := int32(wire >> 3)
  1917. wireType := int(wire & 0x7)
  1918. if wireType == 4 {
  1919. return fmt.Errorf("proto: BlockList: wiretype end group for non-group")
  1920. }
  1921. if fieldNum <= 0 {
  1922. return fmt.Errorf("proto: BlockList: illegal tag %d (wire type %d)", fieldNum, wire)
  1923. }
  1924. switch fieldNum {
  1925. case 1:
  1926. if wireType != 2 {
  1927. return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType)
  1928. }
  1929. var msglen int
  1930. for shift := uint(0); ; shift += 7 {
  1931. if shift >= 64 {
  1932. return ErrIntOverflowStructs
  1933. }
  1934. if iNdEx >= l {
  1935. return io.ErrUnexpectedEOF
  1936. }
  1937. b := dAtA[iNdEx]
  1938. iNdEx++
  1939. msglen |= int(b&0x7F) << shift
  1940. if b < 0x80 {
  1941. break
  1942. }
  1943. }
  1944. if msglen < 0 {
  1945. return ErrInvalidLengthStructs
  1946. }
  1947. postIndex := iNdEx + msglen
  1948. if postIndex < 0 {
  1949. return ErrInvalidLengthStructs
  1950. }
  1951. if postIndex > l {
  1952. return io.ErrUnexpectedEOF
  1953. }
  1954. m.Blocks = append(m.Blocks, protocol.BlockInfo{})
  1955. if err := m.Blocks[len(m.Blocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1956. return err
  1957. }
  1958. iNdEx = postIndex
  1959. default:
  1960. iNdEx = preIndex
  1961. skippy, err := skipStructs(dAtA[iNdEx:])
  1962. if err != nil {
  1963. return err
  1964. }
  1965. if skippy < 0 {
  1966. return ErrInvalidLengthStructs
  1967. }
  1968. if (iNdEx + skippy) < 0 {
  1969. return ErrInvalidLengthStructs
  1970. }
  1971. if (iNdEx + skippy) > l {
  1972. return io.ErrUnexpectedEOF
  1973. }
  1974. iNdEx += skippy
  1975. }
  1976. }
  1977. if iNdEx > l {
  1978. return io.ErrUnexpectedEOF
  1979. }
  1980. return nil
  1981. }
  1982. func (m *IndirectionHashesOnly) Unmarshal(dAtA []byte) error {
  1983. l := len(dAtA)
  1984. iNdEx := 0
  1985. for iNdEx < l {
  1986. preIndex := iNdEx
  1987. var wire uint64
  1988. for shift := uint(0); ; shift += 7 {
  1989. if shift >= 64 {
  1990. return ErrIntOverflowStructs
  1991. }
  1992. if iNdEx >= l {
  1993. return io.ErrUnexpectedEOF
  1994. }
  1995. b := dAtA[iNdEx]
  1996. iNdEx++
  1997. wire |= uint64(b&0x7F) << shift
  1998. if b < 0x80 {
  1999. break
  2000. }
  2001. }
  2002. fieldNum := int32(wire >> 3)
  2003. wireType := int(wire & 0x7)
  2004. if wireType == 4 {
  2005. return fmt.Errorf("proto: IndirectionHashesOnly: wiretype end group for non-group")
  2006. }
  2007. if fieldNum <= 0 {
  2008. return fmt.Errorf("proto: IndirectionHashesOnly: illegal tag %d (wire type %d)", fieldNum, wire)
  2009. }
  2010. switch fieldNum {
  2011. case 18:
  2012. if wireType != 2 {
  2013. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  2014. }
  2015. var byteLen int
  2016. for shift := uint(0); ; shift += 7 {
  2017. if shift >= 64 {
  2018. return ErrIntOverflowStructs
  2019. }
  2020. if iNdEx >= l {
  2021. return io.ErrUnexpectedEOF
  2022. }
  2023. b := dAtA[iNdEx]
  2024. iNdEx++
  2025. byteLen |= int(b&0x7F) << shift
  2026. if b < 0x80 {
  2027. break
  2028. }
  2029. }
  2030. if byteLen < 0 {
  2031. return ErrInvalidLengthStructs
  2032. }
  2033. postIndex := iNdEx + byteLen
  2034. if postIndex < 0 {
  2035. return ErrInvalidLengthStructs
  2036. }
  2037. if postIndex > l {
  2038. return io.ErrUnexpectedEOF
  2039. }
  2040. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  2041. if m.BlocksHash == nil {
  2042. m.BlocksHash = []byte{}
  2043. }
  2044. iNdEx = postIndex
  2045. case 1001:
  2046. if wireType != 2 {
  2047. return fmt.Errorf("proto: wrong wireType = %d for field VersionHash", wireType)
  2048. }
  2049. var byteLen int
  2050. for shift := uint(0); ; shift += 7 {
  2051. if shift >= 64 {
  2052. return ErrIntOverflowStructs
  2053. }
  2054. if iNdEx >= l {
  2055. return io.ErrUnexpectedEOF
  2056. }
  2057. b := dAtA[iNdEx]
  2058. iNdEx++
  2059. byteLen |= int(b&0x7F) << shift
  2060. if b < 0x80 {
  2061. break
  2062. }
  2063. }
  2064. if byteLen < 0 {
  2065. return ErrInvalidLengthStructs
  2066. }
  2067. postIndex := iNdEx + byteLen
  2068. if postIndex < 0 {
  2069. return ErrInvalidLengthStructs
  2070. }
  2071. if postIndex > l {
  2072. return io.ErrUnexpectedEOF
  2073. }
  2074. m.VersionHash = append(m.VersionHash[:0], dAtA[iNdEx:postIndex]...)
  2075. if m.VersionHash == nil {
  2076. m.VersionHash = []byte{}
  2077. }
  2078. iNdEx = postIndex
  2079. default:
  2080. iNdEx = preIndex
  2081. skippy, err := skipStructs(dAtA[iNdEx:])
  2082. if err != nil {
  2083. return err
  2084. }
  2085. if skippy < 0 {
  2086. return ErrInvalidLengthStructs
  2087. }
  2088. if (iNdEx + skippy) < 0 {
  2089. return ErrInvalidLengthStructs
  2090. }
  2091. if (iNdEx + skippy) > l {
  2092. return io.ErrUnexpectedEOF
  2093. }
  2094. iNdEx += skippy
  2095. }
  2096. }
  2097. if iNdEx > l {
  2098. return io.ErrUnexpectedEOF
  2099. }
  2100. return nil
  2101. }
  2102. func (m *Counts) Unmarshal(dAtA []byte) error {
  2103. l := len(dAtA)
  2104. iNdEx := 0
  2105. for iNdEx < l {
  2106. preIndex := iNdEx
  2107. var wire uint64
  2108. for shift := uint(0); ; shift += 7 {
  2109. if shift >= 64 {
  2110. return ErrIntOverflowStructs
  2111. }
  2112. if iNdEx >= l {
  2113. return io.ErrUnexpectedEOF
  2114. }
  2115. b := dAtA[iNdEx]
  2116. iNdEx++
  2117. wire |= uint64(b&0x7F) << shift
  2118. if b < 0x80 {
  2119. break
  2120. }
  2121. }
  2122. fieldNum := int32(wire >> 3)
  2123. wireType := int(wire & 0x7)
  2124. if wireType == 4 {
  2125. return fmt.Errorf("proto: Counts: wiretype end group for non-group")
  2126. }
  2127. if fieldNum <= 0 {
  2128. return fmt.Errorf("proto: Counts: illegal tag %d (wire type %d)", fieldNum, wire)
  2129. }
  2130. switch fieldNum {
  2131. case 1:
  2132. if wireType != 0 {
  2133. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  2134. }
  2135. m.Files = 0
  2136. for shift := uint(0); ; shift += 7 {
  2137. if shift >= 64 {
  2138. return ErrIntOverflowStructs
  2139. }
  2140. if iNdEx >= l {
  2141. return io.ErrUnexpectedEOF
  2142. }
  2143. b := dAtA[iNdEx]
  2144. iNdEx++
  2145. m.Files |= int(b&0x7F) << shift
  2146. if b < 0x80 {
  2147. break
  2148. }
  2149. }
  2150. case 2:
  2151. if wireType != 0 {
  2152. return fmt.Errorf("proto: wrong wireType = %d for field Directories", wireType)
  2153. }
  2154. m.Directories = 0
  2155. for shift := uint(0); ; shift += 7 {
  2156. if shift >= 64 {
  2157. return ErrIntOverflowStructs
  2158. }
  2159. if iNdEx >= l {
  2160. return io.ErrUnexpectedEOF
  2161. }
  2162. b := dAtA[iNdEx]
  2163. iNdEx++
  2164. m.Directories |= int(b&0x7F) << shift
  2165. if b < 0x80 {
  2166. break
  2167. }
  2168. }
  2169. case 3:
  2170. if wireType != 0 {
  2171. return fmt.Errorf("proto: wrong wireType = %d for field Symlinks", wireType)
  2172. }
  2173. m.Symlinks = 0
  2174. for shift := uint(0); ; shift += 7 {
  2175. if shift >= 64 {
  2176. return ErrIntOverflowStructs
  2177. }
  2178. if iNdEx >= l {
  2179. return io.ErrUnexpectedEOF
  2180. }
  2181. b := dAtA[iNdEx]
  2182. iNdEx++
  2183. m.Symlinks |= int(b&0x7F) << shift
  2184. if b < 0x80 {
  2185. break
  2186. }
  2187. }
  2188. case 4:
  2189. if wireType != 0 {
  2190. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  2191. }
  2192. m.Deleted = 0
  2193. for shift := uint(0); ; shift += 7 {
  2194. if shift >= 64 {
  2195. return ErrIntOverflowStructs
  2196. }
  2197. if iNdEx >= l {
  2198. return io.ErrUnexpectedEOF
  2199. }
  2200. b := dAtA[iNdEx]
  2201. iNdEx++
  2202. m.Deleted |= int(b&0x7F) << shift
  2203. if b < 0x80 {
  2204. break
  2205. }
  2206. }
  2207. case 5:
  2208. if wireType != 0 {
  2209. return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
  2210. }
  2211. m.Bytes = 0
  2212. for shift := uint(0); ; shift += 7 {
  2213. if shift >= 64 {
  2214. return ErrIntOverflowStructs
  2215. }
  2216. if iNdEx >= l {
  2217. return io.ErrUnexpectedEOF
  2218. }
  2219. b := dAtA[iNdEx]
  2220. iNdEx++
  2221. m.Bytes |= int64(b&0x7F) << shift
  2222. if b < 0x80 {
  2223. break
  2224. }
  2225. }
  2226. case 6:
  2227. if wireType != 0 {
  2228. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  2229. }
  2230. m.Sequence = 0
  2231. for shift := uint(0); ; shift += 7 {
  2232. if shift >= 64 {
  2233. return ErrIntOverflowStructs
  2234. }
  2235. if iNdEx >= l {
  2236. return io.ErrUnexpectedEOF
  2237. }
  2238. b := dAtA[iNdEx]
  2239. iNdEx++
  2240. m.Sequence |= int64(b&0x7F) << shift
  2241. if b < 0x80 {
  2242. break
  2243. }
  2244. }
  2245. case 17:
  2246. if wireType != 2 {
  2247. return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
  2248. }
  2249. var byteLen int
  2250. for shift := uint(0); ; shift += 7 {
  2251. if shift >= 64 {
  2252. return ErrIntOverflowStructs
  2253. }
  2254. if iNdEx >= l {
  2255. return io.ErrUnexpectedEOF
  2256. }
  2257. b := dAtA[iNdEx]
  2258. iNdEx++
  2259. byteLen |= int(b&0x7F) << shift
  2260. if b < 0x80 {
  2261. break
  2262. }
  2263. }
  2264. if byteLen < 0 {
  2265. return ErrInvalidLengthStructs
  2266. }
  2267. postIndex := iNdEx + byteLen
  2268. if postIndex < 0 {
  2269. return ErrInvalidLengthStructs
  2270. }
  2271. if postIndex > l {
  2272. return io.ErrUnexpectedEOF
  2273. }
  2274. m.DeviceID = append(m.DeviceID[:0], dAtA[iNdEx:postIndex]...)
  2275. if m.DeviceID == nil {
  2276. m.DeviceID = []byte{}
  2277. }
  2278. iNdEx = postIndex
  2279. case 18:
  2280. if wireType != 0 {
  2281. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  2282. }
  2283. m.LocalFlags = 0
  2284. for shift := uint(0); ; shift += 7 {
  2285. if shift >= 64 {
  2286. return ErrIntOverflowStructs
  2287. }
  2288. if iNdEx >= l {
  2289. return io.ErrUnexpectedEOF
  2290. }
  2291. b := dAtA[iNdEx]
  2292. iNdEx++
  2293. m.LocalFlags |= uint32(b&0x7F) << shift
  2294. if b < 0x80 {
  2295. break
  2296. }
  2297. }
  2298. default:
  2299. iNdEx = preIndex
  2300. skippy, err := skipStructs(dAtA[iNdEx:])
  2301. if err != nil {
  2302. return err
  2303. }
  2304. if skippy < 0 {
  2305. return ErrInvalidLengthStructs
  2306. }
  2307. if (iNdEx + skippy) < 0 {
  2308. return ErrInvalidLengthStructs
  2309. }
  2310. if (iNdEx + skippy) > l {
  2311. return io.ErrUnexpectedEOF
  2312. }
  2313. iNdEx += skippy
  2314. }
  2315. }
  2316. if iNdEx > l {
  2317. return io.ErrUnexpectedEOF
  2318. }
  2319. return nil
  2320. }
  2321. func (m *CountsSet) Unmarshal(dAtA []byte) error {
  2322. l := len(dAtA)
  2323. iNdEx := 0
  2324. for iNdEx < l {
  2325. preIndex := iNdEx
  2326. var wire uint64
  2327. for shift := uint(0); ; shift += 7 {
  2328. if shift >= 64 {
  2329. return ErrIntOverflowStructs
  2330. }
  2331. if iNdEx >= l {
  2332. return io.ErrUnexpectedEOF
  2333. }
  2334. b := dAtA[iNdEx]
  2335. iNdEx++
  2336. wire |= uint64(b&0x7F) << shift
  2337. if b < 0x80 {
  2338. break
  2339. }
  2340. }
  2341. fieldNum := int32(wire >> 3)
  2342. wireType := int(wire & 0x7)
  2343. if wireType == 4 {
  2344. return fmt.Errorf("proto: CountsSet: wiretype end group for non-group")
  2345. }
  2346. if fieldNum <= 0 {
  2347. return fmt.Errorf("proto: CountsSet: illegal tag %d (wire type %d)", fieldNum, wire)
  2348. }
  2349. switch fieldNum {
  2350. case 1:
  2351. if wireType != 2 {
  2352. return fmt.Errorf("proto: wrong wireType = %d for field Counts", wireType)
  2353. }
  2354. var msglen int
  2355. for shift := uint(0); ; shift += 7 {
  2356. if shift >= 64 {
  2357. return ErrIntOverflowStructs
  2358. }
  2359. if iNdEx >= l {
  2360. return io.ErrUnexpectedEOF
  2361. }
  2362. b := dAtA[iNdEx]
  2363. iNdEx++
  2364. msglen |= int(b&0x7F) << shift
  2365. if b < 0x80 {
  2366. break
  2367. }
  2368. }
  2369. if msglen < 0 {
  2370. return ErrInvalidLengthStructs
  2371. }
  2372. postIndex := iNdEx + msglen
  2373. if postIndex < 0 {
  2374. return ErrInvalidLengthStructs
  2375. }
  2376. if postIndex > l {
  2377. return io.ErrUnexpectedEOF
  2378. }
  2379. m.Counts = append(m.Counts, Counts{})
  2380. if err := m.Counts[len(m.Counts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2381. return err
  2382. }
  2383. iNdEx = postIndex
  2384. case 2:
  2385. if wireType != 0 {
  2386. return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
  2387. }
  2388. m.Created = 0
  2389. for shift := uint(0); ; shift += 7 {
  2390. if shift >= 64 {
  2391. return ErrIntOverflowStructs
  2392. }
  2393. if iNdEx >= l {
  2394. return io.ErrUnexpectedEOF
  2395. }
  2396. b := dAtA[iNdEx]
  2397. iNdEx++
  2398. m.Created |= int64(b&0x7F) << shift
  2399. if b < 0x80 {
  2400. break
  2401. }
  2402. }
  2403. default:
  2404. iNdEx = preIndex
  2405. skippy, err := skipStructs(dAtA[iNdEx:])
  2406. if err != nil {
  2407. return err
  2408. }
  2409. if skippy < 0 {
  2410. return ErrInvalidLengthStructs
  2411. }
  2412. if (iNdEx + skippy) < 0 {
  2413. return ErrInvalidLengthStructs
  2414. }
  2415. if (iNdEx + skippy) > l {
  2416. return io.ErrUnexpectedEOF
  2417. }
  2418. iNdEx += skippy
  2419. }
  2420. }
  2421. if iNdEx > l {
  2422. return io.ErrUnexpectedEOF
  2423. }
  2424. return nil
  2425. }
  2426. func (m *FileVersionDeprecated) Unmarshal(dAtA []byte) error {
  2427. l := len(dAtA)
  2428. iNdEx := 0
  2429. for iNdEx < l {
  2430. preIndex := iNdEx
  2431. var wire uint64
  2432. for shift := uint(0); ; shift += 7 {
  2433. if shift >= 64 {
  2434. return ErrIntOverflowStructs
  2435. }
  2436. if iNdEx >= l {
  2437. return io.ErrUnexpectedEOF
  2438. }
  2439. b := dAtA[iNdEx]
  2440. iNdEx++
  2441. wire |= uint64(b&0x7F) << shift
  2442. if b < 0x80 {
  2443. break
  2444. }
  2445. }
  2446. fieldNum := int32(wire >> 3)
  2447. wireType := int(wire & 0x7)
  2448. if wireType == 4 {
  2449. return fmt.Errorf("proto: FileVersionDeprecated: wiretype end group for non-group")
  2450. }
  2451. if fieldNum <= 0 {
  2452. return fmt.Errorf("proto: FileVersionDeprecated: illegal tag %d (wire type %d)", fieldNum, wire)
  2453. }
  2454. switch fieldNum {
  2455. case 1:
  2456. if wireType != 2 {
  2457. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  2458. }
  2459. var msglen int
  2460. for shift := uint(0); ; shift += 7 {
  2461. if shift >= 64 {
  2462. return ErrIntOverflowStructs
  2463. }
  2464. if iNdEx >= l {
  2465. return io.ErrUnexpectedEOF
  2466. }
  2467. b := dAtA[iNdEx]
  2468. iNdEx++
  2469. msglen |= int(b&0x7F) << shift
  2470. if b < 0x80 {
  2471. break
  2472. }
  2473. }
  2474. if msglen < 0 {
  2475. return ErrInvalidLengthStructs
  2476. }
  2477. postIndex := iNdEx + msglen
  2478. if postIndex < 0 {
  2479. return ErrInvalidLengthStructs
  2480. }
  2481. if postIndex > l {
  2482. return io.ErrUnexpectedEOF
  2483. }
  2484. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2485. return err
  2486. }
  2487. iNdEx = postIndex
  2488. case 2:
  2489. if wireType != 2 {
  2490. return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  2491. }
  2492. var byteLen int
  2493. for shift := uint(0); ; shift += 7 {
  2494. if shift >= 64 {
  2495. return ErrIntOverflowStructs
  2496. }
  2497. if iNdEx >= l {
  2498. return io.ErrUnexpectedEOF
  2499. }
  2500. b := dAtA[iNdEx]
  2501. iNdEx++
  2502. byteLen |= int(b&0x7F) << shift
  2503. if b < 0x80 {
  2504. break
  2505. }
  2506. }
  2507. if byteLen < 0 {
  2508. return ErrInvalidLengthStructs
  2509. }
  2510. postIndex := iNdEx + byteLen
  2511. if postIndex < 0 {
  2512. return ErrInvalidLengthStructs
  2513. }
  2514. if postIndex > l {
  2515. return io.ErrUnexpectedEOF
  2516. }
  2517. m.Device = append(m.Device[:0], dAtA[iNdEx:postIndex]...)
  2518. if m.Device == nil {
  2519. m.Device = []byte{}
  2520. }
  2521. iNdEx = postIndex
  2522. case 3:
  2523. if wireType != 0 {
  2524. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  2525. }
  2526. var v int
  2527. for shift := uint(0); ; shift += 7 {
  2528. if shift >= 64 {
  2529. return ErrIntOverflowStructs
  2530. }
  2531. if iNdEx >= l {
  2532. return io.ErrUnexpectedEOF
  2533. }
  2534. b := dAtA[iNdEx]
  2535. iNdEx++
  2536. v |= int(b&0x7F) << shift
  2537. if b < 0x80 {
  2538. break
  2539. }
  2540. }
  2541. m.Invalid = bool(v != 0)
  2542. case 4:
  2543. if wireType != 0 {
  2544. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  2545. }
  2546. var v int
  2547. for shift := uint(0); ; shift += 7 {
  2548. if shift >= 64 {
  2549. return ErrIntOverflowStructs
  2550. }
  2551. if iNdEx >= l {
  2552. return io.ErrUnexpectedEOF
  2553. }
  2554. b := dAtA[iNdEx]
  2555. iNdEx++
  2556. v |= int(b&0x7F) << shift
  2557. if b < 0x80 {
  2558. break
  2559. }
  2560. }
  2561. m.Deleted = bool(v != 0)
  2562. default:
  2563. iNdEx = preIndex
  2564. skippy, err := skipStructs(dAtA[iNdEx:])
  2565. if err != nil {
  2566. return err
  2567. }
  2568. if skippy < 0 {
  2569. return ErrInvalidLengthStructs
  2570. }
  2571. if (iNdEx + skippy) < 0 {
  2572. return ErrInvalidLengthStructs
  2573. }
  2574. if (iNdEx + skippy) > l {
  2575. return io.ErrUnexpectedEOF
  2576. }
  2577. iNdEx += skippy
  2578. }
  2579. }
  2580. if iNdEx > l {
  2581. return io.ErrUnexpectedEOF
  2582. }
  2583. return nil
  2584. }
  2585. func (m *VersionListDeprecated) Unmarshal(dAtA []byte) error {
  2586. l := len(dAtA)
  2587. iNdEx := 0
  2588. for iNdEx < l {
  2589. preIndex := iNdEx
  2590. var wire uint64
  2591. for shift := uint(0); ; shift += 7 {
  2592. if shift >= 64 {
  2593. return ErrIntOverflowStructs
  2594. }
  2595. if iNdEx >= l {
  2596. return io.ErrUnexpectedEOF
  2597. }
  2598. b := dAtA[iNdEx]
  2599. iNdEx++
  2600. wire |= uint64(b&0x7F) << shift
  2601. if b < 0x80 {
  2602. break
  2603. }
  2604. }
  2605. fieldNum := int32(wire >> 3)
  2606. wireType := int(wire & 0x7)
  2607. if wireType == 4 {
  2608. return fmt.Errorf("proto: VersionListDeprecated: wiretype end group for non-group")
  2609. }
  2610. if fieldNum <= 0 {
  2611. return fmt.Errorf("proto: VersionListDeprecated: illegal tag %d (wire type %d)", fieldNum, wire)
  2612. }
  2613. switch fieldNum {
  2614. case 1:
  2615. if wireType != 2 {
  2616. return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
  2617. }
  2618. var msglen int
  2619. for shift := uint(0); ; shift += 7 {
  2620. if shift >= 64 {
  2621. return ErrIntOverflowStructs
  2622. }
  2623. if iNdEx >= l {
  2624. return io.ErrUnexpectedEOF
  2625. }
  2626. b := dAtA[iNdEx]
  2627. iNdEx++
  2628. msglen |= int(b&0x7F) << shift
  2629. if b < 0x80 {
  2630. break
  2631. }
  2632. }
  2633. if msglen < 0 {
  2634. return ErrInvalidLengthStructs
  2635. }
  2636. postIndex := iNdEx + msglen
  2637. if postIndex < 0 {
  2638. return ErrInvalidLengthStructs
  2639. }
  2640. if postIndex > l {
  2641. return io.ErrUnexpectedEOF
  2642. }
  2643. m.Versions = append(m.Versions, FileVersionDeprecated{})
  2644. if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2645. return err
  2646. }
  2647. iNdEx = postIndex
  2648. default:
  2649. iNdEx = preIndex
  2650. skippy, err := skipStructs(dAtA[iNdEx:])
  2651. if err != nil {
  2652. return err
  2653. }
  2654. if skippy < 0 {
  2655. return ErrInvalidLengthStructs
  2656. }
  2657. if (iNdEx + skippy) < 0 {
  2658. return ErrInvalidLengthStructs
  2659. }
  2660. if (iNdEx + skippy) > l {
  2661. return io.ErrUnexpectedEOF
  2662. }
  2663. iNdEx += skippy
  2664. }
  2665. }
  2666. if iNdEx > l {
  2667. return io.ErrUnexpectedEOF
  2668. }
  2669. return nil
  2670. }
  2671. func skipStructs(dAtA []byte) (n int, err error) {
  2672. l := len(dAtA)
  2673. iNdEx := 0
  2674. depth := 0
  2675. for iNdEx < l {
  2676. var wire uint64
  2677. for shift := uint(0); ; shift += 7 {
  2678. if shift >= 64 {
  2679. return 0, ErrIntOverflowStructs
  2680. }
  2681. if iNdEx >= l {
  2682. return 0, io.ErrUnexpectedEOF
  2683. }
  2684. b := dAtA[iNdEx]
  2685. iNdEx++
  2686. wire |= (uint64(b) & 0x7F) << shift
  2687. if b < 0x80 {
  2688. break
  2689. }
  2690. }
  2691. wireType := int(wire & 0x7)
  2692. switch wireType {
  2693. case 0:
  2694. for shift := uint(0); ; shift += 7 {
  2695. if shift >= 64 {
  2696. return 0, ErrIntOverflowStructs
  2697. }
  2698. if iNdEx >= l {
  2699. return 0, io.ErrUnexpectedEOF
  2700. }
  2701. iNdEx++
  2702. if dAtA[iNdEx-1] < 0x80 {
  2703. break
  2704. }
  2705. }
  2706. case 1:
  2707. iNdEx += 8
  2708. case 2:
  2709. var length int
  2710. for shift := uint(0); ; shift += 7 {
  2711. if shift >= 64 {
  2712. return 0, ErrIntOverflowStructs
  2713. }
  2714. if iNdEx >= l {
  2715. return 0, io.ErrUnexpectedEOF
  2716. }
  2717. b := dAtA[iNdEx]
  2718. iNdEx++
  2719. length |= (int(b) & 0x7F) << shift
  2720. if b < 0x80 {
  2721. break
  2722. }
  2723. }
  2724. if length < 0 {
  2725. return 0, ErrInvalidLengthStructs
  2726. }
  2727. iNdEx += length
  2728. case 3:
  2729. depth++
  2730. case 4:
  2731. if depth == 0 {
  2732. return 0, ErrUnexpectedEndOfGroupStructs
  2733. }
  2734. depth--
  2735. case 5:
  2736. iNdEx += 4
  2737. default:
  2738. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2739. }
  2740. if iNdEx < 0 {
  2741. return 0, ErrInvalidLengthStructs
  2742. }
  2743. if depth == 0 {
  2744. return iNdEx, nil
  2745. }
  2746. }
  2747. return 0, io.ErrUnexpectedEOF
  2748. }
  2749. var (
  2750. ErrInvalidLengthStructs = fmt.Errorf("proto: negative length found during unmarshaling")
  2751. ErrIntOverflowStructs = fmt.Errorf("proto: integer overflow")
  2752. ErrUnexpectedEndOfGroupStructs = fmt.Errorf("proto: unexpected end of group")
  2753. )