bep.pb.go 125 KB

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