structs.pb.go 84 KB

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