bep.pb.go 123 KB

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