bep.pb.go 96 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057
  1. // Code generated by protoc-gen-gogo.
  2. // source: bep.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package protocol is a generated protocol buffer package.
  6. It is generated from these files:
  7. bep.proto
  8. It has these top-level messages:
  9. Hello
  10. Header
  11. ClusterConfig
  12. Folder
  13. Device
  14. Index
  15. IndexUpdate
  16. FileInfo
  17. BlockInfo
  18. Vector
  19. Counter
  20. Request
  21. Response
  22. DownloadProgress
  23. FileDownloadProgressUpdate
  24. Ping
  25. Close
  26. */
  27. package protocol
  28. import proto "github.com/gogo/protobuf/proto"
  29. import fmt "fmt"
  30. import math "math"
  31. import _ "github.com/gogo/protobuf/gogoproto"
  32. import io "io"
  33. // Reference imports to suppress errors if they are not otherwise used.
  34. var _ = proto.Marshal
  35. var _ = fmt.Errorf
  36. var _ = math.Inf
  37. // This is a compile-time assertion to ensure that this generated file
  38. // is compatible with the proto package it is being compiled against.
  39. const _ = proto.GoGoProtoPackageIsVersion1
  40. type MessageType int32
  41. const (
  42. messageTypeClusterConfig MessageType = 0
  43. messageTypeIndex MessageType = 1
  44. messageTypeIndexUpdate MessageType = 2
  45. messageTypeRequest MessageType = 3
  46. messageTypeResponse MessageType = 4
  47. messageTypeDownloadProgress MessageType = 5
  48. messageTypePing MessageType = 6
  49. messageTypeClose MessageType = 7
  50. )
  51. var MessageType_name = map[int32]string{
  52. 0: "CLUSTER_CONFIG",
  53. 1: "INDEX",
  54. 2: "INDEX_UPDATE",
  55. 3: "REQUEST",
  56. 4: "RESPONSE",
  57. 5: "DOWNLOAD_PROGRESS",
  58. 6: "PING",
  59. 7: "CLOSE",
  60. }
  61. var MessageType_value = map[string]int32{
  62. "CLUSTER_CONFIG": 0,
  63. "INDEX": 1,
  64. "INDEX_UPDATE": 2,
  65. "REQUEST": 3,
  66. "RESPONSE": 4,
  67. "DOWNLOAD_PROGRESS": 5,
  68. "PING": 6,
  69. "CLOSE": 7,
  70. }
  71. func (x MessageType) String() string {
  72. return proto.EnumName(MessageType_name, int32(x))
  73. }
  74. func (MessageType) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{0} }
  75. type MessageCompression int32
  76. const (
  77. MessageCompressionNone MessageCompression = 0
  78. MessageCompressionLZ4 MessageCompression = 1
  79. )
  80. var MessageCompression_name = map[int32]string{
  81. 0: "NONE",
  82. 1: "LZ4",
  83. }
  84. var MessageCompression_value = map[string]int32{
  85. "NONE": 0,
  86. "LZ4": 1,
  87. }
  88. func (x MessageCompression) String() string {
  89. return proto.EnumName(MessageCompression_name, int32(x))
  90. }
  91. func (MessageCompression) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{1} }
  92. type Compression int32
  93. const (
  94. CompressMetadata Compression = 0
  95. CompressNever Compression = 1
  96. CompressAlways Compression = 2
  97. )
  98. var Compression_name = map[int32]string{
  99. 0: "METADATA",
  100. 1: "NEVER",
  101. 2: "ALWAYS",
  102. }
  103. var Compression_value = map[string]int32{
  104. "METADATA": 0,
  105. "NEVER": 1,
  106. "ALWAYS": 2,
  107. }
  108. func (x Compression) String() string {
  109. return proto.EnumName(Compression_name, int32(x))
  110. }
  111. func (Compression) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{2} }
  112. type FileInfoType int32
  113. const (
  114. FileInfoTypeFile FileInfoType = 0
  115. FileInfoTypeDirectory FileInfoType = 1
  116. FileInfoTypeSymlinkFile FileInfoType = 2
  117. FileInfoTypeSymlinkDirectory FileInfoType = 3
  118. FileInfoTypeSymlinkUnknown FileInfoType = 4
  119. )
  120. var FileInfoType_name = map[int32]string{
  121. 0: "FILE",
  122. 1: "DIRECTORY",
  123. 2: "SYMLINK_FILE",
  124. 3: "SYMLINK_DIRECTORY",
  125. 4: "SYMLINK_UNKNOWN",
  126. }
  127. var FileInfoType_value = map[string]int32{
  128. "FILE": 0,
  129. "DIRECTORY": 1,
  130. "SYMLINK_FILE": 2,
  131. "SYMLINK_DIRECTORY": 3,
  132. "SYMLINK_UNKNOWN": 4,
  133. }
  134. func (x FileInfoType) String() string {
  135. return proto.EnumName(FileInfoType_name, int32(x))
  136. }
  137. func (FileInfoType) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{3} }
  138. type ErrorCode int32
  139. const (
  140. ErrorCodeNoError ErrorCode = 0
  141. ErrorCodeGeneric ErrorCode = 1
  142. ErrorCodeNoSuchFile ErrorCode = 2
  143. ErrorCodeInvalidFile ErrorCode = 3
  144. )
  145. var ErrorCode_name = map[int32]string{
  146. 0: "NO_ERROR",
  147. 1: "GENERIC",
  148. 2: "NO_SUCH_FILE",
  149. 3: "INVALID_FILE",
  150. }
  151. var ErrorCode_value = map[string]int32{
  152. "NO_ERROR": 0,
  153. "GENERIC": 1,
  154. "NO_SUCH_FILE": 2,
  155. "INVALID_FILE": 3,
  156. }
  157. func (x ErrorCode) String() string {
  158. return proto.EnumName(ErrorCode_name, int32(x))
  159. }
  160. func (ErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptorBep, []int{4} }
  161. type FileDownloadProgressUpdateType int32
  162. const (
  163. UpdateTypeAppend FileDownloadProgressUpdateType = 0
  164. UpdateTypeForget FileDownloadProgressUpdateType = 1
  165. )
  166. var FileDownloadProgressUpdateType_name = map[int32]string{
  167. 0: "APPEND",
  168. 1: "FORGET",
  169. }
  170. var FileDownloadProgressUpdateType_value = map[string]int32{
  171. "APPEND": 0,
  172. "FORGET": 1,
  173. }
  174. func (x FileDownloadProgressUpdateType) String() string {
  175. return proto.EnumName(FileDownloadProgressUpdateType_name, int32(x))
  176. }
  177. func (FileDownloadProgressUpdateType) EnumDescriptor() ([]byte, []int) {
  178. return fileDescriptorBep, []int{5}
  179. }
  180. type Hello struct {
  181. DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
  182. ClientName string `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"`
  183. ClientVersion string `protobuf:"bytes,3,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"`
  184. }
  185. func (m *Hello) Reset() { *m = Hello{} }
  186. func (m *Hello) String() string { return proto.CompactTextString(m) }
  187. func (*Hello) ProtoMessage() {}
  188. func (*Hello) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{0} }
  189. type Header struct {
  190. Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.MessageType" json:"type,omitempty"`
  191. Compression MessageCompression `protobuf:"varint,2,opt,name=compression,proto3,enum=protocol.MessageCompression" json:"compression,omitempty"`
  192. }
  193. func (m *Header) Reset() { *m = Header{} }
  194. func (m *Header) String() string { return proto.CompactTextString(m) }
  195. func (*Header) ProtoMessage() {}
  196. func (*Header) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{1} }
  197. type ClusterConfig struct {
  198. Folders []Folder `protobuf:"bytes,1,rep,name=folders" json:"folders"`
  199. }
  200. func (m *ClusterConfig) Reset() { *m = ClusterConfig{} }
  201. func (m *ClusterConfig) String() string { return proto.CompactTextString(m) }
  202. func (*ClusterConfig) ProtoMessage() {}
  203. func (*ClusterConfig) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{2} }
  204. type Folder struct {
  205. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  206. Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
  207. ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
  208. IgnorePermissions bool `protobuf:"varint,4,opt,name=ignore_permissions,json=ignorePermissions,proto3" json:"ignore_permissions,omitempty"`
  209. IgnoreDelete bool `protobuf:"varint,5,opt,name=ignore_delete,json=ignoreDelete,proto3" json:"ignore_delete,omitempty"`
  210. DisableTempIndexes bool `protobuf:"varint,6,opt,name=disable_temp_indexes,json=disableTempIndexes,proto3" json:"disable_temp_indexes,omitempty"`
  211. Devices []Device `protobuf:"bytes,16,rep,name=devices" json:"devices"`
  212. }
  213. func (m *Folder) Reset() { *m = Folder{} }
  214. func (m *Folder) String() string { return proto.CompactTextString(m) }
  215. func (*Folder) ProtoMessage() {}
  216. func (*Folder) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{3} }
  217. type Device struct {
  218. ID DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=DeviceID" json:"id"`
  219. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  220. Addresses []string `protobuf:"bytes,3,rep,name=addresses" json:"addresses,omitempty"`
  221. Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression,omitempty"`
  222. CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"cert_name,omitempty"`
  223. MaxSequence int64 `protobuf:"varint,6,opt,name=max_sequence,json=maxSequence,proto3" json:"max_sequence,omitempty"`
  224. Introducer bool `protobuf:"varint,7,opt,name=introducer,proto3" json:"introducer,omitempty"`
  225. IndexID IndexID `protobuf:"varint,8,opt,name=index_id,json=indexId,proto3,customtype=IndexID" json:"index_id"`
  226. }
  227. func (m *Device) Reset() { *m = Device{} }
  228. func (m *Device) String() string { return proto.CompactTextString(m) }
  229. func (*Device) ProtoMessage() {}
  230. func (*Device) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{4} }
  231. type Index struct {
  232. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  233. Files []FileInfo `protobuf:"bytes,2,rep,name=files" json:"files"`
  234. }
  235. func (m *Index) Reset() { *m = Index{} }
  236. func (m *Index) String() string { return proto.CompactTextString(m) }
  237. func (*Index) ProtoMessage() {}
  238. func (*Index) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{5} }
  239. type IndexUpdate struct {
  240. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  241. Files []FileInfo `protobuf:"bytes,2,rep,name=files" json:"files"`
  242. }
  243. func (m *IndexUpdate) Reset() { *m = IndexUpdate{} }
  244. func (m *IndexUpdate) String() string { return proto.CompactTextString(m) }
  245. func (*IndexUpdate) ProtoMessage() {}
  246. func (*IndexUpdate) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{6} }
  247. type FileInfo struct {
  248. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  249. Type FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
  250. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  251. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
  252. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
  253. ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
  254. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
  255. Invalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
  256. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
  257. Version Vector `protobuf:"bytes,9,opt,name=version" json:"version"`
  258. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
  259. Blocks []BlockInfo `protobuf:"bytes,16,rep,name=Blocks,json=blocks" json:"Blocks"`
  260. }
  261. func (m *FileInfo) Reset() { *m = FileInfo{} }
  262. func (*FileInfo) ProtoMessage() {}
  263. func (*FileInfo) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{7} }
  264. type BlockInfo struct {
  265. Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
  266. Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
  267. Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
  268. }
  269. func (m *BlockInfo) Reset() { *m = BlockInfo{} }
  270. func (*BlockInfo) ProtoMessage() {}
  271. func (*BlockInfo) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{8} }
  272. type Vector struct {
  273. Counters []Counter `protobuf:"bytes,1,rep,name=counters" json:"counters"`
  274. }
  275. func (m *Vector) Reset() { *m = Vector{} }
  276. func (m *Vector) String() string { return proto.CompactTextString(m) }
  277. func (*Vector) ProtoMessage() {}
  278. func (*Vector) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{9} }
  279. type Counter struct {
  280. ID ShortID `protobuf:"varint,1,opt,name=id,proto3,customtype=ShortID" json:"id"`
  281. Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
  282. }
  283. func (m *Counter) Reset() { *m = Counter{} }
  284. func (m *Counter) String() string { return proto.CompactTextString(m) }
  285. func (*Counter) ProtoMessage() {}
  286. func (*Counter) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{10} }
  287. type Request struct {
  288. ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  289. Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"`
  290. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
  291. Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
  292. Size int32 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
  293. Hash []byte `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash,omitempty"`
  294. FromTemporary bool `protobuf:"varint,7,opt,name=from_temporary,json=fromTemporary,proto3" json:"from_temporary,omitempty"`
  295. }
  296. func (m *Request) Reset() { *m = Request{} }
  297. func (m *Request) String() string { return proto.CompactTextString(m) }
  298. func (*Request) ProtoMessage() {}
  299. func (*Request) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{11} }
  300. type Response struct {
  301. ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  302. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  303. Code ErrorCode `protobuf:"varint,3,opt,name=code,proto3,enum=protocol.ErrorCode" json:"code,omitempty"`
  304. }
  305. func (m *Response) Reset() { *m = Response{} }
  306. func (m *Response) String() string { return proto.CompactTextString(m) }
  307. func (*Response) ProtoMessage() {}
  308. func (*Response) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{12} }
  309. type DownloadProgress struct {
  310. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  311. Updates []FileDownloadProgressUpdate `protobuf:"bytes,2,rep,name=updates" json:"updates"`
  312. }
  313. func (m *DownloadProgress) Reset() { *m = DownloadProgress{} }
  314. func (m *DownloadProgress) String() string { return proto.CompactTextString(m) }
  315. func (*DownloadProgress) ProtoMessage() {}
  316. func (*DownloadProgress) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{13} }
  317. type FileDownloadProgressUpdate struct {
  318. UpdateType FileDownloadProgressUpdateType `protobuf:"varint,1,opt,name=update_type,json=updateType,proto3,enum=protocol.FileDownloadProgressUpdateType" json:"update_type,omitempty"`
  319. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  320. Version Vector `protobuf:"bytes,3,opt,name=version" json:"version"`
  321. BlockIndexes []int32 `protobuf:"varint,4,rep,name=block_indexes,json=blockIndexes" json:"block_indexes,omitempty"`
  322. }
  323. func (m *FileDownloadProgressUpdate) Reset() { *m = FileDownloadProgressUpdate{} }
  324. func (m *FileDownloadProgressUpdate) String() string { return proto.CompactTextString(m) }
  325. func (*FileDownloadProgressUpdate) ProtoMessage() {}
  326. func (*FileDownloadProgressUpdate) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{14} }
  327. type Ping struct {
  328. }
  329. func (m *Ping) Reset() { *m = Ping{} }
  330. func (m *Ping) String() string { return proto.CompactTextString(m) }
  331. func (*Ping) ProtoMessage() {}
  332. func (*Ping) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{15} }
  333. type Close struct {
  334. Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
  335. }
  336. func (m *Close) Reset() { *m = Close{} }
  337. func (m *Close) String() string { return proto.CompactTextString(m) }
  338. func (*Close) ProtoMessage() {}
  339. func (*Close) Descriptor() ([]byte, []int) { return fileDescriptorBep, []int{16} }
  340. func init() {
  341. proto.RegisterType((*Hello)(nil), "protocol.Hello")
  342. proto.RegisterType((*Header)(nil), "protocol.Header")
  343. proto.RegisterType((*ClusterConfig)(nil), "protocol.ClusterConfig")
  344. proto.RegisterType((*Folder)(nil), "protocol.Folder")
  345. proto.RegisterType((*Device)(nil), "protocol.Device")
  346. proto.RegisterType((*Index)(nil), "protocol.Index")
  347. proto.RegisterType((*IndexUpdate)(nil), "protocol.IndexUpdate")
  348. proto.RegisterType((*FileInfo)(nil), "protocol.FileInfo")
  349. proto.RegisterType((*BlockInfo)(nil), "protocol.BlockInfo")
  350. proto.RegisterType((*Vector)(nil), "protocol.Vector")
  351. proto.RegisterType((*Counter)(nil), "protocol.Counter")
  352. proto.RegisterType((*Request)(nil), "protocol.Request")
  353. proto.RegisterType((*Response)(nil), "protocol.Response")
  354. proto.RegisterType((*DownloadProgress)(nil), "protocol.DownloadProgress")
  355. proto.RegisterType((*FileDownloadProgressUpdate)(nil), "protocol.FileDownloadProgressUpdate")
  356. proto.RegisterType((*Ping)(nil), "protocol.Ping")
  357. proto.RegisterType((*Close)(nil), "protocol.Close")
  358. proto.RegisterEnum("protocol.MessageType", MessageType_name, MessageType_value)
  359. proto.RegisterEnum("protocol.MessageCompression", MessageCompression_name, MessageCompression_value)
  360. proto.RegisterEnum("protocol.Compression", Compression_name, Compression_value)
  361. proto.RegisterEnum("protocol.FileInfoType", FileInfoType_name, FileInfoType_value)
  362. proto.RegisterEnum("protocol.ErrorCode", ErrorCode_name, ErrorCode_value)
  363. proto.RegisterEnum("protocol.FileDownloadProgressUpdateType", FileDownloadProgressUpdateType_name, FileDownloadProgressUpdateType_value)
  364. }
  365. func (m *Hello) Marshal() (data []byte, err error) {
  366. size := m.ProtoSize()
  367. data = make([]byte, size)
  368. n, err := m.MarshalTo(data)
  369. if err != nil {
  370. return nil, err
  371. }
  372. return data[:n], nil
  373. }
  374. func (m *Hello) MarshalTo(data []byte) (int, error) {
  375. var i int
  376. _ = i
  377. var l int
  378. _ = l
  379. if len(m.DeviceName) > 0 {
  380. data[i] = 0xa
  381. i++
  382. i = encodeVarintBep(data, i, uint64(len(m.DeviceName)))
  383. i += copy(data[i:], m.DeviceName)
  384. }
  385. if len(m.ClientName) > 0 {
  386. data[i] = 0x12
  387. i++
  388. i = encodeVarintBep(data, i, uint64(len(m.ClientName)))
  389. i += copy(data[i:], m.ClientName)
  390. }
  391. if len(m.ClientVersion) > 0 {
  392. data[i] = 0x1a
  393. i++
  394. i = encodeVarintBep(data, i, uint64(len(m.ClientVersion)))
  395. i += copy(data[i:], m.ClientVersion)
  396. }
  397. return i, nil
  398. }
  399. func (m *Header) Marshal() (data []byte, err error) {
  400. size := m.ProtoSize()
  401. data = make([]byte, size)
  402. n, err := m.MarshalTo(data)
  403. if err != nil {
  404. return nil, err
  405. }
  406. return data[:n], nil
  407. }
  408. func (m *Header) MarshalTo(data []byte) (int, error) {
  409. var i int
  410. _ = i
  411. var l int
  412. _ = l
  413. if m.Type != 0 {
  414. data[i] = 0x8
  415. i++
  416. i = encodeVarintBep(data, i, uint64(m.Type))
  417. }
  418. if m.Compression != 0 {
  419. data[i] = 0x10
  420. i++
  421. i = encodeVarintBep(data, i, uint64(m.Compression))
  422. }
  423. return i, nil
  424. }
  425. func (m *ClusterConfig) Marshal() (data []byte, err error) {
  426. size := m.ProtoSize()
  427. data = make([]byte, size)
  428. n, err := m.MarshalTo(data)
  429. if err != nil {
  430. return nil, err
  431. }
  432. return data[:n], nil
  433. }
  434. func (m *ClusterConfig) MarshalTo(data []byte) (int, error) {
  435. var i int
  436. _ = i
  437. var l int
  438. _ = l
  439. if len(m.Folders) > 0 {
  440. for _, msg := range m.Folders {
  441. data[i] = 0xa
  442. i++
  443. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  444. n, err := msg.MarshalTo(data[i:])
  445. if err != nil {
  446. return 0, err
  447. }
  448. i += n
  449. }
  450. }
  451. return i, nil
  452. }
  453. func (m *Folder) Marshal() (data []byte, err error) {
  454. size := m.ProtoSize()
  455. data = make([]byte, size)
  456. n, err := m.MarshalTo(data)
  457. if err != nil {
  458. return nil, err
  459. }
  460. return data[:n], nil
  461. }
  462. func (m *Folder) MarshalTo(data []byte) (int, error) {
  463. var i int
  464. _ = i
  465. var l int
  466. _ = l
  467. if len(m.ID) > 0 {
  468. data[i] = 0xa
  469. i++
  470. i = encodeVarintBep(data, i, uint64(len(m.ID)))
  471. i += copy(data[i:], m.ID)
  472. }
  473. if len(m.Label) > 0 {
  474. data[i] = 0x12
  475. i++
  476. i = encodeVarintBep(data, i, uint64(len(m.Label)))
  477. i += copy(data[i:], m.Label)
  478. }
  479. if m.ReadOnly {
  480. data[i] = 0x18
  481. i++
  482. if m.ReadOnly {
  483. data[i] = 1
  484. } else {
  485. data[i] = 0
  486. }
  487. i++
  488. }
  489. if m.IgnorePermissions {
  490. data[i] = 0x20
  491. i++
  492. if m.IgnorePermissions {
  493. data[i] = 1
  494. } else {
  495. data[i] = 0
  496. }
  497. i++
  498. }
  499. if m.IgnoreDelete {
  500. data[i] = 0x28
  501. i++
  502. if m.IgnoreDelete {
  503. data[i] = 1
  504. } else {
  505. data[i] = 0
  506. }
  507. i++
  508. }
  509. if m.DisableTempIndexes {
  510. data[i] = 0x30
  511. i++
  512. if m.DisableTempIndexes {
  513. data[i] = 1
  514. } else {
  515. data[i] = 0
  516. }
  517. i++
  518. }
  519. if len(m.Devices) > 0 {
  520. for _, msg := range m.Devices {
  521. data[i] = 0x82
  522. i++
  523. data[i] = 0x1
  524. i++
  525. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  526. n, err := msg.MarshalTo(data[i:])
  527. if err != nil {
  528. return 0, err
  529. }
  530. i += n
  531. }
  532. }
  533. return i, nil
  534. }
  535. func (m *Device) Marshal() (data []byte, err error) {
  536. size := m.ProtoSize()
  537. data = make([]byte, size)
  538. n, err := m.MarshalTo(data)
  539. if err != nil {
  540. return nil, err
  541. }
  542. return data[:n], nil
  543. }
  544. func (m *Device) MarshalTo(data []byte) (int, error) {
  545. var i int
  546. _ = i
  547. var l int
  548. _ = l
  549. data[i] = 0xa
  550. i++
  551. i = encodeVarintBep(data, i, uint64(m.ID.ProtoSize()))
  552. n1, err := m.ID.MarshalTo(data[i:])
  553. if err != nil {
  554. return 0, err
  555. }
  556. i += n1
  557. if len(m.Name) > 0 {
  558. data[i] = 0x12
  559. i++
  560. i = encodeVarintBep(data, i, uint64(len(m.Name)))
  561. i += copy(data[i:], m.Name)
  562. }
  563. if len(m.Addresses) > 0 {
  564. for _, s := range m.Addresses {
  565. data[i] = 0x1a
  566. i++
  567. l = len(s)
  568. for l >= 1<<7 {
  569. data[i] = uint8(uint64(l)&0x7f | 0x80)
  570. l >>= 7
  571. i++
  572. }
  573. data[i] = uint8(l)
  574. i++
  575. i += copy(data[i:], s)
  576. }
  577. }
  578. if m.Compression != 0 {
  579. data[i] = 0x20
  580. i++
  581. i = encodeVarintBep(data, i, uint64(m.Compression))
  582. }
  583. if len(m.CertName) > 0 {
  584. data[i] = 0x2a
  585. i++
  586. i = encodeVarintBep(data, i, uint64(len(m.CertName)))
  587. i += copy(data[i:], m.CertName)
  588. }
  589. if m.MaxSequence != 0 {
  590. data[i] = 0x30
  591. i++
  592. i = encodeVarintBep(data, i, uint64(m.MaxSequence))
  593. }
  594. if m.Introducer {
  595. data[i] = 0x38
  596. i++
  597. if m.Introducer {
  598. data[i] = 1
  599. } else {
  600. data[i] = 0
  601. }
  602. i++
  603. }
  604. if m.IndexID != 0 {
  605. data[i] = 0x40
  606. i++
  607. i = encodeVarintBep(data, i, uint64(m.IndexID))
  608. }
  609. return i, nil
  610. }
  611. func (m *Index) Marshal() (data []byte, err error) {
  612. size := m.ProtoSize()
  613. data = make([]byte, size)
  614. n, err := m.MarshalTo(data)
  615. if err != nil {
  616. return nil, err
  617. }
  618. return data[:n], nil
  619. }
  620. func (m *Index) MarshalTo(data []byte) (int, error) {
  621. var i int
  622. _ = i
  623. var l int
  624. _ = l
  625. if len(m.Folder) > 0 {
  626. data[i] = 0xa
  627. i++
  628. i = encodeVarintBep(data, i, uint64(len(m.Folder)))
  629. i += copy(data[i:], m.Folder)
  630. }
  631. if len(m.Files) > 0 {
  632. for _, msg := range m.Files {
  633. data[i] = 0x12
  634. i++
  635. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  636. n, err := msg.MarshalTo(data[i:])
  637. if err != nil {
  638. return 0, err
  639. }
  640. i += n
  641. }
  642. }
  643. return i, nil
  644. }
  645. func (m *IndexUpdate) Marshal() (data []byte, err error) {
  646. size := m.ProtoSize()
  647. data = make([]byte, size)
  648. n, err := m.MarshalTo(data)
  649. if err != nil {
  650. return nil, err
  651. }
  652. return data[:n], nil
  653. }
  654. func (m *IndexUpdate) MarshalTo(data []byte) (int, error) {
  655. var i int
  656. _ = i
  657. var l int
  658. _ = l
  659. if len(m.Folder) > 0 {
  660. data[i] = 0xa
  661. i++
  662. i = encodeVarintBep(data, i, uint64(len(m.Folder)))
  663. i += copy(data[i:], m.Folder)
  664. }
  665. if len(m.Files) > 0 {
  666. for _, msg := range m.Files {
  667. data[i] = 0x12
  668. i++
  669. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  670. n, err := msg.MarshalTo(data[i:])
  671. if err != nil {
  672. return 0, err
  673. }
  674. i += n
  675. }
  676. }
  677. return i, nil
  678. }
  679. func (m *FileInfo) Marshal() (data []byte, err error) {
  680. size := m.ProtoSize()
  681. data = make([]byte, size)
  682. n, err := m.MarshalTo(data)
  683. if err != nil {
  684. return nil, err
  685. }
  686. return data[:n], nil
  687. }
  688. func (m *FileInfo) MarshalTo(data []byte) (int, error) {
  689. var i int
  690. _ = i
  691. var l int
  692. _ = l
  693. if len(m.Name) > 0 {
  694. data[i] = 0xa
  695. i++
  696. i = encodeVarintBep(data, i, uint64(len(m.Name)))
  697. i += copy(data[i:], m.Name)
  698. }
  699. if m.Type != 0 {
  700. data[i] = 0x10
  701. i++
  702. i = encodeVarintBep(data, i, uint64(m.Type))
  703. }
  704. if m.Size != 0 {
  705. data[i] = 0x18
  706. i++
  707. i = encodeVarintBep(data, i, uint64(m.Size))
  708. }
  709. if m.Permissions != 0 {
  710. data[i] = 0x20
  711. i++
  712. i = encodeVarintBep(data, i, uint64(m.Permissions))
  713. }
  714. if m.ModifiedS != 0 {
  715. data[i] = 0x28
  716. i++
  717. i = encodeVarintBep(data, i, uint64(m.ModifiedS))
  718. }
  719. if m.Deleted {
  720. data[i] = 0x30
  721. i++
  722. if m.Deleted {
  723. data[i] = 1
  724. } else {
  725. data[i] = 0
  726. }
  727. i++
  728. }
  729. if m.Invalid {
  730. data[i] = 0x38
  731. i++
  732. if m.Invalid {
  733. data[i] = 1
  734. } else {
  735. data[i] = 0
  736. }
  737. i++
  738. }
  739. if m.NoPermissions {
  740. data[i] = 0x40
  741. i++
  742. if m.NoPermissions {
  743. data[i] = 1
  744. } else {
  745. data[i] = 0
  746. }
  747. i++
  748. }
  749. data[i] = 0x4a
  750. i++
  751. i = encodeVarintBep(data, i, uint64(m.Version.ProtoSize()))
  752. n2, err := m.Version.MarshalTo(data[i:])
  753. if err != nil {
  754. return 0, err
  755. }
  756. i += n2
  757. if m.Sequence != 0 {
  758. data[i] = 0x50
  759. i++
  760. i = encodeVarintBep(data, i, uint64(m.Sequence))
  761. }
  762. if m.ModifiedNs != 0 {
  763. data[i] = 0x58
  764. i++
  765. i = encodeVarintBep(data, i, uint64(m.ModifiedNs))
  766. }
  767. if len(m.Blocks) > 0 {
  768. for _, msg := range m.Blocks {
  769. data[i] = 0x82
  770. i++
  771. data[i] = 0x1
  772. i++
  773. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  774. n, err := msg.MarshalTo(data[i:])
  775. if err != nil {
  776. return 0, err
  777. }
  778. i += n
  779. }
  780. }
  781. return i, nil
  782. }
  783. func (m *BlockInfo) Marshal() (data []byte, err error) {
  784. size := m.ProtoSize()
  785. data = make([]byte, size)
  786. n, err := m.MarshalTo(data)
  787. if err != nil {
  788. return nil, err
  789. }
  790. return data[:n], nil
  791. }
  792. func (m *BlockInfo) MarshalTo(data []byte) (int, error) {
  793. var i int
  794. _ = i
  795. var l int
  796. _ = l
  797. if m.Offset != 0 {
  798. data[i] = 0x8
  799. i++
  800. i = encodeVarintBep(data, i, uint64(m.Offset))
  801. }
  802. if m.Size != 0 {
  803. data[i] = 0x10
  804. i++
  805. i = encodeVarintBep(data, i, uint64(m.Size))
  806. }
  807. if len(m.Hash) > 0 {
  808. data[i] = 0x1a
  809. i++
  810. i = encodeVarintBep(data, i, uint64(len(m.Hash)))
  811. i += copy(data[i:], m.Hash)
  812. }
  813. return i, nil
  814. }
  815. func (m *Vector) Marshal() (data []byte, err error) {
  816. size := m.ProtoSize()
  817. data = make([]byte, size)
  818. n, err := m.MarshalTo(data)
  819. if err != nil {
  820. return nil, err
  821. }
  822. return data[:n], nil
  823. }
  824. func (m *Vector) MarshalTo(data []byte) (int, error) {
  825. var i int
  826. _ = i
  827. var l int
  828. _ = l
  829. if len(m.Counters) > 0 {
  830. for _, msg := range m.Counters {
  831. data[i] = 0xa
  832. i++
  833. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  834. n, err := msg.MarshalTo(data[i:])
  835. if err != nil {
  836. return 0, err
  837. }
  838. i += n
  839. }
  840. }
  841. return i, nil
  842. }
  843. func (m *Counter) Marshal() (data []byte, err error) {
  844. size := m.ProtoSize()
  845. data = make([]byte, size)
  846. n, err := m.MarshalTo(data)
  847. if err != nil {
  848. return nil, err
  849. }
  850. return data[:n], nil
  851. }
  852. func (m *Counter) MarshalTo(data []byte) (int, error) {
  853. var i int
  854. _ = i
  855. var l int
  856. _ = l
  857. if m.ID != 0 {
  858. data[i] = 0x8
  859. i++
  860. i = encodeVarintBep(data, i, uint64(m.ID))
  861. }
  862. if m.Value != 0 {
  863. data[i] = 0x10
  864. i++
  865. i = encodeVarintBep(data, i, uint64(m.Value))
  866. }
  867. return i, nil
  868. }
  869. func (m *Request) Marshal() (data []byte, err error) {
  870. size := m.ProtoSize()
  871. data = make([]byte, size)
  872. n, err := m.MarshalTo(data)
  873. if err != nil {
  874. return nil, err
  875. }
  876. return data[:n], nil
  877. }
  878. func (m *Request) MarshalTo(data []byte) (int, error) {
  879. var i int
  880. _ = i
  881. var l int
  882. _ = l
  883. if m.ID != 0 {
  884. data[i] = 0x8
  885. i++
  886. i = encodeVarintBep(data, i, uint64(m.ID))
  887. }
  888. if len(m.Folder) > 0 {
  889. data[i] = 0x12
  890. i++
  891. i = encodeVarintBep(data, i, uint64(len(m.Folder)))
  892. i += copy(data[i:], m.Folder)
  893. }
  894. if len(m.Name) > 0 {
  895. data[i] = 0x1a
  896. i++
  897. i = encodeVarintBep(data, i, uint64(len(m.Name)))
  898. i += copy(data[i:], m.Name)
  899. }
  900. if m.Offset != 0 {
  901. data[i] = 0x20
  902. i++
  903. i = encodeVarintBep(data, i, uint64(m.Offset))
  904. }
  905. if m.Size != 0 {
  906. data[i] = 0x28
  907. i++
  908. i = encodeVarintBep(data, i, uint64(m.Size))
  909. }
  910. if len(m.Hash) > 0 {
  911. data[i] = 0x32
  912. i++
  913. i = encodeVarintBep(data, i, uint64(len(m.Hash)))
  914. i += copy(data[i:], m.Hash)
  915. }
  916. if m.FromTemporary {
  917. data[i] = 0x38
  918. i++
  919. if m.FromTemporary {
  920. data[i] = 1
  921. } else {
  922. data[i] = 0
  923. }
  924. i++
  925. }
  926. return i, nil
  927. }
  928. func (m *Response) Marshal() (data []byte, err error) {
  929. size := m.ProtoSize()
  930. data = make([]byte, size)
  931. n, err := m.MarshalTo(data)
  932. if err != nil {
  933. return nil, err
  934. }
  935. return data[:n], nil
  936. }
  937. func (m *Response) MarshalTo(data []byte) (int, error) {
  938. var i int
  939. _ = i
  940. var l int
  941. _ = l
  942. if m.ID != 0 {
  943. data[i] = 0x8
  944. i++
  945. i = encodeVarintBep(data, i, uint64(m.ID))
  946. }
  947. if len(m.Data) > 0 {
  948. data[i] = 0x12
  949. i++
  950. i = encodeVarintBep(data, i, uint64(len(m.Data)))
  951. i += copy(data[i:], m.Data)
  952. }
  953. if m.Code != 0 {
  954. data[i] = 0x18
  955. i++
  956. i = encodeVarintBep(data, i, uint64(m.Code))
  957. }
  958. return i, nil
  959. }
  960. func (m *DownloadProgress) Marshal() (data []byte, err error) {
  961. size := m.ProtoSize()
  962. data = make([]byte, size)
  963. n, err := m.MarshalTo(data)
  964. if err != nil {
  965. return nil, err
  966. }
  967. return data[:n], nil
  968. }
  969. func (m *DownloadProgress) MarshalTo(data []byte) (int, error) {
  970. var i int
  971. _ = i
  972. var l int
  973. _ = l
  974. if len(m.Folder) > 0 {
  975. data[i] = 0xa
  976. i++
  977. i = encodeVarintBep(data, i, uint64(len(m.Folder)))
  978. i += copy(data[i:], m.Folder)
  979. }
  980. if len(m.Updates) > 0 {
  981. for _, msg := range m.Updates {
  982. data[i] = 0x12
  983. i++
  984. i = encodeVarintBep(data, i, uint64(msg.ProtoSize()))
  985. n, err := msg.MarshalTo(data[i:])
  986. if err != nil {
  987. return 0, err
  988. }
  989. i += n
  990. }
  991. }
  992. return i, nil
  993. }
  994. func (m *FileDownloadProgressUpdate) Marshal() (data []byte, err error) {
  995. size := m.ProtoSize()
  996. data = make([]byte, size)
  997. n, err := m.MarshalTo(data)
  998. if err != nil {
  999. return nil, err
  1000. }
  1001. return data[:n], nil
  1002. }
  1003. func (m *FileDownloadProgressUpdate) MarshalTo(data []byte) (int, error) {
  1004. var i int
  1005. _ = i
  1006. var l int
  1007. _ = l
  1008. if m.UpdateType != 0 {
  1009. data[i] = 0x8
  1010. i++
  1011. i = encodeVarintBep(data, i, uint64(m.UpdateType))
  1012. }
  1013. if len(m.Name) > 0 {
  1014. data[i] = 0x12
  1015. i++
  1016. i = encodeVarintBep(data, i, uint64(len(m.Name)))
  1017. i += copy(data[i:], m.Name)
  1018. }
  1019. data[i] = 0x1a
  1020. i++
  1021. i = encodeVarintBep(data, i, uint64(m.Version.ProtoSize()))
  1022. n3, err := m.Version.MarshalTo(data[i:])
  1023. if err != nil {
  1024. return 0, err
  1025. }
  1026. i += n3
  1027. if len(m.BlockIndexes) > 0 {
  1028. for _, num := range m.BlockIndexes {
  1029. data[i] = 0x20
  1030. i++
  1031. i = encodeVarintBep(data, i, uint64(num))
  1032. }
  1033. }
  1034. return i, nil
  1035. }
  1036. func (m *Ping) Marshal() (data []byte, err error) {
  1037. size := m.ProtoSize()
  1038. data = make([]byte, size)
  1039. n, err := m.MarshalTo(data)
  1040. if err != nil {
  1041. return nil, err
  1042. }
  1043. return data[:n], nil
  1044. }
  1045. func (m *Ping) MarshalTo(data []byte) (int, error) {
  1046. var i int
  1047. _ = i
  1048. var l int
  1049. _ = l
  1050. return i, nil
  1051. }
  1052. func (m *Close) Marshal() (data []byte, err error) {
  1053. size := m.ProtoSize()
  1054. data = make([]byte, size)
  1055. n, err := m.MarshalTo(data)
  1056. if err != nil {
  1057. return nil, err
  1058. }
  1059. return data[:n], nil
  1060. }
  1061. func (m *Close) MarshalTo(data []byte) (int, error) {
  1062. var i int
  1063. _ = i
  1064. var l int
  1065. _ = l
  1066. if len(m.Reason) > 0 {
  1067. data[i] = 0xa
  1068. i++
  1069. i = encodeVarintBep(data, i, uint64(len(m.Reason)))
  1070. i += copy(data[i:], m.Reason)
  1071. }
  1072. return i, nil
  1073. }
  1074. func encodeFixed64Bep(data []byte, offset int, v uint64) int {
  1075. data[offset] = uint8(v)
  1076. data[offset+1] = uint8(v >> 8)
  1077. data[offset+2] = uint8(v >> 16)
  1078. data[offset+3] = uint8(v >> 24)
  1079. data[offset+4] = uint8(v >> 32)
  1080. data[offset+5] = uint8(v >> 40)
  1081. data[offset+6] = uint8(v >> 48)
  1082. data[offset+7] = uint8(v >> 56)
  1083. return offset + 8
  1084. }
  1085. func encodeFixed32Bep(data []byte, offset int, v uint32) int {
  1086. data[offset] = uint8(v)
  1087. data[offset+1] = uint8(v >> 8)
  1088. data[offset+2] = uint8(v >> 16)
  1089. data[offset+3] = uint8(v >> 24)
  1090. return offset + 4
  1091. }
  1092. func encodeVarintBep(data []byte, offset int, v uint64) int {
  1093. for v >= 1<<7 {
  1094. data[offset] = uint8(v&0x7f | 0x80)
  1095. v >>= 7
  1096. offset++
  1097. }
  1098. data[offset] = uint8(v)
  1099. return offset + 1
  1100. }
  1101. func (m *Hello) ProtoSize() (n int) {
  1102. var l int
  1103. _ = l
  1104. l = len(m.DeviceName)
  1105. if l > 0 {
  1106. n += 1 + l + sovBep(uint64(l))
  1107. }
  1108. l = len(m.ClientName)
  1109. if l > 0 {
  1110. n += 1 + l + sovBep(uint64(l))
  1111. }
  1112. l = len(m.ClientVersion)
  1113. if l > 0 {
  1114. n += 1 + l + sovBep(uint64(l))
  1115. }
  1116. return n
  1117. }
  1118. func (m *Header) ProtoSize() (n int) {
  1119. var l int
  1120. _ = l
  1121. if m.Type != 0 {
  1122. n += 1 + sovBep(uint64(m.Type))
  1123. }
  1124. if m.Compression != 0 {
  1125. n += 1 + sovBep(uint64(m.Compression))
  1126. }
  1127. return n
  1128. }
  1129. func (m *ClusterConfig) ProtoSize() (n int) {
  1130. var l int
  1131. _ = l
  1132. if len(m.Folders) > 0 {
  1133. for _, e := range m.Folders {
  1134. l = e.ProtoSize()
  1135. n += 1 + l + sovBep(uint64(l))
  1136. }
  1137. }
  1138. return n
  1139. }
  1140. func (m *Folder) ProtoSize() (n int) {
  1141. var l int
  1142. _ = l
  1143. l = len(m.ID)
  1144. if l > 0 {
  1145. n += 1 + l + sovBep(uint64(l))
  1146. }
  1147. l = len(m.Label)
  1148. if l > 0 {
  1149. n += 1 + l + sovBep(uint64(l))
  1150. }
  1151. if m.ReadOnly {
  1152. n += 2
  1153. }
  1154. if m.IgnorePermissions {
  1155. n += 2
  1156. }
  1157. if m.IgnoreDelete {
  1158. n += 2
  1159. }
  1160. if m.DisableTempIndexes {
  1161. n += 2
  1162. }
  1163. if len(m.Devices) > 0 {
  1164. for _, e := range m.Devices {
  1165. l = e.ProtoSize()
  1166. n += 2 + l + sovBep(uint64(l))
  1167. }
  1168. }
  1169. return n
  1170. }
  1171. func (m *Device) ProtoSize() (n int) {
  1172. var l int
  1173. _ = l
  1174. l = m.ID.ProtoSize()
  1175. n += 1 + l + sovBep(uint64(l))
  1176. l = len(m.Name)
  1177. if l > 0 {
  1178. n += 1 + l + sovBep(uint64(l))
  1179. }
  1180. if len(m.Addresses) > 0 {
  1181. for _, s := range m.Addresses {
  1182. l = len(s)
  1183. n += 1 + l + sovBep(uint64(l))
  1184. }
  1185. }
  1186. if m.Compression != 0 {
  1187. n += 1 + sovBep(uint64(m.Compression))
  1188. }
  1189. l = len(m.CertName)
  1190. if l > 0 {
  1191. n += 1 + l + sovBep(uint64(l))
  1192. }
  1193. if m.MaxSequence != 0 {
  1194. n += 1 + sovBep(uint64(m.MaxSequence))
  1195. }
  1196. if m.Introducer {
  1197. n += 2
  1198. }
  1199. if m.IndexID != 0 {
  1200. n += 1 + sovBep(uint64(m.IndexID))
  1201. }
  1202. return n
  1203. }
  1204. func (m *Index) ProtoSize() (n int) {
  1205. var l int
  1206. _ = l
  1207. l = len(m.Folder)
  1208. if l > 0 {
  1209. n += 1 + l + sovBep(uint64(l))
  1210. }
  1211. if len(m.Files) > 0 {
  1212. for _, e := range m.Files {
  1213. l = e.ProtoSize()
  1214. n += 1 + l + sovBep(uint64(l))
  1215. }
  1216. }
  1217. return n
  1218. }
  1219. func (m *IndexUpdate) ProtoSize() (n int) {
  1220. var l int
  1221. _ = l
  1222. l = len(m.Folder)
  1223. if l > 0 {
  1224. n += 1 + l + sovBep(uint64(l))
  1225. }
  1226. if len(m.Files) > 0 {
  1227. for _, e := range m.Files {
  1228. l = e.ProtoSize()
  1229. n += 1 + l + sovBep(uint64(l))
  1230. }
  1231. }
  1232. return n
  1233. }
  1234. func (m *FileInfo) ProtoSize() (n int) {
  1235. var l int
  1236. _ = l
  1237. l = len(m.Name)
  1238. if l > 0 {
  1239. n += 1 + l + sovBep(uint64(l))
  1240. }
  1241. if m.Type != 0 {
  1242. n += 1 + sovBep(uint64(m.Type))
  1243. }
  1244. if m.Size != 0 {
  1245. n += 1 + sovBep(uint64(m.Size))
  1246. }
  1247. if m.Permissions != 0 {
  1248. n += 1 + sovBep(uint64(m.Permissions))
  1249. }
  1250. if m.ModifiedS != 0 {
  1251. n += 1 + sovBep(uint64(m.ModifiedS))
  1252. }
  1253. if m.Deleted {
  1254. n += 2
  1255. }
  1256. if m.Invalid {
  1257. n += 2
  1258. }
  1259. if m.NoPermissions {
  1260. n += 2
  1261. }
  1262. l = m.Version.ProtoSize()
  1263. n += 1 + l + sovBep(uint64(l))
  1264. if m.Sequence != 0 {
  1265. n += 1 + sovBep(uint64(m.Sequence))
  1266. }
  1267. if m.ModifiedNs != 0 {
  1268. n += 1 + sovBep(uint64(m.ModifiedNs))
  1269. }
  1270. if len(m.Blocks) > 0 {
  1271. for _, e := range m.Blocks {
  1272. l = e.ProtoSize()
  1273. n += 2 + l + sovBep(uint64(l))
  1274. }
  1275. }
  1276. return n
  1277. }
  1278. func (m *BlockInfo) ProtoSize() (n int) {
  1279. var l int
  1280. _ = l
  1281. if m.Offset != 0 {
  1282. n += 1 + sovBep(uint64(m.Offset))
  1283. }
  1284. if m.Size != 0 {
  1285. n += 1 + sovBep(uint64(m.Size))
  1286. }
  1287. l = len(m.Hash)
  1288. if l > 0 {
  1289. n += 1 + l + sovBep(uint64(l))
  1290. }
  1291. return n
  1292. }
  1293. func (m *Vector) ProtoSize() (n int) {
  1294. var l int
  1295. _ = l
  1296. if len(m.Counters) > 0 {
  1297. for _, e := range m.Counters {
  1298. l = e.ProtoSize()
  1299. n += 1 + l + sovBep(uint64(l))
  1300. }
  1301. }
  1302. return n
  1303. }
  1304. func (m *Counter) ProtoSize() (n int) {
  1305. var l int
  1306. _ = l
  1307. if m.ID != 0 {
  1308. n += 1 + sovBep(uint64(m.ID))
  1309. }
  1310. if m.Value != 0 {
  1311. n += 1 + sovBep(uint64(m.Value))
  1312. }
  1313. return n
  1314. }
  1315. func (m *Request) ProtoSize() (n int) {
  1316. var l int
  1317. _ = l
  1318. if m.ID != 0 {
  1319. n += 1 + sovBep(uint64(m.ID))
  1320. }
  1321. l = len(m.Folder)
  1322. if l > 0 {
  1323. n += 1 + l + sovBep(uint64(l))
  1324. }
  1325. l = len(m.Name)
  1326. if l > 0 {
  1327. n += 1 + l + sovBep(uint64(l))
  1328. }
  1329. if m.Offset != 0 {
  1330. n += 1 + sovBep(uint64(m.Offset))
  1331. }
  1332. if m.Size != 0 {
  1333. n += 1 + sovBep(uint64(m.Size))
  1334. }
  1335. l = len(m.Hash)
  1336. if l > 0 {
  1337. n += 1 + l + sovBep(uint64(l))
  1338. }
  1339. if m.FromTemporary {
  1340. n += 2
  1341. }
  1342. return n
  1343. }
  1344. func (m *Response) ProtoSize() (n int) {
  1345. var l int
  1346. _ = l
  1347. if m.ID != 0 {
  1348. n += 1 + sovBep(uint64(m.ID))
  1349. }
  1350. l = len(m.Data)
  1351. if l > 0 {
  1352. n += 1 + l + sovBep(uint64(l))
  1353. }
  1354. if m.Code != 0 {
  1355. n += 1 + sovBep(uint64(m.Code))
  1356. }
  1357. return n
  1358. }
  1359. func (m *DownloadProgress) ProtoSize() (n int) {
  1360. var l int
  1361. _ = l
  1362. l = len(m.Folder)
  1363. if l > 0 {
  1364. n += 1 + l + sovBep(uint64(l))
  1365. }
  1366. if len(m.Updates) > 0 {
  1367. for _, e := range m.Updates {
  1368. l = e.ProtoSize()
  1369. n += 1 + l + sovBep(uint64(l))
  1370. }
  1371. }
  1372. return n
  1373. }
  1374. func (m *FileDownloadProgressUpdate) ProtoSize() (n int) {
  1375. var l int
  1376. _ = l
  1377. if m.UpdateType != 0 {
  1378. n += 1 + sovBep(uint64(m.UpdateType))
  1379. }
  1380. l = len(m.Name)
  1381. if l > 0 {
  1382. n += 1 + l + sovBep(uint64(l))
  1383. }
  1384. l = m.Version.ProtoSize()
  1385. n += 1 + l + sovBep(uint64(l))
  1386. if len(m.BlockIndexes) > 0 {
  1387. for _, e := range m.BlockIndexes {
  1388. n += 1 + sovBep(uint64(e))
  1389. }
  1390. }
  1391. return n
  1392. }
  1393. func (m *Ping) ProtoSize() (n int) {
  1394. var l int
  1395. _ = l
  1396. return n
  1397. }
  1398. func (m *Close) ProtoSize() (n int) {
  1399. var l int
  1400. _ = l
  1401. l = len(m.Reason)
  1402. if l > 0 {
  1403. n += 1 + l + sovBep(uint64(l))
  1404. }
  1405. return n
  1406. }
  1407. func sovBep(x uint64) (n int) {
  1408. for {
  1409. n++
  1410. x >>= 7
  1411. if x == 0 {
  1412. break
  1413. }
  1414. }
  1415. return n
  1416. }
  1417. func sozBep(x uint64) (n int) {
  1418. return sovBep(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1419. }
  1420. func (m *Hello) Unmarshal(data []byte) error {
  1421. l := len(data)
  1422. iNdEx := 0
  1423. for iNdEx < l {
  1424. preIndex := iNdEx
  1425. var wire uint64
  1426. for shift := uint(0); ; shift += 7 {
  1427. if shift >= 64 {
  1428. return ErrIntOverflowBep
  1429. }
  1430. if iNdEx >= l {
  1431. return io.ErrUnexpectedEOF
  1432. }
  1433. b := data[iNdEx]
  1434. iNdEx++
  1435. wire |= (uint64(b) & 0x7F) << shift
  1436. if b < 0x80 {
  1437. break
  1438. }
  1439. }
  1440. fieldNum := int32(wire >> 3)
  1441. wireType := int(wire & 0x7)
  1442. if wireType == 4 {
  1443. return fmt.Errorf("proto: Hello: wiretype end group for non-group")
  1444. }
  1445. if fieldNum <= 0 {
  1446. return fmt.Errorf("proto: Hello: illegal tag %d (wire type %d)", fieldNum, wire)
  1447. }
  1448. switch fieldNum {
  1449. case 1:
  1450. if wireType != 2 {
  1451. return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType)
  1452. }
  1453. var stringLen uint64
  1454. for shift := uint(0); ; shift += 7 {
  1455. if shift >= 64 {
  1456. return ErrIntOverflowBep
  1457. }
  1458. if iNdEx >= l {
  1459. return io.ErrUnexpectedEOF
  1460. }
  1461. b := data[iNdEx]
  1462. iNdEx++
  1463. stringLen |= (uint64(b) & 0x7F) << shift
  1464. if b < 0x80 {
  1465. break
  1466. }
  1467. }
  1468. intStringLen := int(stringLen)
  1469. if intStringLen < 0 {
  1470. return ErrInvalidLengthBep
  1471. }
  1472. postIndex := iNdEx + intStringLen
  1473. if postIndex > l {
  1474. return io.ErrUnexpectedEOF
  1475. }
  1476. m.DeviceName = string(data[iNdEx:postIndex])
  1477. iNdEx = postIndex
  1478. case 2:
  1479. if wireType != 2 {
  1480. return fmt.Errorf("proto: wrong wireType = %d for field ClientName", wireType)
  1481. }
  1482. var stringLen uint64
  1483. for shift := uint(0); ; shift += 7 {
  1484. if shift >= 64 {
  1485. return ErrIntOverflowBep
  1486. }
  1487. if iNdEx >= l {
  1488. return io.ErrUnexpectedEOF
  1489. }
  1490. b := data[iNdEx]
  1491. iNdEx++
  1492. stringLen |= (uint64(b) & 0x7F) << shift
  1493. if b < 0x80 {
  1494. break
  1495. }
  1496. }
  1497. intStringLen := int(stringLen)
  1498. if intStringLen < 0 {
  1499. return ErrInvalidLengthBep
  1500. }
  1501. postIndex := iNdEx + intStringLen
  1502. if postIndex > l {
  1503. return io.ErrUnexpectedEOF
  1504. }
  1505. m.ClientName = string(data[iNdEx:postIndex])
  1506. iNdEx = postIndex
  1507. case 3:
  1508. if wireType != 2 {
  1509. return fmt.Errorf("proto: wrong wireType = %d for field ClientVersion", wireType)
  1510. }
  1511. var stringLen uint64
  1512. for shift := uint(0); ; shift += 7 {
  1513. if shift >= 64 {
  1514. return ErrIntOverflowBep
  1515. }
  1516. if iNdEx >= l {
  1517. return io.ErrUnexpectedEOF
  1518. }
  1519. b := data[iNdEx]
  1520. iNdEx++
  1521. stringLen |= (uint64(b) & 0x7F) << shift
  1522. if b < 0x80 {
  1523. break
  1524. }
  1525. }
  1526. intStringLen := int(stringLen)
  1527. if intStringLen < 0 {
  1528. return ErrInvalidLengthBep
  1529. }
  1530. postIndex := iNdEx + intStringLen
  1531. if postIndex > l {
  1532. return io.ErrUnexpectedEOF
  1533. }
  1534. m.ClientVersion = string(data[iNdEx:postIndex])
  1535. iNdEx = postIndex
  1536. default:
  1537. iNdEx = preIndex
  1538. skippy, err := skipBep(data[iNdEx:])
  1539. if err != nil {
  1540. return err
  1541. }
  1542. if skippy < 0 {
  1543. return ErrInvalidLengthBep
  1544. }
  1545. if (iNdEx + skippy) > l {
  1546. return io.ErrUnexpectedEOF
  1547. }
  1548. iNdEx += skippy
  1549. }
  1550. }
  1551. if iNdEx > l {
  1552. return io.ErrUnexpectedEOF
  1553. }
  1554. return nil
  1555. }
  1556. func (m *Header) Unmarshal(data []byte) error {
  1557. l := len(data)
  1558. iNdEx := 0
  1559. for iNdEx < l {
  1560. preIndex := iNdEx
  1561. var wire uint64
  1562. for shift := uint(0); ; shift += 7 {
  1563. if shift >= 64 {
  1564. return ErrIntOverflowBep
  1565. }
  1566. if iNdEx >= l {
  1567. return io.ErrUnexpectedEOF
  1568. }
  1569. b := data[iNdEx]
  1570. iNdEx++
  1571. wire |= (uint64(b) & 0x7F) << shift
  1572. if b < 0x80 {
  1573. break
  1574. }
  1575. }
  1576. fieldNum := int32(wire >> 3)
  1577. wireType := int(wire & 0x7)
  1578. if wireType == 4 {
  1579. return fmt.Errorf("proto: Header: wiretype end group for non-group")
  1580. }
  1581. if fieldNum <= 0 {
  1582. return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire)
  1583. }
  1584. switch fieldNum {
  1585. case 1:
  1586. if wireType != 0 {
  1587. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1588. }
  1589. m.Type = 0
  1590. for shift := uint(0); ; shift += 7 {
  1591. if shift >= 64 {
  1592. return ErrIntOverflowBep
  1593. }
  1594. if iNdEx >= l {
  1595. return io.ErrUnexpectedEOF
  1596. }
  1597. b := data[iNdEx]
  1598. iNdEx++
  1599. m.Type |= (MessageType(b) & 0x7F) << shift
  1600. if b < 0x80 {
  1601. break
  1602. }
  1603. }
  1604. case 2:
  1605. if wireType != 0 {
  1606. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  1607. }
  1608. m.Compression = 0
  1609. for shift := uint(0); ; shift += 7 {
  1610. if shift >= 64 {
  1611. return ErrIntOverflowBep
  1612. }
  1613. if iNdEx >= l {
  1614. return io.ErrUnexpectedEOF
  1615. }
  1616. b := data[iNdEx]
  1617. iNdEx++
  1618. m.Compression |= (MessageCompression(b) & 0x7F) << shift
  1619. if b < 0x80 {
  1620. break
  1621. }
  1622. }
  1623. default:
  1624. iNdEx = preIndex
  1625. skippy, err := skipBep(data[iNdEx:])
  1626. if err != nil {
  1627. return err
  1628. }
  1629. if skippy < 0 {
  1630. return ErrInvalidLengthBep
  1631. }
  1632. if (iNdEx + skippy) > l {
  1633. return io.ErrUnexpectedEOF
  1634. }
  1635. iNdEx += skippy
  1636. }
  1637. }
  1638. if iNdEx > l {
  1639. return io.ErrUnexpectedEOF
  1640. }
  1641. return nil
  1642. }
  1643. func (m *ClusterConfig) Unmarshal(data []byte) error {
  1644. l := len(data)
  1645. iNdEx := 0
  1646. for iNdEx < l {
  1647. preIndex := iNdEx
  1648. var wire uint64
  1649. for shift := uint(0); ; shift += 7 {
  1650. if shift >= 64 {
  1651. return ErrIntOverflowBep
  1652. }
  1653. if iNdEx >= l {
  1654. return io.ErrUnexpectedEOF
  1655. }
  1656. b := data[iNdEx]
  1657. iNdEx++
  1658. wire |= (uint64(b) & 0x7F) << shift
  1659. if b < 0x80 {
  1660. break
  1661. }
  1662. }
  1663. fieldNum := int32(wire >> 3)
  1664. wireType := int(wire & 0x7)
  1665. if wireType == 4 {
  1666. return fmt.Errorf("proto: ClusterConfig: wiretype end group for non-group")
  1667. }
  1668. if fieldNum <= 0 {
  1669. return fmt.Errorf("proto: ClusterConfig: illegal tag %d (wire type %d)", fieldNum, wire)
  1670. }
  1671. switch fieldNum {
  1672. case 1:
  1673. if wireType != 2 {
  1674. return fmt.Errorf("proto: wrong wireType = %d for field Folders", wireType)
  1675. }
  1676. var msglen int
  1677. for shift := uint(0); ; shift += 7 {
  1678. if shift >= 64 {
  1679. return ErrIntOverflowBep
  1680. }
  1681. if iNdEx >= l {
  1682. return io.ErrUnexpectedEOF
  1683. }
  1684. b := data[iNdEx]
  1685. iNdEx++
  1686. msglen |= (int(b) & 0x7F) << shift
  1687. if b < 0x80 {
  1688. break
  1689. }
  1690. }
  1691. if msglen < 0 {
  1692. return ErrInvalidLengthBep
  1693. }
  1694. postIndex := iNdEx + msglen
  1695. if postIndex > l {
  1696. return io.ErrUnexpectedEOF
  1697. }
  1698. m.Folders = append(m.Folders, Folder{})
  1699. if err := m.Folders[len(m.Folders)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  1700. return err
  1701. }
  1702. iNdEx = postIndex
  1703. default:
  1704. iNdEx = preIndex
  1705. skippy, err := skipBep(data[iNdEx:])
  1706. if err != nil {
  1707. return err
  1708. }
  1709. if skippy < 0 {
  1710. return ErrInvalidLengthBep
  1711. }
  1712. if (iNdEx + skippy) > l {
  1713. return io.ErrUnexpectedEOF
  1714. }
  1715. iNdEx += skippy
  1716. }
  1717. }
  1718. if iNdEx > l {
  1719. return io.ErrUnexpectedEOF
  1720. }
  1721. return nil
  1722. }
  1723. func (m *Folder) Unmarshal(data []byte) error {
  1724. l := len(data)
  1725. iNdEx := 0
  1726. for iNdEx < l {
  1727. preIndex := iNdEx
  1728. var wire uint64
  1729. for shift := uint(0); ; shift += 7 {
  1730. if shift >= 64 {
  1731. return ErrIntOverflowBep
  1732. }
  1733. if iNdEx >= l {
  1734. return io.ErrUnexpectedEOF
  1735. }
  1736. b := data[iNdEx]
  1737. iNdEx++
  1738. wire |= (uint64(b) & 0x7F) << shift
  1739. if b < 0x80 {
  1740. break
  1741. }
  1742. }
  1743. fieldNum := int32(wire >> 3)
  1744. wireType := int(wire & 0x7)
  1745. if wireType == 4 {
  1746. return fmt.Errorf("proto: Folder: wiretype end group for non-group")
  1747. }
  1748. if fieldNum <= 0 {
  1749. return fmt.Errorf("proto: Folder: illegal tag %d (wire type %d)", fieldNum, wire)
  1750. }
  1751. switch fieldNum {
  1752. case 1:
  1753. if wireType != 2 {
  1754. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1755. }
  1756. var stringLen uint64
  1757. for shift := uint(0); ; shift += 7 {
  1758. if shift >= 64 {
  1759. return ErrIntOverflowBep
  1760. }
  1761. if iNdEx >= l {
  1762. return io.ErrUnexpectedEOF
  1763. }
  1764. b := data[iNdEx]
  1765. iNdEx++
  1766. stringLen |= (uint64(b) & 0x7F) << shift
  1767. if b < 0x80 {
  1768. break
  1769. }
  1770. }
  1771. intStringLen := int(stringLen)
  1772. if intStringLen < 0 {
  1773. return ErrInvalidLengthBep
  1774. }
  1775. postIndex := iNdEx + intStringLen
  1776. if postIndex > l {
  1777. return io.ErrUnexpectedEOF
  1778. }
  1779. m.ID = string(data[iNdEx:postIndex])
  1780. iNdEx = postIndex
  1781. case 2:
  1782. if wireType != 2 {
  1783. return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
  1784. }
  1785. var stringLen uint64
  1786. for shift := uint(0); ; shift += 7 {
  1787. if shift >= 64 {
  1788. return ErrIntOverflowBep
  1789. }
  1790. if iNdEx >= l {
  1791. return io.ErrUnexpectedEOF
  1792. }
  1793. b := data[iNdEx]
  1794. iNdEx++
  1795. stringLen |= (uint64(b) & 0x7F) << shift
  1796. if b < 0x80 {
  1797. break
  1798. }
  1799. }
  1800. intStringLen := int(stringLen)
  1801. if intStringLen < 0 {
  1802. return ErrInvalidLengthBep
  1803. }
  1804. postIndex := iNdEx + intStringLen
  1805. if postIndex > l {
  1806. return io.ErrUnexpectedEOF
  1807. }
  1808. m.Label = string(data[iNdEx:postIndex])
  1809. iNdEx = postIndex
  1810. case 3:
  1811. if wireType != 0 {
  1812. return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
  1813. }
  1814. var v int
  1815. for shift := uint(0); ; shift += 7 {
  1816. if shift >= 64 {
  1817. return ErrIntOverflowBep
  1818. }
  1819. if iNdEx >= l {
  1820. return io.ErrUnexpectedEOF
  1821. }
  1822. b := data[iNdEx]
  1823. iNdEx++
  1824. v |= (int(b) & 0x7F) << shift
  1825. if b < 0x80 {
  1826. break
  1827. }
  1828. }
  1829. m.ReadOnly = bool(v != 0)
  1830. case 4:
  1831. if wireType != 0 {
  1832. return fmt.Errorf("proto: wrong wireType = %d for field IgnorePermissions", wireType)
  1833. }
  1834. var v int
  1835. for shift := uint(0); ; shift += 7 {
  1836. if shift >= 64 {
  1837. return ErrIntOverflowBep
  1838. }
  1839. if iNdEx >= l {
  1840. return io.ErrUnexpectedEOF
  1841. }
  1842. b := data[iNdEx]
  1843. iNdEx++
  1844. v |= (int(b) & 0x7F) << shift
  1845. if b < 0x80 {
  1846. break
  1847. }
  1848. }
  1849. m.IgnorePermissions = bool(v != 0)
  1850. case 5:
  1851. if wireType != 0 {
  1852. return fmt.Errorf("proto: wrong wireType = %d for field IgnoreDelete", wireType)
  1853. }
  1854. var v int
  1855. for shift := uint(0); ; shift += 7 {
  1856. if shift >= 64 {
  1857. return ErrIntOverflowBep
  1858. }
  1859. if iNdEx >= l {
  1860. return io.ErrUnexpectedEOF
  1861. }
  1862. b := data[iNdEx]
  1863. iNdEx++
  1864. v |= (int(b) & 0x7F) << shift
  1865. if b < 0x80 {
  1866. break
  1867. }
  1868. }
  1869. m.IgnoreDelete = bool(v != 0)
  1870. case 6:
  1871. if wireType != 0 {
  1872. return fmt.Errorf("proto: wrong wireType = %d for field DisableTempIndexes", wireType)
  1873. }
  1874. var v int
  1875. for shift := uint(0); ; shift += 7 {
  1876. if shift >= 64 {
  1877. return ErrIntOverflowBep
  1878. }
  1879. if iNdEx >= l {
  1880. return io.ErrUnexpectedEOF
  1881. }
  1882. b := data[iNdEx]
  1883. iNdEx++
  1884. v |= (int(b) & 0x7F) << shift
  1885. if b < 0x80 {
  1886. break
  1887. }
  1888. }
  1889. m.DisableTempIndexes = bool(v != 0)
  1890. case 16:
  1891. if wireType != 2 {
  1892. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  1893. }
  1894. var msglen int
  1895. for shift := uint(0); ; shift += 7 {
  1896. if shift >= 64 {
  1897. return ErrIntOverflowBep
  1898. }
  1899. if iNdEx >= l {
  1900. return io.ErrUnexpectedEOF
  1901. }
  1902. b := data[iNdEx]
  1903. iNdEx++
  1904. msglen |= (int(b) & 0x7F) << shift
  1905. if b < 0x80 {
  1906. break
  1907. }
  1908. }
  1909. if msglen < 0 {
  1910. return ErrInvalidLengthBep
  1911. }
  1912. postIndex := iNdEx + msglen
  1913. if postIndex > l {
  1914. return io.ErrUnexpectedEOF
  1915. }
  1916. m.Devices = append(m.Devices, Device{})
  1917. if err := m.Devices[len(m.Devices)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  1918. return err
  1919. }
  1920. iNdEx = postIndex
  1921. default:
  1922. iNdEx = preIndex
  1923. skippy, err := skipBep(data[iNdEx:])
  1924. if err != nil {
  1925. return err
  1926. }
  1927. if skippy < 0 {
  1928. return ErrInvalidLengthBep
  1929. }
  1930. if (iNdEx + skippy) > l {
  1931. return io.ErrUnexpectedEOF
  1932. }
  1933. iNdEx += skippy
  1934. }
  1935. }
  1936. if iNdEx > l {
  1937. return io.ErrUnexpectedEOF
  1938. }
  1939. return nil
  1940. }
  1941. func (m *Device) Unmarshal(data []byte) error {
  1942. l := len(data)
  1943. iNdEx := 0
  1944. for iNdEx < l {
  1945. preIndex := iNdEx
  1946. var wire uint64
  1947. for shift := uint(0); ; shift += 7 {
  1948. if shift >= 64 {
  1949. return ErrIntOverflowBep
  1950. }
  1951. if iNdEx >= l {
  1952. return io.ErrUnexpectedEOF
  1953. }
  1954. b := data[iNdEx]
  1955. iNdEx++
  1956. wire |= (uint64(b) & 0x7F) << shift
  1957. if b < 0x80 {
  1958. break
  1959. }
  1960. }
  1961. fieldNum := int32(wire >> 3)
  1962. wireType := int(wire & 0x7)
  1963. if wireType == 4 {
  1964. return fmt.Errorf("proto: Device: wiretype end group for non-group")
  1965. }
  1966. if fieldNum <= 0 {
  1967. return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
  1968. }
  1969. switch fieldNum {
  1970. case 1:
  1971. if wireType != 2 {
  1972. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1973. }
  1974. var byteLen int
  1975. for shift := uint(0); ; shift += 7 {
  1976. if shift >= 64 {
  1977. return ErrIntOverflowBep
  1978. }
  1979. if iNdEx >= l {
  1980. return io.ErrUnexpectedEOF
  1981. }
  1982. b := data[iNdEx]
  1983. iNdEx++
  1984. byteLen |= (int(b) & 0x7F) << shift
  1985. if b < 0x80 {
  1986. break
  1987. }
  1988. }
  1989. if byteLen < 0 {
  1990. return ErrInvalidLengthBep
  1991. }
  1992. postIndex := iNdEx + byteLen
  1993. if postIndex > l {
  1994. return io.ErrUnexpectedEOF
  1995. }
  1996. if err := m.ID.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1997. return err
  1998. }
  1999. iNdEx = postIndex
  2000. case 2:
  2001. if wireType != 2 {
  2002. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2003. }
  2004. var stringLen uint64
  2005. for shift := uint(0); ; shift += 7 {
  2006. if shift >= 64 {
  2007. return ErrIntOverflowBep
  2008. }
  2009. if iNdEx >= l {
  2010. return io.ErrUnexpectedEOF
  2011. }
  2012. b := data[iNdEx]
  2013. iNdEx++
  2014. stringLen |= (uint64(b) & 0x7F) << shift
  2015. if b < 0x80 {
  2016. break
  2017. }
  2018. }
  2019. intStringLen := int(stringLen)
  2020. if intStringLen < 0 {
  2021. return ErrInvalidLengthBep
  2022. }
  2023. postIndex := iNdEx + intStringLen
  2024. if postIndex > l {
  2025. return io.ErrUnexpectedEOF
  2026. }
  2027. m.Name = string(data[iNdEx:postIndex])
  2028. iNdEx = postIndex
  2029. case 3:
  2030. if wireType != 2 {
  2031. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  2032. }
  2033. var stringLen uint64
  2034. for shift := uint(0); ; shift += 7 {
  2035. if shift >= 64 {
  2036. return ErrIntOverflowBep
  2037. }
  2038. if iNdEx >= l {
  2039. return io.ErrUnexpectedEOF
  2040. }
  2041. b := data[iNdEx]
  2042. iNdEx++
  2043. stringLen |= (uint64(b) & 0x7F) << shift
  2044. if b < 0x80 {
  2045. break
  2046. }
  2047. }
  2048. intStringLen := int(stringLen)
  2049. if intStringLen < 0 {
  2050. return ErrInvalidLengthBep
  2051. }
  2052. postIndex := iNdEx + intStringLen
  2053. if postIndex > l {
  2054. return io.ErrUnexpectedEOF
  2055. }
  2056. m.Addresses = append(m.Addresses, string(data[iNdEx:postIndex]))
  2057. iNdEx = postIndex
  2058. case 4:
  2059. if wireType != 0 {
  2060. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  2061. }
  2062. m.Compression = 0
  2063. for shift := uint(0); ; shift += 7 {
  2064. if shift >= 64 {
  2065. return ErrIntOverflowBep
  2066. }
  2067. if iNdEx >= l {
  2068. return io.ErrUnexpectedEOF
  2069. }
  2070. b := data[iNdEx]
  2071. iNdEx++
  2072. m.Compression |= (Compression(b) & 0x7F) << shift
  2073. if b < 0x80 {
  2074. break
  2075. }
  2076. }
  2077. case 5:
  2078. if wireType != 2 {
  2079. return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType)
  2080. }
  2081. var stringLen uint64
  2082. for shift := uint(0); ; shift += 7 {
  2083. if shift >= 64 {
  2084. return ErrIntOverflowBep
  2085. }
  2086. if iNdEx >= l {
  2087. return io.ErrUnexpectedEOF
  2088. }
  2089. b := data[iNdEx]
  2090. iNdEx++
  2091. stringLen |= (uint64(b) & 0x7F) << shift
  2092. if b < 0x80 {
  2093. break
  2094. }
  2095. }
  2096. intStringLen := int(stringLen)
  2097. if intStringLen < 0 {
  2098. return ErrInvalidLengthBep
  2099. }
  2100. postIndex := iNdEx + intStringLen
  2101. if postIndex > l {
  2102. return io.ErrUnexpectedEOF
  2103. }
  2104. m.CertName = string(data[iNdEx:postIndex])
  2105. iNdEx = postIndex
  2106. case 6:
  2107. if wireType != 0 {
  2108. return fmt.Errorf("proto: wrong wireType = %d for field MaxSequence", wireType)
  2109. }
  2110. m.MaxSequence = 0
  2111. for shift := uint(0); ; shift += 7 {
  2112. if shift >= 64 {
  2113. return ErrIntOverflowBep
  2114. }
  2115. if iNdEx >= l {
  2116. return io.ErrUnexpectedEOF
  2117. }
  2118. b := data[iNdEx]
  2119. iNdEx++
  2120. m.MaxSequence |= (int64(b) & 0x7F) << shift
  2121. if b < 0x80 {
  2122. break
  2123. }
  2124. }
  2125. case 7:
  2126. if wireType != 0 {
  2127. return fmt.Errorf("proto: wrong wireType = %d for field Introducer", wireType)
  2128. }
  2129. var v int
  2130. for shift := uint(0); ; shift += 7 {
  2131. if shift >= 64 {
  2132. return ErrIntOverflowBep
  2133. }
  2134. if iNdEx >= l {
  2135. return io.ErrUnexpectedEOF
  2136. }
  2137. b := data[iNdEx]
  2138. iNdEx++
  2139. v |= (int(b) & 0x7F) << shift
  2140. if b < 0x80 {
  2141. break
  2142. }
  2143. }
  2144. m.Introducer = bool(v != 0)
  2145. case 8:
  2146. if wireType != 0 {
  2147. return fmt.Errorf("proto: wrong wireType = %d for field IndexID", wireType)
  2148. }
  2149. m.IndexID = 0
  2150. for shift := uint(0); ; shift += 7 {
  2151. if shift >= 64 {
  2152. return ErrIntOverflowBep
  2153. }
  2154. if iNdEx >= l {
  2155. return io.ErrUnexpectedEOF
  2156. }
  2157. b := data[iNdEx]
  2158. iNdEx++
  2159. m.IndexID |= (IndexID(b) & 0x7F) << shift
  2160. if b < 0x80 {
  2161. break
  2162. }
  2163. }
  2164. default:
  2165. iNdEx = preIndex
  2166. skippy, err := skipBep(data[iNdEx:])
  2167. if err != nil {
  2168. return err
  2169. }
  2170. if skippy < 0 {
  2171. return ErrInvalidLengthBep
  2172. }
  2173. if (iNdEx + skippy) > l {
  2174. return io.ErrUnexpectedEOF
  2175. }
  2176. iNdEx += skippy
  2177. }
  2178. }
  2179. if iNdEx > l {
  2180. return io.ErrUnexpectedEOF
  2181. }
  2182. return nil
  2183. }
  2184. func (m *Index) Unmarshal(data []byte) error {
  2185. l := len(data)
  2186. iNdEx := 0
  2187. for iNdEx < l {
  2188. preIndex := iNdEx
  2189. var wire uint64
  2190. for shift := uint(0); ; shift += 7 {
  2191. if shift >= 64 {
  2192. return ErrIntOverflowBep
  2193. }
  2194. if iNdEx >= l {
  2195. return io.ErrUnexpectedEOF
  2196. }
  2197. b := data[iNdEx]
  2198. iNdEx++
  2199. wire |= (uint64(b) & 0x7F) << shift
  2200. if b < 0x80 {
  2201. break
  2202. }
  2203. }
  2204. fieldNum := int32(wire >> 3)
  2205. wireType := int(wire & 0x7)
  2206. if wireType == 4 {
  2207. return fmt.Errorf("proto: Index: wiretype end group for non-group")
  2208. }
  2209. if fieldNum <= 0 {
  2210. return fmt.Errorf("proto: Index: illegal tag %d (wire type %d)", fieldNum, wire)
  2211. }
  2212. switch fieldNum {
  2213. case 1:
  2214. if wireType != 2 {
  2215. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  2216. }
  2217. var stringLen uint64
  2218. for shift := uint(0); ; shift += 7 {
  2219. if shift >= 64 {
  2220. return ErrIntOverflowBep
  2221. }
  2222. if iNdEx >= l {
  2223. return io.ErrUnexpectedEOF
  2224. }
  2225. b := data[iNdEx]
  2226. iNdEx++
  2227. stringLen |= (uint64(b) & 0x7F) << shift
  2228. if b < 0x80 {
  2229. break
  2230. }
  2231. }
  2232. intStringLen := int(stringLen)
  2233. if intStringLen < 0 {
  2234. return ErrInvalidLengthBep
  2235. }
  2236. postIndex := iNdEx + intStringLen
  2237. if postIndex > l {
  2238. return io.ErrUnexpectedEOF
  2239. }
  2240. m.Folder = string(data[iNdEx:postIndex])
  2241. iNdEx = postIndex
  2242. case 2:
  2243. if wireType != 2 {
  2244. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  2245. }
  2246. var msglen int
  2247. for shift := uint(0); ; shift += 7 {
  2248. if shift >= 64 {
  2249. return ErrIntOverflowBep
  2250. }
  2251. if iNdEx >= l {
  2252. return io.ErrUnexpectedEOF
  2253. }
  2254. b := data[iNdEx]
  2255. iNdEx++
  2256. msglen |= (int(b) & 0x7F) << shift
  2257. if b < 0x80 {
  2258. break
  2259. }
  2260. }
  2261. if msglen < 0 {
  2262. return ErrInvalidLengthBep
  2263. }
  2264. postIndex := iNdEx + msglen
  2265. if postIndex > l {
  2266. return io.ErrUnexpectedEOF
  2267. }
  2268. m.Files = append(m.Files, FileInfo{})
  2269. if err := m.Files[len(m.Files)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2270. return err
  2271. }
  2272. iNdEx = postIndex
  2273. default:
  2274. iNdEx = preIndex
  2275. skippy, err := skipBep(data[iNdEx:])
  2276. if err != nil {
  2277. return err
  2278. }
  2279. if skippy < 0 {
  2280. return ErrInvalidLengthBep
  2281. }
  2282. if (iNdEx + skippy) > l {
  2283. return io.ErrUnexpectedEOF
  2284. }
  2285. iNdEx += skippy
  2286. }
  2287. }
  2288. if iNdEx > l {
  2289. return io.ErrUnexpectedEOF
  2290. }
  2291. return nil
  2292. }
  2293. func (m *IndexUpdate) Unmarshal(data []byte) error {
  2294. l := len(data)
  2295. iNdEx := 0
  2296. for iNdEx < l {
  2297. preIndex := iNdEx
  2298. var wire uint64
  2299. for shift := uint(0); ; shift += 7 {
  2300. if shift >= 64 {
  2301. return ErrIntOverflowBep
  2302. }
  2303. if iNdEx >= l {
  2304. return io.ErrUnexpectedEOF
  2305. }
  2306. b := data[iNdEx]
  2307. iNdEx++
  2308. wire |= (uint64(b) & 0x7F) << shift
  2309. if b < 0x80 {
  2310. break
  2311. }
  2312. }
  2313. fieldNum := int32(wire >> 3)
  2314. wireType := int(wire & 0x7)
  2315. if wireType == 4 {
  2316. return fmt.Errorf("proto: IndexUpdate: wiretype end group for non-group")
  2317. }
  2318. if fieldNum <= 0 {
  2319. return fmt.Errorf("proto: IndexUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  2320. }
  2321. switch fieldNum {
  2322. case 1:
  2323. if wireType != 2 {
  2324. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  2325. }
  2326. var stringLen uint64
  2327. for shift := uint(0); ; shift += 7 {
  2328. if shift >= 64 {
  2329. return ErrIntOverflowBep
  2330. }
  2331. if iNdEx >= l {
  2332. return io.ErrUnexpectedEOF
  2333. }
  2334. b := data[iNdEx]
  2335. iNdEx++
  2336. stringLen |= (uint64(b) & 0x7F) << shift
  2337. if b < 0x80 {
  2338. break
  2339. }
  2340. }
  2341. intStringLen := int(stringLen)
  2342. if intStringLen < 0 {
  2343. return ErrInvalidLengthBep
  2344. }
  2345. postIndex := iNdEx + intStringLen
  2346. if postIndex > l {
  2347. return io.ErrUnexpectedEOF
  2348. }
  2349. m.Folder = string(data[iNdEx:postIndex])
  2350. iNdEx = postIndex
  2351. case 2:
  2352. if wireType != 2 {
  2353. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  2354. }
  2355. var msglen int
  2356. for shift := uint(0); ; shift += 7 {
  2357. if shift >= 64 {
  2358. return ErrIntOverflowBep
  2359. }
  2360. if iNdEx >= l {
  2361. return io.ErrUnexpectedEOF
  2362. }
  2363. b := data[iNdEx]
  2364. iNdEx++
  2365. msglen |= (int(b) & 0x7F) << shift
  2366. if b < 0x80 {
  2367. break
  2368. }
  2369. }
  2370. if msglen < 0 {
  2371. return ErrInvalidLengthBep
  2372. }
  2373. postIndex := iNdEx + msglen
  2374. if postIndex > l {
  2375. return io.ErrUnexpectedEOF
  2376. }
  2377. m.Files = append(m.Files, FileInfo{})
  2378. if err := m.Files[len(m.Files)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2379. return err
  2380. }
  2381. iNdEx = postIndex
  2382. default:
  2383. iNdEx = preIndex
  2384. skippy, err := skipBep(data[iNdEx:])
  2385. if err != nil {
  2386. return err
  2387. }
  2388. if skippy < 0 {
  2389. return ErrInvalidLengthBep
  2390. }
  2391. if (iNdEx + skippy) > l {
  2392. return io.ErrUnexpectedEOF
  2393. }
  2394. iNdEx += skippy
  2395. }
  2396. }
  2397. if iNdEx > l {
  2398. return io.ErrUnexpectedEOF
  2399. }
  2400. return nil
  2401. }
  2402. func (m *FileInfo) Unmarshal(data []byte) error {
  2403. l := len(data)
  2404. iNdEx := 0
  2405. for iNdEx < l {
  2406. preIndex := iNdEx
  2407. var wire uint64
  2408. for shift := uint(0); ; shift += 7 {
  2409. if shift >= 64 {
  2410. return ErrIntOverflowBep
  2411. }
  2412. if iNdEx >= l {
  2413. return io.ErrUnexpectedEOF
  2414. }
  2415. b := data[iNdEx]
  2416. iNdEx++
  2417. wire |= (uint64(b) & 0x7F) << shift
  2418. if b < 0x80 {
  2419. break
  2420. }
  2421. }
  2422. fieldNum := int32(wire >> 3)
  2423. wireType := int(wire & 0x7)
  2424. if wireType == 4 {
  2425. return fmt.Errorf("proto: FileInfo: wiretype end group for non-group")
  2426. }
  2427. if fieldNum <= 0 {
  2428. return fmt.Errorf("proto: FileInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  2429. }
  2430. switch fieldNum {
  2431. case 1:
  2432. if wireType != 2 {
  2433. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2434. }
  2435. var stringLen uint64
  2436. for shift := uint(0); ; shift += 7 {
  2437. if shift >= 64 {
  2438. return ErrIntOverflowBep
  2439. }
  2440. if iNdEx >= l {
  2441. return io.ErrUnexpectedEOF
  2442. }
  2443. b := data[iNdEx]
  2444. iNdEx++
  2445. stringLen |= (uint64(b) & 0x7F) << shift
  2446. if b < 0x80 {
  2447. break
  2448. }
  2449. }
  2450. intStringLen := int(stringLen)
  2451. if intStringLen < 0 {
  2452. return ErrInvalidLengthBep
  2453. }
  2454. postIndex := iNdEx + intStringLen
  2455. if postIndex > l {
  2456. return io.ErrUnexpectedEOF
  2457. }
  2458. m.Name = string(data[iNdEx:postIndex])
  2459. iNdEx = postIndex
  2460. case 2:
  2461. if wireType != 0 {
  2462. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2463. }
  2464. m.Type = 0
  2465. for shift := uint(0); ; shift += 7 {
  2466. if shift >= 64 {
  2467. return ErrIntOverflowBep
  2468. }
  2469. if iNdEx >= l {
  2470. return io.ErrUnexpectedEOF
  2471. }
  2472. b := data[iNdEx]
  2473. iNdEx++
  2474. m.Type |= (FileInfoType(b) & 0x7F) << shift
  2475. if b < 0x80 {
  2476. break
  2477. }
  2478. }
  2479. case 3:
  2480. if wireType != 0 {
  2481. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  2482. }
  2483. m.Size = 0
  2484. for shift := uint(0); ; shift += 7 {
  2485. if shift >= 64 {
  2486. return ErrIntOverflowBep
  2487. }
  2488. if iNdEx >= l {
  2489. return io.ErrUnexpectedEOF
  2490. }
  2491. b := data[iNdEx]
  2492. iNdEx++
  2493. m.Size |= (int64(b) & 0x7F) << shift
  2494. if b < 0x80 {
  2495. break
  2496. }
  2497. }
  2498. case 4:
  2499. if wireType != 0 {
  2500. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  2501. }
  2502. m.Permissions = 0
  2503. for shift := uint(0); ; shift += 7 {
  2504. if shift >= 64 {
  2505. return ErrIntOverflowBep
  2506. }
  2507. if iNdEx >= l {
  2508. return io.ErrUnexpectedEOF
  2509. }
  2510. b := data[iNdEx]
  2511. iNdEx++
  2512. m.Permissions |= (uint32(b) & 0x7F) << shift
  2513. if b < 0x80 {
  2514. break
  2515. }
  2516. }
  2517. case 5:
  2518. if wireType != 0 {
  2519. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  2520. }
  2521. m.ModifiedS = 0
  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. m.ModifiedS |= (int64(b) & 0x7F) << shift
  2532. if b < 0x80 {
  2533. break
  2534. }
  2535. }
  2536. case 6:
  2537. if wireType != 0 {
  2538. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  2539. }
  2540. var v int
  2541. for shift := uint(0); ; shift += 7 {
  2542. if shift >= 64 {
  2543. return ErrIntOverflowBep
  2544. }
  2545. if iNdEx >= l {
  2546. return io.ErrUnexpectedEOF
  2547. }
  2548. b := data[iNdEx]
  2549. iNdEx++
  2550. v |= (int(b) & 0x7F) << shift
  2551. if b < 0x80 {
  2552. break
  2553. }
  2554. }
  2555. m.Deleted = bool(v != 0)
  2556. case 7:
  2557. if wireType != 0 {
  2558. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  2559. }
  2560. var v int
  2561. for shift := uint(0); ; shift += 7 {
  2562. if shift >= 64 {
  2563. return ErrIntOverflowBep
  2564. }
  2565. if iNdEx >= l {
  2566. return io.ErrUnexpectedEOF
  2567. }
  2568. b := data[iNdEx]
  2569. iNdEx++
  2570. v |= (int(b) & 0x7F) << shift
  2571. if b < 0x80 {
  2572. break
  2573. }
  2574. }
  2575. m.Invalid = bool(v != 0)
  2576. case 8:
  2577. if wireType != 0 {
  2578. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  2579. }
  2580. var v int
  2581. for shift := uint(0); ; shift += 7 {
  2582. if shift >= 64 {
  2583. return ErrIntOverflowBep
  2584. }
  2585. if iNdEx >= l {
  2586. return io.ErrUnexpectedEOF
  2587. }
  2588. b := data[iNdEx]
  2589. iNdEx++
  2590. v |= (int(b) & 0x7F) << shift
  2591. if b < 0x80 {
  2592. break
  2593. }
  2594. }
  2595. m.NoPermissions = bool(v != 0)
  2596. case 9:
  2597. if wireType != 2 {
  2598. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  2599. }
  2600. var msglen int
  2601. for shift := uint(0); ; shift += 7 {
  2602. if shift >= 64 {
  2603. return ErrIntOverflowBep
  2604. }
  2605. if iNdEx >= l {
  2606. return io.ErrUnexpectedEOF
  2607. }
  2608. b := data[iNdEx]
  2609. iNdEx++
  2610. msglen |= (int(b) & 0x7F) << shift
  2611. if b < 0x80 {
  2612. break
  2613. }
  2614. }
  2615. if msglen < 0 {
  2616. return ErrInvalidLengthBep
  2617. }
  2618. postIndex := iNdEx + msglen
  2619. if postIndex > l {
  2620. return io.ErrUnexpectedEOF
  2621. }
  2622. if err := m.Version.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2623. return err
  2624. }
  2625. iNdEx = postIndex
  2626. case 10:
  2627. if wireType != 0 {
  2628. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  2629. }
  2630. m.Sequence = 0
  2631. for shift := uint(0); ; shift += 7 {
  2632. if shift >= 64 {
  2633. return ErrIntOverflowBep
  2634. }
  2635. if iNdEx >= l {
  2636. return io.ErrUnexpectedEOF
  2637. }
  2638. b := data[iNdEx]
  2639. iNdEx++
  2640. m.Sequence |= (int64(b) & 0x7F) << shift
  2641. if b < 0x80 {
  2642. break
  2643. }
  2644. }
  2645. case 11:
  2646. if wireType != 0 {
  2647. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  2648. }
  2649. m.ModifiedNs = 0
  2650. for shift := uint(0); ; shift += 7 {
  2651. if shift >= 64 {
  2652. return ErrIntOverflowBep
  2653. }
  2654. if iNdEx >= l {
  2655. return io.ErrUnexpectedEOF
  2656. }
  2657. b := data[iNdEx]
  2658. iNdEx++
  2659. m.ModifiedNs |= (int32(b) & 0x7F) << shift
  2660. if b < 0x80 {
  2661. break
  2662. }
  2663. }
  2664. case 16:
  2665. if wireType != 2 {
  2666. return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType)
  2667. }
  2668. var msglen int
  2669. for shift := uint(0); ; shift += 7 {
  2670. if shift >= 64 {
  2671. return ErrIntOverflowBep
  2672. }
  2673. if iNdEx >= l {
  2674. return io.ErrUnexpectedEOF
  2675. }
  2676. b := data[iNdEx]
  2677. iNdEx++
  2678. msglen |= (int(b) & 0x7F) << shift
  2679. if b < 0x80 {
  2680. break
  2681. }
  2682. }
  2683. if msglen < 0 {
  2684. return ErrInvalidLengthBep
  2685. }
  2686. postIndex := iNdEx + msglen
  2687. if postIndex > l {
  2688. return io.ErrUnexpectedEOF
  2689. }
  2690. m.Blocks = append(m.Blocks, BlockInfo{})
  2691. if err := m.Blocks[len(m.Blocks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2692. return err
  2693. }
  2694. iNdEx = postIndex
  2695. default:
  2696. iNdEx = preIndex
  2697. skippy, err := skipBep(data[iNdEx:])
  2698. if err != nil {
  2699. return err
  2700. }
  2701. if skippy < 0 {
  2702. return ErrInvalidLengthBep
  2703. }
  2704. if (iNdEx + skippy) > l {
  2705. return io.ErrUnexpectedEOF
  2706. }
  2707. iNdEx += skippy
  2708. }
  2709. }
  2710. if iNdEx > l {
  2711. return io.ErrUnexpectedEOF
  2712. }
  2713. return nil
  2714. }
  2715. func (m *BlockInfo) Unmarshal(data []byte) error {
  2716. l := len(data)
  2717. iNdEx := 0
  2718. for iNdEx < l {
  2719. preIndex := iNdEx
  2720. var wire uint64
  2721. for shift := uint(0); ; shift += 7 {
  2722. if shift >= 64 {
  2723. return ErrIntOverflowBep
  2724. }
  2725. if iNdEx >= l {
  2726. return io.ErrUnexpectedEOF
  2727. }
  2728. b := data[iNdEx]
  2729. iNdEx++
  2730. wire |= (uint64(b) & 0x7F) << shift
  2731. if b < 0x80 {
  2732. break
  2733. }
  2734. }
  2735. fieldNum := int32(wire >> 3)
  2736. wireType := int(wire & 0x7)
  2737. if wireType == 4 {
  2738. return fmt.Errorf("proto: BlockInfo: wiretype end group for non-group")
  2739. }
  2740. if fieldNum <= 0 {
  2741. return fmt.Errorf("proto: BlockInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  2742. }
  2743. switch fieldNum {
  2744. case 1:
  2745. if wireType != 0 {
  2746. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  2747. }
  2748. m.Offset = 0
  2749. for shift := uint(0); ; shift += 7 {
  2750. if shift >= 64 {
  2751. return ErrIntOverflowBep
  2752. }
  2753. if iNdEx >= l {
  2754. return io.ErrUnexpectedEOF
  2755. }
  2756. b := data[iNdEx]
  2757. iNdEx++
  2758. m.Offset |= (int64(b) & 0x7F) << shift
  2759. if b < 0x80 {
  2760. break
  2761. }
  2762. }
  2763. case 2:
  2764. if wireType != 0 {
  2765. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  2766. }
  2767. m.Size = 0
  2768. for shift := uint(0); ; shift += 7 {
  2769. if shift >= 64 {
  2770. return ErrIntOverflowBep
  2771. }
  2772. if iNdEx >= l {
  2773. return io.ErrUnexpectedEOF
  2774. }
  2775. b := data[iNdEx]
  2776. iNdEx++
  2777. m.Size |= (int32(b) & 0x7F) << shift
  2778. if b < 0x80 {
  2779. break
  2780. }
  2781. }
  2782. case 3:
  2783. if wireType != 2 {
  2784. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  2785. }
  2786. var byteLen int
  2787. for shift := uint(0); ; shift += 7 {
  2788. if shift >= 64 {
  2789. return ErrIntOverflowBep
  2790. }
  2791. if iNdEx >= l {
  2792. return io.ErrUnexpectedEOF
  2793. }
  2794. b := data[iNdEx]
  2795. iNdEx++
  2796. byteLen |= (int(b) & 0x7F) << shift
  2797. if b < 0x80 {
  2798. break
  2799. }
  2800. }
  2801. if byteLen < 0 {
  2802. return ErrInvalidLengthBep
  2803. }
  2804. postIndex := iNdEx + byteLen
  2805. if postIndex > l {
  2806. return io.ErrUnexpectedEOF
  2807. }
  2808. m.Hash = append(m.Hash[:0], data[iNdEx:postIndex]...)
  2809. if m.Hash == nil {
  2810. m.Hash = []byte{}
  2811. }
  2812. iNdEx = postIndex
  2813. default:
  2814. iNdEx = preIndex
  2815. skippy, err := skipBep(data[iNdEx:])
  2816. if err != nil {
  2817. return err
  2818. }
  2819. if skippy < 0 {
  2820. return ErrInvalidLengthBep
  2821. }
  2822. if (iNdEx + skippy) > l {
  2823. return io.ErrUnexpectedEOF
  2824. }
  2825. iNdEx += skippy
  2826. }
  2827. }
  2828. if iNdEx > l {
  2829. return io.ErrUnexpectedEOF
  2830. }
  2831. return nil
  2832. }
  2833. func (m *Vector) Unmarshal(data []byte) error {
  2834. l := len(data)
  2835. iNdEx := 0
  2836. for iNdEx < l {
  2837. preIndex := iNdEx
  2838. var wire uint64
  2839. for shift := uint(0); ; shift += 7 {
  2840. if shift >= 64 {
  2841. return ErrIntOverflowBep
  2842. }
  2843. if iNdEx >= l {
  2844. return io.ErrUnexpectedEOF
  2845. }
  2846. b := data[iNdEx]
  2847. iNdEx++
  2848. wire |= (uint64(b) & 0x7F) << shift
  2849. if b < 0x80 {
  2850. break
  2851. }
  2852. }
  2853. fieldNum := int32(wire >> 3)
  2854. wireType := int(wire & 0x7)
  2855. if wireType == 4 {
  2856. return fmt.Errorf("proto: Vector: wiretype end group for non-group")
  2857. }
  2858. if fieldNum <= 0 {
  2859. return fmt.Errorf("proto: Vector: illegal tag %d (wire type %d)", fieldNum, wire)
  2860. }
  2861. switch fieldNum {
  2862. case 1:
  2863. if wireType != 2 {
  2864. return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
  2865. }
  2866. var msglen int
  2867. for shift := uint(0); ; shift += 7 {
  2868. if shift >= 64 {
  2869. return ErrIntOverflowBep
  2870. }
  2871. if iNdEx >= l {
  2872. return io.ErrUnexpectedEOF
  2873. }
  2874. b := data[iNdEx]
  2875. iNdEx++
  2876. msglen |= (int(b) & 0x7F) << shift
  2877. if b < 0x80 {
  2878. break
  2879. }
  2880. }
  2881. if msglen < 0 {
  2882. return ErrInvalidLengthBep
  2883. }
  2884. postIndex := iNdEx + msglen
  2885. if postIndex > l {
  2886. return io.ErrUnexpectedEOF
  2887. }
  2888. m.Counters = append(m.Counters, Counter{})
  2889. if err := m.Counters[len(m.Counters)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2890. return err
  2891. }
  2892. iNdEx = postIndex
  2893. default:
  2894. iNdEx = preIndex
  2895. skippy, err := skipBep(data[iNdEx:])
  2896. if err != nil {
  2897. return err
  2898. }
  2899. if skippy < 0 {
  2900. return ErrInvalidLengthBep
  2901. }
  2902. if (iNdEx + skippy) > l {
  2903. return io.ErrUnexpectedEOF
  2904. }
  2905. iNdEx += skippy
  2906. }
  2907. }
  2908. if iNdEx > l {
  2909. return io.ErrUnexpectedEOF
  2910. }
  2911. return nil
  2912. }
  2913. func (m *Counter) Unmarshal(data []byte) error {
  2914. l := len(data)
  2915. iNdEx := 0
  2916. for iNdEx < l {
  2917. preIndex := iNdEx
  2918. var wire uint64
  2919. for shift := uint(0); ; shift += 7 {
  2920. if shift >= 64 {
  2921. return ErrIntOverflowBep
  2922. }
  2923. if iNdEx >= l {
  2924. return io.ErrUnexpectedEOF
  2925. }
  2926. b := data[iNdEx]
  2927. iNdEx++
  2928. wire |= (uint64(b) & 0x7F) << shift
  2929. if b < 0x80 {
  2930. break
  2931. }
  2932. }
  2933. fieldNum := int32(wire >> 3)
  2934. wireType := int(wire & 0x7)
  2935. if wireType == 4 {
  2936. return fmt.Errorf("proto: Counter: wiretype end group for non-group")
  2937. }
  2938. if fieldNum <= 0 {
  2939. return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire)
  2940. }
  2941. switch fieldNum {
  2942. case 1:
  2943. if wireType != 0 {
  2944. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2945. }
  2946. m.ID = 0
  2947. for shift := uint(0); ; shift += 7 {
  2948. if shift >= 64 {
  2949. return ErrIntOverflowBep
  2950. }
  2951. if iNdEx >= l {
  2952. return io.ErrUnexpectedEOF
  2953. }
  2954. b := data[iNdEx]
  2955. iNdEx++
  2956. m.ID |= (ShortID(b) & 0x7F) << shift
  2957. if b < 0x80 {
  2958. break
  2959. }
  2960. }
  2961. case 2:
  2962. if wireType != 0 {
  2963. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  2964. }
  2965. m.Value = 0
  2966. for shift := uint(0); ; shift += 7 {
  2967. if shift >= 64 {
  2968. return ErrIntOverflowBep
  2969. }
  2970. if iNdEx >= l {
  2971. return io.ErrUnexpectedEOF
  2972. }
  2973. b := data[iNdEx]
  2974. iNdEx++
  2975. m.Value |= (uint64(b) & 0x7F) << shift
  2976. if b < 0x80 {
  2977. break
  2978. }
  2979. }
  2980. default:
  2981. iNdEx = preIndex
  2982. skippy, err := skipBep(data[iNdEx:])
  2983. if err != nil {
  2984. return err
  2985. }
  2986. if skippy < 0 {
  2987. return ErrInvalidLengthBep
  2988. }
  2989. if (iNdEx + skippy) > l {
  2990. return io.ErrUnexpectedEOF
  2991. }
  2992. iNdEx += skippy
  2993. }
  2994. }
  2995. if iNdEx > l {
  2996. return io.ErrUnexpectedEOF
  2997. }
  2998. return nil
  2999. }
  3000. func (m *Request) Unmarshal(data []byte) error {
  3001. l := len(data)
  3002. iNdEx := 0
  3003. for iNdEx < l {
  3004. preIndex := iNdEx
  3005. var wire uint64
  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. wire |= (uint64(b) & 0x7F) << shift
  3016. if b < 0x80 {
  3017. break
  3018. }
  3019. }
  3020. fieldNum := int32(wire >> 3)
  3021. wireType := int(wire & 0x7)
  3022. if wireType == 4 {
  3023. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  3024. }
  3025. if fieldNum <= 0 {
  3026. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  3027. }
  3028. switch fieldNum {
  3029. case 1:
  3030. if wireType != 0 {
  3031. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3032. }
  3033. m.ID = 0
  3034. for shift := uint(0); ; shift += 7 {
  3035. if shift >= 64 {
  3036. return ErrIntOverflowBep
  3037. }
  3038. if iNdEx >= l {
  3039. return io.ErrUnexpectedEOF
  3040. }
  3041. b := data[iNdEx]
  3042. iNdEx++
  3043. m.ID |= (int32(b) & 0x7F) << shift
  3044. if b < 0x80 {
  3045. break
  3046. }
  3047. }
  3048. case 2:
  3049. if wireType != 2 {
  3050. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3051. }
  3052. var stringLen uint64
  3053. for shift := uint(0); ; shift += 7 {
  3054. if shift >= 64 {
  3055. return ErrIntOverflowBep
  3056. }
  3057. if iNdEx >= l {
  3058. return io.ErrUnexpectedEOF
  3059. }
  3060. b := data[iNdEx]
  3061. iNdEx++
  3062. stringLen |= (uint64(b) & 0x7F) << shift
  3063. if b < 0x80 {
  3064. break
  3065. }
  3066. }
  3067. intStringLen := int(stringLen)
  3068. if intStringLen < 0 {
  3069. return ErrInvalidLengthBep
  3070. }
  3071. postIndex := iNdEx + intStringLen
  3072. if postIndex > l {
  3073. return io.ErrUnexpectedEOF
  3074. }
  3075. m.Folder = string(data[iNdEx:postIndex])
  3076. iNdEx = postIndex
  3077. case 3:
  3078. if wireType != 2 {
  3079. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3080. }
  3081. var stringLen uint64
  3082. for shift := uint(0); ; shift += 7 {
  3083. if shift >= 64 {
  3084. return ErrIntOverflowBep
  3085. }
  3086. if iNdEx >= l {
  3087. return io.ErrUnexpectedEOF
  3088. }
  3089. b := data[iNdEx]
  3090. iNdEx++
  3091. stringLen |= (uint64(b) & 0x7F) << shift
  3092. if b < 0x80 {
  3093. break
  3094. }
  3095. }
  3096. intStringLen := int(stringLen)
  3097. if intStringLen < 0 {
  3098. return ErrInvalidLengthBep
  3099. }
  3100. postIndex := iNdEx + intStringLen
  3101. if postIndex > l {
  3102. return io.ErrUnexpectedEOF
  3103. }
  3104. m.Name = string(data[iNdEx:postIndex])
  3105. iNdEx = postIndex
  3106. case 4:
  3107. if wireType != 0 {
  3108. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  3109. }
  3110. m.Offset = 0
  3111. for shift := uint(0); ; shift += 7 {
  3112. if shift >= 64 {
  3113. return ErrIntOverflowBep
  3114. }
  3115. if iNdEx >= l {
  3116. return io.ErrUnexpectedEOF
  3117. }
  3118. b := data[iNdEx]
  3119. iNdEx++
  3120. m.Offset |= (int64(b) & 0x7F) << shift
  3121. if b < 0x80 {
  3122. break
  3123. }
  3124. }
  3125. case 5:
  3126. if wireType != 0 {
  3127. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  3128. }
  3129. m.Size = 0
  3130. for shift := uint(0); ; shift += 7 {
  3131. if shift >= 64 {
  3132. return ErrIntOverflowBep
  3133. }
  3134. if iNdEx >= l {
  3135. return io.ErrUnexpectedEOF
  3136. }
  3137. b := data[iNdEx]
  3138. iNdEx++
  3139. m.Size |= (int32(b) & 0x7F) << shift
  3140. if b < 0x80 {
  3141. break
  3142. }
  3143. }
  3144. case 6:
  3145. if wireType != 2 {
  3146. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  3147. }
  3148. var byteLen int
  3149. for shift := uint(0); ; shift += 7 {
  3150. if shift >= 64 {
  3151. return ErrIntOverflowBep
  3152. }
  3153. if iNdEx >= l {
  3154. return io.ErrUnexpectedEOF
  3155. }
  3156. b := data[iNdEx]
  3157. iNdEx++
  3158. byteLen |= (int(b) & 0x7F) << shift
  3159. if b < 0x80 {
  3160. break
  3161. }
  3162. }
  3163. if byteLen < 0 {
  3164. return ErrInvalidLengthBep
  3165. }
  3166. postIndex := iNdEx + byteLen
  3167. if postIndex > l {
  3168. return io.ErrUnexpectedEOF
  3169. }
  3170. m.Hash = append(m.Hash[:0], data[iNdEx:postIndex]...)
  3171. if m.Hash == nil {
  3172. m.Hash = []byte{}
  3173. }
  3174. iNdEx = postIndex
  3175. case 7:
  3176. if wireType != 0 {
  3177. return fmt.Errorf("proto: wrong wireType = %d for field FromTemporary", wireType)
  3178. }
  3179. var v int
  3180. for shift := uint(0); ; shift += 7 {
  3181. if shift >= 64 {
  3182. return ErrIntOverflowBep
  3183. }
  3184. if iNdEx >= l {
  3185. return io.ErrUnexpectedEOF
  3186. }
  3187. b := data[iNdEx]
  3188. iNdEx++
  3189. v |= (int(b) & 0x7F) << shift
  3190. if b < 0x80 {
  3191. break
  3192. }
  3193. }
  3194. m.FromTemporary = bool(v != 0)
  3195. default:
  3196. iNdEx = preIndex
  3197. skippy, err := skipBep(data[iNdEx:])
  3198. if err != nil {
  3199. return err
  3200. }
  3201. if skippy < 0 {
  3202. return ErrInvalidLengthBep
  3203. }
  3204. if (iNdEx + skippy) > l {
  3205. return io.ErrUnexpectedEOF
  3206. }
  3207. iNdEx += skippy
  3208. }
  3209. }
  3210. if iNdEx > l {
  3211. return io.ErrUnexpectedEOF
  3212. }
  3213. return nil
  3214. }
  3215. func (m *Response) Unmarshal(data []byte) error {
  3216. l := len(data)
  3217. iNdEx := 0
  3218. for iNdEx < l {
  3219. preIndex := iNdEx
  3220. var wire uint64
  3221. for shift := uint(0); ; shift += 7 {
  3222. if shift >= 64 {
  3223. return ErrIntOverflowBep
  3224. }
  3225. if iNdEx >= l {
  3226. return io.ErrUnexpectedEOF
  3227. }
  3228. b := data[iNdEx]
  3229. iNdEx++
  3230. wire |= (uint64(b) & 0x7F) << shift
  3231. if b < 0x80 {
  3232. break
  3233. }
  3234. }
  3235. fieldNum := int32(wire >> 3)
  3236. wireType := int(wire & 0x7)
  3237. if wireType == 4 {
  3238. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  3239. }
  3240. if fieldNum <= 0 {
  3241. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  3242. }
  3243. switch fieldNum {
  3244. case 1:
  3245. if wireType != 0 {
  3246. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3247. }
  3248. m.ID = 0
  3249. for shift := uint(0); ; shift += 7 {
  3250. if shift >= 64 {
  3251. return ErrIntOverflowBep
  3252. }
  3253. if iNdEx >= l {
  3254. return io.ErrUnexpectedEOF
  3255. }
  3256. b := data[iNdEx]
  3257. iNdEx++
  3258. m.ID |= (int32(b) & 0x7F) << shift
  3259. if b < 0x80 {
  3260. break
  3261. }
  3262. }
  3263. case 2:
  3264. if wireType != 2 {
  3265. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  3266. }
  3267. var byteLen int
  3268. for shift := uint(0); ; shift += 7 {
  3269. if shift >= 64 {
  3270. return ErrIntOverflowBep
  3271. }
  3272. if iNdEx >= l {
  3273. return io.ErrUnexpectedEOF
  3274. }
  3275. b := data[iNdEx]
  3276. iNdEx++
  3277. byteLen |= (int(b) & 0x7F) << shift
  3278. if b < 0x80 {
  3279. break
  3280. }
  3281. }
  3282. if byteLen < 0 {
  3283. return ErrInvalidLengthBep
  3284. }
  3285. postIndex := iNdEx + byteLen
  3286. if postIndex > l {
  3287. return io.ErrUnexpectedEOF
  3288. }
  3289. m.Data = append(m.Data[:0], data[iNdEx:postIndex]...)
  3290. if m.Data == nil {
  3291. m.Data = []byte{}
  3292. }
  3293. iNdEx = postIndex
  3294. case 3:
  3295. if wireType != 0 {
  3296. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  3297. }
  3298. m.Code = 0
  3299. for shift := uint(0); ; shift += 7 {
  3300. if shift >= 64 {
  3301. return ErrIntOverflowBep
  3302. }
  3303. if iNdEx >= l {
  3304. return io.ErrUnexpectedEOF
  3305. }
  3306. b := data[iNdEx]
  3307. iNdEx++
  3308. m.Code |= (ErrorCode(b) & 0x7F) << shift
  3309. if b < 0x80 {
  3310. break
  3311. }
  3312. }
  3313. default:
  3314. iNdEx = preIndex
  3315. skippy, err := skipBep(data[iNdEx:])
  3316. if err != nil {
  3317. return err
  3318. }
  3319. if skippy < 0 {
  3320. return ErrInvalidLengthBep
  3321. }
  3322. if (iNdEx + skippy) > l {
  3323. return io.ErrUnexpectedEOF
  3324. }
  3325. iNdEx += skippy
  3326. }
  3327. }
  3328. if iNdEx > l {
  3329. return io.ErrUnexpectedEOF
  3330. }
  3331. return nil
  3332. }
  3333. func (m *DownloadProgress) Unmarshal(data []byte) error {
  3334. l := len(data)
  3335. iNdEx := 0
  3336. for iNdEx < l {
  3337. preIndex := iNdEx
  3338. var wire uint64
  3339. for shift := uint(0); ; shift += 7 {
  3340. if shift >= 64 {
  3341. return ErrIntOverflowBep
  3342. }
  3343. if iNdEx >= l {
  3344. return io.ErrUnexpectedEOF
  3345. }
  3346. b := data[iNdEx]
  3347. iNdEx++
  3348. wire |= (uint64(b) & 0x7F) << shift
  3349. if b < 0x80 {
  3350. break
  3351. }
  3352. }
  3353. fieldNum := int32(wire >> 3)
  3354. wireType := int(wire & 0x7)
  3355. if wireType == 4 {
  3356. return fmt.Errorf("proto: DownloadProgress: wiretype end group for non-group")
  3357. }
  3358. if fieldNum <= 0 {
  3359. return fmt.Errorf("proto: DownloadProgress: illegal tag %d (wire type %d)", fieldNum, wire)
  3360. }
  3361. switch fieldNum {
  3362. case 1:
  3363. if wireType != 2 {
  3364. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3365. }
  3366. var stringLen uint64
  3367. for shift := uint(0); ; shift += 7 {
  3368. if shift >= 64 {
  3369. return ErrIntOverflowBep
  3370. }
  3371. if iNdEx >= l {
  3372. return io.ErrUnexpectedEOF
  3373. }
  3374. b := data[iNdEx]
  3375. iNdEx++
  3376. stringLen |= (uint64(b) & 0x7F) << shift
  3377. if b < 0x80 {
  3378. break
  3379. }
  3380. }
  3381. intStringLen := int(stringLen)
  3382. if intStringLen < 0 {
  3383. return ErrInvalidLengthBep
  3384. }
  3385. postIndex := iNdEx + intStringLen
  3386. if postIndex > l {
  3387. return io.ErrUnexpectedEOF
  3388. }
  3389. m.Folder = string(data[iNdEx:postIndex])
  3390. iNdEx = postIndex
  3391. case 2:
  3392. if wireType != 2 {
  3393. return fmt.Errorf("proto: wrong wireType = %d for field Updates", wireType)
  3394. }
  3395. var msglen int
  3396. for shift := uint(0); ; shift += 7 {
  3397. if shift >= 64 {
  3398. return ErrIntOverflowBep
  3399. }
  3400. if iNdEx >= l {
  3401. return io.ErrUnexpectedEOF
  3402. }
  3403. b := data[iNdEx]
  3404. iNdEx++
  3405. msglen |= (int(b) & 0x7F) << shift
  3406. if b < 0x80 {
  3407. break
  3408. }
  3409. }
  3410. if msglen < 0 {
  3411. return ErrInvalidLengthBep
  3412. }
  3413. postIndex := iNdEx + msglen
  3414. if postIndex > l {
  3415. return io.ErrUnexpectedEOF
  3416. }
  3417. m.Updates = append(m.Updates, FileDownloadProgressUpdate{})
  3418. if err := m.Updates[len(m.Updates)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  3419. return err
  3420. }
  3421. iNdEx = postIndex
  3422. default:
  3423. iNdEx = preIndex
  3424. skippy, err := skipBep(data[iNdEx:])
  3425. if err != nil {
  3426. return err
  3427. }
  3428. if skippy < 0 {
  3429. return ErrInvalidLengthBep
  3430. }
  3431. if (iNdEx + skippy) > l {
  3432. return io.ErrUnexpectedEOF
  3433. }
  3434. iNdEx += skippy
  3435. }
  3436. }
  3437. if iNdEx > l {
  3438. return io.ErrUnexpectedEOF
  3439. }
  3440. return nil
  3441. }
  3442. func (m *FileDownloadProgressUpdate) Unmarshal(data []byte) error {
  3443. l := len(data)
  3444. iNdEx := 0
  3445. for iNdEx < l {
  3446. preIndex := iNdEx
  3447. var wire uint64
  3448. for shift := uint(0); ; shift += 7 {
  3449. if shift >= 64 {
  3450. return ErrIntOverflowBep
  3451. }
  3452. if iNdEx >= l {
  3453. return io.ErrUnexpectedEOF
  3454. }
  3455. b := data[iNdEx]
  3456. iNdEx++
  3457. wire |= (uint64(b) & 0x7F) << shift
  3458. if b < 0x80 {
  3459. break
  3460. }
  3461. }
  3462. fieldNum := int32(wire >> 3)
  3463. wireType := int(wire & 0x7)
  3464. if wireType == 4 {
  3465. return fmt.Errorf("proto: FileDownloadProgressUpdate: wiretype end group for non-group")
  3466. }
  3467. if fieldNum <= 0 {
  3468. return fmt.Errorf("proto: FileDownloadProgressUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  3469. }
  3470. switch fieldNum {
  3471. case 1:
  3472. if wireType != 0 {
  3473. return fmt.Errorf("proto: wrong wireType = %d for field UpdateType", wireType)
  3474. }
  3475. m.UpdateType = 0
  3476. for shift := uint(0); ; shift += 7 {
  3477. if shift >= 64 {
  3478. return ErrIntOverflowBep
  3479. }
  3480. if iNdEx >= l {
  3481. return io.ErrUnexpectedEOF
  3482. }
  3483. b := data[iNdEx]
  3484. iNdEx++
  3485. m.UpdateType |= (FileDownloadProgressUpdateType(b) & 0x7F) << shift
  3486. if b < 0x80 {
  3487. break
  3488. }
  3489. }
  3490. case 2:
  3491. if wireType != 2 {
  3492. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3493. }
  3494. var stringLen uint64
  3495. for shift := uint(0); ; shift += 7 {
  3496. if shift >= 64 {
  3497. return ErrIntOverflowBep
  3498. }
  3499. if iNdEx >= l {
  3500. return io.ErrUnexpectedEOF
  3501. }
  3502. b := data[iNdEx]
  3503. iNdEx++
  3504. stringLen |= (uint64(b) & 0x7F) << shift
  3505. if b < 0x80 {
  3506. break
  3507. }
  3508. }
  3509. intStringLen := int(stringLen)
  3510. if intStringLen < 0 {
  3511. return ErrInvalidLengthBep
  3512. }
  3513. postIndex := iNdEx + intStringLen
  3514. if postIndex > l {
  3515. return io.ErrUnexpectedEOF
  3516. }
  3517. m.Name = string(data[iNdEx:postIndex])
  3518. iNdEx = postIndex
  3519. case 3:
  3520. if wireType != 2 {
  3521. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  3522. }
  3523. var msglen int
  3524. for shift := uint(0); ; shift += 7 {
  3525. if shift >= 64 {
  3526. return ErrIntOverflowBep
  3527. }
  3528. if iNdEx >= l {
  3529. return io.ErrUnexpectedEOF
  3530. }
  3531. b := data[iNdEx]
  3532. iNdEx++
  3533. msglen |= (int(b) & 0x7F) << shift
  3534. if b < 0x80 {
  3535. break
  3536. }
  3537. }
  3538. if msglen < 0 {
  3539. return ErrInvalidLengthBep
  3540. }
  3541. postIndex := iNdEx + msglen
  3542. if postIndex > l {
  3543. return io.ErrUnexpectedEOF
  3544. }
  3545. if err := m.Version.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3546. return err
  3547. }
  3548. iNdEx = postIndex
  3549. case 4:
  3550. if wireType != 0 {
  3551. return fmt.Errorf("proto: wrong wireType = %d for field BlockIndexes", wireType)
  3552. }
  3553. var v int32
  3554. for shift := uint(0); ; shift += 7 {
  3555. if shift >= 64 {
  3556. return ErrIntOverflowBep
  3557. }
  3558. if iNdEx >= l {
  3559. return io.ErrUnexpectedEOF
  3560. }
  3561. b := data[iNdEx]
  3562. iNdEx++
  3563. v |= (int32(b) & 0x7F) << shift
  3564. if b < 0x80 {
  3565. break
  3566. }
  3567. }
  3568. m.BlockIndexes = append(m.BlockIndexes, v)
  3569. default:
  3570. iNdEx = preIndex
  3571. skippy, err := skipBep(data[iNdEx:])
  3572. if err != nil {
  3573. return err
  3574. }
  3575. if skippy < 0 {
  3576. return ErrInvalidLengthBep
  3577. }
  3578. if (iNdEx + skippy) > l {
  3579. return io.ErrUnexpectedEOF
  3580. }
  3581. iNdEx += skippy
  3582. }
  3583. }
  3584. if iNdEx > l {
  3585. return io.ErrUnexpectedEOF
  3586. }
  3587. return nil
  3588. }
  3589. func (m *Ping) Unmarshal(data []byte) error {
  3590. l := len(data)
  3591. iNdEx := 0
  3592. for iNdEx < l {
  3593. preIndex := iNdEx
  3594. var wire uint64
  3595. for shift := uint(0); ; shift += 7 {
  3596. if shift >= 64 {
  3597. return ErrIntOverflowBep
  3598. }
  3599. if iNdEx >= l {
  3600. return io.ErrUnexpectedEOF
  3601. }
  3602. b := data[iNdEx]
  3603. iNdEx++
  3604. wire |= (uint64(b) & 0x7F) << shift
  3605. if b < 0x80 {
  3606. break
  3607. }
  3608. }
  3609. fieldNum := int32(wire >> 3)
  3610. wireType := int(wire & 0x7)
  3611. if wireType == 4 {
  3612. return fmt.Errorf("proto: Ping: wiretype end group for non-group")
  3613. }
  3614. if fieldNum <= 0 {
  3615. return fmt.Errorf("proto: Ping: illegal tag %d (wire type %d)", fieldNum, wire)
  3616. }
  3617. switch fieldNum {
  3618. default:
  3619. iNdEx = preIndex
  3620. skippy, err := skipBep(data[iNdEx:])
  3621. if err != nil {
  3622. return err
  3623. }
  3624. if skippy < 0 {
  3625. return ErrInvalidLengthBep
  3626. }
  3627. if (iNdEx + skippy) > l {
  3628. return io.ErrUnexpectedEOF
  3629. }
  3630. iNdEx += skippy
  3631. }
  3632. }
  3633. if iNdEx > l {
  3634. return io.ErrUnexpectedEOF
  3635. }
  3636. return nil
  3637. }
  3638. func (m *Close) Unmarshal(data []byte) error {
  3639. l := len(data)
  3640. iNdEx := 0
  3641. for iNdEx < l {
  3642. preIndex := iNdEx
  3643. var wire uint64
  3644. for shift := uint(0); ; shift += 7 {
  3645. if shift >= 64 {
  3646. return ErrIntOverflowBep
  3647. }
  3648. if iNdEx >= l {
  3649. return io.ErrUnexpectedEOF
  3650. }
  3651. b := data[iNdEx]
  3652. iNdEx++
  3653. wire |= (uint64(b) & 0x7F) << shift
  3654. if b < 0x80 {
  3655. break
  3656. }
  3657. }
  3658. fieldNum := int32(wire >> 3)
  3659. wireType := int(wire & 0x7)
  3660. if wireType == 4 {
  3661. return fmt.Errorf("proto: Close: wiretype end group for non-group")
  3662. }
  3663. if fieldNum <= 0 {
  3664. return fmt.Errorf("proto: Close: illegal tag %d (wire type %d)", fieldNum, wire)
  3665. }
  3666. switch fieldNum {
  3667. case 1:
  3668. if wireType != 2 {
  3669. return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
  3670. }
  3671. var stringLen uint64
  3672. for shift := uint(0); ; shift += 7 {
  3673. if shift >= 64 {
  3674. return ErrIntOverflowBep
  3675. }
  3676. if iNdEx >= l {
  3677. return io.ErrUnexpectedEOF
  3678. }
  3679. b := data[iNdEx]
  3680. iNdEx++
  3681. stringLen |= (uint64(b) & 0x7F) << shift
  3682. if b < 0x80 {
  3683. break
  3684. }
  3685. }
  3686. intStringLen := int(stringLen)
  3687. if intStringLen < 0 {
  3688. return ErrInvalidLengthBep
  3689. }
  3690. postIndex := iNdEx + intStringLen
  3691. if postIndex > l {
  3692. return io.ErrUnexpectedEOF
  3693. }
  3694. m.Reason = string(data[iNdEx:postIndex])
  3695. iNdEx = postIndex
  3696. default:
  3697. iNdEx = preIndex
  3698. skippy, err := skipBep(data[iNdEx:])
  3699. if err != nil {
  3700. return err
  3701. }
  3702. if skippy < 0 {
  3703. return ErrInvalidLengthBep
  3704. }
  3705. if (iNdEx + skippy) > l {
  3706. return io.ErrUnexpectedEOF
  3707. }
  3708. iNdEx += skippy
  3709. }
  3710. }
  3711. if iNdEx > l {
  3712. return io.ErrUnexpectedEOF
  3713. }
  3714. return nil
  3715. }
  3716. func skipBep(data []byte) (n int, err error) {
  3717. l := len(data)
  3718. iNdEx := 0
  3719. for iNdEx < l {
  3720. var wire uint64
  3721. for shift := uint(0); ; shift += 7 {
  3722. if shift >= 64 {
  3723. return 0, ErrIntOverflowBep
  3724. }
  3725. if iNdEx >= l {
  3726. return 0, io.ErrUnexpectedEOF
  3727. }
  3728. b := data[iNdEx]
  3729. iNdEx++
  3730. wire |= (uint64(b) & 0x7F) << shift
  3731. if b < 0x80 {
  3732. break
  3733. }
  3734. }
  3735. wireType := int(wire & 0x7)
  3736. switch wireType {
  3737. case 0:
  3738. for shift := uint(0); ; shift += 7 {
  3739. if shift >= 64 {
  3740. return 0, ErrIntOverflowBep
  3741. }
  3742. if iNdEx >= l {
  3743. return 0, io.ErrUnexpectedEOF
  3744. }
  3745. iNdEx++
  3746. if data[iNdEx-1] < 0x80 {
  3747. break
  3748. }
  3749. }
  3750. return iNdEx, nil
  3751. case 1:
  3752. iNdEx += 8
  3753. return iNdEx, nil
  3754. case 2:
  3755. var length int
  3756. for shift := uint(0); ; shift += 7 {
  3757. if shift >= 64 {
  3758. return 0, ErrIntOverflowBep
  3759. }
  3760. if iNdEx >= l {
  3761. return 0, io.ErrUnexpectedEOF
  3762. }
  3763. b := data[iNdEx]
  3764. iNdEx++
  3765. length |= (int(b) & 0x7F) << shift
  3766. if b < 0x80 {
  3767. break
  3768. }
  3769. }
  3770. iNdEx += length
  3771. if length < 0 {
  3772. return 0, ErrInvalidLengthBep
  3773. }
  3774. return iNdEx, nil
  3775. case 3:
  3776. for {
  3777. var innerWire uint64
  3778. var start int = iNdEx
  3779. for shift := uint(0); ; shift += 7 {
  3780. if shift >= 64 {
  3781. return 0, ErrIntOverflowBep
  3782. }
  3783. if iNdEx >= l {
  3784. return 0, io.ErrUnexpectedEOF
  3785. }
  3786. b := data[iNdEx]
  3787. iNdEx++
  3788. innerWire |= (uint64(b) & 0x7F) << shift
  3789. if b < 0x80 {
  3790. break
  3791. }
  3792. }
  3793. innerWireType := int(innerWire & 0x7)
  3794. if innerWireType == 4 {
  3795. break
  3796. }
  3797. next, err := skipBep(data[start:])
  3798. if err != nil {
  3799. return 0, err
  3800. }
  3801. iNdEx = start + next
  3802. }
  3803. return iNdEx, nil
  3804. case 4:
  3805. return iNdEx, nil
  3806. case 5:
  3807. iNdEx += 4
  3808. return iNdEx, nil
  3809. default:
  3810. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  3811. }
  3812. }
  3813. panic("unreachable")
  3814. }
  3815. var (
  3816. ErrInvalidLengthBep = fmt.Errorf("proto: negative length found during unmarshaling")
  3817. ErrIntOverflowBep = fmt.Errorf("proto: integer overflow")
  3818. )
  3819. var fileDescriptorBep = []byte{
  3820. // 1598 bytes of a gzipped FileDescriptorProto
  3821. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x6e, 0xdb, 0xc6,
  3822. 0x16, 0xb6, 0x24, 0xea, 0x6f, 0x24, 0x3b, 0xf2, 0xc4, 0x71, 0x74, 0x19, 0xc7, 0xf6, 0x65, 0x92,
  3823. 0x7b, 0x7d, 0x85, 0x1b, 0xe7, 0xde, 0xa4, 0x6d, 0x80, 0x02, 0x2d, 0x20, 0x4b, 0xb4, 0x23, 0x44,
  3824. 0xa6, 0x14, 0x4a, 0x72, 0x9a, 0x2e, 0x2a, 0x48, 0xe2, 0x48, 0x26, 0x42, 0x71, 0x54, 0x52, 0x4a,
  3825. 0xe2, 0x3e, 0x42, 0xfb, 0x02, 0xdd, 0x14, 0x08, 0xba, 0xeb, 0xb6, 0xe8, 0x43, 0x64, 0x19, 0x64,
  3826. 0xd9, 0x45, 0xd0, 0xa6, 0x9b, 0xbe, 0x40, 0xf7, 0x3d, 0x3c, 0x43, 0x52, 0x94, 0x7f, 0x8a, 0x2c,
  3827. 0xba, 0x30, 0x34, 0x73, 0xce, 0x37, 0xe7, 0xcc, 0xf9, 0xce, 0xcf, 0xd0, 0x24, 0xdb, 0x67, 0x93,
  3828. 0xdd, 0x89, 0xc3, 0xa7, 0x9c, 0x66, 0xf0, 0x67, 0xc0, 0x2d, 0xf9, 0xf6, 0xc8, 0x9c, 0x1e, 0xcf,
  3829. 0xfa, 0xbb, 0x03, 0x3e, 0xbe, 0x33, 0xe2, 0x23, 0x7e, 0x07, 0x35, 0xfd, 0xd9, 0x10, 0x77, 0xb8,
  3830. 0xc1, 0x95, 0x38, 0xa8, 0x4c, 0x48, 0xf2, 0x01, 0xb3, 0x2c, 0x4e, 0xb7, 0x48, 0xce, 0x60, 0xcf,
  3831. 0xcc, 0x01, 0xeb, 0xda, 0xbd, 0x31, 0x2b, 0xc6, 0xb6, 0x63, 0x3b, 0x59, 0x9d, 0x08, 0x91, 0x06,
  3832. 0x12, 0x0f, 0x30, 0xb0, 0x4c, 0x66, 0x4f, 0x05, 0x20, 0x2e, 0x00, 0x42, 0x84, 0x80, 0x5b, 0x64,
  3833. 0xc5, 0x07, 0x3c, 0x63, 0x8e, 0x6b, 0x72, 0xbb, 0x98, 0x40, 0xcc, 0xb2, 0x90, 0x1e, 0x09, 0xa1,
  3834. 0xe2, 0x92, 0xd4, 0x03, 0xd6, 0x33, 0x98, 0x43, 0xff, 0x43, 0xa4, 0xe9, 0xc9, 0x44, 0xf8, 0x5a,
  3835. 0xb9, 0x7b, 0x65, 0x37, 0x88, 0x61, 0xf7, 0x90, 0xb9, 0x6e, 0x6f, 0xc4, 0xda, 0xa0, 0xd4, 0x11,
  3836. 0x42, 0x3f, 0x05, 0xe7, 0x7c, 0x3c, 0x71, 0x40, 0xe1, 0x19, 0x8e, 0xe3, 0x89, 0x8d, 0x33, 0x27,
  3837. 0x2a, 0x73, 0x8c, 0x1e, 0x3d, 0xa0, 0x94, 0xc9, 0x72, 0xc5, 0x9a, 0xb9, 0x53, 0xe6, 0x54, 0xb8,
  3838. 0x3d, 0x34, 0x47, 0xf4, 0x7f, 0x24, 0x3d, 0xe4, 0x16, 0xdc, 0xc2, 0x05, 0xf7, 0x89, 0x9d, 0xdc,
  3839. 0xdd, 0xc2, 0xdc, 0xd8, 0x3e, 0x2a, 0xf6, 0xa4, 0x57, 0x6f, 0xb7, 0x96, 0xf4, 0x00, 0xa6, 0x7c,
  3840. 0x13, 0x27, 0x29, 0xa1, 0xa1, 0xeb, 0x24, 0x6e, 0x1a, 0x82, 0xa2, 0xbd, 0xd4, 0xbb, 0xb7, 0x5b,
  3841. 0xf1, 0x5a, 0x55, 0x07, 0x09, 0x5d, 0x23, 0x49, 0xab, 0xd7, 0x67, 0x96, 0x4f, 0x8e, 0xd8, 0xd0,
  3842. 0x6b, 0x24, 0xeb, 0x40, 0xc0, 0x5d, 0x6e, 0x5b, 0x27, 0x48, 0x49, 0x46, 0xcf, 0x78, 0x82, 0x06,
  3843. 0xec, 0xe9, 0x6d, 0x42, 0xcd, 0x91, 0xcd, 0x1d, 0xd6, 0x9d, 0x30, 0x67, 0x6c, 0xe2, 0x6d, 0xdd,
  3844. 0xa2, 0x84, 0xa8, 0x55, 0xa1, 0x69, 0xce, 0x15, 0xf4, 0x06, 0x59, 0xf6, 0xe1, 0x06, 0xb3, 0xd8,
  3845. 0x94, 0x15, 0x93, 0x88, 0xcc, 0x0b, 0x61, 0x15, 0x65, 0x10, 0xdb, 0x9a, 0x61, 0xba, 0xbd, 0xbe,
  3846. 0xc5, 0xba, 0x53, 0x36, 0x9e, 0x74, 0x4d, 0xdb, 0x60, 0x2f, 0x98, 0x5b, 0x4c, 0x21, 0x96, 0xfa,
  3847. 0xba, 0x36, 0xa8, 0x6a, 0x42, 0xe3, 0xb1, 0x21, 0x32, 0xed, 0x16, 0x0b, 0xa7, 0xd9, 0xa8, 0xa2,
  3848. 0x22, 0x60, 0xc3, 0x87, 0x29, 0x3f, 0x02, 0x1b, 0x42, 0x43, 0xff, 0x15, 0xb2, 0x91, 0xdf, 0x5b,
  3849. 0xf7, 0x50, 0x3f, 0xbf, 0xdd, 0xca, 0x08, 0x5d, 0xad, 0x1a, 0x61, 0x87, 0x12, 0x29, 0x52, 0x39,
  3850. 0xb8, 0xa6, 0x1b, 0x24, 0xdb, 0x33, 0x0c, 0x2f, 0x4b, 0xe0, 0x3a, 0x01, 0xae, 0xb3, 0xfa, 0x5c,
  3851. 0x40, 0xef, 0x2f, 0x66, 0x5d, 0x3a, 0x5d, 0x27, 0x17, 0xa5, 0xdb, 0xa3, 0x7c, 0xc0, 0x1c, 0xbf,
  3852. 0x52, 0x93, 0xe8, 0x2f, 0xe3, 0x09, 0xb0, 0x4e, 0xff, 0x49, 0xf2, 0xe3, 0xde, 0x8b, 0xae, 0xcb,
  3853. 0xbe, 0x9c, 0x31, 0x7b, 0xc0, 0x90, 0x96, 0x84, 0x9e, 0x03, 0x59, 0xcb, 0x17, 0xd1, 0x4d, 0x42,
  3854. 0x4c, 0x7b, 0xea, 0x70, 0x63, 0x06, 0xa7, 0x8a, 0x69, 0xe4, 0x2d, 0x22, 0xa1, 0x1f, 0x92, 0x0c,
  3855. 0x92, 0xda, 0x85, 0xc0, 0x33, 0xa0, 0x95, 0xf6, 0x64, 0x3f, 0xf0, 0x34, 0x52, 0x8a, 0x71, 0x07,
  3856. 0x4b, 0x3d, 0x8d, 0xd8, 0x9a, 0xa1, 0x34, 0x48, 0x12, 0x65, 0x50, 0x40, 0x29, 0x51, 0x56, 0x7e,
  3857. 0x9f, 0xf9, 0x3b, 0xba, 0x4b, 0x92, 0x43, 0xd3, 0x02, 0x2a, 0xe2, 0x98, 0x05, 0x1a, 0xa9, 0x49,
  3858. 0x10, 0xd7, 0xec, 0x21, 0xf7, 0xf3, 0x20, 0x60, 0x4a, 0x87, 0xe4, 0xd0, 0x60, 0x67, 0x62, 0xf4,
  3859. 0x20, 0xf1, 0x7f, 0x97, 0xd9, 0xef, 0x13, 0x24, 0x13, 0x68, 0xc2, 0xb4, 0xc5, 0x22, 0x69, 0x2b,
  3860. 0xf9, 0x9d, 0x2b, 0xfa, 0x70, 0xfd, 0xac, 0xbd, 0x48, 0xeb, 0xc2, 0x79, 0xd7, 0xfc, 0x8a, 0x61,
  3861. 0xe5, 0x27, 0x74, 0x5c, 0xd3, 0x6d, 0x92, 0x3b, 0x5d, 0xee, 0xcb, 0x7a, 0x54, 0x44, 0xaf, 0x13,
  3862. 0x32, 0xe6, 0x86, 0x39, 0x34, 0x99, 0xd1, 0x75, 0x31, 0x85, 0x09, 0x3d, 0x1b, 0x48, 0x5a, 0xb4,
  3863. 0xe8, 0x15, 0xac, 0x57, 0xec, 0x86, 0x5f, 0xd5, 0xc1, 0xd6, 0xd3, 0x98, 0xf6, 0xb3, 0x9e, 0x05,
  3864. 0x99, 0x11, 0x79, 0x0b, 0xb6, 0xde, 0x7c, 0xb2, 0xf9, 0x42, 0x9b, 0x65, 0x10, 0xb0, 0x6c, 0xf3,
  3865. 0x68, 0x8b, 0x41, 0x2f, 0x04, 0xf3, 0x2b, 0x0b, 0xfa, 0x85, 0x5e, 0x38, 0x62, 0x83, 0x29, 0x0f,
  3866. 0x27, 0x83, 0x0f, 0xa3, 0x32, 0xc9, 0x84, 0xc5, 0x44, 0xf0, 0xa6, 0xe1, 0xde, 0x9b, 0x9a, 0x61,
  3867. 0x1c, 0xe0, 0x31, 0x07, 0xea, 0xa4, 0x1e, 0x86, 0xa6, 0xb9, 0xf4, 0xff, 0x24, 0xb5, 0x67, 0xf1,
  3868. 0xc1, 0xd3, 0xa0, 0xf3, 0x2e, 0xcf, 0xbd, 0xa1, 0x3c, 0x92, 0x9d, 0x54, 0x1f, 0x81, 0x1f, 0x4b,
  3869. 0xdf, 0xbe, 0xdc, 0x5a, 0x52, 0x1e, 0x91, 0x6c, 0x08, 0xf0, 0x32, 0xcf, 0x87, 0x43, 0x97, 0x4d,
  3870. 0x31, 0x4d, 0x09, 0xdd, 0xdf, 0x85, 0xe4, 0xc7, 0xd1, 0xaf, 0x20, 0x1f, 0x64, 0xc7, 0x3d, 0xf7,
  3871. 0x18, 0x13, 0x92, 0xd7, 0x71, 0xed, 0x9b, 0xfc, 0x84, 0xa4, 0x44, 0x84, 0xf4, 0x1e, 0xc9, 0x0c,
  3872. 0xf8, 0xcc, 0x9e, 0xce, 0xe7, 0xe3, 0x6a, 0xb4, 0xed, 0x50, 0xe3, 0xdf, 0x2a, 0x04, 0x2a, 0xfb,
  3873. 0x24, 0xed, 0xab, 0x80, 0xeb, 0x60, 0x26, 0x48, 0x7b, 0x57, 0x82, 0xd6, 0x68, 0x1d, 0x73, 0x67,
  3874. 0xba, 0x30, 0x12, 0x60, 0x60, 0x42, 0x6e, 0x66, 0xe2, 0x7e, 0x92, 0x2e, 0x36, 0xca, 0x4f, 0x31,
  3875. 0x92, 0xd6, 0x3d, 0x02, 0xdd, 0x69, 0x64, 0xd4, 0x26, 0x17, 0x46, 0xed, 0xbc, 0xd4, 0xe3, 0x0b,
  3876. 0xa5, 0x1e, 0x54, 0x6b, 0x22, 0x52, 0xad, 0x73, 0x72, 0xa4, 0x73, 0xc9, 0x49, 0x9e, 0x43, 0x4e,
  3877. 0x6a, 0x4e, 0x8e, 0x57, 0x38, 0x43, 0x87, 0x8f, 0x71, 0x98, 0x72, 0xa7, 0xe7, 0x9c, 0xf8, 0x95,
  3878. 0xb5, 0xec, 0x49, 0xdb, 0x81, 0x50, 0xe9, 0x92, 0x8c, 0xce, 0xdc, 0x09, 0xd4, 0x10, 0xbb, 0xf0,
  3879. 0xda, 0x60, 0x1e, 0x3a, 0xb5, 0x87, 0x97, 0x06, 0xf3, 0xde, 0x9a, 0xfe, 0x9b, 0x48, 0x03, 0x6e,
  3880. 0x88, 0x2b, 0xaf, 0x44, 0xf3, 0xaf, 0x3a, 0x0e, 0x87, 0xf7, 0xca, 0x80, 0x4e, 0xf2, 0x00, 0xf0,
  3881. 0x56, 0x17, 0xaa, 0xfc, 0xb9, 0x6d, 0xf1, 0x9e, 0xd1, 0x74, 0xf8, 0xc8, 0x1b, 0x76, 0x17, 0xb6,
  3882. 0x7c, 0x95, 0xa4, 0x67, 0x38, 0x14, 0x82, 0xa6, 0xbf, 0xb9, 0xd8, 0xa4, 0xa7, 0x0d, 0x89, 0x09,
  3883. 0x12, 0x54, 0xb6, 0x7f, 0x54, 0x79, 0x13, 0x23, 0xf2, 0xc5, 0x68, 0x5a, 0x23, 0x39, 0x81, 0xec,
  3884. 0x46, 0xde, 0xf1, 0x9d, 0xf7, 0x71, 0x84, 0xf3, 0x81, 0xcc, 0xc2, 0xf5, 0xb9, 0x8f, 0x43, 0xa4,
  3885. 0x13, 0x13, 0xef, 0xd7, 0x89, 0xf0, 0x3c, 0x62, 0x8f, 0x84, 0x4f, 0x9e, 0x04, 0xb1, 0x27, 0xf5,
  3886. 0x7c, 0x5f, 0x34, 0x0a, 0xca, 0x94, 0x14, 0x91, 0x9a, 0xa6, 0x3d, 0x52, 0xb6, 0x48, 0xb2, 0x62,
  3887. 0x71, 0x4c, 0x56, 0x0a, 0xde, 0x63, 0x17, 0xdc, 0xf8, 0x1c, 0x8a, 0x5d, 0xe9, 0x4d, 0x9c, 0xe4,
  3888. 0x22, 0x9f, 0x22, 0x70, 0x9f, 0x95, 0x4a, 0xbd, 0xd3, 0x6a, 0xab, 0x7a, 0xb7, 0xd2, 0xd0, 0xf6,
  3889. 0x6b, 0x07, 0x85, 0x25, 0x79, 0xe3, 0xeb, 0xef, 0xb6, 0x8b, 0xe3, 0x39, 0x68, 0xf1, 0x2b, 0x03,
  3890. 0x5c, 0xd4, 0xb4, 0xaa, 0xfa, 0x59, 0x21, 0x26, 0xaf, 0x01, 0xb0, 0x10, 0x01, 0x8a, 0x87, 0xe0,
  3891. 0xbf, 0x24, 0x8f, 0x80, 0x6e, 0xa7, 0x59, 0x2d, 0xb7, 0xd5, 0x42, 0x5c, 0x96, 0x01, 0xb7, 0x7e,
  3892. 0x1a, 0xe7, 0xf3, 0x7d, 0x03, 0xfa, 0x42, 0x7d, 0xd4, 0x51, 0x5b, 0xed, 0x42, 0x42, 0x5e, 0x07,
  3893. 0x20, 0x8d, 0x00, 0x83, 0x8e, 0xb9, 0x05, 0x65, 0xa8, 0xb6, 0x9a, 0x0d, 0xad, 0xa5, 0x16, 0x24,
  3894. 0xf9, 0x2a, 0xa0, 0x2e, 0x2f, 0xa0, 0xfc, 0x0a, 0xfd, 0x88, 0xac, 0x56, 0x1b, 0x8f, 0xb5, 0x7a,
  3895. 0xa3, 0x5c, 0xed, 0x36, 0xf5, 0xc6, 0x01, 0x9c, 0x69, 0x15, 0x92, 0xf2, 0x16, 0xe0, 0xaf, 0x45,
  3896. 0xf0, 0x67, 0x0a, 0xee, 0x3a, 0xb0, 0x57, 0xd3, 0x0e, 0x0a, 0x29, 0xf9, 0x32, 0x40, 0x2f, 0x45,
  3897. 0xa0, 0x1e, 0xa9, 0x5e, 0xc4, 0x95, 0x7a, 0x03, 0x5c, 0xa7, 0xcf, 0x44, 0x8c, 0x64, 0x97, 0xbe,
  3898. 0x20, 0xf4, 0xec, 0xc7, 0x1a, 0xbd, 0x49, 0x24, 0xad, 0xa1, 0xa9, 0x40, 0x28, 0xc6, 0x7f, 0x16,
  3899. 0xa1, 0x71, 0x9b, 0x51, 0x85, 0x24, 0xea, 0x9f, 0x7f, 0x00, 0x64, 0xfe, 0x03, 0x40, 0x57, 0xce,
  3900. 0x82, 0x40, 0x59, 0xe2, 0x24, 0x17, 0x35, 0xac, 0x90, 0xcc, 0xa1, 0xda, 0x2e, 0x03, 0xb9, 0x65,
  3901. 0x30, 0x8e, 0x57, 0x0a, 0xd4, 0x87, 0x6c, 0xda, 0xc3, 0x06, 0xdc, 0x20, 0x49, 0x4d, 0x3d, 0x52,
  3902. 0x75, 0x30, 0xbc, 0x0a, 0x80, 0xe5, 0x00, 0xa0, 0x31, 0xa8, 0x2b, 0xf8, 0x16, 0x48, 0x95, 0xeb,
  3903. 0x8f, 0xcb, 0x4f, 0x5a, 0x90, 0x1c, 0x0a, 0xea, 0x95, 0x40, 0x5d, 0xb6, 0x9e, 0xf7, 0x4e, 0xdc,
  3904. 0xd2, 0x1f, 0x31, 0x92, 0x8f, 0x3e, 0x7b, 0x70, 0x40, 0xda, 0xaf, 0xd5, 0xd5, 0xc0, 0x5d, 0x54,
  3905. 0xe7, 0xad, 0xe9, 0x0e, 0xc9, 0x56, 0x6b, 0xba, 0x5a, 0x69, 0x37, 0xf4, 0x27, 0x41, 0x2c, 0x51,
  3906. 0x50, 0xd5, 0x74, 0xb0, 0xb8, 0xbd, 0x8f, 0xc3, 0x7c, 0xeb, 0xc9, 0x61, 0xbd, 0xa6, 0x3d, 0xec,
  3907. 0xa2, 0xc5, 0xb8, 0x7c, 0x0d, 0xc0, 0x57, 0xa3, 0xe0, 0xd6, 0xc9, 0xd8, 0x32, 0xed, 0xa7, 0x68,
  3908. 0xf8, 0x3e, 0x59, 0x0d, 0xe0, 0x73, 0x07, 0x09, 0x79, 0x1b, 0xce, 0x6c, 0x9c, 0x73, 0x66, 0xee,
  3909. 0xe7, 0x1e, 0xb9, 0x14, 0x1c, 0xec, 0x68, 0x0f, 0x35, 0x28, 0x0b, 0xa8, 0x9c, 0x4d, 0x38, 0x26,
  3910. 0x9f, 0x73, 0xac, 0x63, 0x3f, 0xb5, 0xa1, 0x28, 0x4a, 0x3f, 0xc4, 0x48, 0x36, 0x9c, 0x50, 0x1e,
  3911. 0xcf, 0x5a, 0xa3, 0xab, 0xea, 0x7a, 0x43, 0x0f, 0x02, 0x0f, 0x95, 0x1a, 0xc7, 0x25, 0x7c, 0x78,
  3912. 0xa5, 0x0f, 0x54, 0x4d, 0xd5, 0x6b, 0x95, 0xa0, 0x1f, 0x42, 0xc8, 0x01, 0xb3, 0x99, 0x63, 0x0e,
  3913. 0xe0, 0x5f, 0x82, 0x3c, 0x98, 0x69, 0x75, 0x2a, 0x0f, 0x82, 0x88, 0xb1, 0x80, 0x23, 0xa6, 0x5a,
  3914. 0xb3, 0xc1, 0x31, 0x46, 0x5b, 0xf2, 0x5a, 0xe7, 0xa8, 0x5c, 0xaf, 0x55, 0x05, 0x34, 0x21, 0x17,
  3915. 0x01, 0xba, 0x16, 0x42, 0x6b, 0xe2, 0xd9, 0xf7, 0xb0, 0x25, 0x83, 0x6c, 0xfe, 0xf5, 0x2c, 0x82,
  3916. 0x2f, 0x92, 0x54, 0xb9, 0xd9, 0x54, 0xb5, 0x6a, 0x70, 0xfb, 0xb9, 0xae, 0x3c, 0x99, 0x30, 0xdb,
  3917. 0xf0, 0x10, 0xfb, 0x0d, 0xfd, 0x40, 0x6d, 0x07, 0x97, 0x9f, 0x23, 0xf6, 0xb9, 0x33, 0x62, 0xd3,
  3918. 0xbd, 0x8d, 0x57, 0xbf, 0x6e, 0x2e, 0xbd, 0x86, 0xbf, 0x57, 0xef, 0x36, 0x63, 0xaf, 0xe1, 0xef,
  3919. 0x97, 0x77, 0x9b, 0x4b, 0xbf, 0xc3, 0xef, 0xcb, 0xdf, 0x36, 0x63, 0xfd, 0x14, 0xce, 0xae, 0x7b,
  3920. 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x96, 0x0b, 0xf7, 0x15, 0xb6, 0x0d, 0x00, 0x00,
  3921. }