bep.pb.go 131 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: lib/protocol/bep.proto
  3. package protocol
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. _ "github.com/syncthing/syncthing/proto/ext"
  9. io "io"
  10. math "math"
  11. math_bits "math/bits"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  22. type MessageType int32
  23. const (
  24. MessageTypeClusterConfig MessageType = 0
  25. MessageTypeIndex MessageType = 1
  26. MessageTypeIndexUpdate MessageType = 2
  27. MessageTypeRequest MessageType = 3
  28. MessageTypeResponse MessageType = 4
  29. MessageTypeDownloadProgress MessageType = 5
  30. MessageTypePing MessageType = 6
  31. MessageTypeClose MessageType = 7
  32. )
  33. var MessageType_name = map[int32]string{
  34. 0: "MESSAGE_TYPE_CLUSTER_CONFIG",
  35. 1: "MESSAGE_TYPE_INDEX",
  36. 2: "MESSAGE_TYPE_INDEX_UPDATE",
  37. 3: "MESSAGE_TYPE_REQUEST",
  38. 4: "MESSAGE_TYPE_RESPONSE",
  39. 5: "MESSAGE_TYPE_DOWNLOAD_PROGRESS",
  40. 6: "MESSAGE_TYPE_PING",
  41. 7: "MESSAGE_TYPE_CLOSE",
  42. }
  43. var MessageType_value = map[string]int32{
  44. "MESSAGE_TYPE_CLUSTER_CONFIG": 0,
  45. "MESSAGE_TYPE_INDEX": 1,
  46. "MESSAGE_TYPE_INDEX_UPDATE": 2,
  47. "MESSAGE_TYPE_REQUEST": 3,
  48. "MESSAGE_TYPE_RESPONSE": 4,
  49. "MESSAGE_TYPE_DOWNLOAD_PROGRESS": 5,
  50. "MESSAGE_TYPE_PING": 6,
  51. "MESSAGE_TYPE_CLOSE": 7,
  52. }
  53. func (x MessageType) String() string {
  54. return proto.EnumName(MessageType_name, int32(x))
  55. }
  56. func (MessageType) EnumDescriptor() ([]byte, []int) {
  57. return fileDescriptor_311ef540e10d9705, []int{0}
  58. }
  59. type MessageCompression int32
  60. const (
  61. MessageCompressionNone MessageCompression = 0
  62. MessageCompressionLZ4 MessageCompression = 1
  63. )
  64. var MessageCompression_name = map[int32]string{
  65. 0: "MESSAGE_COMPRESSION_NONE",
  66. 1: "MESSAGE_COMPRESSION_LZ4",
  67. }
  68. var MessageCompression_value = map[string]int32{
  69. "MESSAGE_COMPRESSION_NONE": 0,
  70. "MESSAGE_COMPRESSION_LZ4": 1,
  71. }
  72. func (x MessageCompression) String() string {
  73. return proto.EnumName(MessageCompression_name, int32(x))
  74. }
  75. func (MessageCompression) EnumDescriptor() ([]byte, []int) {
  76. return fileDescriptor_311ef540e10d9705, []int{1}
  77. }
  78. type Compression int32
  79. const (
  80. CompressionMetadata Compression = 0
  81. CompressionNever Compression = 1
  82. CompressionAlways Compression = 2
  83. )
  84. var Compression_name = map[int32]string{
  85. 0: "COMPRESSION_METADATA",
  86. 1: "COMPRESSION_NEVER",
  87. 2: "COMPRESSION_ALWAYS",
  88. }
  89. var Compression_value = map[string]int32{
  90. "COMPRESSION_METADATA": 0,
  91. "COMPRESSION_NEVER": 1,
  92. "COMPRESSION_ALWAYS": 2,
  93. }
  94. func (x Compression) String() string {
  95. return proto.EnumName(Compression_name, int32(x))
  96. }
  97. func (Compression) EnumDescriptor() ([]byte, []int) {
  98. return fileDescriptor_311ef540e10d9705, []int{2}
  99. }
  100. type FileInfoType int32
  101. const (
  102. FileInfoTypeFile FileInfoType = 0
  103. FileInfoTypeDirectory FileInfoType = 1
  104. FileInfoTypeSymlinkFile FileInfoType = 2 // Deprecated: Do not use.
  105. FileInfoTypeSymlinkDirectory FileInfoType = 3 // Deprecated: Do not use.
  106. FileInfoTypeSymlink FileInfoType = 4
  107. )
  108. var FileInfoType_name = map[int32]string{
  109. 0: "FILE_INFO_TYPE_FILE",
  110. 1: "FILE_INFO_TYPE_DIRECTORY",
  111. 2: "FILE_INFO_TYPE_SYMLINK_FILE",
  112. 3: "FILE_INFO_TYPE_SYMLINK_DIRECTORY",
  113. 4: "FILE_INFO_TYPE_SYMLINK",
  114. }
  115. var FileInfoType_value = map[string]int32{
  116. "FILE_INFO_TYPE_FILE": 0,
  117. "FILE_INFO_TYPE_DIRECTORY": 1,
  118. "FILE_INFO_TYPE_SYMLINK_FILE": 2,
  119. "FILE_INFO_TYPE_SYMLINK_DIRECTORY": 3,
  120. "FILE_INFO_TYPE_SYMLINK": 4,
  121. }
  122. func (x FileInfoType) String() string {
  123. return proto.EnumName(FileInfoType_name, int32(x))
  124. }
  125. func (FileInfoType) EnumDescriptor() ([]byte, []int) {
  126. return fileDescriptor_311ef540e10d9705, []int{3}
  127. }
  128. type ErrorCode int32
  129. const (
  130. ErrorCodeNoError ErrorCode = 0
  131. ErrorCodeGeneric ErrorCode = 1
  132. ErrorCodeNoSuchFile ErrorCode = 2
  133. ErrorCodeInvalidFile ErrorCode = 3
  134. )
  135. var ErrorCode_name = map[int32]string{
  136. 0: "ERROR_CODE_NO_ERROR",
  137. 1: "ERROR_CODE_GENERIC",
  138. 2: "ERROR_CODE_NO_SUCH_FILE",
  139. 3: "ERROR_CODE_INVALID_FILE",
  140. }
  141. var ErrorCode_value = map[string]int32{
  142. "ERROR_CODE_NO_ERROR": 0,
  143. "ERROR_CODE_GENERIC": 1,
  144. "ERROR_CODE_NO_SUCH_FILE": 2,
  145. "ERROR_CODE_INVALID_FILE": 3,
  146. }
  147. func (x ErrorCode) String() string {
  148. return proto.EnumName(ErrorCode_name, int32(x))
  149. }
  150. func (ErrorCode) EnumDescriptor() ([]byte, []int) {
  151. return fileDescriptor_311ef540e10d9705, []int{4}
  152. }
  153. type FileDownloadProgressUpdateType int32
  154. const (
  155. FileDownloadProgressUpdateTypeAppend FileDownloadProgressUpdateType = 0
  156. FileDownloadProgressUpdateTypeForget FileDownloadProgressUpdateType = 1
  157. )
  158. var FileDownloadProgressUpdateType_name = map[int32]string{
  159. 0: "FILE_DOWNLOAD_PROGRESS_UPDATE_TYPE_APPEND",
  160. 1: "FILE_DOWNLOAD_PROGRESS_UPDATE_TYPE_FORGET",
  161. }
  162. var FileDownloadProgressUpdateType_value = map[string]int32{
  163. "FILE_DOWNLOAD_PROGRESS_UPDATE_TYPE_APPEND": 0,
  164. "FILE_DOWNLOAD_PROGRESS_UPDATE_TYPE_FORGET": 1,
  165. }
  166. func (x FileDownloadProgressUpdateType) String() string {
  167. return proto.EnumName(FileDownloadProgressUpdateType_name, int32(x))
  168. }
  169. func (FileDownloadProgressUpdateType) EnumDescriptor() ([]byte, []int) {
  170. return fileDescriptor_311ef540e10d9705, []int{5}
  171. }
  172. type Hello struct {
  173. DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"deviceName" xml:"deviceName"`
  174. ClientName string `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"clientName" xml:"clientName"`
  175. ClientVersion string `protobuf:"bytes,3,opt,name=client_version,json=clientVersion,proto3" json:"clientVersion" xml:"clientVersion"`
  176. }
  177. func (m *Hello) Reset() { *m = Hello{} }
  178. func (m *Hello) String() string { return proto.CompactTextString(m) }
  179. func (*Hello) ProtoMessage() {}
  180. func (*Hello) Descriptor() ([]byte, []int) {
  181. return fileDescriptor_311ef540e10d9705, []int{0}
  182. }
  183. func (m *Hello) XXX_Unmarshal(b []byte) error {
  184. return m.Unmarshal(b)
  185. }
  186. func (m *Hello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  187. if deterministic {
  188. return xxx_messageInfo_Hello.Marshal(b, m, deterministic)
  189. } else {
  190. b = b[:cap(b)]
  191. n, err := m.MarshalToSizedBuffer(b)
  192. if err != nil {
  193. return nil, err
  194. }
  195. return b[:n], nil
  196. }
  197. }
  198. func (m *Hello) XXX_Merge(src proto.Message) {
  199. xxx_messageInfo_Hello.Merge(m, src)
  200. }
  201. func (m *Hello) XXX_Size() int {
  202. return m.ProtoSize()
  203. }
  204. func (m *Hello) XXX_DiscardUnknown() {
  205. xxx_messageInfo_Hello.DiscardUnknown(m)
  206. }
  207. var xxx_messageInfo_Hello proto.InternalMessageInfo
  208. type Header struct {
  209. Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.MessageType" json:"type" xml:"type"`
  210. Compression MessageCompression `protobuf:"varint,2,opt,name=compression,proto3,enum=protocol.MessageCompression" json:"compression" xml:"compression"`
  211. }
  212. func (m *Header) Reset() { *m = Header{} }
  213. func (m *Header) String() string { return proto.CompactTextString(m) }
  214. func (*Header) ProtoMessage() {}
  215. func (*Header) Descriptor() ([]byte, []int) {
  216. return fileDescriptor_311ef540e10d9705, []int{1}
  217. }
  218. func (m *Header) XXX_Unmarshal(b []byte) error {
  219. return m.Unmarshal(b)
  220. }
  221. func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  222. if deterministic {
  223. return xxx_messageInfo_Header.Marshal(b, m, deterministic)
  224. } else {
  225. b = b[:cap(b)]
  226. n, err := m.MarshalToSizedBuffer(b)
  227. if err != nil {
  228. return nil, err
  229. }
  230. return b[:n], nil
  231. }
  232. }
  233. func (m *Header) XXX_Merge(src proto.Message) {
  234. xxx_messageInfo_Header.Merge(m, src)
  235. }
  236. func (m *Header) XXX_Size() int {
  237. return m.ProtoSize()
  238. }
  239. func (m *Header) XXX_DiscardUnknown() {
  240. xxx_messageInfo_Header.DiscardUnknown(m)
  241. }
  242. var xxx_messageInfo_Header proto.InternalMessageInfo
  243. type ClusterConfig struct {
  244. Folders []Folder `protobuf:"bytes,1,rep,name=folders,proto3" json:"folders" xml:"folder"`
  245. }
  246. func (m *ClusterConfig) Reset() { *m = ClusterConfig{} }
  247. func (m *ClusterConfig) String() string { return proto.CompactTextString(m) }
  248. func (*ClusterConfig) ProtoMessage() {}
  249. func (*ClusterConfig) Descriptor() ([]byte, []int) {
  250. return fileDescriptor_311ef540e10d9705, []int{2}
  251. }
  252. func (m *ClusterConfig) XXX_Unmarshal(b []byte) error {
  253. return m.Unmarshal(b)
  254. }
  255. func (m *ClusterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  256. if deterministic {
  257. return xxx_messageInfo_ClusterConfig.Marshal(b, m, deterministic)
  258. } else {
  259. b = b[:cap(b)]
  260. n, err := m.MarshalToSizedBuffer(b)
  261. if err != nil {
  262. return nil, err
  263. }
  264. return b[:n], nil
  265. }
  266. }
  267. func (m *ClusterConfig) XXX_Merge(src proto.Message) {
  268. xxx_messageInfo_ClusterConfig.Merge(m, src)
  269. }
  270. func (m *ClusterConfig) XXX_Size() int {
  271. return m.ProtoSize()
  272. }
  273. func (m *ClusterConfig) XXX_DiscardUnknown() {
  274. xxx_messageInfo_ClusterConfig.DiscardUnknown(m)
  275. }
  276. var xxx_messageInfo_ClusterConfig proto.InternalMessageInfo
  277. type Folder struct {
  278. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" xml:"id"`
  279. Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label" xml:"label"`
  280. ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"readOnly" xml:"readOnly"`
  281. IgnorePermissions bool `protobuf:"varint,4,opt,name=ignore_permissions,json=ignorePermissions,proto3" json:"ignorePermissions" xml:"ignorePermissions"`
  282. IgnoreDelete bool `protobuf:"varint,5,opt,name=ignore_delete,json=ignoreDelete,proto3" json:"ignoreDelete" xml:"ignoreDelete"`
  283. DisableTempIndexes bool `protobuf:"varint,6,opt,name=disable_temp_indexes,json=disableTempIndexes,proto3" json:"disableTempIndexes" xml:"disableTempIndexes"`
  284. Paused bool `protobuf:"varint,7,opt,name=paused,proto3" json:"paused" xml:"paused"`
  285. Devices []Device `protobuf:"bytes,16,rep,name=devices,proto3" json:"devices" xml:"device"`
  286. }
  287. func (m *Folder) Reset() { *m = Folder{} }
  288. func (m *Folder) String() string { return proto.CompactTextString(m) }
  289. func (*Folder) ProtoMessage() {}
  290. func (*Folder) Descriptor() ([]byte, []int) {
  291. return fileDescriptor_311ef540e10d9705, []int{3}
  292. }
  293. func (m *Folder) XXX_Unmarshal(b []byte) error {
  294. return m.Unmarshal(b)
  295. }
  296. func (m *Folder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  297. if deterministic {
  298. return xxx_messageInfo_Folder.Marshal(b, m, deterministic)
  299. } else {
  300. b = b[:cap(b)]
  301. n, err := m.MarshalToSizedBuffer(b)
  302. if err != nil {
  303. return nil, err
  304. }
  305. return b[:n], nil
  306. }
  307. }
  308. func (m *Folder) XXX_Merge(src proto.Message) {
  309. xxx_messageInfo_Folder.Merge(m, src)
  310. }
  311. func (m *Folder) XXX_Size() int {
  312. return m.ProtoSize()
  313. }
  314. func (m *Folder) XXX_DiscardUnknown() {
  315. xxx_messageInfo_Folder.DiscardUnknown(m)
  316. }
  317. var xxx_messageInfo_Folder proto.InternalMessageInfo
  318. type Device struct {
  319. ID DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=DeviceID" json:"id" xml:"id"`
  320. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" xml:"name"`
  321. Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses" xml:"address"`
  322. Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression" xml:"compression"`
  323. CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"certName" xml:"certName"`
  324. MaxSequence int64 `protobuf:"varint,6,opt,name=max_sequence,json=maxSequence,proto3" json:"maxSequence" xml:"maxSequence"`
  325. Introducer bool `protobuf:"varint,7,opt,name=introducer,proto3" json:"introducer" xml:"introducer"`
  326. IndexID IndexID `protobuf:"varint,8,opt,name=index_id,json=indexId,proto3,customtype=IndexID" json:"indexId" xml:"indexId"`
  327. SkipIntroductionRemovals bool `protobuf:"varint,9,opt,name=skip_introduction_removals,json=skipIntroductionRemovals,proto3" json:"skipIntroductionRemovals" xml:"skipIntroductionRemovals"`
  328. }
  329. func (m *Device) Reset() { *m = Device{} }
  330. func (m *Device) String() string { return proto.CompactTextString(m) }
  331. func (*Device) ProtoMessage() {}
  332. func (*Device) Descriptor() ([]byte, []int) {
  333. return fileDescriptor_311ef540e10d9705, []int{4}
  334. }
  335. func (m *Device) XXX_Unmarshal(b []byte) error {
  336. return m.Unmarshal(b)
  337. }
  338. func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  339. if deterministic {
  340. return xxx_messageInfo_Device.Marshal(b, m, deterministic)
  341. } else {
  342. b = b[:cap(b)]
  343. n, err := m.MarshalToSizedBuffer(b)
  344. if err != nil {
  345. return nil, err
  346. }
  347. return b[:n], nil
  348. }
  349. }
  350. func (m *Device) XXX_Merge(src proto.Message) {
  351. xxx_messageInfo_Device.Merge(m, src)
  352. }
  353. func (m *Device) XXX_Size() int {
  354. return m.ProtoSize()
  355. }
  356. func (m *Device) XXX_DiscardUnknown() {
  357. xxx_messageInfo_Device.DiscardUnknown(m)
  358. }
  359. var xxx_messageInfo_Device proto.InternalMessageInfo
  360. type Index struct {
  361. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder" xml:"folder"`
  362. Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files" xml:"file"`
  363. }
  364. func (m *Index) Reset() { *m = Index{} }
  365. func (m *Index) String() string { return proto.CompactTextString(m) }
  366. func (*Index) ProtoMessage() {}
  367. func (*Index) Descriptor() ([]byte, []int) {
  368. return fileDescriptor_311ef540e10d9705, []int{5}
  369. }
  370. func (m *Index) XXX_Unmarshal(b []byte) error {
  371. return m.Unmarshal(b)
  372. }
  373. func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  374. if deterministic {
  375. return xxx_messageInfo_Index.Marshal(b, m, deterministic)
  376. } else {
  377. b = b[:cap(b)]
  378. n, err := m.MarshalToSizedBuffer(b)
  379. if err != nil {
  380. return nil, err
  381. }
  382. return b[:n], nil
  383. }
  384. }
  385. func (m *Index) XXX_Merge(src proto.Message) {
  386. xxx_messageInfo_Index.Merge(m, src)
  387. }
  388. func (m *Index) XXX_Size() int {
  389. return m.ProtoSize()
  390. }
  391. func (m *Index) XXX_DiscardUnknown() {
  392. xxx_messageInfo_Index.DiscardUnknown(m)
  393. }
  394. var xxx_messageInfo_Index proto.InternalMessageInfo
  395. type IndexUpdate struct {
  396. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder" xml:"folder"`
  397. Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files" xml:"file"`
  398. }
  399. func (m *IndexUpdate) Reset() { *m = IndexUpdate{} }
  400. func (m *IndexUpdate) String() string { return proto.CompactTextString(m) }
  401. func (*IndexUpdate) ProtoMessage() {}
  402. func (*IndexUpdate) Descriptor() ([]byte, []int) {
  403. return fileDescriptor_311ef540e10d9705, []int{6}
  404. }
  405. func (m *IndexUpdate) XXX_Unmarshal(b []byte) error {
  406. return m.Unmarshal(b)
  407. }
  408. func (m *IndexUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  409. if deterministic {
  410. return xxx_messageInfo_IndexUpdate.Marshal(b, m, deterministic)
  411. } else {
  412. b = b[:cap(b)]
  413. n, err := m.MarshalToSizedBuffer(b)
  414. if err != nil {
  415. return nil, err
  416. }
  417. return b[:n], nil
  418. }
  419. }
  420. func (m *IndexUpdate) XXX_Merge(src proto.Message) {
  421. xxx_messageInfo_IndexUpdate.Merge(m, src)
  422. }
  423. func (m *IndexUpdate) XXX_Size() int {
  424. return m.ProtoSize()
  425. }
  426. func (m *IndexUpdate) XXX_DiscardUnknown() {
  427. xxx_messageInfo_IndexUpdate.DiscardUnknown(m)
  428. }
  429. var xxx_messageInfo_IndexUpdate proto.InternalMessageInfo
  430. type FileInfo struct {
  431. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" xml:"name"`
  432. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size" xml:"size"`
  433. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modifiedS" xml:"modifiedS"`
  434. ModifiedBy ShortID `protobuf:"varint,12,opt,name=modified_by,json=modifiedBy,proto3,customtype=ShortID" json:"modifiedBy" xml:"modifiedBy"`
  435. Version Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version" xml:"version"`
  436. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence" xml:"sequence"`
  437. Blocks []BlockInfo `protobuf:"bytes,16,rep,name=blocks,proto3" json:"blocks" xml:"block"`
  438. SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlinkTarget" xml:"symlinkTarget"`
  439. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocksHash" xml:"blocksHash"`
  440. Type FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type" xml:"type"`
  441. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions" xml:"permissions"`
  442. ModifiedNs int `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3,casttype=int" json:"modifiedNs" xml:"modifiedNs"`
  443. RawBlockSize int `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3,casttype=int" json:"blockSize" xml:"blockSize"`
  444. // The local_flags fields stores flags that are relevant to the local
  445. // host only. It is not part of the protocol, doesn't get sent or
  446. // received (we make sure to zero it), nonetheless we need it on our
  447. // struct and to be able to serialize it to/from the database.
  448. LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"localFlags" xml:"localFlags"`
  449. // The version_hash is an implementation detail and not part of the wire
  450. // format.
  451. VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"versionHash" xml:"versionHash"`
  452. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
  453. RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid" xml:"invalid"`
  454. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"noPermissions" xml:"noPermissions"`
  455. }
  456. func (m *FileInfo) Reset() { *m = FileInfo{} }
  457. func (*FileInfo) ProtoMessage() {}
  458. func (*FileInfo) Descriptor() ([]byte, []int) {
  459. return fileDescriptor_311ef540e10d9705, []int{7}
  460. }
  461. func (m *FileInfo) XXX_Unmarshal(b []byte) error {
  462. return m.Unmarshal(b)
  463. }
  464. func (m *FileInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  465. if deterministic {
  466. return xxx_messageInfo_FileInfo.Marshal(b, m, deterministic)
  467. } else {
  468. b = b[:cap(b)]
  469. n, err := m.MarshalToSizedBuffer(b)
  470. if err != nil {
  471. return nil, err
  472. }
  473. return b[:n], nil
  474. }
  475. }
  476. func (m *FileInfo) XXX_Merge(src proto.Message) {
  477. xxx_messageInfo_FileInfo.Merge(m, src)
  478. }
  479. func (m *FileInfo) XXX_Size() int {
  480. return m.ProtoSize()
  481. }
  482. func (m *FileInfo) XXX_DiscardUnknown() {
  483. xxx_messageInfo_FileInfo.DiscardUnknown(m)
  484. }
  485. var xxx_messageInfo_FileInfo proto.InternalMessageInfo
  486. type BlockInfo struct {
  487. Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash" xml:"hash"`
  488. Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset" xml:"offset"`
  489. Size int `protobuf:"varint,2,opt,name=size,proto3,casttype=int" json:"size" xml:"size"`
  490. WeakHash uint32 `protobuf:"varint,4,opt,name=weak_hash,json=weakHash,proto3" json:"weakHash" xml:"weakHash"`
  491. }
  492. func (m *BlockInfo) Reset() { *m = BlockInfo{} }
  493. func (*BlockInfo) ProtoMessage() {}
  494. func (*BlockInfo) Descriptor() ([]byte, []int) {
  495. return fileDescriptor_311ef540e10d9705, []int{8}
  496. }
  497. func (m *BlockInfo) XXX_Unmarshal(b []byte) error {
  498. return m.Unmarshal(b)
  499. }
  500. func (m *BlockInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  501. if deterministic {
  502. return xxx_messageInfo_BlockInfo.Marshal(b, m, deterministic)
  503. } else {
  504. b = b[:cap(b)]
  505. n, err := m.MarshalToSizedBuffer(b)
  506. if err != nil {
  507. return nil, err
  508. }
  509. return b[:n], nil
  510. }
  511. }
  512. func (m *BlockInfo) XXX_Merge(src proto.Message) {
  513. xxx_messageInfo_BlockInfo.Merge(m, src)
  514. }
  515. func (m *BlockInfo) XXX_Size() int {
  516. return m.ProtoSize()
  517. }
  518. func (m *BlockInfo) XXX_DiscardUnknown() {
  519. xxx_messageInfo_BlockInfo.DiscardUnknown(m)
  520. }
  521. var xxx_messageInfo_BlockInfo proto.InternalMessageInfo
  522. type Vector struct {
  523. Counters []Counter `protobuf:"bytes,1,rep,name=counters,proto3" json:"counters" xml:"counter"`
  524. }
  525. func (m *Vector) Reset() { *m = Vector{} }
  526. func (m *Vector) String() string { return proto.CompactTextString(m) }
  527. func (*Vector) ProtoMessage() {}
  528. func (*Vector) Descriptor() ([]byte, []int) {
  529. return fileDescriptor_311ef540e10d9705, []int{9}
  530. }
  531. func (m *Vector) XXX_Unmarshal(b []byte) error {
  532. return m.Unmarshal(b)
  533. }
  534. func (m *Vector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  535. if deterministic {
  536. return xxx_messageInfo_Vector.Marshal(b, m, deterministic)
  537. } else {
  538. b = b[:cap(b)]
  539. n, err := m.MarshalToSizedBuffer(b)
  540. if err != nil {
  541. return nil, err
  542. }
  543. return b[:n], nil
  544. }
  545. }
  546. func (m *Vector) XXX_Merge(src proto.Message) {
  547. xxx_messageInfo_Vector.Merge(m, src)
  548. }
  549. func (m *Vector) XXX_Size() int {
  550. return m.ProtoSize()
  551. }
  552. func (m *Vector) XXX_DiscardUnknown() {
  553. xxx_messageInfo_Vector.DiscardUnknown(m)
  554. }
  555. var xxx_messageInfo_Vector proto.InternalMessageInfo
  556. type Counter struct {
  557. ID ShortID `protobuf:"varint,1,opt,name=id,proto3,customtype=ShortID" json:"id" xml:"id"`
  558. Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value" xml:"value"`
  559. }
  560. func (m *Counter) Reset() { *m = Counter{} }
  561. func (m *Counter) String() string { return proto.CompactTextString(m) }
  562. func (*Counter) ProtoMessage() {}
  563. func (*Counter) Descriptor() ([]byte, []int) {
  564. return fileDescriptor_311ef540e10d9705, []int{10}
  565. }
  566. func (m *Counter) XXX_Unmarshal(b []byte) error {
  567. return m.Unmarshal(b)
  568. }
  569. func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  570. if deterministic {
  571. return xxx_messageInfo_Counter.Marshal(b, m, deterministic)
  572. } else {
  573. b = b[:cap(b)]
  574. n, err := m.MarshalToSizedBuffer(b)
  575. if err != nil {
  576. return nil, err
  577. }
  578. return b[:n], nil
  579. }
  580. }
  581. func (m *Counter) XXX_Merge(src proto.Message) {
  582. xxx_messageInfo_Counter.Merge(m, src)
  583. }
  584. func (m *Counter) XXX_Size() int {
  585. return m.ProtoSize()
  586. }
  587. func (m *Counter) XXX_DiscardUnknown() {
  588. xxx_messageInfo_Counter.DiscardUnknown(m)
  589. }
  590. var xxx_messageInfo_Counter proto.InternalMessageInfo
  591. type Request struct {
  592. ID int `protobuf:"varint,1,opt,name=id,proto3,casttype=int" json:"id" xml:"id"`
  593. Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder" xml:"folder"`
  594. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name" xml:"name"`
  595. Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset" xml:"offset"`
  596. Size int `protobuf:"varint,5,opt,name=size,proto3,casttype=int" json:"size" xml:"size"`
  597. Hash []byte `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash" xml:"hash"`
  598. FromTemporary bool `protobuf:"varint,7,opt,name=from_temporary,json=fromTemporary,proto3" json:"fromTemporary" xml:"fromTemporary"`
  599. WeakHash uint32 `protobuf:"varint,8,opt,name=weak_hash,json=weakHash,proto3" json:"weakHash" xml:"weakHash"`
  600. }
  601. func (m *Request) Reset() { *m = Request{} }
  602. func (m *Request) String() string { return proto.CompactTextString(m) }
  603. func (*Request) ProtoMessage() {}
  604. func (*Request) Descriptor() ([]byte, []int) {
  605. return fileDescriptor_311ef540e10d9705, []int{11}
  606. }
  607. func (m *Request) XXX_Unmarshal(b []byte) error {
  608. return m.Unmarshal(b)
  609. }
  610. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  611. if deterministic {
  612. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  613. } else {
  614. b = b[:cap(b)]
  615. n, err := m.MarshalToSizedBuffer(b)
  616. if err != nil {
  617. return nil, err
  618. }
  619. return b[:n], nil
  620. }
  621. }
  622. func (m *Request) XXX_Merge(src proto.Message) {
  623. xxx_messageInfo_Request.Merge(m, src)
  624. }
  625. func (m *Request) XXX_Size() int {
  626. return m.ProtoSize()
  627. }
  628. func (m *Request) XXX_DiscardUnknown() {
  629. xxx_messageInfo_Request.DiscardUnknown(m)
  630. }
  631. var xxx_messageInfo_Request proto.InternalMessageInfo
  632. type Response struct {
  633. ID int `protobuf:"varint,1,opt,name=id,proto3,casttype=int" json:"id" xml:"id"`
  634. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data" xml:"data"`
  635. Code ErrorCode `protobuf:"varint,3,opt,name=code,proto3,enum=protocol.ErrorCode" json:"code" xml:"code"`
  636. }
  637. func (m *Response) Reset() { *m = Response{} }
  638. func (m *Response) String() string { return proto.CompactTextString(m) }
  639. func (*Response) ProtoMessage() {}
  640. func (*Response) Descriptor() ([]byte, []int) {
  641. return fileDescriptor_311ef540e10d9705, []int{12}
  642. }
  643. func (m *Response) XXX_Unmarshal(b []byte) error {
  644. return m.Unmarshal(b)
  645. }
  646. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  647. if deterministic {
  648. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  649. } else {
  650. b = b[:cap(b)]
  651. n, err := m.MarshalToSizedBuffer(b)
  652. if err != nil {
  653. return nil, err
  654. }
  655. return b[:n], nil
  656. }
  657. }
  658. func (m *Response) XXX_Merge(src proto.Message) {
  659. xxx_messageInfo_Response.Merge(m, src)
  660. }
  661. func (m *Response) XXX_Size() int {
  662. return m.ProtoSize()
  663. }
  664. func (m *Response) XXX_DiscardUnknown() {
  665. xxx_messageInfo_Response.DiscardUnknown(m)
  666. }
  667. var xxx_messageInfo_Response proto.InternalMessageInfo
  668. type DownloadProgress struct {
  669. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder" xml:"folder"`
  670. Updates []FileDownloadProgressUpdate `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates" xml:"update"`
  671. }
  672. func (m *DownloadProgress) Reset() { *m = DownloadProgress{} }
  673. func (m *DownloadProgress) String() string { return proto.CompactTextString(m) }
  674. func (*DownloadProgress) ProtoMessage() {}
  675. func (*DownloadProgress) Descriptor() ([]byte, []int) {
  676. return fileDescriptor_311ef540e10d9705, []int{13}
  677. }
  678. func (m *DownloadProgress) XXX_Unmarshal(b []byte) error {
  679. return m.Unmarshal(b)
  680. }
  681. func (m *DownloadProgress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  682. if deterministic {
  683. return xxx_messageInfo_DownloadProgress.Marshal(b, m, deterministic)
  684. } else {
  685. b = b[:cap(b)]
  686. n, err := m.MarshalToSizedBuffer(b)
  687. if err != nil {
  688. return nil, err
  689. }
  690. return b[:n], nil
  691. }
  692. }
  693. func (m *DownloadProgress) XXX_Merge(src proto.Message) {
  694. xxx_messageInfo_DownloadProgress.Merge(m, src)
  695. }
  696. func (m *DownloadProgress) XXX_Size() int {
  697. return m.ProtoSize()
  698. }
  699. func (m *DownloadProgress) XXX_DiscardUnknown() {
  700. xxx_messageInfo_DownloadProgress.DiscardUnknown(m)
  701. }
  702. var xxx_messageInfo_DownloadProgress proto.InternalMessageInfo
  703. type FileDownloadProgressUpdate struct {
  704. UpdateType FileDownloadProgressUpdateType `protobuf:"varint,1,opt,name=update_type,json=updateType,proto3,enum=protocol.FileDownloadProgressUpdateType" json:"updateType" xml:"updateType"`
  705. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" xml:"name"`
  706. Version Vector `protobuf:"bytes,3,opt,name=version,proto3" json:"version" xml:"version"`
  707. BlockIndexes []int `protobuf:"varint,4,rep,name=block_indexes,json=blockIndexes,proto3,casttype=int" json:"blockIndexes" xml:"blockIndexe"`
  708. BlockSize int `protobuf:"varint,5,opt,name=block_size,json=blockSize,proto3,casttype=int" json:"blockSize" xml:"blockSize"`
  709. }
  710. func (m *FileDownloadProgressUpdate) Reset() { *m = FileDownloadProgressUpdate{} }
  711. func (m *FileDownloadProgressUpdate) String() string { return proto.CompactTextString(m) }
  712. func (*FileDownloadProgressUpdate) ProtoMessage() {}
  713. func (*FileDownloadProgressUpdate) Descriptor() ([]byte, []int) {
  714. return fileDescriptor_311ef540e10d9705, []int{14}
  715. }
  716. func (m *FileDownloadProgressUpdate) XXX_Unmarshal(b []byte) error {
  717. return m.Unmarshal(b)
  718. }
  719. func (m *FileDownloadProgressUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  720. if deterministic {
  721. return xxx_messageInfo_FileDownloadProgressUpdate.Marshal(b, m, deterministic)
  722. } else {
  723. b = b[:cap(b)]
  724. n, err := m.MarshalToSizedBuffer(b)
  725. if err != nil {
  726. return nil, err
  727. }
  728. return b[:n], nil
  729. }
  730. }
  731. func (m *FileDownloadProgressUpdate) XXX_Merge(src proto.Message) {
  732. xxx_messageInfo_FileDownloadProgressUpdate.Merge(m, src)
  733. }
  734. func (m *FileDownloadProgressUpdate) XXX_Size() int {
  735. return m.ProtoSize()
  736. }
  737. func (m *FileDownloadProgressUpdate) XXX_DiscardUnknown() {
  738. xxx_messageInfo_FileDownloadProgressUpdate.DiscardUnknown(m)
  739. }
  740. var xxx_messageInfo_FileDownloadProgressUpdate proto.InternalMessageInfo
  741. type Ping struct {
  742. }
  743. func (m *Ping) Reset() { *m = Ping{} }
  744. func (m *Ping) String() string { return proto.CompactTextString(m) }
  745. func (*Ping) ProtoMessage() {}
  746. func (*Ping) Descriptor() ([]byte, []int) {
  747. return fileDescriptor_311ef540e10d9705, []int{15}
  748. }
  749. func (m *Ping) XXX_Unmarshal(b []byte) error {
  750. return m.Unmarshal(b)
  751. }
  752. func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  753. if deterministic {
  754. return xxx_messageInfo_Ping.Marshal(b, m, deterministic)
  755. } else {
  756. b = b[:cap(b)]
  757. n, err := m.MarshalToSizedBuffer(b)
  758. if err != nil {
  759. return nil, err
  760. }
  761. return b[:n], nil
  762. }
  763. }
  764. func (m *Ping) XXX_Merge(src proto.Message) {
  765. xxx_messageInfo_Ping.Merge(m, src)
  766. }
  767. func (m *Ping) XXX_Size() int {
  768. return m.ProtoSize()
  769. }
  770. func (m *Ping) XXX_DiscardUnknown() {
  771. xxx_messageInfo_Ping.DiscardUnknown(m)
  772. }
  773. var xxx_messageInfo_Ping proto.InternalMessageInfo
  774. type Close struct {
  775. Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason" xml:"reason"`
  776. }
  777. func (m *Close) Reset() { *m = Close{} }
  778. func (m *Close) String() string { return proto.CompactTextString(m) }
  779. func (*Close) ProtoMessage() {}
  780. func (*Close) Descriptor() ([]byte, []int) {
  781. return fileDescriptor_311ef540e10d9705, []int{16}
  782. }
  783. func (m *Close) XXX_Unmarshal(b []byte) error {
  784. return m.Unmarshal(b)
  785. }
  786. func (m *Close) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  787. if deterministic {
  788. return xxx_messageInfo_Close.Marshal(b, m, deterministic)
  789. } else {
  790. b = b[:cap(b)]
  791. n, err := m.MarshalToSizedBuffer(b)
  792. if err != nil {
  793. return nil, err
  794. }
  795. return b[:n], nil
  796. }
  797. }
  798. func (m *Close) XXX_Merge(src proto.Message) {
  799. xxx_messageInfo_Close.Merge(m, src)
  800. }
  801. func (m *Close) XXX_Size() int {
  802. return m.ProtoSize()
  803. }
  804. func (m *Close) XXX_DiscardUnknown() {
  805. xxx_messageInfo_Close.DiscardUnknown(m)
  806. }
  807. var xxx_messageInfo_Close proto.InternalMessageInfo
  808. func init() {
  809. proto.RegisterEnum("protocol.MessageType", MessageType_name, MessageType_value)
  810. proto.RegisterEnum("protocol.MessageCompression", MessageCompression_name, MessageCompression_value)
  811. proto.RegisterEnum("protocol.Compression", Compression_name, Compression_value)
  812. proto.RegisterEnum("protocol.FileInfoType", FileInfoType_name, FileInfoType_value)
  813. proto.RegisterEnum("protocol.ErrorCode", ErrorCode_name, ErrorCode_value)
  814. proto.RegisterEnum("protocol.FileDownloadProgressUpdateType", FileDownloadProgressUpdateType_name, FileDownloadProgressUpdateType_value)
  815. proto.RegisterType((*Hello)(nil), "protocol.Hello")
  816. proto.RegisterType((*Header)(nil), "protocol.Header")
  817. proto.RegisterType((*ClusterConfig)(nil), "protocol.ClusterConfig")
  818. proto.RegisterType((*Folder)(nil), "protocol.Folder")
  819. proto.RegisterType((*Device)(nil), "protocol.Device")
  820. proto.RegisterType((*Index)(nil), "protocol.Index")
  821. proto.RegisterType((*IndexUpdate)(nil), "protocol.IndexUpdate")
  822. proto.RegisterType((*FileInfo)(nil), "protocol.FileInfo")
  823. proto.RegisterType((*BlockInfo)(nil), "protocol.BlockInfo")
  824. proto.RegisterType((*Vector)(nil), "protocol.Vector")
  825. proto.RegisterType((*Counter)(nil), "protocol.Counter")
  826. proto.RegisterType((*Request)(nil), "protocol.Request")
  827. proto.RegisterType((*Response)(nil), "protocol.Response")
  828. proto.RegisterType((*DownloadProgress)(nil), "protocol.DownloadProgress")
  829. proto.RegisterType((*FileDownloadProgressUpdate)(nil), "protocol.FileDownloadProgressUpdate")
  830. proto.RegisterType((*Ping)(nil), "protocol.Ping")
  831. proto.RegisterType((*Close)(nil), "protocol.Close")
  832. }
  833. func init() { proto.RegisterFile("lib/protocol/bep.proto", fileDescriptor_311ef540e10d9705) }
  834. var fileDescriptor_311ef540e10d9705 = []byte{
  835. // 2584 bytes of a gzipped FileDescriptorProto
  836. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4d, 0x6c, 0xe3, 0xc6,
  837. 0xf5, 0x17, 0xf5, 0x61, 0xcb, 0x63, 0x7b, 0x23, 0xcf, 0x7e, 0x29, 0xda, 0x8d, 0xa8, 0xff, 0xfc,
  838. 0x37, 0xad, 0xe3, 0x34, 0xde, 0xc4, 0x49, 0xda, 0x34, 0x49, 0x13, 0xe8, 0x83, 0xb6, 0x95, 0xd8,
  839. 0x92, 0x3b, 0xf2, 0x6e, 0xba, 0x8b, 0x16, 0x04, 0x2d, 0x8e, 0x6d, 0x62, 0x29, 0x52, 0x25, 0x65,
  840. 0xef, 0x3a, 0xe8, 0xa9, 0xbd, 0x04, 0x3a, 0x14, 0x45, 0x4e, 0x45, 0x51, 0xa1, 0x69, 0x2f, 0xbd,
  841. 0x15, 0xe8, 0xa1, 0x97, 0xdc, 0x7a, 0x29, 0x72, 0x5c, 0x04, 0x28, 0x50, 0xf4, 0x40, 0x20, 0xbb,
  842. 0x97, 0x56, 0x47, 0x1d, 0x7b, 0x2a, 0xe6, 0x83, 0xe4, 0xd0, 0xb2, 0x03, 0x27, 0x39, 0xf4, 0xc6,
  843. 0xf7, 0x7b, 0x1f, 0x1c, 0xce, 0xfb, 0xbd, 0x37, 0x6f, 0x24, 0x70, 0xcd, 0xb6, 0xf6, 0x6e, 0xf7,
  844. 0x3d, 0x77, 0xe0, 0x76, 0x5d, 0xfb, 0xf6, 0x1e, 0xe9, 0xaf, 0x32, 0x01, 0xe6, 0x43, 0xac, 0x34,
  845. 0x47, 0x1e, 0x0d, 0x38, 0x58, 0xfa, 0x7f, 0x8f, 0xf4, 0x5d, 0x9f, 0x9b, 0xef, 0x1d, 0xed, 0xdf,
  846. 0x3e, 0x70, 0x0f, 0x5c, 0x26, 0xb0, 0x27, 0x6e, 0x84, 0x9e, 0x28, 0x20, 0xb7, 0x49, 0x6c, 0xdb,
  847. 0x85, 0x75, 0x30, 0x6f, 0x92, 0x63, 0xab, 0x4b, 0x74, 0xc7, 0xe8, 0x91, 0xa2, 0x52, 0x51, 0x96,
  848. 0xe7, 0x6a, 0x68, 0x1c, 0xa8, 0x80, 0xc3, 0x2d, 0xa3, 0x47, 0x26, 0x81, 0x5a, 0x78, 0xd4, 0xb3,
  849. 0xdf, 0x44, 0x31, 0x84, 0xb0, 0xa4, 0xa7, 0x41, 0xba, 0xb6, 0x45, 0x9c, 0x01, 0x0f, 0x92, 0x8e,
  850. 0x83, 0x70, 0x38, 0x11, 0x24, 0x86, 0x10, 0x96, 0xf4, 0xb0, 0x0d, 0x2e, 0x89, 0x20, 0xc7, 0xc4,
  851. 0xf3, 0x2d, 0xd7, 0x29, 0x66, 0x58, 0x9c, 0xe5, 0x71, 0xa0, 0x2e, 0x72, 0xcd, 0x5d, 0xae, 0x98,
  852. 0x04, 0xea, 0x65, 0x29, 0x94, 0x40, 0x11, 0x4e, 0x5a, 0xa1, 0x3f, 0x2b, 0x60, 0x66, 0x93, 0x18,
  853. 0x26, 0xf1, 0x60, 0x15, 0x64, 0x07, 0x27, 0x7d, 0xfe, 0x79, 0x97, 0xd6, 0xae, 0xae, 0x86, 0x1b,
  854. 0xb7, 0xba, 0x4d, 0x7c, 0xdf, 0x38, 0x20, 0xbb, 0x27, 0x7d, 0x52, 0xbb, 0x36, 0x0e, 0x54, 0x66,
  855. 0x36, 0x09, 0x54, 0xc0, 0xe2, 0x53, 0x01, 0x61, 0x86, 0x41, 0x13, 0xcc, 0x77, 0xdd, 0x5e, 0xdf,
  856. 0x23, 0x3e, 0x5b, 0x5b, 0x9a, 0x45, 0xba, 0x39, 0x15, 0xa9, 0x1e, 0xdb, 0xd4, 0x6e, 0x8d, 0x03,
  857. 0x55, 0x76, 0x9a, 0x04, 0xea, 0x12, 0x5f, 0x77, 0x8c, 0x21, 0x2c, 0x5b, 0xa0, 0x1f, 0x83, 0xc5,
  858. 0xba, 0x7d, 0xe4, 0x0f, 0x88, 0x57, 0x77, 0x9d, 0x7d, 0xeb, 0x00, 0xbe, 0x0f, 0x66, 0xf7, 0x5d,
  859. 0xdb, 0x24, 0x9e, 0x5f, 0x54, 0x2a, 0x99, 0xe5, 0xf9, 0xb5, 0x42, 0xfc, 0xca, 0x75, 0xa6, 0xa8,
  860. 0xa9, 0x9f, 0x05, 0x6a, 0x6a, 0x1c, 0xa8, 0xa1, 0xe1, 0x24, 0x50, 0x17, 0xd8, 0x6b, 0xb8, 0x8c,
  861. 0x70, 0xa8, 0x40, 0x9f, 0x66, 0xc1, 0x0c, 0x77, 0x82, 0xab, 0x20, 0x6d, 0x99, 0x22, 0xdd, 0xe5,
  862. 0x27, 0x81, 0x9a, 0x6e, 0x36, 0xc6, 0x81, 0x9a, 0xb6, 0xcc, 0x49, 0xa0, 0xe6, 0x99, 0xb7, 0x65,
  863. 0xa2, 0x8f, 0x1f, 0xdf, 0x4a, 0x37, 0x1b, 0x38, 0x6d, 0x99, 0x70, 0x15, 0xe4, 0x6c, 0x63, 0x8f,
  864. 0xd8, 0x22, 0xb9, 0xc5, 0x71, 0xa0, 0x72, 0x60, 0x12, 0xa8, 0xf3, 0xcc, 0x9e, 0x49, 0x08, 0x73,
  865. 0x14, 0xbe, 0x05, 0xe6, 0x3c, 0x62, 0x98, 0xba, 0xeb, 0xd8, 0x27, 0x2c, 0x91, 0xf9, 0x5a, 0x79,
  866. 0x1c, 0xa8, 0x79, 0x0a, 0xb6, 0x1d, 0xfb, 0x64, 0x12, 0xa8, 0x97, 0x98, 0x5b, 0x08, 0x20, 0x1c,
  867. 0xe9, 0xa0, 0x0e, 0xa0, 0x75, 0xe0, 0xb8, 0x1e, 0xd1, 0xfb, 0xc4, 0xeb, 0x59, 0x6c, 0x6b, 0xfc,
  868. 0x62, 0x96, 0x45, 0x79, 0x79, 0x1c, 0xa8, 0x4b, 0x5c, 0xbb, 0x13, 0x2b, 0x27, 0x81, 0x7a, 0x9d,
  869. 0xaf, 0xfa, 0xb4, 0x06, 0xe1, 0x69, 0x6b, 0xf8, 0x3e, 0x58, 0x14, 0x2f, 0x30, 0x89, 0x4d, 0x06,
  870. 0xa4, 0x98, 0x63, 0xb1, 0xbf, 0x35, 0x0e, 0xd4, 0x05, 0xae, 0x68, 0x30, 0x7c, 0x12, 0xa8, 0x50,
  871. 0x0a, 0xcb, 0x41, 0x84, 0x13, 0x36, 0xd0, 0x04, 0x57, 0x4c, 0xcb, 0x37, 0xf6, 0x6c, 0xa2, 0x0f,
  872. 0x48, 0xaf, 0xaf, 0x5b, 0x8e, 0x49, 0x1e, 0x11, 0xbf, 0x38, 0xc3, 0x62, 0xae, 0x8d, 0x03, 0x15,
  873. 0x0a, 0xfd, 0x2e, 0xe9, 0xf5, 0x9b, 0x5c, 0x3b, 0x09, 0xd4, 0x22, 0xaf, 0xa9, 0x29, 0x15, 0xc2,
  874. 0x67, 0xd8, 0xc3, 0x35, 0x30, 0xd3, 0x37, 0x8e, 0x7c, 0x62, 0x16, 0x67, 0x59, 0xdc, 0xd2, 0x38,
  875. 0x50, 0x05, 0x12, 0x25, 0x9c, 0x8b, 0x08, 0x0b, 0x9c, 0x92, 0x87, 0x57, 0xa9, 0x5f, 0x2c, 0x9c,
  876. 0x26, 0x4f, 0x83, 0x29, 0x62, 0xf2, 0x08, 0xc3, 0x28, 0x16, 0x97, 0x11, 0x0e, 0x15, 0xe8, 0x6f,
  877. 0x39, 0x30, 0xc3, 0x9d, 0x60, 0x2d, 0x22, 0xcf, 0x42, 0x6d, 0x8d, 0x06, 0xf8, 0x67, 0xa0, 0xe6,
  878. 0xb9, 0xae, 0xd9, 0x38, 0x8f, 0x4c, 0x1f, 0x3d, 0xbe, 0xa5, 0x48, 0x84, 0x5a, 0x01, 0x59, 0xa9,
  879. 0x59, 0xb0, 0xda, 0x73, 0x78, 0x9b, 0xe0, 0xb5, 0xe7, 0xb0, 0x06, 0xc1, 0x30, 0xf8, 0x36, 0x98,
  880. 0x33, 0x4c, 0x93, 0xd6, 0x08, 0xf1, 0x8b, 0x99, 0x4a, 0x86, 0x72, 0x76, 0x1c, 0xa8, 0x31, 0x38,
  881. 0x09, 0xd4, 0x45, 0xe6, 0x25, 0x10, 0x84, 0x63, 0x1d, 0xfc, 0x49, 0xb2, 0x72, 0xb3, 0xa7, 0x7b,
  882. 0xc0, 0x37, 0x2b, 0x59, 0xca, 0xf4, 0x2e, 0xf1, 0x44, 0xeb, 0xcb, 0xf1, 0x82, 0xa2, 0x4c, 0xa7,
  883. 0xa0, 0x68, 0x7c, 0x9c, 0xe9, 0x21, 0x80, 0x70, 0xa4, 0x83, 0x1b, 0x60, 0xa1, 0x67, 0x3c, 0xd2,
  884. 0x7d, 0xf2, 0xd3, 0x23, 0xe2, 0x74, 0x09, 0xe3, 0x4c, 0x86, 0xaf, 0xa2, 0x67, 0x3c, 0xea, 0x08,
  885. 0x38, 0x5a, 0x85, 0x84, 0x21, 0x2c, 0x5b, 0xc0, 0x1a, 0x00, 0x96, 0x33, 0xf0, 0x5c, 0xf3, 0xa8,
  886. 0x4b, 0x3c, 0x41, 0x11, 0xd6, 0x81, 0x63, 0x34, 0xea, 0xc0, 0x31, 0x84, 0xb0, 0xa4, 0x87, 0x07,
  887. 0x20, 0xcf, 0xb8, 0xab, 0x5b, 0x66, 0x31, 0x5f, 0x51, 0x96, 0xb3, 0xb5, 0x2d, 0x91, 0xdc, 0x59,
  888. 0xc6, 0x42, 0x96, 0xdb, 0xf0, 0x91, 0x72, 0x86, 0x59, 0x37, 0xcd, 0x68, 0xf7, 0x85, 0x4c, 0xfb,
  889. 0x46, 0x68, 0xf6, 0x9b, 0xf8, 0x11, 0x87, 0xf6, 0xf0, 0x67, 0xa0, 0xe4, 0x3f, 0xb0, 0x68, 0xa5,
  890. 0xf0, 0x77, 0x0f, 0x2c, 0xd7, 0xd1, 0x3d, 0xd2, 0x73, 0x8f, 0x0d, 0xdb, 0x2f, 0xce, 0xb1, 0xc5,
  891. 0xbf, 0x33, 0x0e, 0xd4, 0x22, 0xb5, 0x6a, 0x4a, 0x46, 0x58, 0xd8, 0x4c, 0x02, 0xb5, 0xcc, 0xde,
  892. 0x78, 0x9e, 0x01, 0xc2, 0xe7, 0xfa, 0xa2, 0x9f, 0x2b, 0x20, 0xc7, 0x96, 0x44, 0x6b, 0x8a, 0xb7,
  893. 0x46, 0xd1, 0x08, 0x59, 0x4d, 0x71, 0x64, 0xaa, 0x89, 0x0a, 0x1c, 0x6a, 0x20, 0xb7, 0x6f, 0xd9,
  894. 0xc4, 0x2f, 0xa6, 0x59, 0x45, 0x41, 0xa9, 0x1d, 0x5b, 0x36, 0x69, 0x3a, 0xfb, 0x6e, 0xed, 0x86,
  895. 0xa8, 0x29, 0x6e, 0x18, 0x31, 0x9a, 0x4a, 0x08, 0x73, 0x10, 0x7d, 0xa4, 0x80, 0x79, 0xb6, 0x88,
  896. 0x3b, 0x7d, 0xd3, 0x18, 0x90, 0xff, 0xe5, 0x52, 0x7e, 0x0f, 0x40, 0x3e, 0x74, 0x88, 0xca, 0x52,
  897. 0xb9, 0x40, 0x59, 0xae, 0x80, 0xac, 0x6f, 0x7d, 0x48, 0x58, 0x7b, 0xcf, 0x70, 0x5b, 0x2a, 0x47,
  898. 0xb6, 0x54, 0x40, 0x98, 0x61, 0xf0, 0x5d, 0x00, 0x7a, 0xae, 0x69, 0xed, 0x5b, 0xc4, 0xd4, 0x7d,
  899. 0x56, 0x26, 0x99, 0x5a, 0x85, 0xd6, 0x70, 0x88, 0x76, 0x26, 0x81, 0xfa, 0x0c, 0x27, 0x79, 0x88,
  900. 0x20, 0x1c, 0x6b, 0x69, 0x15, 0x47, 0x01, 0xf6, 0x4e, 0x8a, 0x0b, 0x8c, 0x9f, 0x6f, 0x87, 0xfc,
  901. 0xec, 0x1c, 0xba, 0xde, 0x80, 0x91, 0x32, 0x7a, 0x4d, 0xed, 0x24, 0x22, 0x7c, 0x0c, 0x21, 0xca,
  902. 0x47, 0x61, 0x8c, 0x25, 0x53, 0xb8, 0x05, 0x66, 0xc3, 0xb1, 0x83, 0xf2, 0x2f, 0xd1, 0x2a, 0xef,
  903. 0x92, 0xee, 0xc0, 0xf5, 0x6a, 0x95, 0xb0, 0x55, 0x1e, 0x47, 0x63, 0x08, 0xa7, 0xfd, 0x71, 0x38,
  904. 0x80, 0x84, 0x1a, 0xf8, 0x26, 0xc8, 0x47, 0x25, 0x0d, 0xd8, 0xb7, 0xb2, 0x96, 0xe0, 0xc7, 0xf5,
  905. 0xcc, 0x5b, 0x82, 0x1f, 0x15, 0x73, 0xa4, 0x83, 0xef, 0x81, 0x99, 0x3d, 0xdb, 0xed, 0x3e, 0x08,
  906. 0x7b, 0xf6, 0xe5, 0x78, 0x21, 0x35, 0x8a, 0xb3, 0xbc, 0x3e, 0x27, 0xd6, 0x22, 0x4c, 0xa3, 0x43,
  907. 0x98, 0x89, 0x08, 0x0b, 0x98, 0xce, 0x54, 0xfe, 0x49, 0xcf, 0xb6, 0x9c, 0x07, 0xfa, 0xc0, 0xf0,
  908. 0x0e, 0xc8, 0xa0, 0xb8, 0x14, 0xcf, 0x54, 0x42, 0xb3, 0xcb, 0x14, 0xd1, 0x4c, 0x95, 0x40, 0x11,
  909. 0x4e, 0x5a, 0xd1, 0x49, 0x8f, 0x87, 0xd6, 0x0f, 0x0d, 0xff, 0xb0, 0x08, 0xd9, 0x11, 0xc0, 0xfa,
  910. 0x0c, 0x87, 0x37, 0x0d, 0xff, 0x30, 0xda, 0xf6, 0x18, 0x42, 0x58, 0xd2, 0xc3, 0x9a, 0x98, 0xc6,
  911. 0xf8, 0x0c, 0x75, 0x6d, 0x9a, 0xb6, 0x17, 0x18, 0xc7, 0xd6, 0xc1, 0xfc, 0xe9, 0xd9, 0x60, 0x91,
  912. 0xf7, 0xcd, 0x7e, 0x62, 0x2a, 0xe0, 0x7d, 0xb3, 0x2f, 0xcf, 0x03, 0xb2, 0x05, 0x7c, 0x4f, 0xa2,
  913. 0x95, 0xe3, 0x17, 0xe7, 0x2b, 0xca, 0x72, 0xae, 0xf6, 0x82, 0xcc, 0xa3, 0x96, 0x3f, 0xc5, 0xa3,
  914. 0x96, 0x8f, 0xfe, 0x13, 0xa8, 0x19, 0xcb, 0x19, 0x60, 0xc9, 0x0c, 0xee, 0x03, 0xfe, 0x95, 0x3a,
  915. 0xab, 0x8a, 0x45, 0x16, 0x6a, 0xe3, 0x49, 0xa0, 0x2e, 0x60, 0xe3, 0x21, 0x4b, 0x5d, 0xc7, 0xfa,
  916. 0x90, 0x50, 0xce, 0xef, 0x85, 0x42, 0xc4, 0xf9, 0x08, 0x09, 0x03, 0x7f, 0xfc, 0xf8, 0x56, 0xc2,
  917. 0x0d, 0xc7, 0x4e, 0xb0, 0x01, 0xe6, 0x6d, 0xb7, 0x6b, 0xd8, 0xfa, 0xbe, 0x6d, 0x1c, 0xf8, 0xc5,
  918. 0x7f, 0xcd, 0xb2, 0x8f, 0x67, 0x59, 0x60, 0xf8, 0x3a, 0x85, 0xa3, 0x45, 0xc7, 0x10, 0xc2, 0x92,
  919. 0x1e, 0x6e, 0x82, 0x05, 0x41, 0x57, 0x9e, 0xcb, 0x7f, 0xcf, 0xb2, 0x64, 0xb2, 0x3d, 0x14, 0x0a,
  920. 0x91, 0xcd, 0x25, 0x99, 0xe5, 0x3c, 0x9d, 0xb2, 0x05, 0xfc, 0x2e, 0x1d, 0x33, 0xe8, 0x28, 0x64,
  921. 0x8a, 0x99, 0xe7, 0x26, 0x1f, 0x28, 0x18, 0x14, 0x55, 0x89, 0x90, 0xd9, 0x44, 0xc1, 0x9e, 0x20,
  922. 0x06, 0xb3, 0x96, 0x73, 0x6c, 0xd8, 0x56, 0x38, 0xd3, 0xbc, 0xf1, 0x24, 0x50, 0x01, 0x36, 0x1e,
  923. 0x36, 0x39, 0xca, 0x8f, 0x18, 0xf6, 0x28, 0x1d, 0x31, 0x4c, 0xa6, 0x47, 0x8c, 0x64, 0x89, 0x43,
  924. 0x3b, 0xca, 0x78, 0xc7, 0x4d, 0x8c, 0x8d, 0x79, 0x16, 0x9a, 0x31, 0xde, 0x71, 0x93, 0x23, 0x23,
  925. 0x67, 0x7c, 0x02, 0x45, 0x38, 0x69, 0xf5, 0x66, 0xf6, 0xd7, 0x9f, 0xa8, 0x29, 0xf4, 0x85, 0x02,
  926. 0xe6, 0xa2, 0xea, 0xa3, 0x8d, 0x8f, 0x6d, 0x59, 0x86, 0xed, 0x18, 0x23, 0xea, 0x21, 0xdf, 0x2a,
  927. 0x4e, 0xd4, 0x43, 0xb6, 0x47, 0x0c, 0xa3, 0x8d, 0xdd, 0xdd, 0xdf, 0xf7, 0xc9, 0x80, 0xb5, 0xd4,
  928. 0x0c, 0x6f, 0xec, 0x1c, 0x89, 0x1a, 0x3b, 0x17, 0x11, 0x16, 0x38, 0x7c, 0x45, 0x34, 0xd6, 0x34,
  929. 0xa3, 0xd0, 0x73, 0x67, 0x37, 0xd6, 0x90, 0x81, 0xbc, 0xbf, 0xbe, 0x05, 0xe6, 0x1e, 0x12, 0xe3,
  930. 0x01, 0x4f, 0x25, 0xaf, 0x06, 0xd6, 0x72, 0x28, 0x28, 0xd2, 0xc8, 0x5b, 0x4e, 0x08, 0x20, 0x1c,
  931. 0xe9, 0xc4, 0x37, 0xde, 0x07, 0x33, 0xbc, 0xd3, 0xc1, 0x1d, 0x90, 0xef, 0xba, 0x47, 0xce, 0x20,
  932. 0xbe, 0x75, 0x2c, 0xc9, 0xe3, 0x12, 0xd3, 0xd4, 0xfe, 0x4f, 0xb4, 0xa0, 0xc8, 0x34, 0xca, 0x91,
  933. 0x00, 0xe8, 0x9c, 0x23, 0x54, 0xe8, 0x17, 0x0a, 0x98, 0x15, 0x8e, 0x70, 0x33, 0x9a, 0x1e, 0xb3,
  934. 0xb5, 0x37, 0x4e, 0x35, 0xf0, 0x2f, 0xbf, 0x89, 0xc8, 0xcd, 0x5b, 0x5c, 0x4a, 0x8e, 0x0d, 0xfb,
  935. 0x88, 0x6f, 0x54, 0x96, 0x5f, 0x4a, 0x18, 0x10, 0xf5, 0x43, 0x26, 0x21, 0xcc, 0x51, 0xf4, 0xd7,
  936. 0x0c, 0x98, 0xc5, 0xb4, 0xcf, 0xfa, 0x03, 0xf8, 0x7a, 0xb4, 0x8a, 0x5c, 0xed, 0xf9, 0xf3, 0x5e,
  937. 0x1b, 0x17, 0x63, 0x38, 0xb6, 0xc6, 0xe7, 0x74, 0xfa, 0xc2, 0xe7, 0x74, 0x78, 0xa6, 0x66, 0x2e,
  938. 0x70, 0xa6, 0xc6, 0x74, 0xc9, 0x7e, 0x65, 0xba, 0xe4, 0x2e, 0x4e, 0x97, 0x90, 0xc1, 0x33, 0x17,
  939. 0x60, 0x70, 0x1b, 0x5c, 0xda, 0xf7, 0xdc, 0x1e, 0xbb, 0xdc, 0xb8, 0x9e, 0xe1, 0x9d, 0x88, 0x6a,
  940. 0x65, 0x25, 0x45, 0x35, 0xbb, 0xa1, 0x22, 0x2a, 0xa9, 0x04, 0x8a, 0x70, 0xd2, 0x2a, 0xc9, 0xd5,
  941. 0xfc, 0x57, 0xe3, 0x2a, 0xfa, 0x93, 0x02, 0xf2, 0x98, 0xf8, 0x7d, 0xd7, 0xf1, 0xc9, 0xd7, 0x4d,
  942. 0xe2, 0x0a, 0xc8, 0x9a, 0xc6, 0xc0, 0x60, 0x29, 0x14, 0x5f, 0x4f, 0xe5, 0xe8, 0xeb, 0xa9, 0x80,
  943. 0x30, 0xc3, 0xe0, 0xbb, 0x20, 0xdb, 0x75, 0x4d, 0x9e, 0xbc, 0x4b, 0xf2, 0x61, 0xac, 0x79, 0x9e,
  944. 0xeb, 0xd5, 0x5d, 0x53, 0x9c, 0x54, 0xd4, 0x28, 0x0a, 0x40, 0x05, 0x84, 0x19, 0x86, 0xfe, 0xa8,
  945. 0x80, 0x42, 0xc3, 0x7d, 0xe8, 0xd8, 0xae, 0x61, 0xee, 0x78, 0xee, 0x01, 0xbd, 0x37, 0x7c, 0xad,
  946. 0x71, 0x4f, 0x07, 0xb3, 0x47, 0x6c, 0x58, 0x0c, 0x07, 0xbe, 0x5b, 0xc9, 0x93, 0xf3, 0xf4, 0x4b,
  947. 0xf8, 0x64, 0x19, 0xdf, 0xf0, 0x84, 0x73, 0x14, 0x9f, 0xcb, 0x08, 0x87, 0x0a, 0xf4, 0x87, 0x0c,
  948. 0x28, 0x9d, 0x1f, 0x08, 0xf6, 0xc0, 0x3c, 0xb7, 0xd4, 0xa5, 0xdf, 0x52, 0x96, 0x2f, 0xb2, 0x06,
  949. 0x76, 0x9e, 0xb3, 0xf3, 0xe9, 0x28, 0x92, 0xa3, 0xf3, 0x29, 0x86, 0x10, 0x96, 0xf4, 0x5f, 0xe9,
  950. 0x82, 0x28, 0x4d, 0x6f, 0x99, 0x6f, 0x3e, 0xbd, 0x75, 0xc0, 0x22, 0x3f, 0xc7, 0xc3, 0x9b, 0x7c,
  951. 0xb6, 0x92, 0x59, 0xce, 0xd5, 0x56, 0xc7, 0x81, 0xba, 0xb0, 0xc7, 0x0f, 0x81, 0xf0, 0x0e, 0xbf,
  952. 0x14, 0x9f, 0xde, 0x1c, 0x0c, 0xd9, 0x56, 0x48, 0xe1, 0x84, 0x2d, 0x5c, 0x4f, 0x0c, 0x07, 0xbc,
  953. 0x54, 0xbf, 0x7d, 0xc1, 0x61, 0x40, 0x3a, 0xfc, 0xd1, 0x0c, 0xc8, 0xee, 0x58, 0xce, 0x01, 0x7a,
  954. 0x0b, 0xe4, 0xea, 0xb6, 0xeb, 0xb3, 0x8e, 0xe1, 0x11, 0xc3, 0x77, 0x1d, 0x99, 0x4a, 0x1c, 0x89,
  955. 0x52, 0xcd, 0x45, 0x84, 0x05, 0xbe, 0xf2, 0x69, 0x06, 0xcc, 0x4b, 0x3f, 0x7d, 0xc1, 0x1f, 0x80,
  956. 0x1b, 0xdb, 0x5a, 0xa7, 0x53, 0xdd, 0xd0, 0xf4, 0xdd, 0x7b, 0x3b, 0x9a, 0x5e, 0xdf, 0xba, 0xd3,
  957. 0xd9, 0xd5, 0xb0, 0x5e, 0x6f, 0xb7, 0xd6, 0x9b, 0x1b, 0x85, 0x54, 0xe9, 0xe6, 0x70, 0x54, 0x29,
  958. 0x4a, 0x1e, 0xc9, 0x1f, 0xa9, 0xbe, 0x03, 0x60, 0xc2, 0xbd, 0xd9, 0x6a, 0x68, 0x3f, 0x2a, 0x28,
  959. 0xa5, 0x2b, 0xc3, 0x51, 0xa5, 0x20, 0x79, 0xf1, 0x5b, 0xd7, 0xf7, 0xc1, 0xb3, 0xd3, 0xd6, 0xfa,
  960. 0x9d, 0x9d, 0x46, 0x75, 0x57, 0x2b, 0xa4, 0x4b, 0xa5, 0xe1, 0xa8, 0x72, 0xed, 0xb4, 0x93, 0xa0,
  961. 0xe0, 0xcb, 0xe0, 0x4a, 0xc2, 0x15, 0x6b, 0x3f, 0xbc, 0xa3, 0x75, 0x76, 0x0b, 0x99, 0xd2, 0xb5,
  962. 0xe1, 0xa8, 0x02, 0x25, 0xaf, 0xb0, 0xcd, 0xaf, 0x81, 0xab, 0xa7, 0x3c, 0x3a, 0x3b, 0xed, 0x56,
  963. 0x47, 0x2b, 0x64, 0x4b, 0xd7, 0x87, 0xa3, 0xca, 0xe5, 0x84, 0x8b, 0xe8, 0x2a, 0x75, 0x50, 0x4e,
  964. 0xf8, 0x34, 0xda, 0x1f, 0xb4, 0xb6, 0xda, 0xd5, 0x86, 0xbe, 0x83, 0xdb, 0x1b, 0x58, 0xeb, 0x74,
  965. 0x0a, 0xb9, 0x92, 0x3a, 0x1c, 0x55, 0x6e, 0x48, 0xce, 0x53, 0x15, 0xbe, 0x02, 0x96, 0x12, 0x41,
  966. 0x76, 0x9a, 0xad, 0x8d, 0xc2, 0x4c, 0xe9, 0xf2, 0x70, 0x54, 0x79, 0x46, 0xf2, 0xa3, 0xb9, 0x9c,
  967. 0xda, 0xbf, 0xfa, 0x56, 0xbb, 0xa3, 0x15, 0x66, 0xa7, 0xf6, 0x8f, 0x25, 0x7c, 0xe5, 0x77, 0x0a,
  968. 0x80, 0xd3, 0xbf, 0x36, 0xc2, 0x37, 0x40, 0x31, 0x0c, 0x52, 0x6f, 0x6f, 0xef, 0xd0, 0x75, 0x36,
  969. 0xdb, 0x2d, 0xbd, 0xd5, 0x6e, 0x69, 0x85, 0x54, 0x62, 0x57, 0x25, 0xaf, 0x96, 0xeb, 0x10, 0xd8,
  970. 0x06, 0xd7, 0xcf, 0xf2, 0xdc, 0xba, 0xff, 0x5a, 0x41, 0x29, 0xad, 0x0d, 0x47, 0x95, 0xab, 0xd3,
  971. 0x8e, 0x5b, 0xf7, 0x5f, 0xfb, 0xfc, 0x97, 0xcf, 0x9f, 0xad, 0x58, 0xf9, 0xad, 0x02, 0xe6, 0xe5,
  972. 0xa5, 0xbd, 0x02, 0xae, 0xc8, 0x81, 0xb7, 0xb5, 0xdd, 0x6a, 0xa3, 0xba, 0x5b, 0x2d, 0xa4, 0x78,
  973. 0x0e, 0x24, 0xd3, 0x6d, 0x32, 0x30, 0x58, 0xdb, 0x7d, 0x11, 0x2c, 0x25, 0xbe, 0x42, 0xbb, 0xab,
  974. 0xe1, 0x90, 0x51, 0xf2, 0xfa, 0xc9, 0x31, 0xf1, 0xe0, 0x4b, 0x00, 0xca, 0xc6, 0xd5, 0xad, 0x0f,
  975. 0xaa, 0xf7, 0x3a, 0x85, 0x74, 0xe9, 0xea, 0x70, 0x54, 0x59, 0x92, 0xac, 0xab, 0xf6, 0x43, 0xe3,
  976. 0xc4, 0x5f, 0xf9, 0x4b, 0x1a, 0x2c, 0xc8, 0x57, 0x0d, 0xf8, 0x12, 0xb8, 0xbc, 0xde, 0xdc, 0xa2,
  977. 0x4c, 0x5c, 0x6f, 0xf3, 0x0c, 0x50, 0xb1, 0x90, 0xe2, 0xaf, 0x93, 0x4d, 0xe9, 0x33, 0xfc, 0x1e,
  978. 0x28, 0x9e, 0x32, 0x6f, 0x34, 0xb1, 0x56, 0xdf, 0x6d, 0xe3, 0x7b, 0x05, 0xa5, 0xf4, 0x2c, 0xdd,
  979. 0x30, 0xd9, 0xa7, 0x61, 0x79, 0xac, 0x05, 0x9d, 0xc0, 0x77, 0xc0, 0x8d, 0x53, 0x8e, 0x9d, 0x7b,
  980. 0xdb, 0x5b, 0xcd, 0xd6, 0xfb, 0xfc, 0x7d, 0xe9, 0xd2, 0x73, 0xc3, 0x51, 0xe5, 0xba, 0xec, 0xdb,
  981. 0xe1, 0xb7, 0x2f, 0x0a, 0xe5, 0x15, 0xb8, 0x09, 0x2a, 0xe7, 0xf8, 0xc7, 0x0b, 0xc8, 0x94, 0xd0,
  982. 0x70, 0x54, 0xb9, 0x79, 0x46, 0x90, 0x68, 0x1d, 0x79, 0x05, 0xbe, 0x0a, 0xae, 0x9d, 0x1d, 0x29,
  983. 0xac, 0x8b, 0x33, 0xfc, 0x57, 0xfe, 0xae, 0x80, 0xb9, 0xe8, 0xd4, 0xa3, 0x9b, 0xa6, 0x61, 0xdc,
  984. 0xa6, 0x4d, 0xa2, 0xa1, 0xe9, 0xad, 0xb6, 0xce, 0xa4, 0x70, 0xd3, 0x22, 0xbb, 0x96, 0xcb, 0x1e,
  985. 0x29, 0xc7, 0x25, 0xf3, 0x0d, 0xad, 0xa5, 0xe1, 0x66, 0x3d, 0xcc, 0x68, 0x64, 0xbd, 0x41, 0x1c,
  986. 0xe2, 0x59, 0x5d, 0xf8, 0x1a, 0xb8, 0x9e, 0x0c, 0xde, 0xb9, 0x53, 0xdf, 0x0c, 0x77, 0x89, 0x2d,
  987. 0x50, 0x7a, 0x41, 0xe7, 0xa8, 0x7b, 0xc8, 0x12, 0xf3, 0x7a, 0xc2, 0xab, 0xd9, 0xba, 0x5b, 0xdd,
  988. 0x6a, 0x36, 0xb8, 0x57, 0xa6, 0x54, 0x1c, 0x8e, 0x2a, 0x57, 0x22, 0x2f, 0x71, 0x71, 0xa0, 0x6e,
  989. 0x2b, 0x9f, 0x2b, 0xa0, 0xfc, 0xe5, 0x87, 0x17, 0xfc, 0x00, 0xbc, 0xc0, 0xf6, 0x6b, 0xaa, 0x15,
  990. 0x88, 0xbe, 0xc5, 0xf7, 0xb0, 0xba, 0xb3, 0xa3, 0xb5, 0x1a, 0x85, 0x54, 0x69, 0x79, 0x38, 0xaa,
  991. 0xdc, 0xfa, 0xf2, 0x90, 0xd5, 0x7e, 0x9f, 0x38, 0xe6, 0x05, 0x03, 0xaf, 0xb7, 0xf1, 0x86, 0xb6,
  992. 0x5b, 0x50, 0x2e, 0x12, 0x78, 0xdd, 0xa5, 0x37, 0xf5, 0xda, 0xf6, 0x67, 0x5f, 0x94, 0x53, 0x8f,
  993. 0xbf, 0x28, 0xa7, 0x3e, 0x7b, 0x52, 0x56, 0x1e, 0x3f, 0x29, 0x2b, 0xbf, 0x7a, 0x5a, 0x4e, 0x7d,
  994. 0xf2, 0xb4, 0xac, 0x3c, 0x7e, 0x5a, 0x4e, 0xfd, 0xe3, 0x69, 0x39, 0x75, 0xff, 0xc5, 0x03, 0x6b,
  995. 0x70, 0x78, 0xb4, 0xb7, 0xda, 0x75, 0x7b, 0xb7, 0xfd, 0x13, 0xa7, 0x3b, 0x38, 0xb4, 0x9c, 0x03,
  996. 0xe9, 0x49, 0xfe, 0xd7, 0x69, 0x6f, 0x86, 0x3d, 0xbd, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff,
  997. 0xf3, 0xce, 0x28, 0x00, 0x8c, 0x1a, 0x00, 0x00,
  998. }
  999. func (m *Hello) Marshal() (dAtA []byte, err error) {
  1000. size := m.ProtoSize()
  1001. dAtA = make([]byte, size)
  1002. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1003. if err != nil {
  1004. return nil, err
  1005. }
  1006. return dAtA[:n], nil
  1007. }
  1008. func (m *Hello) MarshalTo(dAtA []byte) (int, error) {
  1009. size := m.ProtoSize()
  1010. return m.MarshalToSizedBuffer(dAtA[:size])
  1011. }
  1012. func (m *Hello) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1013. i := len(dAtA)
  1014. _ = i
  1015. var l int
  1016. _ = l
  1017. if len(m.ClientVersion) > 0 {
  1018. i -= len(m.ClientVersion)
  1019. copy(dAtA[i:], m.ClientVersion)
  1020. i = encodeVarintBep(dAtA, i, uint64(len(m.ClientVersion)))
  1021. i--
  1022. dAtA[i] = 0x1a
  1023. }
  1024. if len(m.ClientName) > 0 {
  1025. i -= len(m.ClientName)
  1026. copy(dAtA[i:], m.ClientName)
  1027. i = encodeVarintBep(dAtA, i, uint64(len(m.ClientName)))
  1028. i--
  1029. dAtA[i] = 0x12
  1030. }
  1031. if len(m.DeviceName) > 0 {
  1032. i -= len(m.DeviceName)
  1033. copy(dAtA[i:], m.DeviceName)
  1034. i = encodeVarintBep(dAtA, i, uint64(len(m.DeviceName)))
  1035. i--
  1036. dAtA[i] = 0xa
  1037. }
  1038. return len(dAtA) - i, nil
  1039. }
  1040. func (m *Header) Marshal() (dAtA []byte, err error) {
  1041. size := m.ProtoSize()
  1042. dAtA = make([]byte, size)
  1043. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1044. if err != nil {
  1045. return nil, err
  1046. }
  1047. return dAtA[:n], nil
  1048. }
  1049. func (m *Header) MarshalTo(dAtA []byte) (int, error) {
  1050. size := m.ProtoSize()
  1051. return m.MarshalToSizedBuffer(dAtA[:size])
  1052. }
  1053. func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1054. i := len(dAtA)
  1055. _ = i
  1056. var l int
  1057. _ = l
  1058. if m.Compression != 0 {
  1059. i = encodeVarintBep(dAtA, i, uint64(m.Compression))
  1060. i--
  1061. dAtA[i] = 0x10
  1062. }
  1063. if m.Type != 0 {
  1064. i = encodeVarintBep(dAtA, i, uint64(m.Type))
  1065. i--
  1066. dAtA[i] = 0x8
  1067. }
  1068. return len(dAtA) - i, nil
  1069. }
  1070. func (m *ClusterConfig) Marshal() (dAtA []byte, err error) {
  1071. size := m.ProtoSize()
  1072. dAtA = make([]byte, size)
  1073. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1074. if err != nil {
  1075. return nil, err
  1076. }
  1077. return dAtA[:n], nil
  1078. }
  1079. func (m *ClusterConfig) MarshalTo(dAtA []byte) (int, error) {
  1080. size := m.ProtoSize()
  1081. return m.MarshalToSizedBuffer(dAtA[:size])
  1082. }
  1083. func (m *ClusterConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1084. i := len(dAtA)
  1085. _ = i
  1086. var l int
  1087. _ = l
  1088. if len(m.Folders) > 0 {
  1089. for iNdEx := len(m.Folders) - 1; iNdEx >= 0; iNdEx-- {
  1090. {
  1091. size, err := m.Folders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1092. if err != nil {
  1093. return 0, err
  1094. }
  1095. i -= size
  1096. i = encodeVarintBep(dAtA, i, uint64(size))
  1097. }
  1098. i--
  1099. dAtA[i] = 0xa
  1100. }
  1101. }
  1102. return len(dAtA) - i, nil
  1103. }
  1104. func (m *Folder) Marshal() (dAtA []byte, err error) {
  1105. size := m.ProtoSize()
  1106. dAtA = make([]byte, size)
  1107. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1108. if err != nil {
  1109. return nil, err
  1110. }
  1111. return dAtA[:n], nil
  1112. }
  1113. func (m *Folder) MarshalTo(dAtA []byte) (int, error) {
  1114. size := m.ProtoSize()
  1115. return m.MarshalToSizedBuffer(dAtA[:size])
  1116. }
  1117. func (m *Folder) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1118. i := len(dAtA)
  1119. _ = i
  1120. var l int
  1121. _ = l
  1122. if len(m.Devices) > 0 {
  1123. for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  1124. {
  1125. size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1126. if err != nil {
  1127. return 0, err
  1128. }
  1129. i -= size
  1130. i = encodeVarintBep(dAtA, i, uint64(size))
  1131. }
  1132. i--
  1133. dAtA[i] = 0x1
  1134. i--
  1135. dAtA[i] = 0x82
  1136. }
  1137. }
  1138. if m.Paused {
  1139. i--
  1140. if m.Paused {
  1141. dAtA[i] = 1
  1142. } else {
  1143. dAtA[i] = 0
  1144. }
  1145. i--
  1146. dAtA[i] = 0x38
  1147. }
  1148. if m.DisableTempIndexes {
  1149. i--
  1150. if m.DisableTempIndexes {
  1151. dAtA[i] = 1
  1152. } else {
  1153. dAtA[i] = 0
  1154. }
  1155. i--
  1156. dAtA[i] = 0x30
  1157. }
  1158. if m.IgnoreDelete {
  1159. i--
  1160. if m.IgnoreDelete {
  1161. dAtA[i] = 1
  1162. } else {
  1163. dAtA[i] = 0
  1164. }
  1165. i--
  1166. dAtA[i] = 0x28
  1167. }
  1168. if m.IgnorePermissions {
  1169. i--
  1170. if m.IgnorePermissions {
  1171. dAtA[i] = 1
  1172. } else {
  1173. dAtA[i] = 0
  1174. }
  1175. i--
  1176. dAtA[i] = 0x20
  1177. }
  1178. if m.ReadOnly {
  1179. i--
  1180. if m.ReadOnly {
  1181. dAtA[i] = 1
  1182. } else {
  1183. dAtA[i] = 0
  1184. }
  1185. i--
  1186. dAtA[i] = 0x18
  1187. }
  1188. if len(m.Label) > 0 {
  1189. i -= len(m.Label)
  1190. copy(dAtA[i:], m.Label)
  1191. i = encodeVarintBep(dAtA, i, uint64(len(m.Label)))
  1192. i--
  1193. dAtA[i] = 0x12
  1194. }
  1195. if len(m.ID) > 0 {
  1196. i -= len(m.ID)
  1197. copy(dAtA[i:], m.ID)
  1198. i = encodeVarintBep(dAtA, i, uint64(len(m.ID)))
  1199. i--
  1200. dAtA[i] = 0xa
  1201. }
  1202. return len(dAtA) - i, nil
  1203. }
  1204. func (m *Device) Marshal() (dAtA []byte, err error) {
  1205. size := m.ProtoSize()
  1206. dAtA = make([]byte, size)
  1207. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1208. if err != nil {
  1209. return nil, err
  1210. }
  1211. return dAtA[:n], nil
  1212. }
  1213. func (m *Device) MarshalTo(dAtA []byte) (int, error) {
  1214. size := m.ProtoSize()
  1215. return m.MarshalToSizedBuffer(dAtA[:size])
  1216. }
  1217. func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1218. i := len(dAtA)
  1219. _ = i
  1220. var l int
  1221. _ = l
  1222. if m.SkipIntroductionRemovals {
  1223. i--
  1224. if m.SkipIntroductionRemovals {
  1225. dAtA[i] = 1
  1226. } else {
  1227. dAtA[i] = 0
  1228. }
  1229. i--
  1230. dAtA[i] = 0x48
  1231. }
  1232. if m.IndexID != 0 {
  1233. i = encodeVarintBep(dAtA, i, uint64(m.IndexID))
  1234. i--
  1235. dAtA[i] = 0x40
  1236. }
  1237. if m.Introducer {
  1238. i--
  1239. if m.Introducer {
  1240. dAtA[i] = 1
  1241. } else {
  1242. dAtA[i] = 0
  1243. }
  1244. i--
  1245. dAtA[i] = 0x38
  1246. }
  1247. if m.MaxSequence != 0 {
  1248. i = encodeVarintBep(dAtA, i, uint64(m.MaxSequence))
  1249. i--
  1250. dAtA[i] = 0x30
  1251. }
  1252. if len(m.CertName) > 0 {
  1253. i -= len(m.CertName)
  1254. copy(dAtA[i:], m.CertName)
  1255. i = encodeVarintBep(dAtA, i, uint64(len(m.CertName)))
  1256. i--
  1257. dAtA[i] = 0x2a
  1258. }
  1259. if m.Compression != 0 {
  1260. i = encodeVarintBep(dAtA, i, uint64(m.Compression))
  1261. i--
  1262. dAtA[i] = 0x20
  1263. }
  1264. if len(m.Addresses) > 0 {
  1265. for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
  1266. i -= len(m.Addresses[iNdEx])
  1267. copy(dAtA[i:], m.Addresses[iNdEx])
  1268. i = encodeVarintBep(dAtA, i, uint64(len(m.Addresses[iNdEx])))
  1269. i--
  1270. dAtA[i] = 0x1a
  1271. }
  1272. }
  1273. if len(m.Name) > 0 {
  1274. i -= len(m.Name)
  1275. copy(dAtA[i:], m.Name)
  1276. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1277. i--
  1278. dAtA[i] = 0x12
  1279. }
  1280. {
  1281. size := m.ID.ProtoSize()
  1282. i -= size
  1283. if _, err := m.ID.MarshalTo(dAtA[i:]); err != nil {
  1284. return 0, err
  1285. }
  1286. i = encodeVarintBep(dAtA, i, uint64(size))
  1287. }
  1288. i--
  1289. dAtA[i] = 0xa
  1290. return len(dAtA) - i, nil
  1291. }
  1292. func (m *Index) Marshal() (dAtA []byte, err error) {
  1293. size := m.ProtoSize()
  1294. dAtA = make([]byte, size)
  1295. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1296. if err != nil {
  1297. return nil, err
  1298. }
  1299. return dAtA[:n], nil
  1300. }
  1301. func (m *Index) MarshalTo(dAtA []byte) (int, error) {
  1302. size := m.ProtoSize()
  1303. return m.MarshalToSizedBuffer(dAtA[:size])
  1304. }
  1305. func (m *Index) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1306. i := len(dAtA)
  1307. _ = i
  1308. var l int
  1309. _ = l
  1310. if len(m.Files) > 0 {
  1311. for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- {
  1312. {
  1313. size, err := m.Files[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1314. if err != nil {
  1315. return 0, err
  1316. }
  1317. i -= size
  1318. i = encodeVarintBep(dAtA, i, uint64(size))
  1319. }
  1320. i--
  1321. dAtA[i] = 0x12
  1322. }
  1323. }
  1324. if len(m.Folder) > 0 {
  1325. i -= len(m.Folder)
  1326. copy(dAtA[i:], m.Folder)
  1327. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1328. i--
  1329. dAtA[i] = 0xa
  1330. }
  1331. return len(dAtA) - i, nil
  1332. }
  1333. func (m *IndexUpdate) Marshal() (dAtA []byte, err error) {
  1334. size := m.ProtoSize()
  1335. dAtA = make([]byte, size)
  1336. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1337. if err != nil {
  1338. return nil, err
  1339. }
  1340. return dAtA[:n], nil
  1341. }
  1342. func (m *IndexUpdate) MarshalTo(dAtA []byte) (int, error) {
  1343. size := m.ProtoSize()
  1344. return m.MarshalToSizedBuffer(dAtA[:size])
  1345. }
  1346. func (m *IndexUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1347. i := len(dAtA)
  1348. _ = i
  1349. var l int
  1350. _ = l
  1351. if len(m.Files) > 0 {
  1352. for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- {
  1353. {
  1354. size, err := m.Files[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1355. if err != nil {
  1356. return 0, err
  1357. }
  1358. i -= size
  1359. i = encodeVarintBep(dAtA, i, uint64(size))
  1360. }
  1361. i--
  1362. dAtA[i] = 0x12
  1363. }
  1364. }
  1365. if len(m.Folder) > 0 {
  1366. i -= len(m.Folder)
  1367. copy(dAtA[i:], m.Folder)
  1368. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1369. i--
  1370. dAtA[i] = 0xa
  1371. }
  1372. return len(dAtA) - i, nil
  1373. }
  1374. func (m *FileInfo) Marshal() (dAtA []byte, err error) {
  1375. size := m.ProtoSize()
  1376. dAtA = make([]byte, size)
  1377. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1378. if err != nil {
  1379. return nil, err
  1380. }
  1381. return dAtA[:n], nil
  1382. }
  1383. func (m *FileInfo) MarshalTo(dAtA []byte) (int, error) {
  1384. size := m.ProtoSize()
  1385. return m.MarshalToSizedBuffer(dAtA[:size])
  1386. }
  1387. func (m *FileInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1388. i := len(dAtA)
  1389. _ = i
  1390. var l int
  1391. _ = l
  1392. if len(m.VersionHash) > 0 {
  1393. i -= len(m.VersionHash)
  1394. copy(dAtA[i:], m.VersionHash)
  1395. i = encodeVarintBep(dAtA, i, uint64(len(m.VersionHash)))
  1396. i--
  1397. dAtA[i] = 0x3e
  1398. i--
  1399. dAtA[i] = 0xca
  1400. }
  1401. if m.LocalFlags != 0 {
  1402. i = encodeVarintBep(dAtA, i, uint64(m.LocalFlags))
  1403. i--
  1404. dAtA[i] = 0x3e
  1405. i--
  1406. dAtA[i] = 0xc0
  1407. }
  1408. if len(m.BlocksHash) > 0 {
  1409. i -= len(m.BlocksHash)
  1410. copy(dAtA[i:], m.BlocksHash)
  1411. i = encodeVarintBep(dAtA, i, uint64(len(m.BlocksHash)))
  1412. i--
  1413. dAtA[i] = 0x1
  1414. i--
  1415. dAtA[i] = 0x92
  1416. }
  1417. if len(m.SymlinkTarget) > 0 {
  1418. i -= len(m.SymlinkTarget)
  1419. copy(dAtA[i:], m.SymlinkTarget)
  1420. i = encodeVarintBep(dAtA, i, uint64(len(m.SymlinkTarget)))
  1421. i--
  1422. dAtA[i] = 0x1
  1423. i--
  1424. dAtA[i] = 0x8a
  1425. }
  1426. if len(m.Blocks) > 0 {
  1427. for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- {
  1428. {
  1429. size, err := m.Blocks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1430. if err != nil {
  1431. return 0, err
  1432. }
  1433. i -= size
  1434. i = encodeVarintBep(dAtA, i, uint64(size))
  1435. }
  1436. i--
  1437. dAtA[i] = 0x1
  1438. i--
  1439. dAtA[i] = 0x82
  1440. }
  1441. }
  1442. if m.RawBlockSize != 0 {
  1443. i = encodeVarintBep(dAtA, i, uint64(m.RawBlockSize))
  1444. i--
  1445. dAtA[i] = 0x68
  1446. }
  1447. if m.ModifiedBy != 0 {
  1448. i = encodeVarintBep(dAtA, i, uint64(m.ModifiedBy))
  1449. i--
  1450. dAtA[i] = 0x60
  1451. }
  1452. if m.ModifiedNs != 0 {
  1453. i = encodeVarintBep(dAtA, i, uint64(m.ModifiedNs))
  1454. i--
  1455. dAtA[i] = 0x58
  1456. }
  1457. if m.Sequence != 0 {
  1458. i = encodeVarintBep(dAtA, i, uint64(m.Sequence))
  1459. i--
  1460. dAtA[i] = 0x50
  1461. }
  1462. {
  1463. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  1464. if err != nil {
  1465. return 0, err
  1466. }
  1467. i -= size
  1468. i = encodeVarintBep(dAtA, i, uint64(size))
  1469. }
  1470. i--
  1471. dAtA[i] = 0x4a
  1472. if m.NoPermissions {
  1473. i--
  1474. if m.NoPermissions {
  1475. dAtA[i] = 1
  1476. } else {
  1477. dAtA[i] = 0
  1478. }
  1479. i--
  1480. dAtA[i] = 0x40
  1481. }
  1482. if m.RawInvalid {
  1483. i--
  1484. if m.RawInvalid {
  1485. dAtA[i] = 1
  1486. } else {
  1487. dAtA[i] = 0
  1488. }
  1489. i--
  1490. dAtA[i] = 0x38
  1491. }
  1492. if m.Deleted {
  1493. i--
  1494. if m.Deleted {
  1495. dAtA[i] = 1
  1496. } else {
  1497. dAtA[i] = 0
  1498. }
  1499. i--
  1500. dAtA[i] = 0x30
  1501. }
  1502. if m.ModifiedS != 0 {
  1503. i = encodeVarintBep(dAtA, i, uint64(m.ModifiedS))
  1504. i--
  1505. dAtA[i] = 0x28
  1506. }
  1507. if m.Permissions != 0 {
  1508. i = encodeVarintBep(dAtA, i, uint64(m.Permissions))
  1509. i--
  1510. dAtA[i] = 0x20
  1511. }
  1512. if m.Size != 0 {
  1513. i = encodeVarintBep(dAtA, i, uint64(m.Size))
  1514. i--
  1515. dAtA[i] = 0x18
  1516. }
  1517. if m.Type != 0 {
  1518. i = encodeVarintBep(dAtA, i, uint64(m.Type))
  1519. i--
  1520. dAtA[i] = 0x10
  1521. }
  1522. if len(m.Name) > 0 {
  1523. i -= len(m.Name)
  1524. copy(dAtA[i:], m.Name)
  1525. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1526. i--
  1527. dAtA[i] = 0xa
  1528. }
  1529. return len(dAtA) - i, nil
  1530. }
  1531. func (m *BlockInfo) Marshal() (dAtA []byte, err error) {
  1532. size := m.ProtoSize()
  1533. dAtA = make([]byte, size)
  1534. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1535. if err != nil {
  1536. return nil, err
  1537. }
  1538. return dAtA[:n], nil
  1539. }
  1540. func (m *BlockInfo) MarshalTo(dAtA []byte) (int, error) {
  1541. size := m.ProtoSize()
  1542. return m.MarshalToSizedBuffer(dAtA[:size])
  1543. }
  1544. func (m *BlockInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1545. i := len(dAtA)
  1546. _ = i
  1547. var l int
  1548. _ = l
  1549. if m.WeakHash != 0 {
  1550. i = encodeVarintBep(dAtA, i, uint64(m.WeakHash))
  1551. i--
  1552. dAtA[i] = 0x20
  1553. }
  1554. if len(m.Hash) > 0 {
  1555. i -= len(m.Hash)
  1556. copy(dAtA[i:], m.Hash)
  1557. i = encodeVarintBep(dAtA, i, uint64(len(m.Hash)))
  1558. i--
  1559. dAtA[i] = 0x1a
  1560. }
  1561. if m.Size != 0 {
  1562. i = encodeVarintBep(dAtA, i, uint64(m.Size))
  1563. i--
  1564. dAtA[i] = 0x10
  1565. }
  1566. if m.Offset != 0 {
  1567. i = encodeVarintBep(dAtA, i, uint64(m.Offset))
  1568. i--
  1569. dAtA[i] = 0x8
  1570. }
  1571. return len(dAtA) - i, nil
  1572. }
  1573. func (m *Vector) Marshal() (dAtA []byte, err error) {
  1574. size := m.ProtoSize()
  1575. dAtA = make([]byte, size)
  1576. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1577. if err != nil {
  1578. return nil, err
  1579. }
  1580. return dAtA[:n], nil
  1581. }
  1582. func (m *Vector) MarshalTo(dAtA []byte) (int, error) {
  1583. size := m.ProtoSize()
  1584. return m.MarshalToSizedBuffer(dAtA[:size])
  1585. }
  1586. func (m *Vector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1587. i := len(dAtA)
  1588. _ = i
  1589. var l int
  1590. _ = l
  1591. if len(m.Counters) > 0 {
  1592. for iNdEx := len(m.Counters) - 1; iNdEx >= 0; iNdEx-- {
  1593. {
  1594. size, err := m.Counters[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1595. if err != nil {
  1596. return 0, err
  1597. }
  1598. i -= size
  1599. i = encodeVarintBep(dAtA, i, uint64(size))
  1600. }
  1601. i--
  1602. dAtA[i] = 0xa
  1603. }
  1604. }
  1605. return len(dAtA) - i, nil
  1606. }
  1607. func (m *Counter) Marshal() (dAtA []byte, err error) {
  1608. size := m.ProtoSize()
  1609. dAtA = make([]byte, size)
  1610. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1611. if err != nil {
  1612. return nil, err
  1613. }
  1614. return dAtA[:n], nil
  1615. }
  1616. func (m *Counter) MarshalTo(dAtA []byte) (int, error) {
  1617. size := m.ProtoSize()
  1618. return m.MarshalToSizedBuffer(dAtA[:size])
  1619. }
  1620. func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1621. i := len(dAtA)
  1622. _ = i
  1623. var l int
  1624. _ = l
  1625. if m.Value != 0 {
  1626. i = encodeVarintBep(dAtA, i, uint64(m.Value))
  1627. i--
  1628. dAtA[i] = 0x10
  1629. }
  1630. if m.ID != 0 {
  1631. i = encodeVarintBep(dAtA, i, uint64(m.ID))
  1632. i--
  1633. dAtA[i] = 0x8
  1634. }
  1635. return len(dAtA) - i, nil
  1636. }
  1637. func (m *Request) Marshal() (dAtA []byte, err error) {
  1638. size := m.ProtoSize()
  1639. dAtA = make([]byte, size)
  1640. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1641. if err != nil {
  1642. return nil, err
  1643. }
  1644. return dAtA[:n], nil
  1645. }
  1646. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  1647. size := m.ProtoSize()
  1648. return m.MarshalToSizedBuffer(dAtA[:size])
  1649. }
  1650. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1651. i := len(dAtA)
  1652. _ = i
  1653. var l int
  1654. _ = l
  1655. if m.WeakHash != 0 {
  1656. i = encodeVarintBep(dAtA, i, uint64(m.WeakHash))
  1657. i--
  1658. dAtA[i] = 0x40
  1659. }
  1660. if m.FromTemporary {
  1661. i--
  1662. if m.FromTemporary {
  1663. dAtA[i] = 1
  1664. } else {
  1665. dAtA[i] = 0
  1666. }
  1667. i--
  1668. dAtA[i] = 0x38
  1669. }
  1670. if len(m.Hash) > 0 {
  1671. i -= len(m.Hash)
  1672. copy(dAtA[i:], m.Hash)
  1673. i = encodeVarintBep(dAtA, i, uint64(len(m.Hash)))
  1674. i--
  1675. dAtA[i] = 0x32
  1676. }
  1677. if m.Size != 0 {
  1678. i = encodeVarintBep(dAtA, i, uint64(m.Size))
  1679. i--
  1680. dAtA[i] = 0x28
  1681. }
  1682. if m.Offset != 0 {
  1683. i = encodeVarintBep(dAtA, i, uint64(m.Offset))
  1684. i--
  1685. dAtA[i] = 0x20
  1686. }
  1687. if len(m.Name) > 0 {
  1688. i -= len(m.Name)
  1689. copy(dAtA[i:], m.Name)
  1690. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1691. i--
  1692. dAtA[i] = 0x1a
  1693. }
  1694. if len(m.Folder) > 0 {
  1695. i -= len(m.Folder)
  1696. copy(dAtA[i:], m.Folder)
  1697. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1698. i--
  1699. dAtA[i] = 0x12
  1700. }
  1701. if m.ID != 0 {
  1702. i = encodeVarintBep(dAtA, i, uint64(m.ID))
  1703. i--
  1704. dAtA[i] = 0x8
  1705. }
  1706. return len(dAtA) - i, nil
  1707. }
  1708. func (m *Response) Marshal() (dAtA []byte, err error) {
  1709. size := m.ProtoSize()
  1710. dAtA = make([]byte, size)
  1711. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1712. if err != nil {
  1713. return nil, err
  1714. }
  1715. return dAtA[:n], nil
  1716. }
  1717. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  1718. size := m.ProtoSize()
  1719. return m.MarshalToSizedBuffer(dAtA[:size])
  1720. }
  1721. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1722. i := len(dAtA)
  1723. _ = i
  1724. var l int
  1725. _ = l
  1726. if m.Code != 0 {
  1727. i = encodeVarintBep(dAtA, i, uint64(m.Code))
  1728. i--
  1729. dAtA[i] = 0x18
  1730. }
  1731. if len(m.Data) > 0 {
  1732. i -= len(m.Data)
  1733. copy(dAtA[i:], m.Data)
  1734. i = encodeVarintBep(dAtA, i, uint64(len(m.Data)))
  1735. i--
  1736. dAtA[i] = 0x12
  1737. }
  1738. if m.ID != 0 {
  1739. i = encodeVarintBep(dAtA, i, uint64(m.ID))
  1740. i--
  1741. dAtA[i] = 0x8
  1742. }
  1743. return len(dAtA) - i, nil
  1744. }
  1745. func (m *DownloadProgress) Marshal() (dAtA []byte, err error) {
  1746. size := m.ProtoSize()
  1747. dAtA = make([]byte, size)
  1748. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1749. if err != nil {
  1750. return nil, err
  1751. }
  1752. return dAtA[:n], nil
  1753. }
  1754. func (m *DownloadProgress) MarshalTo(dAtA []byte) (int, error) {
  1755. size := m.ProtoSize()
  1756. return m.MarshalToSizedBuffer(dAtA[:size])
  1757. }
  1758. func (m *DownloadProgress) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1759. i := len(dAtA)
  1760. _ = i
  1761. var l int
  1762. _ = l
  1763. if len(m.Updates) > 0 {
  1764. for iNdEx := len(m.Updates) - 1; iNdEx >= 0; iNdEx-- {
  1765. {
  1766. size, err := m.Updates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1767. if err != nil {
  1768. return 0, err
  1769. }
  1770. i -= size
  1771. i = encodeVarintBep(dAtA, i, uint64(size))
  1772. }
  1773. i--
  1774. dAtA[i] = 0x12
  1775. }
  1776. }
  1777. if len(m.Folder) > 0 {
  1778. i -= len(m.Folder)
  1779. copy(dAtA[i:], m.Folder)
  1780. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1781. i--
  1782. dAtA[i] = 0xa
  1783. }
  1784. return len(dAtA) - i, nil
  1785. }
  1786. func (m *FileDownloadProgressUpdate) Marshal() (dAtA []byte, err error) {
  1787. size := m.ProtoSize()
  1788. dAtA = make([]byte, size)
  1789. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1790. if err != nil {
  1791. return nil, err
  1792. }
  1793. return dAtA[:n], nil
  1794. }
  1795. func (m *FileDownloadProgressUpdate) MarshalTo(dAtA []byte) (int, error) {
  1796. size := m.ProtoSize()
  1797. return m.MarshalToSizedBuffer(dAtA[:size])
  1798. }
  1799. func (m *FileDownloadProgressUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1800. i := len(dAtA)
  1801. _ = i
  1802. var l int
  1803. _ = l
  1804. if m.BlockSize != 0 {
  1805. i = encodeVarintBep(dAtA, i, uint64(m.BlockSize))
  1806. i--
  1807. dAtA[i] = 0x28
  1808. }
  1809. if len(m.BlockIndexes) > 0 {
  1810. for iNdEx := len(m.BlockIndexes) - 1; iNdEx >= 0; iNdEx-- {
  1811. i = encodeVarintBep(dAtA, i, uint64(m.BlockIndexes[iNdEx]))
  1812. i--
  1813. dAtA[i] = 0x20
  1814. }
  1815. }
  1816. {
  1817. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  1818. if err != nil {
  1819. return 0, err
  1820. }
  1821. i -= size
  1822. i = encodeVarintBep(dAtA, i, uint64(size))
  1823. }
  1824. i--
  1825. dAtA[i] = 0x1a
  1826. if len(m.Name) > 0 {
  1827. i -= len(m.Name)
  1828. copy(dAtA[i:], m.Name)
  1829. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1830. i--
  1831. dAtA[i] = 0x12
  1832. }
  1833. if m.UpdateType != 0 {
  1834. i = encodeVarintBep(dAtA, i, uint64(m.UpdateType))
  1835. i--
  1836. dAtA[i] = 0x8
  1837. }
  1838. return len(dAtA) - i, nil
  1839. }
  1840. func (m *Ping) Marshal() (dAtA []byte, err error) {
  1841. size := m.ProtoSize()
  1842. dAtA = make([]byte, size)
  1843. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1844. if err != nil {
  1845. return nil, err
  1846. }
  1847. return dAtA[:n], nil
  1848. }
  1849. func (m *Ping) MarshalTo(dAtA []byte) (int, error) {
  1850. size := m.ProtoSize()
  1851. return m.MarshalToSizedBuffer(dAtA[:size])
  1852. }
  1853. func (m *Ping) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1854. i := len(dAtA)
  1855. _ = i
  1856. var l int
  1857. _ = l
  1858. return len(dAtA) - i, nil
  1859. }
  1860. func (m *Close) Marshal() (dAtA []byte, err error) {
  1861. size := m.ProtoSize()
  1862. dAtA = make([]byte, size)
  1863. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1864. if err != nil {
  1865. return nil, err
  1866. }
  1867. return dAtA[:n], nil
  1868. }
  1869. func (m *Close) MarshalTo(dAtA []byte) (int, error) {
  1870. size := m.ProtoSize()
  1871. return m.MarshalToSizedBuffer(dAtA[:size])
  1872. }
  1873. func (m *Close) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1874. i := len(dAtA)
  1875. _ = i
  1876. var l int
  1877. _ = l
  1878. if len(m.Reason) > 0 {
  1879. i -= len(m.Reason)
  1880. copy(dAtA[i:], m.Reason)
  1881. i = encodeVarintBep(dAtA, i, uint64(len(m.Reason)))
  1882. i--
  1883. dAtA[i] = 0xa
  1884. }
  1885. return len(dAtA) - i, nil
  1886. }
  1887. func encodeVarintBep(dAtA []byte, offset int, v uint64) int {
  1888. offset -= sovBep(v)
  1889. base := offset
  1890. for v >= 1<<7 {
  1891. dAtA[offset] = uint8(v&0x7f | 0x80)
  1892. v >>= 7
  1893. offset++
  1894. }
  1895. dAtA[offset] = uint8(v)
  1896. return base
  1897. }
  1898. func (m *Hello) ProtoSize() (n int) {
  1899. if m == nil {
  1900. return 0
  1901. }
  1902. var l int
  1903. _ = l
  1904. l = len(m.DeviceName)
  1905. if l > 0 {
  1906. n += 1 + l + sovBep(uint64(l))
  1907. }
  1908. l = len(m.ClientName)
  1909. if l > 0 {
  1910. n += 1 + l + sovBep(uint64(l))
  1911. }
  1912. l = len(m.ClientVersion)
  1913. if l > 0 {
  1914. n += 1 + l + sovBep(uint64(l))
  1915. }
  1916. return n
  1917. }
  1918. func (m *Header) ProtoSize() (n int) {
  1919. if m == nil {
  1920. return 0
  1921. }
  1922. var l int
  1923. _ = l
  1924. if m.Type != 0 {
  1925. n += 1 + sovBep(uint64(m.Type))
  1926. }
  1927. if m.Compression != 0 {
  1928. n += 1 + sovBep(uint64(m.Compression))
  1929. }
  1930. return n
  1931. }
  1932. func (m *ClusterConfig) ProtoSize() (n int) {
  1933. if m == nil {
  1934. return 0
  1935. }
  1936. var l int
  1937. _ = l
  1938. if len(m.Folders) > 0 {
  1939. for _, e := range m.Folders {
  1940. l = e.ProtoSize()
  1941. n += 1 + l + sovBep(uint64(l))
  1942. }
  1943. }
  1944. return n
  1945. }
  1946. func (m *Folder) ProtoSize() (n int) {
  1947. if m == nil {
  1948. return 0
  1949. }
  1950. var l int
  1951. _ = l
  1952. l = len(m.ID)
  1953. if l > 0 {
  1954. n += 1 + l + sovBep(uint64(l))
  1955. }
  1956. l = len(m.Label)
  1957. if l > 0 {
  1958. n += 1 + l + sovBep(uint64(l))
  1959. }
  1960. if m.ReadOnly {
  1961. n += 2
  1962. }
  1963. if m.IgnorePermissions {
  1964. n += 2
  1965. }
  1966. if m.IgnoreDelete {
  1967. n += 2
  1968. }
  1969. if m.DisableTempIndexes {
  1970. n += 2
  1971. }
  1972. if m.Paused {
  1973. n += 2
  1974. }
  1975. if len(m.Devices) > 0 {
  1976. for _, e := range m.Devices {
  1977. l = e.ProtoSize()
  1978. n += 2 + l + sovBep(uint64(l))
  1979. }
  1980. }
  1981. return n
  1982. }
  1983. func (m *Device) ProtoSize() (n int) {
  1984. if m == nil {
  1985. return 0
  1986. }
  1987. var l int
  1988. _ = l
  1989. l = m.ID.ProtoSize()
  1990. n += 1 + l + sovBep(uint64(l))
  1991. l = len(m.Name)
  1992. if l > 0 {
  1993. n += 1 + l + sovBep(uint64(l))
  1994. }
  1995. if len(m.Addresses) > 0 {
  1996. for _, s := range m.Addresses {
  1997. l = len(s)
  1998. n += 1 + l + sovBep(uint64(l))
  1999. }
  2000. }
  2001. if m.Compression != 0 {
  2002. n += 1 + sovBep(uint64(m.Compression))
  2003. }
  2004. l = len(m.CertName)
  2005. if l > 0 {
  2006. n += 1 + l + sovBep(uint64(l))
  2007. }
  2008. if m.MaxSequence != 0 {
  2009. n += 1 + sovBep(uint64(m.MaxSequence))
  2010. }
  2011. if m.Introducer {
  2012. n += 2
  2013. }
  2014. if m.IndexID != 0 {
  2015. n += 1 + sovBep(uint64(m.IndexID))
  2016. }
  2017. if m.SkipIntroductionRemovals {
  2018. n += 2
  2019. }
  2020. return n
  2021. }
  2022. func (m *Index) ProtoSize() (n int) {
  2023. if m == nil {
  2024. return 0
  2025. }
  2026. var l int
  2027. _ = l
  2028. l = len(m.Folder)
  2029. if l > 0 {
  2030. n += 1 + l + sovBep(uint64(l))
  2031. }
  2032. if len(m.Files) > 0 {
  2033. for _, e := range m.Files {
  2034. l = e.ProtoSize()
  2035. n += 1 + l + sovBep(uint64(l))
  2036. }
  2037. }
  2038. return n
  2039. }
  2040. func (m *IndexUpdate) ProtoSize() (n int) {
  2041. if m == nil {
  2042. return 0
  2043. }
  2044. var l int
  2045. _ = l
  2046. l = len(m.Folder)
  2047. if l > 0 {
  2048. n += 1 + l + sovBep(uint64(l))
  2049. }
  2050. if len(m.Files) > 0 {
  2051. for _, e := range m.Files {
  2052. l = e.ProtoSize()
  2053. n += 1 + l + sovBep(uint64(l))
  2054. }
  2055. }
  2056. return n
  2057. }
  2058. func (m *FileInfo) ProtoSize() (n int) {
  2059. if m == nil {
  2060. return 0
  2061. }
  2062. var l int
  2063. _ = l
  2064. l = len(m.Name)
  2065. if l > 0 {
  2066. n += 1 + l + sovBep(uint64(l))
  2067. }
  2068. if m.Type != 0 {
  2069. n += 1 + sovBep(uint64(m.Type))
  2070. }
  2071. if m.Size != 0 {
  2072. n += 1 + sovBep(uint64(m.Size))
  2073. }
  2074. if m.Permissions != 0 {
  2075. n += 1 + sovBep(uint64(m.Permissions))
  2076. }
  2077. if m.ModifiedS != 0 {
  2078. n += 1 + sovBep(uint64(m.ModifiedS))
  2079. }
  2080. if m.Deleted {
  2081. n += 2
  2082. }
  2083. if m.RawInvalid {
  2084. n += 2
  2085. }
  2086. if m.NoPermissions {
  2087. n += 2
  2088. }
  2089. l = m.Version.ProtoSize()
  2090. n += 1 + l + sovBep(uint64(l))
  2091. if m.Sequence != 0 {
  2092. n += 1 + sovBep(uint64(m.Sequence))
  2093. }
  2094. if m.ModifiedNs != 0 {
  2095. n += 1 + sovBep(uint64(m.ModifiedNs))
  2096. }
  2097. if m.ModifiedBy != 0 {
  2098. n += 1 + sovBep(uint64(m.ModifiedBy))
  2099. }
  2100. if m.RawBlockSize != 0 {
  2101. n += 1 + sovBep(uint64(m.RawBlockSize))
  2102. }
  2103. if len(m.Blocks) > 0 {
  2104. for _, e := range m.Blocks {
  2105. l = e.ProtoSize()
  2106. n += 2 + l + sovBep(uint64(l))
  2107. }
  2108. }
  2109. l = len(m.SymlinkTarget)
  2110. if l > 0 {
  2111. n += 2 + l + sovBep(uint64(l))
  2112. }
  2113. l = len(m.BlocksHash)
  2114. if l > 0 {
  2115. n += 2 + l + sovBep(uint64(l))
  2116. }
  2117. if m.LocalFlags != 0 {
  2118. n += 2 + sovBep(uint64(m.LocalFlags))
  2119. }
  2120. l = len(m.VersionHash)
  2121. if l > 0 {
  2122. n += 2 + l + sovBep(uint64(l))
  2123. }
  2124. return n
  2125. }
  2126. func (m *BlockInfo) ProtoSize() (n int) {
  2127. if m == nil {
  2128. return 0
  2129. }
  2130. var l int
  2131. _ = l
  2132. if m.Offset != 0 {
  2133. n += 1 + sovBep(uint64(m.Offset))
  2134. }
  2135. if m.Size != 0 {
  2136. n += 1 + sovBep(uint64(m.Size))
  2137. }
  2138. l = len(m.Hash)
  2139. if l > 0 {
  2140. n += 1 + l + sovBep(uint64(l))
  2141. }
  2142. if m.WeakHash != 0 {
  2143. n += 1 + sovBep(uint64(m.WeakHash))
  2144. }
  2145. return n
  2146. }
  2147. func (m *Vector) ProtoSize() (n int) {
  2148. if m == nil {
  2149. return 0
  2150. }
  2151. var l int
  2152. _ = l
  2153. if len(m.Counters) > 0 {
  2154. for _, e := range m.Counters {
  2155. l = e.ProtoSize()
  2156. n += 1 + l + sovBep(uint64(l))
  2157. }
  2158. }
  2159. return n
  2160. }
  2161. func (m *Counter) ProtoSize() (n int) {
  2162. if m == nil {
  2163. return 0
  2164. }
  2165. var l int
  2166. _ = l
  2167. if m.ID != 0 {
  2168. n += 1 + sovBep(uint64(m.ID))
  2169. }
  2170. if m.Value != 0 {
  2171. n += 1 + sovBep(uint64(m.Value))
  2172. }
  2173. return n
  2174. }
  2175. func (m *Request) ProtoSize() (n int) {
  2176. if m == nil {
  2177. return 0
  2178. }
  2179. var l int
  2180. _ = l
  2181. if m.ID != 0 {
  2182. n += 1 + sovBep(uint64(m.ID))
  2183. }
  2184. l = len(m.Folder)
  2185. if l > 0 {
  2186. n += 1 + l + sovBep(uint64(l))
  2187. }
  2188. l = len(m.Name)
  2189. if l > 0 {
  2190. n += 1 + l + sovBep(uint64(l))
  2191. }
  2192. if m.Offset != 0 {
  2193. n += 1 + sovBep(uint64(m.Offset))
  2194. }
  2195. if m.Size != 0 {
  2196. n += 1 + sovBep(uint64(m.Size))
  2197. }
  2198. l = len(m.Hash)
  2199. if l > 0 {
  2200. n += 1 + l + sovBep(uint64(l))
  2201. }
  2202. if m.FromTemporary {
  2203. n += 2
  2204. }
  2205. if m.WeakHash != 0 {
  2206. n += 1 + sovBep(uint64(m.WeakHash))
  2207. }
  2208. return n
  2209. }
  2210. func (m *Response) ProtoSize() (n int) {
  2211. if m == nil {
  2212. return 0
  2213. }
  2214. var l int
  2215. _ = l
  2216. if m.ID != 0 {
  2217. n += 1 + sovBep(uint64(m.ID))
  2218. }
  2219. l = len(m.Data)
  2220. if l > 0 {
  2221. n += 1 + l + sovBep(uint64(l))
  2222. }
  2223. if m.Code != 0 {
  2224. n += 1 + sovBep(uint64(m.Code))
  2225. }
  2226. return n
  2227. }
  2228. func (m *DownloadProgress) ProtoSize() (n int) {
  2229. if m == nil {
  2230. return 0
  2231. }
  2232. var l int
  2233. _ = l
  2234. l = len(m.Folder)
  2235. if l > 0 {
  2236. n += 1 + l + sovBep(uint64(l))
  2237. }
  2238. if len(m.Updates) > 0 {
  2239. for _, e := range m.Updates {
  2240. l = e.ProtoSize()
  2241. n += 1 + l + sovBep(uint64(l))
  2242. }
  2243. }
  2244. return n
  2245. }
  2246. func (m *FileDownloadProgressUpdate) ProtoSize() (n int) {
  2247. if m == nil {
  2248. return 0
  2249. }
  2250. var l int
  2251. _ = l
  2252. if m.UpdateType != 0 {
  2253. n += 1 + sovBep(uint64(m.UpdateType))
  2254. }
  2255. l = len(m.Name)
  2256. if l > 0 {
  2257. n += 1 + l + sovBep(uint64(l))
  2258. }
  2259. l = m.Version.ProtoSize()
  2260. n += 1 + l + sovBep(uint64(l))
  2261. if len(m.BlockIndexes) > 0 {
  2262. for _, e := range m.BlockIndexes {
  2263. n += 1 + sovBep(uint64(e))
  2264. }
  2265. }
  2266. if m.BlockSize != 0 {
  2267. n += 1 + sovBep(uint64(m.BlockSize))
  2268. }
  2269. return n
  2270. }
  2271. func (m *Ping) ProtoSize() (n int) {
  2272. if m == nil {
  2273. return 0
  2274. }
  2275. var l int
  2276. _ = l
  2277. return n
  2278. }
  2279. func (m *Close) ProtoSize() (n int) {
  2280. if m == nil {
  2281. return 0
  2282. }
  2283. var l int
  2284. _ = l
  2285. l = len(m.Reason)
  2286. if l > 0 {
  2287. n += 1 + l + sovBep(uint64(l))
  2288. }
  2289. return n
  2290. }
  2291. func sovBep(x uint64) (n int) {
  2292. return (math_bits.Len64(x|1) + 6) / 7
  2293. }
  2294. func sozBep(x uint64) (n int) {
  2295. return sovBep(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2296. }
  2297. func (m *Hello) Unmarshal(dAtA []byte) error {
  2298. l := len(dAtA)
  2299. iNdEx := 0
  2300. for iNdEx < l {
  2301. preIndex := iNdEx
  2302. var wire uint64
  2303. for shift := uint(0); ; shift += 7 {
  2304. if shift >= 64 {
  2305. return ErrIntOverflowBep
  2306. }
  2307. if iNdEx >= l {
  2308. return io.ErrUnexpectedEOF
  2309. }
  2310. b := dAtA[iNdEx]
  2311. iNdEx++
  2312. wire |= uint64(b&0x7F) << shift
  2313. if b < 0x80 {
  2314. break
  2315. }
  2316. }
  2317. fieldNum := int32(wire >> 3)
  2318. wireType := int(wire & 0x7)
  2319. if wireType == 4 {
  2320. return fmt.Errorf("proto: Hello: wiretype end group for non-group")
  2321. }
  2322. if fieldNum <= 0 {
  2323. return fmt.Errorf("proto: Hello: illegal tag %d (wire type %d)", fieldNum, wire)
  2324. }
  2325. switch fieldNum {
  2326. case 1:
  2327. if wireType != 2 {
  2328. return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType)
  2329. }
  2330. var stringLen uint64
  2331. for shift := uint(0); ; shift += 7 {
  2332. if shift >= 64 {
  2333. return ErrIntOverflowBep
  2334. }
  2335. if iNdEx >= l {
  2336. return io.ErrUnexpectedEOF
  2337. }
  2338. b := dAtA[iNdEx]
  2339. iNdEx++
  2340. stringLen |= uint64(b&0x7F) << shift
  2341. if b < 0x80 {
  2342. break
  2343. }
  2344. }
  2345. intStringLen := int(stringLen)
  2346. if intStringLen < 0 {
  2347. return ErrInvalidLengthBep
  2348. }
  2349. postIndex := iNdEx + intStringLen
  2350. if postIndex < 0 {
  2351. return ErrInvalidLengthBep
  2352. }
  2353. if postIndex > l {
  2354. return io.ErrUnexpectedEOF
  2355. }
  2356. m.DeviceName = string(dAtA[iNdEx:postIndex])
  2357. iNdEx = postIndex
  2358. case 2:
  2359. if wireType != 2 {
  2360. return fmt.Errorf("proto: wrong wireType = %d for field ClientName", wireType)
  2361. }
  2362. var stringLen uint64
  2363. for shift := uint(0); ; shift += 7 {
  2364. if shift >= 64 {
  2365. return ErrIntOverflowBep
  2366. }
  2367. if iNdEx >= l {
  2368. return io.ErrUnexpectedEOF
  2369. }
  2370. b := dAtA[iNdEx]
  2371. iNdEx++
  2372. stringLen |= uint64(b&0x7F) << shift
  2373. if b < 0x80 {
  2374. break
  2375. }
  2376. }
  2377. intStringLen := int(stringLen)
  2378. if intStringLen < 0 {
  2379. return ErrInvalidLengthBep
  2380. }
  2381. postIndex := iNdEx + intStringLen
  2382. if postIndex < 0 {
  2383. return ErrInvalidLengthBep
  2384. }
  2385. if postIndex > l {
  2386. return io.ErrUnexpectedEOF
  2387. }
  2388. m.ClientName = string(dAtA[iNdEx:postIndex])
  2389. iNdEx = postIndex
  2390. case 3:
  2391. if wireType != 2 {
  2392. return fmt.Errorf("proto: wrong wireType = %d for field ClientVersion", wireType)
  2393. }
  2394. var stringLen uint64
  2395. for shift := uint(0); ; shift += 7 {
  2396. if shift >= 64 {
  2397. return ErrIntOverflowBep
  2398. }
  2399. if iNdEx >= l {
  2400. return io.ErrUnexpectedEOF
  2401. }
  2402. b := dAtA[iNdEx]
  2403. iNdEx++
  2404. stringLen |= uint64(b&0x7F) << shift
  2405. if b < 0x80 {
  2406. break
  2407. }
  2408. }
  2409. intStringLen := int(stringLen)
  2410. if intStringLen < 0 {
  2411. return ErrInvalidLengthBep
  2412. }
  2413. postIndex := iNdEx + intStringLen
  2414. if postIndex < 0 {
  2415. return ErrInvalidLengthBep
  2416. }
  2417. if postIndex > l {
  2418. return io.ErrUnexpectedEOF
  2419. }
  2420. m.ClientVersion = string(dAtA[iNdEx:postIndex])
  2421. iNdEx = postIndex
  2422. default:
  2423. iNdEx = preIndex
  2424. skippy, err := skipBep(dAtA[iNdEx:])
  2425. if err != nil {
  2426. return err
  2427. }
  2428. if skippy < 0 {
  2429. return ErrInvalidLengthBep
  2430. }
  2431. if (iNdEx + skippy) < 0 {
  2432. return ErrInvalidLengthBep
  2433. }
  2434. if (iNdEx + skippy) > l {
  2435. return io.ErrUnexpectedEOF
  2436. }
  2437. iNdEx += skippy
  2438. }
  2439. }
  2440. if iNdEx > l {
  2441. return io.ErrUnexpectedEOF
  2442. }
  2443. return nil
  2444. }
  2445. func (m *Header) Unmarshal(dAtA []byte) error {
  2446. l := len(dAtA)
  2447. iNdEx := 0
  2448. for iNdEx < l {
  2449. preIndex := iNdEx
  2450. var wire uint64
  2451. for shift := uint(0); ; shift += 7 {
  2452. if shift >= 64 {
  2453. return ErrIntOverflowBep
  2454. }
  2455. if iNdEx >= l {
  2456. return io.ErrUnexpectedEOF
  2457. }
  2458. b := dAtA[iNdEx]
  2459. iNdEx++
  2460. wire |= uint64(b&0x7F) << shift
  2461. if b < 0x80 {
  2462. break
  2463. }
  2464. }
  2465. fieldNum := int32(wire >> 3)
  2466. wireType := int(wire & 0x7)
  2467. if wireType == 4 {
  2468. return fmt.Errorf("proto: Header: wiretype end group for non-group")
  2469. }
  2470. if fieldNum <= 0 {
  2471. return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire)
  2472. }
  2473. switch fieldNum {
  2474. case 1:
  2475. if wireType != 0 {
  2476. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2477. }
  2478. m.Type = 0
  2479. for shift := uint(0); ; shift += 7 {
  2480. if shift >= 64 {
  2481. return ErrIntOverflowBep
  2482. }
  2483. if iNdEx >= l {
  2484. return io.ErrUnexpectedEOF
  2485. }
  2486. b := dAtA[iNdEx]
  2487. iNdEx++
  2488. m.Type |= MessageType(b&0x7F) << shift
  2489. if b < 0x80 {
  2490. break
  2491. }
  2492. }
  2493. case 2:
  2494. if wireType != 0 {
  2495. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  2496. }
  2497. m.Compression = 0
  2498. for shift := uint(0); ; shift += 7 {
  2499. if shift >= 64 {
  2500. return ErrIntOverflowBep
  2501. }
  2502. if iNdEx >= l {
  2503. return io.ErrUnexpectedEOF
  2504. }
  2505. b := dAtA[iNdEx]
  2506. iNdEx++
  2507. m.Compression |= MessageCompression(b&0x7F) << shift
  2508. if b < 0x80 {
  2509. break
  2510. }
  2511. }
  2512. default:
  2513. iNdEx = preIndex
  2514. skippy, err := skipBep(dAtA[iNdEx:])
  2515. if err != nil {
  2516. return err
  2517. }
  2518. if skippy < 0 {
  2519. return ErrInvalidLengthBep
  2520. }
  2521. if (iNdEx + skippy) < 0 {
  2522. return ErrInvalidLengthBep
  2523. }
  2524. if (iNdEx + skippy) > l {
  2525. return io.ErrUnexpectedEOF
  2526. }
  2527. iNdEx += skippy
  2528. }
  2529. }
  2530. if iNdEx > l {
  2531. return io.ErrUnexpectedEOF
  2532. }
  2533. return nil
  2534. }
  2535. func (m *ClusterConfig) Unmarshal(dAtA []byte) error {
  2536. l := len(dAtA)
  2537. iNdEx := 0
  2538. for iNdEx < l {
  2539. preIndex := iNdEx
  2540. var wire uint64
  2541. for shift := uint(0); ; shift += 7 {
  2542. if shift >= 64 {
  2543. return ErrIntOverflowBep
  2544. }
  2545. if iNdEx >= l {
  2546. return io.ErrUnexpectedEOF
  2547. }
  2548. b := dAtA[iNdEx]
  2549. iNdEx++
  2550. wire |= uint64(b&0x7F) << shift
  2551. if b < 0x80 {
  2552. break
  2553. }
  2554. }
  2555. fieldNum := int32(wire >> 3)
  2556. wireType := int(wire & 0x7)
  2557. if wireType == 4 {
  2558. return fmt.Errorf("proto: ClusterConfig: wiretype end group for non-group")
  2559. }
  2560. if fieldNum <= 0 {
  2561. return fmt.Errorf("proto: ClusterConfig: illegal tag %d (wire type %d)", fieldNum, wire)
  2562. }
  2563. switch fieldNum {
  2564. case 1:
  2565. if wireType != 2 {
  2566. return fmt.Errorf("proto: wrong wireType = %d for field Folders", wireType)
  2567. }
  2568. var msglen int
  2569. for shift := uint(0); ; shift += 7 {
  2570. if shift >= 64 {
  2571. return ErrIntOverflowBep
  2572. }
  2573. if iNdEx >= l {
  2574. return io.ErrUnexpectedEOF
  2575. }
  2576. b := dAtA[iNdEx]
  2577. iNdEx++
  2578. msglen |= int(b&0x7F) << shift
  2579. if b < 0x80 {
  2580. break
  2581. }
  2582. }
  2583. if msglen < 0 {
  2584. return ErrInvalidLengthBep
  2585. }
  2586. postIndex := iNdEx + msglen
  2587. if postIndex < 0 {
  2588. return ErrInvalidLengthBep
  2589. }
  2590. if postIndex > l {
  2591. return io.ErrUnexpectedEOF
  2592. }
  2593. m.Folders = append(m.Folders, Folder{})
  2594. if err := m.Folders[len(m.Folders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2595. return err
  2596. }
  2597. iNdEx = postIndex
  2598. default:
  2599. iNdEx = preIndex
  2600. skippy, err := skipBep(dAtA[iNdEx:])
  2601. if err != nil {
  2602. return err
  2603. }
  2604. if skippy < 0 {
  2605. return ErrInvalidLengthBep
  2606. }
  2607. if (iNdEx + skippy) < 0 {
  2608. return ErrInvalidLengthBep
  2609. }
  2610. if (iNdEx + skippy) > l {
  2611. return io.ErrUnexpectedEOF
  2612. }
  2613. iNdEx += skippy
  2614. }
  2615. }
  2616. if iNdEx > l {
  2617. return io.ErrUnexpectedEOF
  2618. }
  2619. return nil
  2620. }
  2621. func (m *Folder) Unmarshal(dAtA []byte) error {
  2622. l := len(dAtA)
  2623. iNdEx := 0
  2624. for iNdEx < l {
  2625. preIndex := iNdEx
  2626. var wire uint64
  2627. for shift := uint(0); ; shift += 7 {
  2628. if shift >= 64 {
  2629. return ErrIntOverflowBep
  2630. }
  2631. if iNdEx >= l {
  2632. return io.ErrUnexpectedEOF
  2633. }
  2634. b := dAtA[iNdEx]
  2635. iNdEx++
  2636. wire |= uint64(b&0x7F) << shift
  2637. if b < 0x80 {
  2638. break
  2639. }
  2640. }
  2641. fieldNum := int32(wire >> 3)
  2642. wireType := int(wire & 0x7)
  2643. if wireType == 4 {
  2644. return fmt.Errorf("proto: Folder: wiretype end group for non-group")
  2645. }
  2646. if fieldNum <= 0 {
  2647. return fmt.Errorf("proto: Folder: illegal tag %d (wire type %d)", fieldNum, wire)
  2648. }
  2649. switch fieldNum {
  2650. case 1:
  2651. if wireType != 2 {
  2652. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2653. }
  2654. var stringLen uint64
  2655. for shift := uint(0); ; shift += 7 {
  2656. if shift >= 64 {
  2657. return ErrIntOverflowBep
  2658. }
  2659. if iNdEx >= l {
  2660. return io.ErrUnexpectedEOF
  2661. }
  2662. b := dAtA[iNdEx]
  2663. iNdEx++
  2664. stringLen |= uint64(b&0x7F) << shift
  2665. if b < 0x80 {
  2666. break
  2667. }
  2668. }
  2669. intStringLen := int(stringLen)
  2670. if intStringLen < 0 {
  2671. return ErrInvalidLengthBep
  2672. }
  2673. postIndex := iNdEx + intStringLen
  2674. if postIndex < 0 {
  2675. return ErrInvalidLengthBep
  2676. }
  2677. if postIndex > l {
  2678. return io.ErrUnexpectedEOF
  2679. }
  2680. m.ID = string(dAtA[iNdEx:postIndex])
  2681. iNdEx = postIndex
  2682. case 2:
  2683. if wireType != 2 {
  2684. return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
  2685. }
  2686. var stringLen uint64
  2687. for shift := uint(0); ; shift += 7 {
  2688. if shift >= 64 {
  2689. return ErrIntOverflowBep
  2690. }
  2691. if iNdEx >= l {
  2692. return io.ErrUnexpectedEOF
  2693. }
  2694. b := dAtA[iNdEx]
  2695. iNdEx++
  2696. stringLen |= uint64(b&0x7F) << shift
  2697. if b < 0x80 {
  2698. break
  2699. }
  2700. }
  2701. intStringLen := int(stringLen)
  2702. if intStringLen < 0 {
  2703. return ErrInvalidLengthBep
  2704. }
  2705. postIndex := iNdEx + intStringLen
  2706. if postIndex < 0 {
  2707. return ErrInvalidLengthBep
  2708. }
  2709. if postIndex > l {
  2710. return io.ErrUnexpectedEOF
  2711. }
  2712. m.Label = string(dAtA[iNdEx:postIndex])
  2713. iNdEx = postIndex
  2714. case 3:
  2715. if wireType != 0 {
  2716. return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
  2717. }
  2718. var v int
  2719. for shift := uint(0); ; shift += 7 {
  2720. if shift >= 64 {
  2721. return ErrIntOverflowBep
  2722. }
  2723. if iNdEx >= l {
  2724. return io.ErrUnexpectedEOF
  2725. }
  2726. b := dAtA[iNdEx]
  2727. iNdEx++
  2728. v |= int(b&0x7F) << shift
  2729. if b < 0x80 {
  2730. break
  2731. }
  2732. }
  2733. m.ReadOnly = bool(v != 0)
  2734. case 4:
  2735. if wireType != 0 {
  2736. return fmt.Errorf("proto: wrong wireType = %d for field IgnorePermissions", wireType)
  2737. }
  2738. var v int
  2739. for shift := uint(0); ; shift += 7 {
  2740. if shift >= 64 {
  2741. return ErrIntOverflowBep
  2742. }
  2743. if iNdEx >= l {
  2744. return io.ErrUnexpectedEOF
  2745. }
  2746. b := dAtA[iNdEx]
  2747. iNdEx++
  2748. v |= int(b&0x7F) << shift
  2749. if b < 0x80 {
  2750. break
  2751. }
  2752. }
  2753. m.IgnorePermissions = bool(v != 0)
  2754. case 5:
  2755. if wireType != 0 {
  2756. return fmt.Errorf("proto: wrong wireType = %d for field IgnoreDelete", wireType)
  2757. }
  2758. var v int
  2759. for shift := uint(0); ; shift += 7 {
  2760. if shift >= 64 {
  2761. return ErrIntOverflowBep
  2762. }
  2763. if iNdEx >= l {
  2764. return io.ErrUnexpectedEOF
  2765. }
  2766. b := dAtA[iNdEx]
  2767. iNdEx++
  2768. v |= int(b&0x7F) << shift
  2769. if b < 0x80 {
  2770. break
  2771. }
  2772. }
  2773. m.IgnoreDelete = bool(v != 0)
  2774. case 6:
  2775. if wireType != 0 {
  2776. return fmt.Errorf("proto: wrong wireType = %d for field DisableTempIndexes", wireType)
  2777. }
  2778. var v int
  2779. for shift := uint(0); ; shift += 7 {
  2780. if shift >= 64 {
  2781. return ErrIntOverflowBep
  2782. }
  2783. if iNdEx >= l {
  2784. return io.ErrUnexpectedEOF
  2785. }
  2786. b := dAtA[iNdEx]
  2787. iNdEx++
  2788. v |= int(b&0x7F) << shift
  2789. if b < 0x80 {
  2790. break
  2791. }
  2792. }
  2793. m.DisableTempIndexes = bool(v != 0)
  2794. case 7:
  2795. if wireType != 0 {
  2796. return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
  2797. }
  2798. var v int
  2799. for shift := uint(0); ; shift += 7 {
  2800. if shift >= 64 {
  2801. return ErrIntOverflowBep
  2802. }
  2803. if iNdEx >= l {
  2804. return io.ErrUnexpectedEOF
  2805. }
  2806. b := dAtA[iNdEx]
  2807. iNdEx++
  2808. v |= int(b&0x7F) << shift
  2809. if b < 0x80 {
  2810. break
  2811. }
  2812. }
  2813. m.Paused = bool(v != 0)
  2814. case 16:
  2815. if wireType != 2 {
  2816. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  2817. }
  2818. var msglen int
  2819. for shift := uint(0); ; shift += 7 {
  2820. if shift >= 64 {
  2821. return ErrIntOverflowBep
  2822. }
  2823. if iNdEx >= l {
  2824. return io.ErrUnexpectedEOF
  2825. }
  2826. b := dAtA[iNdEx]
  2827. iNdEx++
  2828. msglen |= int(b&0x7F) << shift
  2829. if b < 0x80 {
  2830. break
  2831. }
  2832. }
  2833. if msglen < 0 {
  2834. return ErrInvalidLengthBep
  2835. }
  2836. postIndex := iNdEx + msglen
  2837. if postIndex < 0 {
  2838. return ErrInvalidLengthBep
  2839. }
  2840. if postIndex > l {
  2841. return io.ErrUnexpectedEOF
  2842. }
  2843. m.Devices = append(m.Devices, Device{})
  2844. if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2845. return err
  2846. }
  2847. iNdEx = postIndex
  2848. default:
  2849. iNdEx = preIndex
  2850. skippy, err := skipBep(dAtA[iNdEx:])
  2851. if err != nil {
  2852. return err
  2853. }
  2854. if skippy < 0 {
  2855. return ErrInvalidLengthBep
  2856. }
  2857. if (iNdEx + skippy) < 0 {
  2858. return ErrInvalidLengthBep
  2859. }
  2860. if (iNdEx + skippy) > l {
  2861. return io.ErrUnexpectedEOF
  2862. }
  2863. iNdEx += skippy
  2864. }
  2865. }
  2866. if iNdEx > l {
  2867. return io.ErrUnexpectedEOF
  2868. }
  2869. return nil
  2870. }
  2871. func (m *Device) Unmarshal(dAtA []byte) error {
  2872. l := len(dAtA)
  2873. iNdEx := 0
  2874. for iNdEx < l {
  2875. preIndex := iNdEx
  2876. var wire uint64
  2877. for shift := uint(0); ; shift += 7 {
  2878. if shift >= 64 {
  2879. return ErrIntOverflowBep
  2880. }
  2881. if iNdEx >= l {
  2882. return io.ErrUnexpectedEOF
  2883. }
  2884. b := dAtA[iNdEx]
  2885. iNdEx++
  2886. wire |= uint64(b&0x7F) << shift
  2887. if b < 0x80 {
  2888. break
  2889. }
  2890. }
  2891. fieldNum := int32(wire >> 3)
  2892. wireType := int(wire & 0x7)
  2893. if wireType == 4 {
  2894. return fmt.Errorf("proto: Device: wiretype end group for non-group")
  2895. }
  2896. if fieldNum <= 0 {
  2897. return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
  2898. }
  2899. switch fieldNum {
  2900. case 1:
  2901. if wireType != 2 {
  2902. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2903. }
  2904. var byteLen int
  2905. for shift := uint(0); ; shift += 7 {
  2906. if shift >= 64 {
  2907. return ErrIntOverflowBep
  2908. }
  2909. if iNdEx >= l {
  2910. return io.ErrUnexpectedEOF
  2911. }
  2912. b := dAtA[iNdEx]
  2913. iNdEx++
  2914. byteLen |= int(b&0x7F) << shift
  2915. if b < 0x80 {
  2916. break
  2917. }
  2918. }
  2919. if byteLen < 0 {
  2920. return ErrInvalidLengthBep
  2921. }
  2922. postIndex := iNdEx + byteLen
  2923. if postIndex < 0 {
  2924. return ErrInvalidLengthBep
  2925. }
  2926. if postIndex > l {
  2927. return io.ErrUnexpectedEOF
  2928. }
  2929. if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2930. return err
  2931. }
  2932. iNdEx = postIndex
  2933. case 2:
  2934. if wireType != 2 {
  2935. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2936. }
  2937. var stringLen uint64
  2938. for shift := uint(0); ; shift += 7 {
  2939. if shift >= 64 {
  2940. return ErrIntOverflowBep
  2941. }
  2942. if iNdEx >= l {
  2943. return io.ErrUnexpectedEOF
  2944. }
  2945. b := dAtA[iNdEx]
  2946. iNdEx++
  2947. stringLen |= uint64(b&0x7F) << shift
  2948. if b < 0x80 {
  2949. break
  2950. }
  2951. }
  2952. intStringLen := int(stringLen)
  2953. if intStringLen < 0 {
  2954. return ErrInvalidLengthBep
  2955. }
  2956. postIndex := iNdEx + intStringLen
  2957. if postIndex < 0 {
  2958. return ErrInvalidLengthBep
  2959. }
  2960. if postIndex > l {
  2961. return io.ErrUnexpectedEOF
  2962. }
  2963. m.Name = string(dAtA[iNdEx:postIndex])
  2964. iNdEx = postIndex
  2965. case 3:
  2966. if wireType != 2 {
  2967. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  2968. }
  2969. var stringLen uint64
  2970. for shift := uint(0); ; shift += 7 {
  2971. if shift >= 64 {
  2972. return ErrIntOverflowBep
  2973. }
  2974. if iNdEx >= l {
  2975. return io.ErrUnexpectedEOF
  2976. }
  2977. b := dAtA[iNdEx]
  2978. iNdEx++
  2979. stringLen |= uint64(b&0x7F) << shift
  2980. if b < 0x80 {
  2981. break
  2982. }
  2983. }
  2984. intStringLen := int(stringLen)
  2985. if intStringLen < 0 {
  2986. return ErrInvalidLengthBep
  2987. }
  2988. postIndex := iNdEx + intStringLen
  2989. if postIndex < 0 {
  2990. return ErrInvalidLengthBep
  2991. }
  2992. if postIndex > l {
  2993. return io.ErrUnexpectedEOF
  2994. }
  2995. m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
  2996. iNdEx = postIndex
  2997. case 4:
  2998. if wireType != 0 {
  2999. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  3000. }
  3001. m.Compression = 0
  3002. for shift := uint(0); ; shift += 7 {
  3003. if shift >= 64 {
  3004. return ErrIntOverflowBep
  3005. }
  3006. if iNdEx >= l {
  3007. return io.ErrUnexpectedEOF
  3008. }
  3009. b := dAtA[iNdEx]
  3010. iNdEx++
  3011. m.Compression |= Compression(b&0x7F) << shift
  3012. if b < 0x80 {
  3013. break
  3014. }
  3015. }
  3016. case 5:
  3017. if wireType != 2 {
  3018. return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType)
  3019. }
  3020. var stringLen uint64
  3021. for shift := uint(0); ; shift += 7 {
  3022. if shift >= 64 {
  3023. return ErrIntOverflowBep
  3024. }
  3025. if iNdEx >= l {
  3026. return io.ErrUnexpectedEOF
  3027. }
  3028. b := dAtA[iNdEx]
  3029. iNdEx++
  3030. stringLen |= uint64(b&0x7F) << shift
  3031. if b < 0x80 {
  3032. break
  3033. }
  3034. }
  3035. intStringLen := int(stringLen)
  3036. if intStringLen < 0 {
  3037. return ErrInvalidLengthBep
  3038. }
  3039. postIndex := iNdEx + intStringLen
  3040. if postIndex < 0 {
  3041. return ErrInvalidLengthBep
  3042. }
  3043. if postIndex > l {
  3044. return io.ErrUnexpectedEOF
  3045. }
  3046. m.CertName = string(dAtA[iNdEx:postIndex])
  3047. iNdEx = postIndex
  3048. case 6:
  3049. if wireType != 0 {
  3050. return fmt.Errorf("proto: wrong wireType = %d for field MaxSequence", wireType)
  3051. }
  3052. m.MaxSequence = 0
  3053. for shift := uint(0); ; shift += 7 {
  3054. if shift >= 64 {
  3055. return ErrIntOverflowBep
  3056. }
  3057. if iNdEx >= l {
  3058. return io.ErrUnexpectedEOF
  3059. }
  3060. b := dAtA[iNdEx]
  3061. iNdEx++
  3062. m.MaxSequence |= int64(b&0x7F) << shift
  3063. if b < 0x80 {
  3064. break
  3065. }
  3066. }
  3067. case 7:
  3068. if wireType != 0 {
  3069. return fmt.Errorf("proto: wrong wireType = %d for field Introducer", wireType)
  3070. }
  3071. var v int
  3072. for shift := uint(0); ; shift += 7 {
  3073. if shift >= 64 {
  3074. return ErrIntOverflowBep
  3075. }
  3076. if iNdEx >= l {
  3077. return io.ErrUnexpectedEOF
  3078. }
  3079. b := dAtA[iNdEx]
  3080. iNdEx++
  3081. v |= int(b&0x7F) << shift
  3082. if b < 0x80 {
  3083. break
  3084. }
  3085. }
  3086. m.Introducer = bool(v != 0)
  3087. case 8:
  3088. if wireType != 0 {
  3089. return fmt.Errorf("proto: wrong wireType = %d for field IndexID", wireType)
  3090. }
  3091. m.IndexID = 0
  3092. for shift := uint(0); ; shift += 7 {
  3093. if shift >= 64 {
  3094. return ErrIntOverflowBep
  3095. }
  3096. if iNdEx >= l {
  3097. return io.ErrUnexpectedEOF
  3098. }
  3099. b := dAtA[iNdEx]
  3100. iNdEx++
  3101. m.IndexID |= IndexID(b&0x7F) << shift
  3102. if b < 0x80 {
  3103. break
  3104. }
  3105. }
  3106. case 9:
  3107. if wireType != 0 {
  3108. return fmt.Errorf("proto: wrong wireType = %d for field SkipIntroductionRemovals", wireType)
  3109. }
  3110. var v int
  3111. for shift := uint(0); ; shift += 7 {
  3112. if shift >= 64 {
  3113. return ErrIntOverflowBep
  3114. }
  3115. if iNdEx >= l {
  3116. return io.ErrUnexpectedEOF
  3117. }
  3118. b := dAtA[iNdEx]
  3119. iNdEx++
  3120. v |= int(b&0x7F) << shift
  3121. if b < 0x80 {
  3122. break
  3123. }
  3124. }
  3125. m.SkipIntroductionRemovals = bool(v != 0)
  3126. default:
  3127. iNdEx = preIndex
  3128. skippy, err := skipBep(dAtA[iNdEx:])
  3129. if err != nil {
  3130. return err
  3131. }
  3132. if skippy < 0 {
  3133. return ErrInvalidLengthBep
  3134. }
  3135. if (iNdEx + skippy) < 0 {
  3136. return ErrInvalidLengthBep
  3137. }
  3138. if (iNdEx + skippy) > l {
  3139. return io.ErrUnexpectedEOF
  3140. }
  3141. iNdEx += skippy
  3142. }
  3143. }
  3144. if iNdEx > l {
  3145. return io.ErrUnexpectedEOF
  3146. }
  3147. return nil
  3148. }
  3149. func (m *Index) Unmarshal(dAtA []byte) error {
  3150. l := len(dAtA)
  3151. iNdEx := 0
  3152. for iNdEx < l {
  3153. preIndex := iNdEx
  3154. var wire uint64
  3155. for shift := uint(0); ; shift += 7 {
  3156. if shift >= 64 {
  3157. return ErrIntOverflowBep
  3158. }
  3159. if iNdEx >= l {
  3160. return io.ErrUnexpectedEOF
  3161. }
  3162. b := dAtA[iNdEx]
  3163. iNdEx++
  3164. wire |= uint64(b&0x7F) << shift
  3165. if b < 0x80 {
  3166. break
  3167. }
  3168. }
  3169. fieldNum := int32(wire >> 3)
  3170. wireType := int(wire & 0x7)
  3171. if wireType == 4 {
  3172. return fmt.Errorf("proto: Index: wiretype end group for non-group")
  3173. }
  3174. if fieldNum <= 0 {
  3175. return fmt.Errorf("proto: Index: illegal tag %d (wire type %d)", fieldNum, wire)
  3176. }
  3177. switch fieldNum {
  3178. case 1:
  3179. if wireType != 2 {
  3180. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3181. }
  3182. var stringLen uint64
  3183. for shift := uint(0); ; shift += 7 {
  3184. if shift >= 64 {
  3185. return ErrIntOverflowBep
  3186. }
  3187. if iNdEx >= l {
  3188. return io.ErrUnexpectedEOF
  3189. }
  3190. b := dAtA[iNdEx]
  3191. iNdEx++
  3192. stringLen |= uint64(b&0x7F) << shift
  3193. if b < 0x80 {
  3194. break
  3195. }
  3196. }
  3197. intStringLen := int(stringLen)
  3198. if intStringLen < 0 {
  3199. return ErrInvalidLengthBep
  3200. }
  3201. postIndex := iNdEx + intStringLen
  3202. if postIndex < 0 {
  3203. return ErrInvalidLengthBep
  3204. }
  3205. if postIndex > l {
  3206. return io.ErrUnexpectedEOF
  3207. }
  3208. m.Folder = string(dAtA[iNdEx:postIndex])
  3209. iNdEx = postIndex
  3210. case 2:
  3211. if wireType != 2 {
  3212. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  3213. }
  3214. var msglen int
  3215. for shift := uint(0); ; shift += 7 {
  3216. if shift >= 64 {
  3217. return ErrIntOverflowBep
  3218. }
  3219. if iNdEx >= l {
  3220. return io.ErrUnexpectedEOF
  3221. }
  3222. b := dAtA[iNdEx]
  3223. iNdEx++
  3224. msglen |= int(b&0x7F) << shift
  3225. if b < 0x80 {
  3226. break
  3227. }
  3228. }
  3229. if msglen < 0 {
  3230. return ErrInvalidLengthBep
  3231. }
  3232. postIndex := iNdEx + msglen
  3233. if postIndex < 0 {
  3234. return ErrInvalidLengthBep
  3235. }
  3236. if postIndex > l {
  3237. return io.ErrUnexpectedEOF
  3238. }
  3239. m.Files = append(m.Files, FileInfo{})
  3240. if err := m.Files[len(m.Files)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3241. return err
  3242. }
  3243. iNdEx = postIndex
  3244. default:
  3245. iNdEx = preIndex
  3246. skippy, err := skipBep(dAtA[iNdEx:])
  3247. if err != nil {
  3248. return err
  3249. }
  3250. if skippy < 0 {
  3251. return ErrInvalidLengthBep
  3252. }
  3253. if (iNdEx + skippy) < 0 {
  3254. return ErrInvalidLengthBep
  3255. }
  3256. if (iNdEx + skippy) > l {
  3257. return io.ErrUnexpectedEOF
  3258. }
  3259. iNdEx += skippy
  3260. }
  3261. }
  3262. if iNdEx > l {
  3263. return io.ErrUnexpectedEOF
  3264. }
  3265. return nil
  3266. }
  3267. func (m *IndexUpdate) Unmarshal(dAtA []byte) error {
  3268. l := len(dAtA)
  3269. iNdEx := 0
  3270. for iNdEx < l {
  3271. preIndex := iNdEx
  3272. var wire uint64
  3273. for shift := uint(0); ; shift += 7 {
  3274. if shift >= 64 {
  3275. return ErrIntOverflowBep
  3276. }
  3277. if iNdEx >= l {
  3278. return io.ErrUnexpectedEOF
  3279. }
  3280. b := dAtA[iNdEx]
  3281. iNdEx++
  3282. wire |= uint64(b&0x7F) << shift
  3283. if b < 0x80 {
  3284. break
  3285. }
  3286. }
  3287. fieldNum := int32(wire >> 3)
  3288. wireType := int(wire & 0x7)
  3289. if wireType == 4 {
  3290. return fmt.Errorf("proto: IndexUpdate: wiretype end group for non-group")
  3291. }
  3292. if fieldNum <= 0 {
  3293. return fmt.Errorf("proto: IndexUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  3294. }
  3295. switch fieldNum {
  3296. case 1:
  3297. if wireType != 2 {
  3298. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3299. }
  3300. var stringLen uint64
  3301. for shift := uint(0); ; shift += 7 {
  3302. if shift >= 64 {
  3303. return ErrIntOverflowBep
  3304. }
  3305. if iNdEx >= l {
  3306. return io.ErrUnexpectedEOF
  3307. }
  3308. b := dAtA[iNdEx]
  3309. iNdEx++
  3310. stringLen |= uint64(b&0x7F) << shift
  3311. if b < 0x80 {
  3312. break
  3313. }
  3314. }
  3315. intStringLen := int(stringLen)
  3316. if intStringLen < 0 {
  3317. return ErrInvalidLengthBep
  3318. }
  3319. postIndex := iNdEx + intStringLen
  3320. if postIndex < 0 {
  3321. return ErrInvalidLengthBep
  3322. }
  3323. if postIndex > l {
  3324. return io.ErrUnexpectedEOF
  3325. }
  3326. m.Folder = string(dAtA[iNdEx:postIndex])
  3327. iNdEx = postIndex
  3328. case 2:
  3329. if wireType != 2 {
  3330. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  3331. }
  3332. var msglen int
  3333. for shift := uint(0); ; shift += 7 {
  3334. if shift >= 64 {
  3335. return ErrIntOverflowBep
  3336. }
  3337. if iNdEx >= l {
  3338. return io.ErrUnexpectedEOF
  3339. }
  3340. b := dAtA[iNdEx]
  3341. iNdEx++
  3342. msglen |= int(b&0x7F) << shift
  3343. if b < 0x80 {
  3344. break
  3345. }
  3346. }
  3347. if msglen < 0 {
  3348. return ErrInvalidLengthBep
  3349. }
  3350. postIndex := iNdEx + msglen
  3351. if postIndex < 0 {
  3352. return ErrInvalidLengthBep
  3353. }
  3354. if postIndex > l {
  3355. return io.ErrUnexpectedEOF
  3356. }
  3357. m.Files = append(m.Files, FileInfo{})
  3358. if err := m.Files[len(m.Files)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3359. return err
  3360. }
  3361. iNdEx = postIndex
  3362. default:
  3363. iNdEx = preIndex
  3364. skippy, err := skipBep(dAtA[iNdEx:])
  3365. if err != nil {
  3366. return err
  3367. }
  3368. if skippy < 0 {
  3369. return ErrInvalidLengthBep
  3370. }
  3371. if (iNdEx + skippy) < 0 {
  3372. return ErrInvalidLengthBep
  3373. }
  3374. if (iNdEx + skippy) > l {
  3375. return io.ErrUnexpectedEOF
  3376. }
  3377. iNdEx += skippy
  3378. }
  3379. }
  3380. if iNdEx > l {
  3381. return io.ErrUnexpectedEOF
  3382. }
  3383. return nil
  3384. }
  3385. func (m *FileInfo) Unmarshal(dAtA []byte) error {
  3386. l := len(dAtA)
  3387. iNdEx := 0
  3388. for iNdEx < l {
  3389. preIndex := iNdEx
  3390. var wire uint64
  3391. for shift := uint(0); ; shift += 7 {
  3392. if shift >= 64 {
  3393. return ErrIntOverflowBep
  3394. }
  3395. if iNdEx >= l {
  3396. return io.ErrUnexpectedEOF
  3397. }
  3398. b := dAtA[iNdEx]
  3399. iNdEx++
  3400. wire |= uint64(b&0x7F) << shift
  3401. if b < 0x80 {
  3402. break
  3403. }
  3404. }
  3405. fieldNum := int32(wire >> 3)
  3406. wireType := int(wire & 0x7)
  3407. if wireType == 4 {
  3408. return fmt.Errorf("proto: FileInfo: wiretype end group for non-group")
  3409. }
  3410. if fieldNum <= 0 {
  3411. return fmt.Errorf("proto: FileInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  3412. }
  3413. switch fieldNum {
  3414. case 1:
  3415. if wireType != 2 {
  3416. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3417. }
  3418. var stringLen uint64
  3419. for shift := uint(0); ; shift += 7 {
  3420. if shift >= 64 {
  3421. return ErrIntOverflowBep
  3422. }
  3423. if iNdEx >= l {
  3424. return io.ErrUnexpectedEOF
  3425. }
  3426. b := dAtA[iNdEx]
  3427. iNdEx++
  3428. stringLen |= uint64(b&0x7F) << shift
  3429. if b < 0x80 {
  3430. break
  3431. }
  3432. }
  3433. intStringLen := int(stringLen)
  3434. if intStringLen < 0 {
  3435. return ErrInvalidLengthBep
  3436. }
  3437. postIndex := iNdEx + intStringLen
  3438. if postIndex < 0 {
  3439. return ErrInvalidLengthBep
  3440. }
  3441. if postIndex > l {
  3442. return io.ErrUnexpectedEOF
  3443. }
  3444. m.Name = string(dAtA[iNdEx:postIndex])
  3445. iNdEx = postIndex
  3446. case 2:
  3447. if wireType != 0 {
  3448. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  3449. }
  3450. m.Type = 0
  3451. for shift := uint(0); ; shift += 7 {
  3452. if shift >= 64 {
  3453. return ErrIntOverflowBep
  3454. }
  3455. if iNdEx >= l {
  3456. return io.ErrUnexpectedEOF
  3457. }
  3458. b := dAtA[iNdEx]
  3459. iNdEx++
  3460. m.Type |= FileInfoType(b&0x7F) << shift
  3461. if b < 0x80 {
  3462. break
  3463. }
  3464. }
  3465. case 3:
  3466. if wireType != 0 {
  3467. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  3468. }
  3469. m.Size = 0
  3470. for shift := uint(0); ; shift += 7 {
  3471. if shift >= 64 {
  3472. return ErrIntOverflowBep
  3473. }
  3474. if iNdEx >= l {
  3475. return io.ErrUnexpectedEOF
  3476. }
  3477. b := dAtA[iNdEx]
  3478. iNdEx++
  3479. m.Size |= int64(b&0x7F) << shift
  3480. if b < 0x80 {
  3481. break
  3482. }
  3483. }
  3484. case 4:
  3485. if wireType != 0 {
  3486. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  3487. }
  3488. m.Permissions = 0
  3489. for shift := uint(0); ; shift += 7 {
  3490. if shift >= 64 {
  3491. return ErrIntOverflowBep
  3492. }
  3493. if iNdEx >= l {
  3494. return io.ErrUnexpectedEOF
  3495. }
  3496. b := dAtA[iNdEx]
  3497. iNdEx++
  3498. m.Permissions |= uint32(b&0x7F) << shift
  3499. if b < 0x80 {
  3500. break
  3501. }
  3502. }
  3503. case 5:
  3504. if wireType != 0 {
  3505. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  3506. }
  3507. m.ModifiedS = 0
  3508. for shift := uint(0); ; shift += 7 {
  3509. if shift >= 64 {
  3510. return ErrIntOverflowBep
  3511. }
  3512. if iNdEx >= l {
  3513. return io.ErrUnexpectedEOF
  3514. }
  3515. b := dAtA[iNdEx]
  3516. iNdEx++
  3517. m.ModifiedS |= int64(b&0x7F) << shift
  3518. if b < 0x80 {
  3519. break
  3520. }
  3521. }
  3522. case 6:
  3523. if wireType != 0 {
  3524. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  3525. }
  3526. var v int
  3527. for shift := uint(0); ; shift += 7 {
  3528. if shift >= 64 {
  3529. return ErrIntOverflowBep
  3530. }
  3531. if iNdEx >= l {
  3532. return io.ErrUnexpectedEOF
  3533. }
  3534. b := dAtA[iNdEx]
  3535. iNdEx++
  3536. v |= int(b&0x7F) << shift
  3537. if b < 0x80 {
  3538. break
  3539. }
  3540. }
  3541. m.Deleted = bool(v != 0)
  3542. case 7:
  3543. if wireType != 0 {
  3544. return fmt.Errorf("proto: wrong wireType = %d for field RawInvalid", wireType)
  3545. }
  3546. var v int
  3547. for shift := uint(0); ; shift += 7 {
  3548. if shift >= 64 {
  3549. return ErrIntOverflowBep
  3550. }
  3551. if iNdEx >= l {
  3552. return io.ErrUnexpectedEOF
  3553. }
  3554. b := dAtA[iNdEx]
  3555. iNdEx++
  3556. v |= int(b&0x7F) << shift
  3557. if b < 0x80 {
  3558. break
  3559. }
  3560. }
  3561. m.RawInvalid = bool(v != 0)
  3562. case 8:
  3563. if wireType != 0 {
  3564. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  3565. }
  3566. var v int
  3567. for shift := uint(0); ; shift += 7 {
  3568. if shift >= 64 {
  3569. return ErrIntOverflowBep
  3570. }
  3571. if iNdEx >= l {
  3572. return io.ErrUnexpectedEOF
  3573. }
  3574. b := dAtA[iNdEx]
  3575. iNdEx++
  3576. v |= int(b&0x7F) << shift
  3577. if b < 0x80 {
  3578. break
  3579. }
  3580. }
  3581. m.NoPermissions = bool(v != 0)
  3582. case 9:
  3583. if wireType != 2 {
  3584. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  3585. }
  3586. var msglen int
  3587. for shift := uint(0); ; shift += 7 {
  3588. if shift >= 64 {
  3589. return ErrIntOverflowBep
  3590. }
  3591. if iNdEx >= l {
  3592. return io.ErrUnexpectedEOF
  3593. }
  3594. b := dAtA[iNdEx]
  3595. iNdEx++
  3596. msglen |= int(b&0x7F) << shift
  3597. if b < 0x80 {
  3598. break
  3599. }
  3600. }
  3601. if msglen < 0 {
  3602. return ErrInvalidLengthBep
  3603. }
  3604. postIndex := iNdEx + msglen
  3605. if postIndex < 0 {
  3606. return ErrInvalidLengthBep
  3607. }
  3608. if postIndex > l {
  3609. return io.ErrUnexpectedEOF
  3610. }
  3611. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3612. return err
  3613. }
  3614. iNdEx = postIndex
  3615. case 10:
  3616. if wireType != 0 {
  3617. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  3618. }
  3619. m.Sequence = 0
  3620. for shift := uint(0); ; shift += 7 {
  3621. if shift >= 64 {
  3622. return ErrIntOverflowBep
  3623. }
  3624. if iNdEx >= l {
  3625. return io.ErrUnexpectedEOF
  3626. }
  3627. b := dAtA[iNdEx]
  3628. iNdEx++
  3629. m.Sequence |= int64(b&0x7F) << shift
  3630. if b < 0x80 {
  3631. break
  3632. }
  3633. }
  3634. case 11:
  3635. if wireType != 0 {
  3636. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  3637. }
  3638. m.ModifiedNs = 0
  3639. for shift := uint(0); ; shift += 7 {
  3640. if shift >= 64 {
  3641. return ErrIntOverflowBep
  3642. }
  3643. if iNdEx >= l {
  3644. return io.ErrUnexpectedEOF
  3645. }
  3646. b := dAtA[iNdEx]
  3647. iNdEx++
  3648. m.ModifiedNs |= int(b&0x7F) << shift
  3649. if b < 0x80 {
  3650. break
  3651. }
  3652. }
  3653. case 12:
  3654. if wireType != 0 {
  3655. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedBy", wireType)
  3656. }
  3657. m.ModifiedBy = 0
  3658. for shift := uint(0); ; shift += 7 {
  3659. if shift >= 64 {
  3660. return ErrIntOverflowBep
  3661. }
  3662. if iNdEx >= l {
  3663. return io.ErrUnexpectedEOF
  3664. }
  3665. b := dAtA[iNdEx]
  3666. iNdEx++
  3667. m.ModifiedBy |= ShortID(b&0x7F) << shift
  3668. if b < 0x80 {
  3669. break
  3670. }
  3671. }
  3672. case 13:
  3673. if wireType != 0 {
  3674. return fmt.Errorf("proto: wrong wireType = %d for field RawBlockSize", wireType)
  3675. }
  3676. m.RawBlockSize = 0
  3677. for shift := uint(0); ; shift += 7 {
  3678. if shift >= 64 {
  3679. return ErrIntOverflowBep
  3680. }
  3681. if iNdEx >= l {
  3682. return io.ErrUnexpectedEOF
  3683. }
  3684. b := dAtA[iNdEx]
  3685. iNdEx++
  3686. m.RawBlockSize |= int(b&0x7F) << shift
  3687. if b < 0x80 {
  3688. break
  3689. }
  3690. }
  3691. case 16:
  3692. if wireType != 2 {
  3693. return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType)
  3694. }
  3695. var msglen int
  3696. for shift := uint(0); ; shift += 7 {
  3697. if shift >= 64 {
  3698. return ErrIntOverflowBep
  3699. }
  3700. if iNdEx >= l {
  3701. return io.ErrUnexpectedEOF
  3702. }
  3703. b := dAtA[iNdEx]
  3704. iNdEx++
  3705. msglen |= int(b&0x7F) << shift
  3706. if b < 0x80 {
  3707. break
  3708. }
  3709. }
  3710. if msglen < 0 {
  3711. return ErrInvalidLengthBep
  3712. }
  3713. postIndex := iNdEx + msglen
  3714. if postIndex < 0 {
  3715. return ErrInvalidLengthBep
  3716. }
  3717. if postIndex > l {
  3718. return io.ErrUnexpectedEOF
  3719. }
  3720. m.Blocks = append(m.Blocks, BlockInfo{})
  3721. if err := m.Blocks[len(m.Blocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3722. return err
  3723. }
  3724. iNdEx = postIndex
  3725. case 17:
  3726. if wireType != 2 {
  3727. return fmt.Errorf("proto: wrong wireType = %d for field SymlinkTarget", wireType)
  3728. }
  3729. var stringLen uint64
  3730. for shift := uint(0); ; shift += 7 {
  3731. if shift >= 64 {
  3732. return ErrIntOverflowBep
  3733. }
  3734. if iNdEx >= l {
  3735. return io.ErrUnexpectedEOF
  3736. }
  3737. b := dAtA[iNdEx]
  3738. iNdEx++
  3739. stringLen |= uint64(b&0x7F) << shift
  3740. if b < 0x80 {
  3741. break
  3742. }
  3743. }
  3744. intStringLen := int(stringLen)
  3745. if intStringLen < 0 {
  3746. return ErrInvalidLengthBep
  3747. }
  3748. postIndex := iNdEx + intStringLen
  3749. if postIndex < 0 {
  3750. return ErrInvalidLengthBep
  3751. }
  3752. if postIndex > l {
  3753. return io.ErrUnexpectedEOF
  3754. }
  3755. m.SymlinkTarget = string(dAtA[iNdEx:postIndex])
  3756. iNdEx = postIndex
  3757. case 18:
  3758. if wireType != 2 {
  3759. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  3760. }
  3761. var byteLen int
  3762. for shift := uint(0); ; shift += 7 {
  3763. if shift >= 64 {
  3764. return ErrIntOverflowBep
  3765. }
  3766. if iNdEx >= l {
  3767. return io.ErrUnexpectedEOF
  3768. }
  3769. b := dAtA[iNdEx]
  3770. iNdEx++
  3771. byteLen |= int(b&0x7F) << shift
  3772. if b < 0x80 {
  3773. break
  3774. }
  3775. }
  3776. if byteLen < 0 {
  3777. return ErrInvalidLengthBep
  3778. }
  3779. postIndex := iNdEx + byteLen
  3780. if postIndex < 0 {
  3781. return ErrInvalidLengthBep
  3782. }
  3783. if postIndex > l {
  3784. return io.ErrUnexpectedEOF
  3785. }
  3786. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  3787. if m.BlocksHash == nil {
  3788. m.BlocksHash = []byte{}
  3789. }
  3790. iNdEx = postIndex
  3791. case 1000:
  3792. if wireType != 0 {
  3793. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  3794. }
  3795. m.LocalFlags = 0
  3796. for shift := uint(0); ; shift += 7 {
  3797. if shift >= 64 {
  3798. return ErrIntOverflowBep
  3799. }
  3800. if iNdEx >= l {
  3801. return io.ErrUnexpectedEOF
  3802. }
  3803. b := dAtA[iNdEx]
  3804. iNdEx++
  3805. m.LocalFlags |= uint32(b&0x7F) << shift
  3806. if b < 0x80 {
  3807. break
  3808. }
  3809. }
  3810. case 1001:
  3811. if wireType != 2 {
  3812. return fmt.Errorf("proto: wrong wireType = %d for field VersionHash", wireType)
  3813. }
  3814. var byteLen int
  3815. for shift := uint(0); ; shift += 7 {
  3816. if shift >= 64 {
  3817. return ErrIntOverflowBep
  3818. }
  3819. if iNdEx >= l {
  3820. return io.ErrUnexpectedEOF
  3821. }
  3822. b := dAtA[iNdEx]
  3823. iNdEx++
  3824. byteLen |= int(b&0x7F) << shift
  3825. if b < 0x80 {
  3826. break
  3827. }
  3828. }
  3829. if byteLen < 0 {
  3830. return ErrInvalidLengthBep
  3831. }
  3832. postIndex := iNdEx + byteLen
  3833. if postIndex < 0 {
  3834. return ErrInvalidLengthBep
  3835. }
  3836. if postIndex > l {
  3837. return io.ErrUnexpectedEOF
  3838. }
  3839. m.VersionHash = append(m.VersionHash[:0], dAtA[iNdEx:postIndex]...)
  3840. if m.VersionHash == nil {
  3841. m.VersionHash = []byte{}
  3842. }
  3843. iNdEx = postIndex
  3844. default:
  3845. iNdEx = preIndex
  3846. skippy, err := skipBep(dAtA[iNdEx:])
  3847. if err != nil {
  3848. return err
  3849. }
  3850. if skippy < 0 {
  3851. return ErrInvalidLengthBep
  3852. }
  3853. if (iNdEx + skippy) < 0 {
  3854. return ErrInvalidLengthBep
  3855. }
  3856. if (iNdEx + skippy) > l {
  3857. return io.ErrUnexpectedEOF
  3858. }
  3859. iNdEx += skippy
  3860. }
  3861. }
  3862. if iNdEx > l {
  3863. return io.ErrUnexpectedEOF
  3864. }
  3865. return nil
  3866. }
  3867. func (m *BlockInfo) Unmarshal(dAtA []byte) error {
  3868. l := len(dAtA)
  3869. iNdEx := 0
  3870. for iNdEx < l {
  3871. preIndex := iNdEx
  3872. var wire uint64
  3873. for shift := uint(0); ; shift += 7 {
  3874. if shift >= 64 {
  3875. return ErrIntOverflowBep
  3876. }
  3877. if iNdEx >= l {
  3878. return io.ErrUnexpectedEOF
  3879. }
  3880. b := dAtA[iNdEx]
  3881. iNdEx++
  3882. wire |= uint64(b&0x7F) << shift
  3883. if b < 0x80 {
  3884. break
  3885. }
  3886. }
  3887. fieldNum := int32(wire >> 3)
  3888. wireType := int(wire & 0x7)
  3889. if wireType == 4 {
  3890. return fmt.Errorf("proto: BlockInfo: wiretype end group for non-group")
  3891. }
  3892. if fieldNum <= 0 {
  3893. return fmt.Errorf("proto: BlockInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  3894. }
  3895. switch fieldNum {
  3896. case 1:
  3897. if wireType != 0 {
  3898. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  3899. }
  3900. m.Offset = 0
  3901. for shift := uint(0); ; shift += 7 {
  3902. if shift >= 64 {
  3903. return ErrIntOverflowBep
  3904. }
  3905. if iNdEx >= l {
  3906. return io.ErrUnexpectedEOF
  3907. }
  3908. b := dAtA[iNdEx]
  3909. iNdEx++
  3910. m.Offset |= int64(b&0x7F) << shift
  3911. if b < 0x80 {
  3912. break
  3913. }
  3914. }
  3915. case 2:
  3916. if wireType != 0 {
  3917. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  3918. }
  3919. m.Size = 0
  3920. for shift := uint(0); ; shift += 7 {
  3921. if shift >= 64 {
  3922. return ErrIntOverflowBep
  3923. }
  3924. if iNdEx >= l {
  3925. return io.ErrUnexpectedEOF
  3926. }
  3927. b := dAtA[iNdEx]
  3928. iNdEx++
  3929. m.Size |= int(b&0x7F) << shift
  3930. if b < 0x80 {
  3931. break
  3932. }
  3933. }
  3934. case 3:
  3935. if wireType != 2 {
  3936. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  3937. }
  3938. var byteLen int
  3939. for shift := uint(0); ; shift += 7 {
  3940. if shift >= 64 {
  3941. return ErrIntOverflowBep
  3942. }
  3943. if iNdEx >= l {
  3944. return io.ErrUnexpectedEOF
  3945. }
  3946. b := dAtA[iNdEx]
  3947. iNdEx++
  3948. byteLen |= int(b&0x7F) << shift
  3949. if b < 0x80 {
  3950. break
  3951. }
  3952. }
  3953. if byteLen < 0 {
  3954. return ErrInvalidLengthBep
  3955. }
  3956. postIndex := iNdEx + byteLen
  3957. if postIndex < 0 {
  3958. return ErrInvalidLengthBep
  3959. }
  3960. if postIndex > l {
  3961. return io.ErrUnexpectedEOF
  3962. }
  3963. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  3964. if m.Hash == nil {
  3965. m.Hash = []byte{}
  3966. }
  3967. iNdEx = postIndex
  3968. case 4:
  3969. if wireType != 0 {
  3970. return fmt.Errorf("proto: wrong wireType = %d for field WeakHash", wireType)
  3971. }
  3972. m.WeakHash = 0
  3973. for shift := uint(0); ; shift += 7 {
  3974. if shift >= 64 {
  3975. return ErrIntOverflowBep
  3976. }
  3977. if iNdEx >= l {
  3978. return io.ErrUnexpectedEOF
  3979. }
  3980. b := dAtA[iNdEx]
  3981. iNdEx++
  3982. m.WeakHash |= uint32(b&0x7F) << shift
  3983. if b < 0x80 {
  3984. break
  3985. }
  3986. }
  3987. default:
  3988. iNdEx = preIndex
  3989. skippy, err := skipBep(dAtA[iNdEx:])
  3990. if err != nil {
  3991. return err
  3992. }
  3993. if skippy < 0 {
  3994. return ErrInvalidLengthBep
  3995. }
  3996. if (iNdEx + skippy) < 0 {
  3997. return ErrInvalidLengthBep
  3998. }
  3999. if (iNdEx + skippy) > l {
  4000. return io.ErrUnexpectedEOF
  4001. }
  4002. iNdEx += skippy
  4003. }
  4004. }
  4005. if iNdEx > l {
  4006. return io.ErrUnexpectedEOF
  4007. }
  4008. return nil
  4009. }
  4010. func (m *Vector) Unmarshal(dAtA []byte) error {
  4011. l := len(dAtA)
  4012. iNdEx := 0
  4013. for iNdEx < l {
  4014. preIndex := iNdEx
  4015. var wire uint64
  4016. for shift := uint(0); ; shift += 7 {
  4017. if shift >= 64 {
  4018. return ErrIntOverflowBep
  4019. }
  4020. if iNdEx >= l {
  4021. return io.ErrUnexpectedEOF
  4022. }
  4023. b := dAtA[iNdEx]
  4024. iNdEx++
  4025. wire |= uint64(b&0x7F) << shift
  4026. if b < 0x80 {
  4027. break
  4028. }
  4029. }
  4030. fieldNum := int32(wire >> 3)
  4031. wireType := int(wire & 0x7)
  4032. if wireType == 4 {
  4033. return fmt.Errorf("proto: Vector: wiretype end group for non-group")
  4034. }
  4035. if fieldNum <= 0 {
  4036. return fmt.Errorf("proto: Vector: illegal tag %d (wire type %d)", fieldNum, wire)
  4037. }
  4038. switch fieldNum {
  4039. case 1:
  4040. if wireType != 2 {
  4041. return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
  4042. }
  4043. var msglen int
  4044. for shift := uint(0); ; shift += 7 {
  4045. if shift >= 64 {
  4046. return ErrIntOverflowBep
  4047. }
  4048. if iNdEx >= l {
  4049. return io.ErrUnexpectedEOF
  4050. }
  4051. b := dAtA[iNdEx]
  4052. iNdEx++
  4053. msglen |= int(b&0x7F) << shift
  4054. if b < 0x80 {
  4055. break
  4056. }
  4057. }
  4058. if msglen < 0 {
  4059. return ErrInvalidLengthBep
  4060. }
  4061. postIndex := iNdEx + msglen
  4062. if postIndex < 0 {
  4063. return ErrInvalidLengthBep
  4064. }
  4065. if postIndex > l {
  4066. return io.ErrUnexpectedEOF
  4067. }
  4068. m.Counters = append(m.Counters, Counter{})
  4069. if err := m.Counters[len(m.Counters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4070. return err
  4071. }
  4072. iNdEx = postIndex
  4073. default:
  4074. iNdEx = preIndex
  4075. skippy, err := skipBep(dAtA[iNdEx:])
  4076. if err != nil {
  4077. return err
  4078. }
  4079. if skippy < 0 {
  4080. return ErrInvalidLengthBep
  4081. }
  4082. if (iNdEx + skippy) < 0 {
  4083. return ErrInvalidLengthBep
  4084. }
  4085. if (iNdEx + skippy) > l {
  4086. return io.ErrUnexpectedEOF
  4087. }
  4088. iNdEx += skippy
  4089. }
  4090. }
  4091. if iNdEx > l {
  4092. return io.ErrUnexpectedEOF
  4093. }
  4094. return nil
  4095. }
  4096. func (m *Counter) Unmarshal(dAtA []byte) error {
  4097. l := len(dAtA)
  4098. iNdEx := 0
  4099. for iNdEx < l {
  4100. preIndex := iNdEx
  4101. var wire uint64
  4102. for shift := uint(0); ; shift += 7 {
  4103. if shift >= 64 {
  4104. return ErrIntOverflowBep
  4105. }
  4106. if iNdEx >= l {
  4107. return io.ErrUnexpectedEOF
  4108. }
  4109. b := dAtA[iNdEx]
  4110. iNdEx++
  4111. wire |= uint64(b&0x7F) << shift
  4112. if b < 0x80 {
  4113. break
  4114. }
  4115. }
  4116. fieldNum := int32(wire >> 3)
  4117. wireType := int(wire & 0x7)
  4118. if wireType == 4 {
  4119. return fmt.Errorf("proto: Counter: wiretype end group for non-group")
  4120. }
  4121. if fieldNum <= 0 {
  4122. return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire)
  4123. }
  4124. switch fieldNum {
  4125. case 1:
  4126. if wireType != 0 {
  4127. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4128. }
  4129. m.ID = 0
  4130. for shift := uint(0); ; shift += 7 {
  4131. if shift >= 64 {
  4132. return ErrIntOverflowBep
  4133. }
  4134. if iNdEx >= l {
  4135. return io.ErrUnexpectedEOF
  4136. }
  4137. b := dAtA[iNdEx]
  4138. iNdEx++
  4139. m.ID |= ShortID(b&0x7F) << shift
  4140. if b < 0x80 {
  4141. break
  4142. }
  4143. }
  4144. case 2:
  4145. if wireType != 0 {
  4146. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  4147. }
  4148. m.Value = 0
  4149. for shift := uint(0); ; shift += 7 {
  4150. if shift >= 64 {
  4151. return ErrIntOverflowBep
  4152. }
  4153. if iNdEx >= l {
  4154. return io.ErrUnexpectedEOF
  4155. }
  4156. b := dAtA[iNdEx]
  4157. iNdEx++
  4158. m.Value |= uint64(b&0x7F) << shift
  4159. if b < 0x80 {
  4160. break
  4161. }
  4162. }
  4163. default:
  4164. iNdEx = preIndex
  4165. skippy, err := skipBep(dAtA[iNdEx:])
  4166. if err != nil {
  4167. return err
  4168. }
  4169. if skippy < 0 {
  4170. return ErrInvalidLengthBep
  4171. }
  4172. if (iNdEx + skippy) < 0 {
  4173. return ErrInvalidLengthBep
  4174. }
  4175. if (iNdEx + skippy) > l {
  4176. return io.ErrUnexpectedEOF
  4177. }
  4178. iNdEx += skippy
  4179. }
  4180. }
  4181. if iNdEx > l {
  4182. return io.ErrUnexpectedEOF
  4183. }
  4184. return nil
  4185. }
  4186. func (m *Request) Unmarshal(dAtA []byte) error {
  4187. l := len(dAtA)
  4188. iNdEx := 0
  4189. for iNdEx < l {
  4190. preIndex := iNdEx
  4191. var wire uint64
  4192. for shift := uint(0); ; shift += 7 {
  4193. if shift >= 64 {
  4194. return ErrIntOverflowBep
  4195. }
  4196. if iNdEx >= l {
  4197. return io.ErrUnexpectedEOF
  4198. }
  4199. b := dAtA[iNdEx]
  4200. iNdEx++
  4201. wire |= uint64(b&0x7F) << shift
  4202. if b < 0x80 {
  4203. break
  4204. }
  4205. }
  4206. fieldNum := int32(wire >> 3)
  4207. wireType := int(wire & 0x7)
  4208. if wireType == 4 {
  4209. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  4210. }
  4211. if fieldNum <= 0 {
  4212. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  4213. }
  4214. switch fieldNum {
  4215. case 1:
  4216. if wireType != 0 {
  4217. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4218. }
  4219. m.ID = 0
  4220. for shift := uint(0); ; shift += 7 {
  4221. if shift >= 64 {
  4222. return ErrIntOverflowBep
  4223. }
  4224. if iNdEx >= l {
  4225. return io.ErrUnexpectedEOF
  4226. }
  4227. b := dAtA[iNdEx]
  4228. iNdEx++
  4229. m.ID |= int(b&0x7F) << shift
  4230. if b < 0x80 {
  4231. break
  4232. }
  4233. }
  4234. case 2:
  4235. if wireType != 2 {
  4236. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  4237. }
  4238. var stringLen uint64
  4239. for shift := uint(0); ; shift += 7 {
  4240. if shift >= 64 {
  4241. return ErrIntOverflowBep
  4242. }
  4243. if iNdEx >= l {
  4244. return io.ErrUnexpectedEOF
  4245. }
  4246. b := dAtA[iNdEx]
  4247. iNdEx++
  4248. stringLen |= uint64(b&0x7F) << shift
  4249. if b < 0x80 {
  4250. break
  4251. }
  4252. }
  4253. intStringLen := int(stringLen)
  4254. if intStringLen < 0 {
  4255. return ErrInvalidLengthBep
  4256. }
  4257. postIndex := iNdEx + intStringLen
  4258. if postIndex < 0 {
  4259. return ErrInvalidLengthBep
  4260. }
  4261. if postIndex > l {
  4262. return io.ErrUnexpectedEOF
  4263. }
  4264. m.Folder = string(dAtA[iNdEx:postIndex])
  4265. iNdEx = postIndex
  4266. case 3:
  4267. if wireType != 2 {
  4268. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  4269. }
  4270. var stringLen uint64
  4271. for shift := uint(0); ; shift += 7 {
  4272. if shift >= 64 {
  4273. return ErrIntOverflowBep
  4274. }
  4275. if iNdEx >= l {
  4276. return io.ErrUnexpectedEOF
  4277. }
  4278. b := dAtA[iNdEx]
  4279. iNdEx++
  4280. stringLen |= uint64(b&0x7F) << shift
  4281. if b < 0x80 {
  4282. break
  4283. }
  4284. }
  4285. intStringLen := int(stringLen)
  4286. if intStringLen < 0 {
  4287. return ErrInvalidLengthBep
  4288. }
  4289. postIndex := iNdEx + intStringLen
  4290. if postIndex < 0 {
  4291. return ErrInvalidLengthBep
  4292. }
  4293. if postIndex > l {
  4294. return io.ErrUnexpectedEOF
  4295. }
  4296. m.Name = string(dAtA[iNdEx:postIndex])
  4297. iNdEx = postIndex
  4298. case 4:
  4299. if wireType != 0 {
  4300. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  4301. }
  4302. m.Offset = 0
  4303. for shift := uint(0); ; shift += 7 {
  4304. if shift >= 64 {
  4305. return ErrIntOverflowBep
  4306. }
  4307. if iNdEx >= l {
  4308. return io.ErrUnexpectedEOF
  4309. }
  4310. b := dAtA[iNdEx]
  4311. iNdEx++
  4312. m.Offset |= int64(b&0x7F) << shift
  4313. if b < 0x80 {
  4314. break
  4315. }
  4316. }
  4317. case 5:
  4318. if wireType != 0 {
  4319. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  4320. }
  4321. m.Size = 0
  4322. for shift := uint(0); ; shift += 7 {
  4323. if shift >= 64 {
  4324. return ErrIntOverflowBep
  4325. }
  4326. if iNdEx >= l {
  4327. return io.ErrUnexpectedEOF
  4328. }
  4329. b := dAtA[iNdEx]
  4330. iNdEx++
  4331. m.Size |= int(b&0x7F) << shift
  4332. if b < 0x80 {
  4333. break
  4334. }
  4335. }
  4336. case 6:
  4337. if wireType != 2 {
  4338. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  4339. }
  4340. var byteLen int
  4341. for shift := uint(0); ; shift += 7 {
  4342. if shift >= 64 {
  4343. return ErrIntOverflowBep
  4344. }
  4345. if iNdEx >= l {
  4346. return io.ErrUnexpectedEOF
  4347. }
  4348. b := dAtA[iNdEx]
  4349. iNdEx++
  4350. byteLen |= int(b&0x7F) << shift
  4351. if b < 0x80 {
  4352. break
  4353. }
  4354. }
  4355. if byteLen < 0 {
  4356. return ErrInvalidLengthBep
  4357. }
  4358. postIndex := iNdEx + byteLen
  4359. if postIndex < 0 {
  4360. return ErrInvalidLengthBep
  4361. }
  4362. if postIndex > l {
  4363. return io.ErrUnexpectedEOF
  4364. }
  4365. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  4366. if m.Hash == nil {
  4367. m.Hash = []byte{}
  4368. }
  4369. iNdEx = postIndex
  4370. case 7:
  4371. if wireType != 0 {
  4372. return fmt.Errorf("proto: wrong wireType = %d for field FromTemporary", wireType)
  4373. }
  4374. var v int
  4375. for shift := uint(0); ; shift += 7 {
  4376. if shift >= 64 {
  4377. return ErrIntOverflowBep
  4378. }
  4379. if iNdEx >= l {
  4380. return io.ErrUnexpectedEOF
  4381. }
  4382. b := dAtA[iNdEx]
  4383. iNdEx++
  4384. v |= int(b&0x7F) << shift
  4385. if b < 0x80 {
  4386. break
  4387. }
  4388. }
  4389. m.FromTemporary = bool(v != 0)
  4390. case 8:
  4391. if wireType != 0 {
  4392. return fmt.Errorf("proto: wrong wireType = %d for field WeakHash", wireType)
  4393. }
  4394. m.WeakHash = 0
  4395. for shift := uint(0); ; shift += 7 {
  4396. if shift >= 64 {
  4397. return ErrIntOverflowBep
  4398. }
  4399. if iNdEx >= l {
  4400. return io.ErrUnexpectedEOF
  4401. }
  4402. b := dAtA[iNdEx]
  4403. iNdEx++
  4404. m.WeakHash |= uint32(b&0x7F) << shift
  4405. if b < 0x80 {
  4406. break
  4407. }
  4408. }
  4409. default:
  4410. iNdEx = preIndex
  4411. skippy, err := skipBep(dAtA[iNdEx:])
  4412. if err != nil {
  4413. return err
  4414. }
  4415. if skippy < 0 {
  4416. return ErrInvalidLengthBep
  4417. }
  4418. if (iNdEx + skippy) < 0 {
  4419. return ErrInvalidLengthBep
  4420. }
  4421. if (iNdEx + skippy) > l {
  4422. return io.ErrUnexpectedEOF
  4423. }
  4424. iNdEx += skippy
  4425. }
  4426. }
  4427. if iNdEx > l {
  4428. return io.ErrUnexpectedEOF
  4429. }
  4430. return nil
  4431. }
  4432. func (m *Response) Unmarshal(dAtA []byte) error {
  4433. l := len(dAtA)
  4434. iNdEx := 0
  4435. for iNdEx < l {
  4436. preIndex := iNdEx
  4437. var wire uint64
  4438. for shift := uint(0); ; shift += 7 {
  4439. if shift >= 64 {
  4440. return ErrIntOverflowBep
  4441. }
  4442. if iNdEx >= l {
  4443. return io.ErrUnexpectedEOF
  4444. }
  4445. b := dAtA[iNdEx]
  4446. iNdEx++
  4447. wire |= uint64(b&0x7F) << shift
  4448. if b < 0x80 {
  4449. break
  4450. }
  4451. }
  4452. fieldNum := int32(wire >> 3)
  4453. wireType := int(wire & 0x7)
  4454. if wireType == 4 {
  4455. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  4456. }
  4457. if fieldNum <= 0 {
  4458. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  4459. }
  4460. switch fieldNum {
  4461. case 1:
  4462. if wireType != 0 {
  4463. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4464. }
  4465. m.ID = 0
  4466. for shift := uint(0); ; shift += 7 {
  4467. if shift >= 64 {
  4468. return ErrIntOverflowBep
  4469. }
  4470. if iNdEx >= l {
  4471. return io.ErrUnexpectedEOF
  4472. }
  4473. b := dAtA[iNdEx]
  4474. iNdEx++
  4475. m.ID |= int(b&0x7F) << shift
  4476. if b < 0x80 {
  4477. break
  4478. }
  4479. }
  4480. case 2:
  4481. if wireType != 2 {
  4482. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  4483. }
  4484. var byteLen int
  4485. for shift := uint(0); ; shift += 7 {
  4486. if shift >= 64 {
  4487. return ErrIntOverflowBep
  4488. }
  4489. if iNdEx >= l {
  4490. return io.ErrUnexpectedEOF
  4491. }
  4492. b := dAtA[iNdEx]
  4493. iNdEx++
  4494. byteLen |= int(b&0x7F) << shift
  4495. if b < 0x80 {
  4496. break
  4497. }
  4498. }
  4499. if byteLen < 0 {
  4500. return ErrInvalidLengthBep
  4501. }
  4502. postIndex := iNdEx + byteLen
  4503. if postIndex < 0 {
  4504. return ErrInvalidLengthBep
  4505. }
  4506. if postIndex > l {
  4507. return io.ErrUnexpectedEOF
  4508. }
  4509. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  4510. if m.Data == nil {
  4511. m.Data = []byte{}
  4512. }
  4513. iNdEx = postIndex
  4514. case 3:
  4515. if wireType != 0 {
  4516. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  4517. }
  4518. m.Code = 0
  4519. for shift := uint(0); ; shift += 7 {
  4520. if shift >= 64 {
  4521. return ErrIntOverflowBep
  4522. }
  4523. if iNdEx >= l {
  4524. return io.ErrUnexpectedEOF
  4525. }
  4526. b := dAtA[iNdEx]
  4527. iNdEx++
  4528. m.Code |= ErrorCode(b&0x7F) << shift
  4529. if b < 0x80 {
  4530. break
  4531. }
  4532. }
  4533. default:
  4534. iNdEx = preIndex
  4535. skippy, err := skipBep(dAtA[iNdEx:])
  4536. if err != nil {
  4537. return err
  4538. }
  4539. if skippy < 0 {
  4540. return ErrInvalidLengthBep
  4541. }
  4542. if (iNdEx + skippy) < 0 {
  4543. return ErrInvalidLengthBep
  4544. }
  4545. if (iNdEx + skippy) > l {
  4546. return io.ErrUnexpectedEOF
  4547. }
  4548. iNdEx += skippy
  4549. }
  4550. }
  4551. if iNdEx > l {
  4552. return io.ErrUnexpectedEOF
  4553. }
  4554. return nil
  4555. }
  4556. func (m *DownloadProgress) Unmarshal(dAtA []byte) error {
  4557. l := len(dAtA)
  4558. iNdEx := 0
  4559. for iNdEx < l {
  4560. preIndex := iNdEx
  4561. var wire uint64
  4562. for shift := uint(0); ; shift += 7 {
  4563. if shift >= 64 {
  4564. return ErrIntOverflowBep
  4565. }
  4566. if iNdEx >= l {
  4567. return io.ErrUnexpectedEOF
  4568. }
  4569. b := dAtA[iNdEx]
  4570. iNdEx++
  4571. wire |= uint64(b&0x7F) << shift
  4572. if b < 0x80 {
  4573. break
  4574. }
  4575. }
  4576. fieldNum := int32(wire >> 3)
  4577. wireType := int(wire & 0x7)
  4578. if wireType == 4 {
  4579. return fmt.Errorf("proto: DownloadProgress: wiretype end group for non-group")
  4580. }
  4581. if fieldNum <= 0 {
  4582. return fmt.Errorf("proto: DownloadProgress: illegal tag %d (wire type %d)", fieldNum, wire)
  4583. }
  4584. switch fieldNum {
  4585. case 1:
  4586. if wireType != 2 {
  4587. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  4588. }
  4589. var stringLen uint64
  4590. for shift := uint(0); ; shift += 7 {
  4591. if shift >= 64 {
  4592. return ErrIntOverflowBep
  4593. }
  4594. if iNdEx >= l {
  4595. return io.ErrUnexpectedEOF
  4596. }
  4597. b := dAtA[iNdEx]
  4598. iNdEx++
  4599. stringLen |= uint64(b&0x7F) << shift
  4600. if b < 0x80 {
  4601. break
  4602. }
  4603. }
  4604. intStringLen := int(stringLen)
  4605. if intStringLen < 0 {
  4606. return ErrInvalidLengthBep
  4607. }
  4608. postIndex := iNdEx + intStringLen
  4609. if postIndex < 0 {
  4610. return ErrInvalidLengthBep
  4611. }
  4612. if postIndex > l {
  4613. return io.ErrUnexpectedEOF
  4614. }
  4615. m.Folder = string(dAtA[iNdEx:postIndex])
  4616. iNdEx = postIndex
  4617. case 2:
  4618. if wireType != 2 {
  4619. return fmt.Errorf("proto: wrong wireType = %d for field Updates", wireType)
  4620. }
  4621. var msglen int
  4622. for shift := uint(0); ; shift += 7 {
  4623. if shift >= 64 {
  4624. return ErrIntOverflowBep
  4625. }
  4626. if iNdEx >= l {
  4627. return io.ErrUnexpectedEOF
  4628. }
  4629. b := dAtA[iNdEx]
  4630. iNdEx++
  4631. msglen |= int(b&0x7F) << shift
  4632. if b < 0x80 {
  4633. break
  4634. }
  4635. }
  4636. if msglen < 0 {
  4637. return ErrInvalidLengthBep
  4638. }
  4639. postIndex := iNdEx + msglen
  4640. if postIndex < 0 {
  4641. return ErrInvalidLengthBep
  4642. }
  4643. if postIndex > l {
  4644. return io.ErrUnexpectedEOF
  4645. }
  4646. m.Updates = append(m.Updates, FileDownloadProgressUpdate{})
  4647. if err := m.Updates[len(m.Updates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4648. return err
  4649. }
  4650. iNdEx = postIndex
  4651. default:
  4652. iNdEx = preIndex
  4653. skippy, err := skipBep(dAtA[iNdEx:])
  4654. if err != nil {
  4655. return err
  4656. }
  4657. if skippy < 0 {
  4658. return ErrInvalidLengthBep
  4659. }
  4660. if (iNdEx + skippy) < 0 {
  4661. return ErrInvalidLengthBep
  4662. }
  4663. if (iNdEx + skippy) > l {
  4664. return io.ErrUnexpectedEOF
  4665. }
  4666. iNdEx += skippy
  4667. }
  4668. }
  4669. if iNdEx > l {
  4670. return io.ErrUnexpectedEOF
  4671. }
  4672. return nil
  4673. }
  4674. func (m *FileDownloadProgressUpdate) Unmarshal(dAtA []byte) error {
  4675. l := len(dAtA)
  4676. iNdEx := 0
  4677. for iNdEx < l {
  4678. preIndex := iNdEx
  4679. var wire uint64
  4680. for shift := uint(0); ; shift += 7 {
  4681. if shift >= 64 {
  4682. return ErrIntOverflowBep
  4683. }
  4684. if iNdEx >= l {
  4685. return io.ErrUnexpectedEOF
  4686. }
  4687. b := dAtA[iNdEx]
  4688. iNdEx++
  4689. wire |= uint64(b&0x7F) << shift
  4690. if b < 0x80 {
  4691. break
  4692. }
  4693. }
  4694. fieldNum := int32(wire >> 3)
  4695. wireType := int(wire & 0x7)
  4696. if wireType == 4 {
  4697. return fmt.Errorf("proto: FileDownloadProgressUpdate: wiretype end group for non-group")
  4698. }
  4699. if fieldNum <= 0 {
  4700. return fmt.Errorf("proto: FileDownloadProgressUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  4701. }
  4702. switch fieldNum {
  4703. case 1:
  4704. if wireType != 0 {
  4705. return fmt.Errorf("proto: wrong wireType = %d for field UpdateType", wireType)
  4706. }
  4707. m.UpdateType = 0
  4708. for shift := uint(0); ; shift += 7 {
  4709. if shift >= 64 {
  4710. return ErrIntOverflowBep
  4711. }
  4712. if iNdEx >= l {
  4713. return io.ErrUnexpectedEOF
  4714. }
  4715. b := dAtA[iNdEx]
  4716. iNdEx++
  4717. m.UpdateType |= FileDownloadProgressUpdateType(b&0x7F) << shift
  4718. if b < 0x80 {
  4719. break
  4720. }
  4721. }
  4722. case 2:
  4723. if wireType != 2 {
  4724. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  4725. }
  4726. var stringLen uint64
  4727. for shift := uint(0); ; shift += 7 {
  4728. if shift >= 64 {
  4729. return ErrIntOverflowBep
  4730. }
  4731. if iNdEx >= l {
  4732. return io.ErrUnexpectedEOF
  4733. }
  4734. b := dAtA[iNdEx]
  4735. iNdEx++
  4736. stringLen |= uint64(b&0x7F) << shift
  4737. if b < 0x80 {
  4738. break
  4739. }
  4740. }
  4741. intStringLen := int(stringLen)
  4742. if intStringLen < 0 {
  4743. return ErrInvalidLengthBep
  4744. }
  4745. postIndex := iNdEx + intStringLen
  4746. if postIndex < 0 {
  4747. return ErrInvalidLengthBep
  4748. }
  4749. if postIndex > l {
  4750. return io.ErrUnexpectedEOF
  4751. }
  4752. m.Name = string(dAtA[iNdEx:postIndex])
  4753. iNdEx = postIndex
  4754. case 3:
  4755. if wireType != 2 {
  4756. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  4757. }
  4758. var msglen int
  4759. for shift := uint(0); ; shift += 7 {
  4760. if shift >= 64 {
  4761. return ErrIntOverflowBep
  4762. }
  4763. if iNdEx >= l {
  4764. return io.ErrUnexpectedEOF
  4765. }
  4766. b := dAtA[iNdEx]
  4767. iNdEx++
  4768. msglen |= int(b&0x7F) << shift
  4769. if b < 0x80 {
  4770. break
  4771. }
  4772. }
  4773. if msglen < 0 {
  4774. return ErrInvalidLengthBep
  4775. }
  4776. postIndex := iNdEx + msglen
  4777. if postIndex < 0 {
  4778. return ErrInvalidLengthBep
  4779. }
  4780. if postIndex > l {
  4781. return io.ErrUnexpectedEOF
  4782. }
  4783. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4784. return err
  4785. }
  4786. iNdEx = postIndex
  4787. case 4:
  4788. if wireType == 0 {
  4789. var v int
  4790. for shift := uint(0); ; shift += 7 {
  4791. if shift >= 64 {
  4792. return ErrIntOverflowBep
  4793. }
  4794. if iNdEx >= l {
  4795. return io.ErrUnexpectedEOF
  4796. }
  4797. b := dAtA[iNdEx]
  4798. iNdEx++
  4799. v |= int(b&0x7F) << shift
  4800. if b < 0x80 {
  4801. break
  4802. }
  4803. }
  4804. m.BlockIndexes = append(m.BlockIndexes, v)
  4805. } else if wireType == 2 {
  4806. var packedLen int
  4807. for shift := uint(0); ; shift += 7 {
  4808. if shift >= 64 {
  4809. return ErrIntOverflowBep
  4810. }
  4811. if iNdEx >= l {
  4812. return io.ErrUnexpectedEOF
  4813. }
  4814. b := dAtA[iNdEx]
  4815. iNdEx++
  4816. packedLen |= int(b&0x7F) << shift
  4817. if b < 0x80 {
  4818. break
  4819. }
  4820. }
  4821. if packedLen < 0 {
  4822. return ErrInvalidLengthBep
  4823. }
  4824. postIndex := iNdEx + packedLen
  4825. if postIndex < 0 {
  4826. return ErrInvalidLengthBep
  4827. }
  4828. if postIndex > l {
  4829. return io.ErrUnexpectedEOF
  4830. }
  4831. var elementCount int
  4832. var count int
  4833. for _, integer := range dAtA[iNdEx:postIndex] {
  4834. if integer < 128 {
  4835. count++
  4836. }
  4837. }
  4838. elementCount = count
  4839. if elementCount != 0 && len(m.BlockIndexes) == 0 {
  4840. m.BlockIndexes = make([]int, 0, elementCount)
  4841. }
  4842. for iNdEx < postIndex {
  4843. var v int
  4844. for shift := uint(0); ; shift += 7 {
  4845. if shift >= 64 {
  4846. return ErrIntOverflowBep
  4847. }
  4848. if iNdEx >= l {
  4849. return io.ErrUnexpectedEOF
  4850. }
  4851. b := dAtA[iNdEx]
  4852. iNdEx++
  4853. v |= int(b&0x7F) << shift
  4854. if b < 0x80 {
  4855. break
  4856. }
  4857. }
  4858. m.BlockIndexes = append(m.BlockIndexes, v)
  4859. }
  4860. } else {
  4861. return fmt.Errorf("proto: wrong wireType = %d for field BlockIndexes", wireType)
  4862. }
  4863. case 5:
  4864. if wireType != 0 {
  4865. return fmt.Errorf("proto: wrong wireType = %d for field BlockSize", wireType)
  4866. }
  4867. m.BlockSize = 0
  4868. for shift := uint(0); ; shift += 7 {
  4869. if shift >= 64 {
  4870. return ErrIntOverflowBep
  4871. }
  4872. if iNdEx >= l {
  4873. return io.ErrUnexpectedEOF
  4874. }
  4875. b := dAtA[iNdEx]
  4876. iNdEx++
  4877. m.BlockSize |= int(b&0x7F) << shift
  4878. if b < 0x80 {
  4879. break
  4880. }
  4881. }
  4882. default:
  4883. iNdEx = preIndex
  4884. skippy, err := skipBep(dAtA[iNdEx:])
  4885. if err != nil {
  4886. return err
  4887. }
  4888. if skippy < 0 {
  4889. return ErrInvalidLengthBep
  4890. }
  4891. if (iNdEx + skippy) < 0 {
  4892. return ErrInvalidLengthBep
  4893. }
  4894. if (iNdEx + skippy) > l {
  4895. return io.ErrUnexpectedEOF
  4896. }
  4897. iNdEx += skippy
  4898. }
  4899. }
  4900. if iNdEx > l {
  4901. return io.ErrUnexpectedEOF
  4902. }
  4903. return nil
  4904. }
  4905. func (m *Ping) Unmarshal(dAtA []byte) error {
  4906. l := len(dAtA)
  4907. iNdEx := 0
  4908. for iNdEx < l {
  4909. preIndex := iNdEx
  4910. var wire uint64
  4911. for shift := uint(0); ; shift += 7 {
  4912. if shift >= 64 {
  4913. return ErrIntOverflowBep
  4914. }
  4915. if iNdEx >= l {
  4916. return io.ErrUnexpectedEOF
  4917. }
  4918. b := dAtA[iNdEx]
  4919. iNdEx++
  4920. wire |= uint64(b&0x7F) << shift
  4921. if b < 0x80 {
  4922. break
  4923. }
  4924. }
  4925. fieldNum := int32(wire >> 3)
  4926. wireType := int(wire & 0x7)
  4927. if wireType == 4 {
  4928. return fmt.Errorf("proto: Ping: wiretype end group for non-group")
  4929. }
  4930. if fieldNum <= 0 {
  4931. return fmt.Errorf("proto: Ping: illegal tag %d (wire type %d)", fieldNum, wire)
  4932. }
  4933. switch fieldNum {
  4934. default:
  4935. iNdEx = preIndex
  4936. skippy, err := skipBep(dAtA[iNdEx:])
  4937. if err != nil {
  4938. return err
  4939. }
  4940. if skippy < 0 {
  4941. return ErrInvalidLengthBep
  4942. }
  4943. if (iNdEx + skippy) < 0 {
  4944. return ErrInvalidLengthBep
  4945. }
  4946. if (iNdEx + skippy) > l {
  4947. return io.ErrUnexpectedEOF
  4948. }
  4949. iNdEx += skippy
  4950. }
  4951. }
  4952. if iNdEx > l {
  4953. return io.ErrUnexpectedEOF
  4954. }
  4955. return nil
  4956. }
  4957. func (m *Close) Unmarshal(dAtA []byte) error {
  4958. l := len(dAtA)
  4959. iNdEx := 0
  4960. for iNdEx < l {
  4961. preIndex := iNdEx
  4962. var wire uint64
  4963. for shift := uint(0); ; shift += 7 {
  4964. if shift >= 64 {
  4965. return ErrIntOverflowBep
  4966. }
  4967. if iNdEx >= l {
  4968. return io.ErrUnexpectedEOF
  4969. }
  4970. b := dAtA[iNdEx]
  4971. iNdEx++
  4972. wire |= uint64(b&0x7F) << shift
  4973. if b < 0x80 {
  4974. break
  4975. }
  4976. }
  4977. fieldNum := int32(wire >> 3)
  4978. wireType := int(wire & 0x7)
  4979. if wireType == 4 {
  4980. return fmt.Errorf("proto: Close: wiretype end group for non-group")
  4981. }
  4982. if fieldNum <= 0 {
  4983. return fmt.Errorf("proto: Close: illegal tag %d (wire type %d)", fieldNum, wire)
  4984. }
  4985. switch fieldNum {
  4986. case 1:
  4987. if wireType != 2 {
  4988. return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
  4989. }
  4990. var stringLen uint64
  4991. for shift := uint(0); ; shift += 7 {
  4992. if shift >= 64 {
  4993. return ErrIntOverflowBep
  4994. }
  4995. if iNdEx >= l {
  4996. return io.ErrUnexpectedEOF
  4997. }
  4998. b := dAtA[iNdEx]
  4999. iNdEx++
  5000. stringLen |= uint64(b&0x7F) << shift
  5001. if b < 0x80 {
  5002. break
  5003. }
  5004. }
  5005. intStringLen := int(stringLen)
  5006. if intStringLen < 0 {
  5007. return ErrInvalidLengthBep
  5008. }
  5009. postIndex := iNdEx + intStringLen
  5010. if postIndex < 0 {
  5011. return ErrInvalidLengthBep
  5012. }
  5013. if postIndex > l {
  5014. return io.ErrUnexpectedEOF
  5015. }
  5016. m.Reason = string(dAtA[iNdEx:postIndex])
  5017. iNdEx = postIndex
  5018. default:
  5019. iNdEx = preIndex
  5020. skippy, err := skipBep(dAtA[iNdEx:])
  5021. if err != nil {
  5022. return err
  5023. }
  5024. if skippy < 0 {
  5025. return ErrInvalidLengthBep
  5026. }
  5027. if (iNdEx + skippy) < 0 {
  5028. return ErrInvalidLengthBep
  5029. }
  5030. if (iNdEx + skippy) > l {
  5031. return io.ErrUnexpectedEOF
  5032. }
  5033. iNdEx += skippy
  5034. }
  5035. }
  5036. if iNdEx > l {
  5037. return io.ErrUnexpectedEOF
  5038. }
  5039. return nil
  5040. }
  5041. func skipBep(dAtA []byte) (n int, err error) {
  5042. l := len(dAtA)
  5043. iNdEx := 0
  5044. depth := 0
  5045. for iNdEx < l {
  5046. var wire uint64
  5047. for shift := uint(0); ; shift += 7 {
  5048. if shift >= 64 {
  5049. return 0, ErrIntOverflowBep
  5050. }
  5051. if iNdEx >= l {
  5052. return 0, io.ErrUnexpectedEOF
  5053. }
  5054. b := dAtA[iNdEx]
  5055. iNdEx++
  5056. wire |= (uint64(b) & 0x7F) << shift
  5057. if b < 0x80 {
  5058. break
  5059. }
  5060. }
  5061. wireType := int(wire & 0x7)
  5062. switch wireType {
  5063. case 0:
  5064. for shift := uint(0); ; shift += 7 {
  5065. if shift >= 64 {
  5066. return 0, ErrIntOverflowBep
  5067. }
  5068. if iNdEx >= l {
  5069. return 0, io.ErrUnexpectedEOF
  5070. }
  5071. iNdEx++
  5072. if dAtA[iNdEx-1] < 0x80 {
  5073. break
  5074. }
  5075. }
  5076. case 1:
  5077. iNdEx += 8
  5078. case 2:
  5079. var length int
  5080. for shift := uint(0); ; shift += 7 {
  5081. if shift >= 64 {
  5082. return 0, ErrIntOverflowBep
  5083. }
  5084. if iNdEx >= l {
  5085. return 0, io.ErrUnexpectedEOF
  5086. }
  5087. b := dAtA[iNdEx]
  5088. iNdEx++
  5089. length |= (int(b) & 0x7F) << shift
  5090. if b < 0x80 {
  5091. break
  5092. }
  5093. }
  5094. if length < 0 {
  5095. return 0, ErrInvalidLengthBep
  5096. }
  5097. iNdEx += length
  5098. case 3:
  5099. depth++
  5100. case 4:
  5101. if depth == 0 {
  5102. return 0, ErrUnexpectedEndOfGroupBep
  5103. }
  5104. depth--
  5105. case 5:
  5106. iNdEx += 4
  5107. default:
  5108. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  5109. }
  5110. if iNdEx < 0 {
  5111. return 0, ErrInvalidLengthBep
  5112. }
  5113. if depth == 0 {
  5114. return iNdEx, nil
  5115. }
  5116. }
  5117. return 0, io.ErrUnexpectedEOF
  5118. }
  5119. var (
  5120. ErrInvalidLengthBep = fmt.Errorf("proto: negative length found during unmarshaling")
  5121. ErrIntOverflowBep = fmt.Errorf("proto: integer overflow")
  5122. ErrUnexpectedEndOfGroupBep = fmt.Errorf("proto: unexpected end of group")
  5123. )