raft_internal.pb.go 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062
  1. // Code generated by protoc-gen-gogo.
  2. // source: raft_internal.proto
  3. // DO NOT EDIT!
  4. package etcdserverpb
  5. import (
  6. "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. math "math"
  9. io "io"
  10. )
  11. // Reference imports to suppress errors if they are not otherwise used.
  12. var _ = proto.Marshal
  13. var _ = fmt.Errorf
  14. var _ = math.Inf
  15. type RequestHeader struct {
  16. ID uint64 `protobuf:"varint,1,opt,name=ID,json=iD,proto3" json:"ID,omitempty"`
  17. // username is a username that is associated with an auth token of gRPC connection
  18. Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
  19. }
  20. func (m *RequestHeader) Reset() { *m = RequestHeader{} }
  21. func (m *RequestHeader) String() string { return proto.CompactTextString(m) }
  22. func (*RequestHeader) ProtoMessage() {}
  23. func (*RequestHeader) Descriptor() ([]byte, []int) { return fileDescriptorRaftInternal, []int{0} }
  24. // An InternalRaftRequest is the union of all requests which can be
  25. // sent via raft.
  26. type InternalRaftRequest struct {
  27. Header *RequestHeader `protobuf:"bytes,100,opt,name=header" json:"header,omitempty"`
  28. ID uint64 `protobuf:"varint,1,opt,name=ID,json=iD,proto3" json:"ID,omitempty"`
  29. V2 *Request `protobuf:"bytes,2,opt,name=v2" json:"v2,omitempty"`
  30. Range *RangeRequest `protobuf:"bytes,3,opt,name=range" json:"range,omitempty"`
  31. Put *PutRequest `protobuf:"bytes,4,opt,name=put" json:"put,omitempty"`
  32. DeleteRange *DeleteRangeRequest `protobuf:"bytes,5,opt,name=delete_range,json=deleteRange" json:"delete_range,omitempty"`
  33. Txn *TxnRequest `protobuf:"bytes,6,opt,name=txn" json:"txn,omitempty"`
  34. Compaction *CompactionRequest `protobuf:"bytes,7,opt,name=compaction" json:"compaction,omitempty"`
  35. LeaseGrant *LeaseGrantRequest `protobuf:"bytes,8,opt,name=lease_grant,json=leaseGrant" json:"lease_grant,omitempty"`
  36. LeaseRevoke *LeaseRevokeRequest `protobuf:"bytes,9,opt,name=lease_revoke,json=leaseRevoke" json:"lease_revoke,omitempty"`
  37. Alarm *AlarmRequest `protobuf:"bytes,10,opt,name=alarm" json:"alarm,omitempty"`
  38. AuthEnable *AuthEnableRequest `protobuf:"bytes,1000,opt,name=auth_enable,json=authEnable" json:"auth_enable,omitempty"`
  39. AuthDisable *AuthDisableRequest `protobuf:"bytes,1011,opt,name=auth_disable,json=authDisable" json:"auth_disable,omitempty"`
  40. Authenticate *InternalAuthenticateRequest `protobuf:"bytes,1012,opt,name=authenticate" json:"authenticate,omitempty"`
  41. AuthUserAdd *AuthUserAddRequest `protobuf:"bytes,1100,opt,name=auth_user_add,json=authUserAdd" json:"auth_user_add,omitempty"`
  42. AuthUserDelete *AuthUserDeleteRequest `protobuf:"bytes,1101,opt,name=auth_user_delete,json=authUserDelete" json:"auth_user_delete,omitempty"`
  43. AuthUserGet *AuthUserGetRequest `protobuf:"bytes,1102,opt,name=auth_user_get,json=authUserGet" json:"auth_user_get,omitempty"`
  44. AuthUserChangePassword *AuthUserChangePasswordRequest `protobuf:"bytes,1103,opt,name=auth_user_change_password,json=authUserChangePassword" json:"auth_user_change_password,omitempty"`
  45. AuthUserGrantRole *AuthUserGrantRoleRequest `protobuf:"bytes,1104,opt,name=auth_user_grant_role,json=authUserGrantRole" json:"auth_user_grant_role,omitempty"`
  46. AuthUserRevokeRole *AuthUserRevokeRoleRequest `protobuf:"bytes,1105,opt,name=auth_user_revoke_role,json=authUserRevokeRole" json:"auth_user_revoke_role,omitempty"`
  47. AuthUserList *AuthUserListRequest `protobuf:"bytes,1106,opt,name=auth_user_list,json=authUserList" json:"auth_user_list,omitempty"`
  48. AuthRoleList *AuthRoleListRequest `protobuf:"bytes,1107,opt,name=auth_role_list,json=authRoleList" json:"auth_role_list,omitempty"`
  49. AuthRoleAdd *AuthRoleAddRequest `protobuf:"bytes,1200,opt,name=auth_role_add,json=authRoleAdd" json:"auth_role_add,omitempty"`
  50. AuthRoleDelete *AuthRoleDeleteRequest `protobuf:"bytes,1201,opt,name=auth_role_delete,json=authRoleDelete" json:"auth_role_delete,omitempty"`
  51. AuthRoleGet *AuthRoleGetRequest `protobuf:"bytes,1202,opt,name=auth_role_get,json=authRoleGet" json:"auth_role_get,omitempty"`
  52. AuthRoleGrantPermission *AuthRoleGrantPermissionRequest `protobuf:"bytes,1203,opt,name=auth_role_grant_permission,json=authRoleGrantPermission" json:"auth_role_grant_permission,omitempty"`
  53. AuthRoleRevokePermission *AuthRoleRevokePermissionRequest `protobuf:"bytes,1204,opt,name=auth_role_revoke_permission,json=authRoleRevokePermission" json:"auth_role_revoke_permission,omitempty"`
  54. }
  55. func (m *InternalRaftRequest) Reset() { *m = InternalRaftRequest{} }
  56. func (m *InternalRaftRequest) String() string { return proto.CompactTextString(m) }
  57. func (*InternalRaftRequest) ProtoMessage() {}
  58. func (*InternalRaftRequest) Descriptor() ([]byte, []int) { return fileDescriptorRaftInternal, []int{1} }
  59. type EmptyResponse struct {
  60. }
  61. func (m *EmptyResponse) Reset() { *m = EmptyResponse{} }
  62. func (m *EmptyResponse) String() string { return proto.CompactTextString(m) }
  63. func (*EmptyResponse) ProtoMessage() {}
  64. func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptorRaftInternal, []int{2} }
  65. // What is the difference between AuthenticateRequest (defined in rpc.proto) and InternalAuthenticateRequest?
  66. // InternalAuthenticateRequest has a member that is filled by etcdserver and shouldn't be user-facing.
  67. // For avoiding misusage the field, we have an internal version of AuthenticateRequest.
  68. type InternalAuthenticateRequest struct {
  69. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  70. Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
  71. // simple_token is generated in API layer (etcdserver/v3_server.go)
  72. SimpleToken string `protobuf:"bytes,3,opt,name=simple_token,json=simpleToken,proto3" json:"simple_token,omitempty"`
  73. }
  74. func (m *InternalAuthenticateRequest) Reset() { *m = InternalAuthenticateRequest{} }
  75. func (m *InternalAuthenticateRequest) String() string { return proto.CompactTextString(m) }
  76. func (*InternalAuthenticateRequest) ProtoMessage() {}
  77. func (*InternalAuthenticateRequest) Descriptor() ([]byte, []int) {
  78. return fileDescriptorRaftInternal, []int{3}
  79. }
  80. func init() {
  81. proto.RegisterType((*RequestHeader)(nil), "etcdserverpb.RequestHeader")
  82. proto.RegisterType((*InternalRaftRequest)(nil), "etcdserverpb.InternalRaftRequest")
  83. proto.RegisterType((*EmptyResponse)(nil), "etcdserverpb.EmptyResponse")
  84. proto.RegisterType((*InternalAuthenticateRequest)(nil), "etcdserverpb.InternalAuthenticateRequest")
  85. }
  86. func (m *RequestHeader) Marshal() (data []byte, err error) {
  87. size := m.Size()
  88. data = make([]byte, size)
  89. n, err := m.MarshalTo(data)
  90. if err != nil {
  91. return nil, err
  92. }
  93. return data[:n], nil
  94. }
  95. func (m *RequestHeader) MarshalTo(data []byte) (int, error) {
  96. var i int
  97. _ = i
  98. var l int
  99. _ = l
  100. if m.ID != 0 {
  101. data[i] = 0x8
  102. i++
  103. i = encodeVarintRaftInternal(data, i, uint64(m.ID))
  104. }
  105. if len(m.Username) > 0 {
  106. data[i] = 0x12
  107. i++
  108. i = encodeVarintRaftInternal(data, i, uint64(len(m.Username)))
  109. i += copy(data[i:], m.Username)
  110. }
  111. return i, nil
  112. }
  113. func (m *InternalRaftRequest) Marshal() (data []byte, err error) {
  114. size := m.Size()
  115. data = make([]byte, size)
  116. n, err := m.MarshalTo(data)
  117. if err != nil {
  118. return nil, err
  119. }
  120. return data[:n], nil
  121. }
  122. func (m *InternalRaftRequest) MarshalTo(data []byte) (int, error) {
  123. var i int
  124. _ = i
  125. var l int
  126. _ = l
  127. if m.ID != 0 {
  128. data[i] = 0x8
  129. i++
  130. i = encodeVarintRaftInternal(data, i, uint64(m.ID))
  131. }
  132. if m.V2 != nil {
  133. data[i] = 0x12
  134. i++
  135. i = encodeVarintRaftInternal(data, i, uint64(m.V2.Size()))
  136. n1, err := m.V2.MarshalTo(data[i:])
  137. if err != nil {
  138. return 0, err
  139. }
  140. i += n1
  141. }
  142. if m.Range != nil {
  143. data[i] = 0x1a
  144. i++
  145. i = encodeVarintRaftInternal(data, i, uint64(m.Range.Size()))
  146. n2, err := m.Range.MarshalTo(data[i:])
  147. if err != nil {
  148. return 0, err
  149. }
  150. i += n2
  151. }
  152. if m.Put != nil {
  153. data[i] = 0x22
  154. i++
  155. i = encodeVarintRaftInternal(data, i, uint64(m.Put.Size()))
  156. n3, err := m.Put.MarshalTo(data[i:])
  157. if err != nil {
  158. return 0, err
  159. }
  160. i += n3
  161. }
  162. if m.DeleteRange != nil {
  163. data[i] = 0x2a
  164. i++
  165. i = encodeVarintRaftInternal(data, i, uint64(m.DeleteRange.Size()))
  166. n4, err := m.DeleteRange.MarshalTo(data[i:])
  167. if err != nil {
  168. return 0, err
  169. }
  170. i += n4
  171. }
  172. if m.Txn != nil {
  173. data[i] = 0x32
  174. i++
  175. i = encodeVarintRaftInternal(data, i, uint64(m.Txn.Size()))
  176. n5, err := m.Txn.MarshalTo(data[i:])
  177. if err != nil {
  178. return 0, err
  179. }
  180. i += n5
  181. }
  182. if m.Compaction != nil {
  183. data[i] = 0x3a
  184. i++
  185. i = encodeVarintRaftInternal(data, i, uint64(m.Compaction.Size()))
  186. n6, err := m.Compaction.MarshalTo(data[i:])
  187. if err != nil {
  188. return 0, err
  189. }
  190. i += n6
  191. }
  192. if m.LeaseGrant != nil {
  193. data[i] = 0x42
  194. i++
  195. i = encodeVarintRaftInternal(data, i, uint64(m.LeaseGrant.Size()))
  196. n7, err := m.LeaseGrant.MarshalTo(data[i:])
  197. if err != nil {
  198. return 0, err
  199. }
  200. i += n7
  201. }
  202. if m.LeaseRevoke != nil {
  203. data[i] = 0x4a
  204. i++
  205. i = encodeVarintRaftInternal(data, i, uint64(m.LeaseRevoke.Size()))
  206. n8, err := m.LeaseRevoke.MarshalTo(data[i:])
  207. if err != nil {
  208. return 0, err
  209. }
  210. i += n8
  211. }
  212. if m.Alarm != nil {
  213. data[i] = 0x52
  214. i++
  215. i = encodeVarintRaftInternal(data, i, uint64(m.Alarm.Size()))
  216. n9, err := m.Alarm.MarshalTo(data[i:])
  217. if err != nil {
  218. return 0, err
  219. }
  220. i += n9
  221. }
  222. if m.Header != nil {
  223. data[i] = 0xa2
  224. i++
  225. data[i] = 0x6
  226. i++
  227. i = encodeVarintRaftInternal(data, i, uint64(m.Header.Size()))
  228. n10, err := m.Header.MarshalTo(data[i:])
  229. if err != nil {
  230. return 0, err
  231. }
  232. i += n10
  233. }
  234. if m.AuthEnable != nil {
  235. data[i] = 0xc2
  236. i++
  237. data[i] = 0x3e
  238. i++
  239. i = encodeVarintRaftInternal(data, i, uint64(m.AuthEnable.Size()))
  240. n11, err := m.AuthEnable.MarshalTo(data[i:])
  241. if err != nil {
  242. return 0, err
  243. }
  244. i += n11
  245. }
  246. if m.AuthDisable != nil {
  247. data[i] = 0x9a
  248. i++
  249. data[i] = 0x3f
  250. i++
  251. i = encodeVarintRaftInternal(data, i, uint64(m.AuthDisable.Size()))
  252. n12, err := m.AuthDisable.MarshalTo(data[i:])
  253. if err != nil {
  254. return 0, err
  255. }
  256. i += n12
  257. }
  258. if m.Authenticate != nil {
  259. data[i] = 0xa2
  260. i++
  261. data[i] = 0x3f
  262. i++
  263. i = encodeVarintRaftInternal(data, i, uint64(m.Authenticate.Size()))
  264. n13, err := m.Authenticate.MarshalTo(data[i:])
  265. if err != nil {
  266. return 0, err
  267. }
  268. i += n13
  269. }
  270. if m.AuthUserAdd != nil {
  271. data[i] = 0xe2
  272. i++
  273. data[i] = 0x44
  274. i++
  275. i = encodeVarintRaftInternal(data, i, uint64(m.AuthUserAdd.Size()))
  276. n14, err := m.AuthUserAdd.MarshalTo(data[i:])
  277. if err != nil {
  278. return 0, err
  279. }
  280. i += n14
  281. }
  282. if m.AuthUserDelete != nil {
  283. data[i] = 0xea
  284. i++
  285. data[i] = 0x44
  286. i++
  287. i = encodeVarintRaftInternal(data, i, uint64(m.AuthUserDelete.Size()))
  288. n15, err := m.AuthUserDelete.MarshalTo(data[i:])
  289. if err != nil {
  290. return 0, err
  291. }
  292. i += n15
  293. }
  294. if m.AuthUserGet != nil {
  295. data[i] = 0xf2
  296. i++
  297. data[i] = 0x44
  298. i++
  299. i = encodeVarintRaftInternal(data, i, uint64(m.AuthUserGet.Size()))
  300. n16, err := m.AuthUserGet.MarshalTo(data[i:])
  301. if err != nil {
  302. return 0, err
  303. }
  304. i += n16
  305. }
  306. if m.AuthUserChangePassword != nil {
  307. data[i] = 0xfa
  308. i++
  309. data[i] = 0x44
  310. i++
  311. i = encodeVarintRaftInternal(data, i, uint64(m.AuthUserChangePassword.Size()))
  312. n17, err := m.AuthUserChangePassword.MarshalTo(data[i:])
  313. if err != nil {
  314. return 0, err
  315. }
  316. i += n17
  317. }
  318. if m.AuthUserGrantRole != nil {
  319. data[i] = 0x82
  320. i++
  321. data[i] = 0x45
  322. i++
  323. i = encodeVarintRaftInternal(data, i, uint64(m.AuthUserGrantRole.Size()))
  324. n18, err := m.AuthUserGrantRole.MarshalTo(data[i:])
  325. if err != nil {
  326. return 0, err
  327. }
  328. i += n18
  329. }
  330. if m.AuthUserRevokeRole != nil {
  331. data[i] = 0x8a
  332. i++
  333. data[i] = 0x45
  334. i++
  335. i = encodeVarintRaftInternal(data, i, uint64(m.AuthUserRevokeRole.Size()))
  336. n19, err := m.AuthUserRevokeRole.MarshalTo(data[i:])
  337. if err != nil {
  338. return 0, err
  339. }
  340. i += n19
  341. }
  342. if m.AuthUserList != nil {
  343. data[i] = 0x92
  344. i++
  345. data[i] = 0x45
  346. i++
  347. i = encodeVarintRaftInternal(data, i, uint64(m.AuthUserList.Size()))
  348. n20, err := m.AuthUserList.MarshalTo(data[i:])
  349. if err != nil {
  350. return 0, err
  351. }
  352. i += n20
  353. }
  354. if m.AuthRoleList != nil {
  355. data[i] = 0x9a
  356. i++
  357. data[i] = 0x45
  358. i++
  359. i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleList.Size()))
  360. n21, err := m.AuthRoleList.MarshalTo(data[i:])
  361. if err != nil {
  362. return 0, err
  363. }
  364. i += n21
  365. }
  366. if m.AuthRoleAdd != nil {
  367. data[i] = 0x82
  368. i++
  369. data[i] = 0x4b
  370. i++
  371. i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleAdd.Size()))
  372. n22, err := m.AuthRoleAdd.MarshalTo(data[i:])
  373. if err != nil {
  374. return 0, err
  375. }
  376. i += n22
  377. }
  378. if m.AuthRoleDelete != nil {
  379. data[i] = 0x8a
  380. i++
  381. data[i] = 0x4b
  382. i++
  383. i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleDelete.Size()))
  384. n23, err := m.AuthRoleDelete.MarshalTo(data[i:])
  385. if err != nil {
  386. return 0, err
  387. }
  388. i += n23
  389. }
  390. if m.AuthRoleGet != nil {
  391. data[i] = 0x92
  392. i++
  393. data[i] = 0x4b
  394. i++
  395. i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleGet.Size()))
  396. n24, err := m.AuthRoleGet.MarshalTo(data[i:])
  397. if err != nil {
  398. return 0, err
  399. }
  400. i += n24
  401. }
  402. if m.AuthRoleGrantPermission != nil {
  403. data[i] = 0x9a
  404. i++
  405. data[i] = 0x4b
  406. i++
  407. i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleGrantPermission.Size()))
  408. n25, err := m.AuthRoleGrantPermission.MarshalTo(data[i:])
  409. if err != nil {
  410. return 0, err
  411. }
  412. i += n25
  413. }
  414. if m.AuthRoleRevokePermission != nil {
  415. data[i] = 0xa2
  416. i++
  417. data[i] = 0x4b
  418. i++
  419. i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleRevokePermission.Size()))
  420. n26, err := m.AuthRoleRevokePermission.MarshalTo(data[i:])
  421. if err != nil {
  422. return 0, err
  423. }
  424. i += n26
  425. }
  426. return i, nil
  427. }
  428. func (m *EmptyResponse) Marshal() (data []byte, err error) {
  429. size := m.Size()
  430. data = make([]byte, size)
  431. n, err := m.MarshalTo(data)
  432. if err != nil {
  433. return nil, err
  434. }
  435. return data[:n], nil
  436. }
  437. func (m *EmptyResponse) MarshalTo(data []byte) (int, error) {
  438. var i int
  439. _ = i
  440. var l int
  441. _ = l
  442. return i, nil
  443. }
  444. func (m *InternalAuthenticateRequest) Marshal() (data []byte, err error) {
  445. size := m.Size()
  446. data = make([]byte, size)
  447. n, err := m.MarshalTo(data)
  448. if err != nil {
  449. return nil, err
  450. }
  451. return data[:n], nil
  452. }
  453. func (m *InternalAuthenticateRequest) MarshalTo(data []byte) (int, error) {
  454. var i int
  455. _ = i
  456. var l int
  457. _ = l
  458. if len(m.Name) > 0 {
  459. data[i] = 0xa
  460. i++
  461. i = encodeVarintRaftInternal(data, i, uint64(len(m.Name)))
  462. i += copy(data[i:], m.Name)
  463. }
  464. if len(m.Password) > 0 {
  465. data[i] = 0x12
  466. i++
  467. i = encodeVarintRaftInternal(data, i, uint64(len(m.Password)))
  468. i += copy(data[i:], m.Password)
  469. }
  470. if len(m.SimpleToken) > 0 {
  471. data[i] = 0x1a
  472. i++
  473. i = encodeVarintRaftInternal(data, i, uint64(len(m.SimpleToken)))
  474. i += copy(data[i:], m.SimpleToken)
  475. }
  476. return i, nil
  477. }
  478. func encodeFixed64RaftInternal(data []byte, offset int, v uint64) int {
  479. data[offset] = uint8(v)
  480. data[offset+1] = uint8(v >> 8)
  481. data[offset+2] = uint8(v >> 16)
  482. data[offset+3] = uint8(v >> 24)
  483. data[offset+4] = uint8(v >> 32)
  484. data[offset+5] = uint8(v >> 40)
  485. data[offset+6] = uint8(v >> 48)
  486. data[offset+7] = uint8(v >> 56)
  487. return offset + 8
  488. }
  489. func encodeFixed32RaftInternal(data []byte, offset int, v uint32) int {
  490. data[offset] = uint8(v)
  491. data[offset+1] = uint8(v >> 8)
  492. data[offset+2] = uint8(v >> 16)
  493. data[offset+3] = uint8(v >> 24)
  494. return offset + 4
  495. }
  496. func encodeVarintRaftInternal(data []byte, offset int, v uint64) int {
  497. for v >= 1<<7 {
  498. data[offset] = uint8(v&0x7f | 0x80)
  499. v >>= 7
  500. offset++
  501. }
  502. data[offset] = uint8(v)
  503. return offset + 1
  504. }
  505. func (m *RequestHeader) Size() (n int) {
  506. var l int
  507. _ = l
  508. if m.ID != 0 {
  509. n += 1 + sovRaftInternal(uint64(m.ID))
  510. }
  511. l = len(m.Username)
  512. if l > 0 {
  513. n += 1 + l + sovRaftInternal(uint64(l))
  514. }
  515. return n
  516. }
  517. func (m *InternalRaftRequest) Size() (n int) {
  518. var l int
  519. _ = l
  520. if m.ID != 0 {
  521. n += 1 + sovRaftInternal(uint64(m.ID))
  522. }
  523. if m.V2 != nil {
  524. l = m.V2.Size()
  525. n += 1 + l + sovRaftInternal(uint64(l))
  526. }
  527. if m.Range != nil {
  528. l = m.Range.Size()
  529. n += 1 + l + sovRaftInternal(uint64(l))
  530. }
  531. if m.Put != nil {
  532. l = m.Put.Size()
  533. n += 1 + l + sovRaftInternal(uint64(l))
  534. }
  535. if m.DeleteRange != nil {
  536. l = m.DeleteRange.Size()
  537. n += 1 + l + sovRaftInternal(uint64(l))
  538. }
  539. if m.Txn != nil {
  540. l = m.Txn.Size()
  541. n += 1 + l + sovRaftInternal(uint64(l))
  542. }
  543. if m.Compaction != nil {
  544. l = m.Compaction.Size()
  545. n += 1 + l + sovRaftInternal(uint64(l))
  546. }
  547. if m.LeaseGrant != nil {
  548. l = m.LeaseGrant.Size()
  549. n += 1 + l + sovRaftInternal(uint64(l))
  550. }
  551. if m.LeaseRevoke != nil {
  552. l = m.LeaseRevoke.Size()
  553. n += 1 + l + sovRaftInternal(uint64(l))
  554. }
  555. if m.Alarm != nil {
  556. l = m.Alarm.Size()
  557. n += 1 + l + sovRaftInternal(uint64(l))
  558. }
  559. if m.Header != nil {
  560. l = m.Header.Size()
  561. n += 2 + l + sovRaftInternal(uint64(l))
  562. }
  563. if m.AuthEnable != nil {
  564. l = m.AuthEnable.Size()
  565. n += 2 + l + sovRaftInternal(uint64(l))
  566. }
  567. if m.AuthDisable != nil {
  568. l = m.AuthDisable.Size()
  569. n += 2 + l + sovRaftInternal(uint64(l))
  570. }
  571. if m.Authenticate != nil {
  572. l = m.Authenticate.Size()
  573. n += 2 + l + sovRaftInternal(uint64(l))
  574. }
  575. if m.AuthUserAdd != nil {
  576. l = m.AuthUserAdd.Size()
  577. n += 2 + l + sovRaftInternal(uint64(l))
  578. }
  579. if m.AuthUserDelete != nil {
  580. l = m.AuthUserDelete.Size()
  581. n += 2 + l + sovRaftInternal(uint64(l))
  582. }
  583. if m.AuthUserGet != nil {
  584. l = m.AuthUserGet.Size()
  585. n += 2 + l + sovRaftInternal(uint64(l))
  586. }
  587. if m.AuthUserChangePassword != nil {
  588. l = m.AuthUserChangePassword.Size()
  589. n += 2 + l + sovRaftInternal(uint64(l))
  590. }
  591. if m.AuthUserGrantRole != nil {
  592. l = m.AuthUserGrantRole.Size()
  593. n += 2 + l + sovRaftInternal(uint64(l))
  594. }
  595. if m.AuthUserRevokeRole != nil {
  596. l = m.AuthUserRevokeRole.Size()
  597. n += 2 + l + sovRaftInternal(uint64(l))
  598. }
  599. if m.AuthUserList != nil {
  600. l = m.AuthUserList.Size()
  601. n += 2 + l + sovRaftInternal(uint64(l))
  602. }
  603. if m.AuthRoleList != nil {
  604. l = m.AuthRoleList.Size()
  605. n += 2 + l + sovRaftInternal(uint64(l))
  606. }
  607. if m.AuthRoleAdd != nil {
  608. l = m.AuthRoleAdd.Size()
  609. n += 2 + l + sovRaftInternal(uint64(l))
  610. }
  611. if m.AuthRoleDelete != nil {
  612. l = m.AuthRoleDelete.Size()
  613. n += 2 + l + sovRaftInternal(uint64(l))
  614. }
  615. if m.AuthRoleGet != nil {
  616. l = m.AuthRoleGet.Size()
  617. n += 2 + l + sovRaftInternal(uint64(l))
  618. }
  619. if m.AuthRoleGrantPermission != nil {
  620. l = m.AuthRoleGrantPermission.Size()
  621. n += 2 + l + sovRaftInternal(uint64(l))
  622. }
  623. if m.AuthRoleRevokePermission != nil {
  624. l = m.AuthRoleRevokePermission.Size()
  625. n += 2 + l + sovRaftInternal(uint64(l))
  626. }
  627. return n
  628. }
  629. func (m *EmptyResponse) Size() (n int) {
  630. var l int
  631. _ = l
  632. return n
  633. }
  634. func (m *InternalAuthenticateRequest) Size() (n int) {
  635. var l int
  636. _ = l
  637. l = len(m.Name)
  638. if l > 0 {
  639. n += 1 + l + sovRaftInternal(uint64(l))
  640. }
  641. l = len(m.Password)
  642. if l > 0 {
  643. n += 1 + l + sovRaftInternal(uint64(l))
  644. }
  645. l = len(m.SimpleToken)
  646. if l > 0 {
  647. n += 1 + l + sovRaftInternal(uint64(l))
  648. }
  649. return n
  650. }
  651. func sovRaftInternal(x uint64) (n int) {
  652. for {
  653. n++
  654. x >>= 7
  655. if x == 0 {
  656. break
  657. }
  658. }
  659. return n
  660. }
  661. func sozRaftInternal(x uint64) (n int) {
  662. return sovRaftInternal(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  663. }
  664. func (m *RequestHeader) Unmarshal(data []byte) error {
  665. l := len(data)
  666. iNdEx := 0
  667. for iNdEx < l {
  668. preIndex := iNdEx
  669. var wire uint64
  670. for shift := uint(0); ; shift += 7 {
  671. if shift >= 64 {
  672. return ErrIntOverflowRaftInternal
  673. }
  674. if iNdEx >= l {
  675. return io.ErrUnexpectedEOF
  676. }
  677. b := data[iNdEx]
  678. iNdEx++
  679. wire |= (uint64(b) & 0x7F) << shift
  680. if b < 0x80 {
  681. break
  682. }
  683. }
  684. fieldNum := int32(wire >> 3)
  685. wireType := int(wire & 0x7)
  686. if wireType == 4 {
  687. return fmt.Errorf("proto: RequestHeader: wiretype end group for non-group")
  688. }
  689. if fieldNum <= 0 {
  690. return fmt.Errorf("proto: RequestHeader: illegal tag %d (wire type %d)", fieldNum, wire)
  691. }
  692. switch fieldNum {
  693. case 1:
  694. if wireType != 0 {
  695. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  696. }
  697. m.ID = 0
  698. for shift := uint(0); ; shift += 7 {
  699. if shift >= 64 {
  700. return ErrIntOverflowRaftInternal
  701. }
  702. if iNdEx >= l {
  703. return io.ErrUnexpectedEOF
  704. }
  705. b := data[iNdEx]
  706. iNdEx++
  707. m.ID |= (uint64(b) & 0x7F) << shift
  708. if b < 0x80 {
  709. break
  710. }
  711. }
  712. case 2:
  713. if wireType != 2 {
  714. return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
  715. }
  716. var stringLen uint64
  717. for shift := uint(0); ; shift += 7 {
  718. if shift >= 64 {
  719. return ErrIntOverflowRaftInternal
  720. }
  721. if iNdEx >= l {
  722. return io.ErrUnexpectedEOF
  723. }
  724. b := data[iNdEx]
  725. iNdEx++
  726. stringLen |= (uint64(b) & 0x7F) << shift
  727. if b < 0x80 {
  728. break
  729. }
  730. }
  731. intStringLen := int(stringLen)
  732. if intStringLen < 0 {
  733. return ErrInvalidLengthRaftInternal
  734. }
  735. postIndex := iNdEx + intStringLen
  736. if postIndex > l {
  737. return io.ErrUnexpectedEOF
  738. }
  739. m.Username = string(data[iNdEx:postIndex])
  740. iNdEx = postIndex
  741. default:
  742. iNdEx = preIndex
  743. skippy, err := skipRaftInternal(data[iNdEx:])
  744. if err != nil {
  745. return err
  746. }
  747. if skippy < 0 {
  748. return ErrInvalidLengthRaftInternal
  749. }
  750. if (iNdEx + skippy) > l {
  751. return io.ErrUnexpectedEOF
  752. }
  753. iNdEx += skippy
  754. }
  755. }
  756. if iNdEx > l {
  757. return io.ErrUnexpectedEOF
  758. }
  759. return nil
  760. }
  761. func (m *InternalRaftRequest) Unmarshal(data []byte) error {
  762. l := len(data)
  763. iNdEx := 0
  764. for iNdEx < l {
  765. preIndex := iNdEx
  766. var wire uint64
  767. for shift := uint(0); ; shift += 7 {
  768. if shift >= 64 {
  769. return ErrIntOverflowRaftInternal
  770. }
  771. if iNdEx >= l {
  772. return io.ErrUnexpectedEOF
  773. }
  774. b := data[iNdEx]
  775. iNdEx++
  776. wire |= (uint64(b) & 0x7F) << shift
  777. if b < 0x80 {
  778. break
  779. }
  780. }
  781. fieldNum := int32(wire >> 3)
  782. wireType := int(wire & 0x7)
  783. if wireType == 4 {
  784. return fmt.Errorf("proto: InternalRaftRequest: wiretype end group for non-group")
  785. }
  786. if fieldNum <= 0 {
  787. return fmt.Errorf("proto: InternalRaftRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  788. }
  789. switch fieldNum {
  790. case 1:
  791. if wireType != 0 {
  792. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  793. }
  794. m.ID = 0
  795. for shift := uint(0); ; shift += 7 {
  796. if shift >= 64 {
  797. return ErrIntOverflowRaftInternal
  798. }
  799. if iNdEx >= l {
  800. return io.ErrUnexpectedEOF
  801. }
  802. b := data[iNdEx]
  803. iNdEx++
  804. m.ID |= (uint64(b) & 0x7F) << shift
  805. if b < 0x80 {
  806. break
  807. }
  808. }
  809. case 2:
  810. if wireType != 2 {
  811. return fmt.Errorf("proto: wrong wireType = %d for field V2", wireType)
  812. }
  813. var msglen int
  814. for shift := uint(0); ; shift += 7 {
  815. if shift >= 64 {
  816. return ErrIntOverflowRaftInternal
  817. }
  818. if iNdEx >= l {
  819. return io.ErrUnexpectedEOF
  820. }
  821. b := data[iNdEx]
  822. iNdEx++
  823. msglen |= (int(b) & 0x7F) << shift
  824. if b < 0x80 {
  825. break
  826. }
  827. }
  828. if msglen < 0 {
  829. return ErrInvalidLengthRaftInternal
  830. }
  831. postIndex := iNdEx + msglen
  832. if postIndex > l {
  833. return io.ErrUnexpectedEOF
  834. }
  835. if m.V2 == nil {
  836. m.V2 = &Request{}
  837. }
  838. if err := m.V2.Unmarshal(data[iNdEx:postIndex]); err != nil {
  839. return err
  840. }
  841. iNdEx = postIndex
  842. case 3:
  843. if wireType != 2 {
  844. return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType)
  845. }
  846. var msglen int
  847. for shift := uint(0); ; shift += 7 {
  848. if shift >= 64 {
  849. return ErrIntOverflowRaftInternal
  850. }
  851. if iNdEx >= l {
  852. return io.ErrUnexpectedEOF
  853. }
  854. b := data[iNdEx]
  855. iNdEx++
  856. msglen |= (int(b) & 0x7F) << shift
  857. if b < 0x80 {
  858. break
  859. }
  860. }
  861. if msglen < 0 {
  862. return ErrInvalidLengthRaftInternal
  863. }
  864. postIndex := iNdEx + msglen
  865. if postIndex > l {
  866. return io.ErrUnexpectedEOF
  867. }
  868. if m.Range == nil {
  869. m.Range = &RangeRequest{}
  870. }
  871. if err := m.Range.Unmarshal(data[iNdEx:postIndex]); err != nil {
  872. return err
  873. }
  874. iNdEx = postIndex
  875. case 4:
  876. if wireType != 2 {
  877. return fmt.Errorf("proto: wrong wireType = %d for field Put", wireType)
  878. }
  879. var msglen int
  880. for shift := uint(0); ; shift += 7 {
  881. if shift >= 64 {
  882. return ErrIntOverflowRaftInternal
  883. }
  884. if iNdEx >= l {
  885. return io.ErrUnexpectedEOF
  886. }
  887. b := data[iNdEx]
  888. iNdEx++
  889. msglen |= (int(b) & 0x7F) << shift
  890. if b < 0x80 {
  891. break
  892. }
  893. }
  894. if msglen < 0 {
  895. return ErrInvalidLengthRaftInternal
  896. }
  897. postIndex := iNdEx + msglen
  898. if postIndex > l {
  899. return io.ErrUnexpectedEOF
  900. }
  901. if m.Put == nil {
  902. m.Put = &PutRequest{}
  903. }
  904. if err := m.Put.Unmarshal(data[iNdEx:postIndex]); err != nil {
  905. return err
  906. }
  907. iNdEx = postIndex
  908. case 5:
  909. if wireType != 2 {
  910. return fmt.Errorf("proto: wrong wireType = %d for field DeleteRange", wireType)
  911. }
  912. var msglen int
  913. for shift := uint(0); ; shift += 7 {
  914. if shift >= 64 {
  915. return ErrIntOverflowRaftInternal
  916. }
  917. if iNdEx >= l {
  918. return io.ErrUnexpectedEOF
  919. }
  920. b := data[iNdEx]
  921. iNdEx++
  922. msglen |= (int(b) & 0x7F) << shift
  923. if b < 0x80 {
  924. break
  925. }
  926. }
  927. if msglen < 0 {
  928. return ErrInvalidLengthRaftInternal
  929. }
  930. postIndex := iNdEx + msglen
  931. if postIndex > l {
  932. return io.ErrUnexpectedEOF
  933. }
  934. if m.DeleteRange == nil {
  935. m.DeleteRange = &DeleteRangeRequest{}
  936. }
  937. if err := m.DeleteRange.Unmarshal(data[iNdEx:postIndex]); err != nil {
  938. return err
  939. }
  940. iNdEx = postIndex
  941. case 6:
  942. if wireType != 2 {
  943. return fmt.Errorf("proto: wrong wireType = %d for field Txn", wireType)
  944. }
  945. var msglen int
  946. for shift := uint(0); ; shift += 7 {
  947. if shift >= 64 {
  948. return ErrIntOverflowRaftInternal
  949. }
  950. if iNdEx >= l {
  951. return io.ErrUnexpectedEOF
  952. }
  953. b := data[iNdEx]
  954. iNdEx++
  955. msglen |= (int(b) & 0x7F) << shift
  956. if b < 0x80 {
  957. break
  958. }
  959. }
  960. if msglen < 0 {
  961. return ErrInvalidLengthRaftInternal
  962. }
  963. postIndex := iNdEx + msglen
  964. if postIndex > l {
  965. return io.ErrUnexpectedEOF
  966. }
  967. if m.Txn == nil {
  968. m.Txn = &TxnRequest{}
  969. }
  970. if err := m.Txn.Unmarshal(data[iNdEx:postIndex]); err != nil {
  971. return err
  972. }
  973. iNdEx = postIndex
  974. case 7:
  975. if wireType != 2 {
  976. return fmt.Errorf("proto: wrong wireType = %d for field Compaction", wireType)
  977. }
  978. var msglen int
  979. for shift := uint(0); ; shift += 7 {
  980. if shift >= 64 {
  981. return ErrIntOverflowRaftInternal
  982. }
  983. if iNdEx >= l {
  984. return io.ErrUnexpectedEOF
  985. }
  986. b := data[iNdEx]
  987. iNdEx++
  988. msglen |= (int(b) & 0x7F) << shift
  989. if b < 0x80 {
  990. break
  991. }
  992. }
  993. if msglen < 0 {
  994. return ErrInvalidLengthRaftInternal
  995. }
  996. postIndex := iNdEx + msglen
  997. if postIndex > l {
  998. return io.ErrUnexpectedEOF
  999. }
  1000. if m.Compaction == nil {
  1001. m.Compaction = &CompactionRequest{}
  1002. }
  1003. if err := m.Compaction.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1004. return err
  1005. }
  1006. iNdEx = postIndex
  1007. case 8:
  1008. if wireType != 2 {
  1009. return fmt.Errorf("proto: wrong wireType = %d for field LeaseGrant", wireType)
  1010. }
  1011. var msglen int
  1012. for shift := uint(0); ; shift += 7 {
  1013. if shift >= 64 {
  1014. return ErrIntOverflowRaftInternal
  1015. }
  1016. if iNdEx >= l {
  1017. return io.ErrUnexpectedEOF
  1018. }
  1019. b := data[iNdEx]
  1020. iNdEx++
  1021. msglen |= (int(b) & 0x7F) << shift
  1022. if b < 0x80 {
  1023. break
  1024. }
  1025. }
  1026. if msglen < 0 {
  1027. return ErrInvalidLengthRaftInternal
  1028. }
  1029. postIndex := iNdEx + msglen
  1030. if postIndex > l {
  1031. return io.ErrUnexpectedEOF
  1032. }
  1033. if m.LeaseGrant == nil {
  1034. m.LeaseGrant = &LeaseGrantRequest{}
  1035. }
  1036. if err := m.LeaseGrant.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1037. return err
  1038. }
  1039. iNdEx = postIndex
  1040. case 9:
  1041. if wireType != 2 {
  1042. return fmt.Errorf("proto: wrong wireType = %d for field LeaseRevoke", wireType)
  1043. }
  1044. var msglen int
  1045. for shift := uint(0); ; shift += 7 {
  1046. if shift >= 64 {
  1047. return ErrIntOverflowRaftInternal
  1048. }
  1049. if iNdEx >= l {
  1050. return io.ErrUnexpectedEOF
  1051. }
  1052. b := data[iNdEx]
  1053. iNdEx++
  1054. msglen |= (int(b) & 0x7F) << shift
  1055. if b < 0x80 {
  1056. break
  1057. }
  1058. }
  1059. if msglen < 0 {
  1060. return ErrInvalidLengthRaftInternal
  1061. }
  1062. postIndex := iNdEx + msglen
  1063. if postIndex > l {
  1064. return io.ErrUnexpectedEOF
  1065. }
  1066. if m.LeaseRevoke == nil {
  1067. m.LeaseRevoke = &LeaseRevokeRequest{}
  1068. }
  1069. if err := m.LeaseRevoke.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1070. return err
  1071. }
  1072. iNdEx = postIndex
  1073. case 10:
  1074. if wireType != 2 {
  1075. return fmt.Errorf("proto: wrong wireType = %d for field Alarm", wireType)
  1076. }
  1077. var msglen int
  1078. for shift := uint(0); ; shift += 7 {
  1079. if shift >= 64 {
  1080. return ErrIntOverflowRaftInternal
  1081. }
  1082. if iNdEx >= l {
  1083. return io.ErrUnexpectedEOF
  1084. }
  1085. b := data[iNdEx]
  1086. iNdEx++
  1087. msglen |= (int(b) & 0x7F) << shift
  1088. if b < 0x80 {
  1089. break
  1090. }
  1091. }
  1092. if msglen < 0 {
  1093. return ErrInvalidLengthRaftInternal
  1094. }
  1095. postIndex := iNdEx + msglen
  1096. if postIndex > l {
  1097. return io.ErrUnexpectedEOF
  1098. }
  1099. if m.Alarm == nil {
  1100. m.Alarm = &AlarmRequest{}
  1101. }
  1102. if err := m.Alarm.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1103. return err
  1104. }
  1105. iNdEx = postIndex
  1106. case 100:
  1107. if wireType != 2 {
  1108. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  1109. }
  1110. var msglen int
  1111. for shift := uint(0); ; shift += 7 {
  1112. if shift >= 64 {
  1113. return ErrIntOverflowRaftInternal
  1114. }
  1115. if iNdEx >= l {
  1116. return io.ErrUnexpectedEOF
  1117. }
  1118. b := data[iNdEx]
  1119. iNdEx++
  1120. msglen |= (int(b) & 0x7F) << shift
  1121. if b < 0x80 {
  1122. break
  1123. }
  1124. }
  1125. if msglen < 0 {
  1126. return ErrInvalidLengthRaftInternal
  1127. }
  1128. postIndex := iNdEx + msglen
  1129. if postIndex > l {
  1130. return io.ErrUnexpectedEOF
  1131. }
  1132. if m.Header == nil {
  1133. m.Header = &RequestHeader{}
  1134. }
  1135. if err := m.Header.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1136. return err
  1137. }
  1138. iNdEx = postIndex
  1139. case 1000:
  1140. if wireType != 2 {
  1141. return fmt.Errorf("proto: wrong wireType = %d for field AuthEnable", wireType)
  1142. }
  1143. var msglen int
  1144. for shift := uint(0); ; shift += 7 {
  1145. if shift >= 64 {
  1146. return ErrIntOverflowRaftInternal
  1147. }
  1148. if iNdEx >= l {
  1149. return io.ErrUnexpectedEOF
  1150. }
  1151. b := data[iNdEx]
  1152. iNdEx++
  1153. msglen |= (int(b) & 0x7F) << shift
  1154. if b < 0x80 {
  1155. break
  1156. }
  1157. }
  1158. if msglen < 0 {
  1159. return ErrInvalidLengthRaftInternal
  1160. }
  1161. postIndex := iNdEx + msglen
  1162. if postIndex > l {
  1163. return io.ErrUnexpectedEOF
  1164. }
  1165. if m.AuthEnable == nil {
  1166. m.AuthEnable = &AuthEnableRequest{}
  1167. }
  1168. if err := m.AuthEnable.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1169. return err
  1170. }
  1171. iNdEx = postIndex
  1172. case 1011:
  1173. if wireType != 2 {
  1174. return fmt.Errorf("proto: wrong wireType = %d for field AuthDisable", wireType)
  1175. }
  1176. var msglen int
  1177. for shift := uint(0); ; shift += 7 {
  1178. if shift >= 64 {
  1179. return ErrIntOverflowRaftInternal
  1180. }
  1181. if iNdEx >= l {
  1182. return io.ErrUnexpectedEOF
  1183. }
  1184. b := data[iNdEx]
  1185. iNdEx++
  1186. msglen |= (int(b) & 0x7F) << shift
  1187. if b < 0x80 {
  1188. break
  1189. }
  1190. }
  1191. if msglen < 0 {
  1192. return ErrInvalidLengthRaftInternal
  1193. }
  1194. postIndex := iNdEx + msglen
  1195. if postIndex > l {
  1196. return io.ErrUnexpectedEOF
  1197. }
  1198. if m.AuthDisable == nil {
  1199. m.AuthDisable = &AuthDisableRequest{}
  1200. }
  1201. if err := m.AuthDisable.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1202. return err
  1203. }
  1204. iNdEx = postIndex
  1205. case 1012:
  1206. if wireType != 2 {
  1207. return fmt.Errorf("proto: wrong wireType = %d for field Authenticate", wireType)
  1208. }
  1209. var msglen int
  1210. for shift := uint(0); ; shift += 7 {
  1211. if shift >= 64 {
  1212. return ErrIntOverflowRaftInternal
  1213. }
  1214. if iNdEx >= l {
  1215. return io.ErrUnexpectedEOF
  1216. }
  1217. b := data[iNdEx]
  1218. iNdEx++
  1219. msglen |= (int(b) & 0x7F) << shift
  1220. if b < 0x80 {
  1221. break
  1222. }
  1223. }
  1224. if msglen < 0 {
  1225. return ErrInvalidLengthRaftInternal
  1226. }
  1227. postIndex := iNdEx + msglen
  1228. if postIndex > l {
  1229. return io.ErrUnexpectedEOF
  1230. }
  1231. if m.Authenticate == nil {
  1232. m.Authenticate = &InternalAuthenticateRequest{}
  1233. }
  1234. if err := m.Authenticate.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1235. return err
  1236. }
  1237. iNdEx = postIndex
  1238. case 1100:
  1239. if wireType != 2 {
  1240. return fmt.Errorf("proto: wrong wireType = %d for field AuthUserAdd", wireType)
  1241. }
  1242. var msglen int
  1243. for shift := uint(0); ; shift += 7 {
  1244. if shift >= 64 {
  1245. return ErrIntOverflowRaftInternal
  1246. }
  1247. if iNdEx >= l {
  1248. return io.ErrUnexpectedEOF
  1249. }
  1250. b := data[iNdEx]
  1251. iNdEx++
  1252. msglen |= (int(b) & 0x7F) << shift
  1253. if b < 0x80 {
  1254. break
  1255. }
  1256. }
  1257. if msglen < 0 {
  1258. return ErrInvalidLengthRaftInternal
  1259. }
  1260. postIndex := iNdEx + msglen
  1261. if postIndex > l {
  1262. return io.ErrUnexpectedEOF
  1263. }
  1264. if m.AuthUserAdd == nil {
  1265. m.AuthUserAdd = &AuthUserAddRequest{}
  1266. }
  1267. if err := m.AuthUserAdd.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1268. return err
  1269. }
  1270. iNdEx = postIndex
  1271. case 1101:
  1272. if wireType != 2 {
  1273. return fmt.Errorf("proto: wrong wireType = %d for field AuthUserDelete", wireType)
  1274. }
  1275. var msglen int
  1276. for shift := uint(0); ; shift += 7 {
  1277. if shift >= 64 {
  1278. return ErrIntOverflowRaftInternal
  1279. }
  1280. if iNdEx >= l {
  1281. return io.ErrUnexpectedEOF
  1282. }
  1283. b := data[iNdEx]
  1284. iNdEx++
  1285. msglen |= (int(b) & 0x7F) << shift
  1286. if b < 0x80 {
  1287. break
  1288. }
  1289. }
  1290. if msglen < 0 {
  1291. return ErrInvalidLengthRaftInternal
  1292. }
  1293. postIndex := iNdEx + msglen
  1294. if postIndex > l {
  1295. return io.ErrUnexpectedEOF
  1296. }
  1297. if m.AuthUserDelete == nil {
  1298. m.AuthUserDelete = &AuthUserDeleteRequest{}
  1299. }
  1300. if err := m.AuthUserDelete.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1301. return err
  1302. }
  1303. iNdEx = postIndex
  1304. case 1102:
  1305. if wireType != 2 {
  1306. return fmt.Errorf("proto: wrong wireType = %d for field AuthUserGet", wireType)
  1307. }
  1308. var msglen int
  1309. for shift := uint(0); ; shift += 7 {
  1310. if shift >= 64 {
  1311. return ErrIntOverflowRaftInternal
  1312. }
  1313. if iNdEx >= l {
  1314. return io.ErrUnexpectedEOF
  1315. }
  1316. b := data[iNdEx]
  1317. iNdEx++
  1318. msglen |= (int(b) & 0x7F) << shift
  1319. if b < 0x80 {
  1320. break
  1321. }
  1322. }
  1323. if msglen < 0 {
  1324. return ErrInvalidLengthRaftInternal
  1325. }
  1326. postIndex := iNdEx + msglen
  1327. if postIndex > l {
  1328. return io.ErrUnexpectedEOF
  1329. }
  1330. if m.AuthUserGet == nil {
  1331. m.AuthUserGet = &AuthUserGetRequest{}
  1332. }
  1333. if err := m.AuthUserGet.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1334. return err
  1335. }
  1336. iNdEx = postIndex
  1337. case 1103:
  1338. if wireType != 2 {
  1339. return fmt.Errorf("proto: wrong wireType = %d for field AuthUserChangePassword", wireType)
  1340. }
  1341. var msglen int
  1342. for shift := uint(0); ; shift += 7 {
  1343. if shift >= 64 {
  1344. return ErrIntOverflowRaftInternal
  1345. }
  1346. if iNdEx >= l {
  1347. return io.ErrUnexpectedEOF
  1348. }
  1349. b := data[iNdEx]
  1350. iNdEx++
  1351. msglen |= (int(b) & 0x7F) << shift
  1352. if b < 0x80 {
  1353. break
  1354. }
  1355. }
  1356. if msglen < 0 {
  1357. return ErrInvalidLengthRaftInternal
  1358. }
  1359. postIndex := iNdEx + msglen
  1360. if postIndex > l {
  1361. return io.ErrUnexpectedEOF
  1362. }
  1363. if m.AuthUserChangePassword == nil {
  1364. m.AuthUserChangePassword = &AuthUserChangePasswordRequest{}
  1365. }
  1366. if err := m.AuthUserChangePassword.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1367. return err
  1368. }
  1369. iNdEx = postIndex
  1370. case 1104:
  1371. if wireType != 2 {
  1372. return fmt.Errorf("proto: wrong wireType = %d for field AuthUserGrantRole", wireType)
  1373. }
  1374. var msglen int
  1375. for shift := uint(0); ; shift += 7 {
  1376. if shift >= 64 {
  1377. return ErrIntOverflowRaftInternal
  1378. }
  1379. if iNdEx >= l {
  1380. return io.ErrUnexpectedEOF
  1381. }
  1382. b := data[iNdEx]
  1383. iNdEx++
  1384. msglen |= (int(b) & 0x7F) << shift
  1385. if b < 0x80 {
  1386. break
  1387. }
  1388. }
  1389. if msglen < 0 {
  1390. return ErrInvalidLengthRaftInternal
  1391. }
  1392. postIndex := iNdEx + msglen
  1393. if postIndex > l {
  1394. return io.ErrUnexpectedEOF
  1395. }
  1396. if m.AuthUserGrantRole == nil {
  1397. m.AuthUserGrantRole = &AuthUserGrantRoleRequest{}
  1398. }
  1399. if err := m.AuthUserGrantRole.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1400. return err
  1401. }
  1402. iNdEx = postIndex
  1403. case 1105:
  1404. if wireType != 2 {
  1405. return fmt.Errorf("proto: wrong wireType = %d for field AuthUserRevokeRole", wireType)
  1406. }
  1407. var msglen int
  1408. for shift := uint(0); ; shift += 7 {
  1409. if shift >= 64 {
  1410. return ErrIntOverflowRaftInternal
  1411. }
  1412. if iNdEx >= l {
  1413. return io.ErrUnexpectedEOF
  1414. }
  1415. b := data[iNdEx]
  1416. iNdEx++
  1417. msglen |= (int(b) & 0x7F) << shift
  1418. if b < 0x80 {
  1419. break
  1420. }
  1421. }
  1422. if msglen < 0 {
  1423. return ErrInvalidLengthRaftInternal
  1424. }
  1425. postIndex := iNdEx + msglen
  1426. if postIndex > l {
  1427. return io.ErrUnexpectedEOF
  1428. }
  1429. if m.AuthUserRevokeRole == nil {
  1430. m.AuthUserRevokeRole = &AuthUserRevokeRoleRequest{}
  1431. }
  1432. if err := m.AuthUserRevokeRole.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1433. return err
  1434. }
  1435. iNdEx = postIndex
  1436. case 1106:
  1437. if wireType != 2 {
  1438. return fmt.Errorf("proto: wrong wireType = %d for field AuthUserList", wireType)
  1439. }
  1440. var msglen int
  1441. for shift := uint(0); ; shift += 7 {
  1442. if shift >= 64 {
  1443. return ErrIntOverflowRaftInternal
  1444. }
  1445. if iNdEx >= l {
  1446. return io.ErrUnexpectedEOF
  1447. }
  1448. b := data[iNdEx]
  1449. iNdEx++
  1450. msglen |= (int(b) & 0x7F) << shift
  1451. if b < 0x80 {
  1452. break
  1453. }
  1454. }
  1455. if msglen < 0 {
  1456. return ErrInvalidLengthRaftInternal
  1457. }
  1458. postIndex := iNdEx + msglen
  1459. if postIndex > l {
  1460. return io.ErrUnexpectedEOF
  1461. }
  1462. if m.AuthUserList == nil {
  1463. m.AuthUserList = &AuthUserListRequest{}
  1464. }
  1465. if err := m.AuthUserList.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1466. return err
  1467. }
  1468. iNdEx = postIndex
  1469. case 1107:
  1470. if wireType != 2 {
  1471. return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleList", wireType)
  1472. }
  1473. var msglen int
  1474. for shift := uint(0); ; shift += 7 {
  1475. if shift >= 64 {
  1476. return ErrIntOverflowRaftInternal
  1477. }
  1478. if iNdEx >= l {
  1479. return io.ErrUnexpectedEOF
  1480. }
  1481. b := data[iNdEx]
  1482. iNdEx++
  1483. msglen |= (int(b) & 0x7F) << shift
  1484. if b < 0x80 {
  1485. break
  1486. }
  1487. }
  1488. if msglen < 0 {
  1489. return ErrInvalidLengthRaftInternal
  1490. }
  1491. postIndex := iNdEx + msglen
  1492. if postIndex > l {
  1493. return io.ErrUnexpectedEOF
  1494. }
  1495. if m.AuthRoleList == nil {
  1496. m.AuthRoleList = &AuthRoleListRequest{}
  1497. }
  1498. if err := m.AuthRoleList.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1499. return err
  1500. }
  1501. iNdEx = postIndex
  1502. case 1200:
  1503. if wireType != 2 {
  1504. return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleAdd", wireType)
  1505. }
  1506. var msglen int
  1507. for shift := uint(0); ; shift += 7 {
  1508. if shift >= 64 {
  1509. return ErrIntOverflowRaftInternal
  1510. }
  1511. if iNdEx >= l {
  1512. return io.ErrUnexpectedEOF
  1513. }
  1514. b := data[iNdEx]
  1515. iNdEx++
  1516. msglen |= (int(b) & 0x7F) << shift
  1517. if b < 0x80 {
  1518. break
  1519. }
  1520. }
  1521. if msglen < 0 {
  1522. return ErrInvalidLengthRaftInternal
  1523. }
  1524. postIndex := iNdEx + msglen
  1525. if postIndex > l {
  1526. return io.ErrUnexpectedEOF
  1527. }
  1528. if m.AuthRoleAdd == nil {
  1529. m.AuthRoleAdd = &AuthRoleAddRequest{}
  1530. }
  1531. if err := m.AuthRoleAdd.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1532. return err
  1533. }
  1534. iNdEx = postIndex
  1535. case 1201:
  1536. if wireType != 2 {
  1537. return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleDelete", wireType)
  1538. }
  1539. var msglen int
  1540. for shift := uint(0); ; shift += 7 {
  1541. if shift >= 64 {
  1542. return ErrIntOverflowRaftInternal
  1543. }
  1544. if iNdEx >= l {
  1545. return io.ErrUnexpectedEOF
  1546. }
  1547. b := data[iNdEx]
  1548. iNdEx++
  1549. msglen |= (int(b) & 0x7F) << shift
  1550. if b < 0x80 {
  1551. break
  1552. }
  1553. }
  1554. if msglen < 0 {
  1555. return ErrInvalidLengthRaftInternal
  1556. }
  1557. postIndex := iNdEx + msglen
  1558. if postIndex > l {
  1559. return io.ErrUnexpectedEOF
  1560. }
  1561. if m.AuthRoleDelete == nil {
  1562. m.AuthRoleDelete = &AuthRoleDeleteRequest{}
  1563. }
  1564. if err := m.AuthRoleDelete.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1565. return err
  1566. }
  1567. iNdEx = postIndex
  1568. case 1202:
  1569. if wireType != 2 {
  1570. return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleGet", wireType)
  1571. }
  1572. var msglen int
  1573. for shift := uint(0); ; shift += 7 {
  1574. if shift >= 64 {
  1575. return ErrIntOverflowRaftInternal
  1576. }
  1577. if iNdEx >= l {
  1578. return io.ErrUnexpectedEOF
  1579. }
  1580. b := data[iNdEx]
  1581. iNdEx++
  1582. msglen |= (int(b) & 0x7F) << shift
  1583. if b < 0x80 {
  1584. break
  1585. }
  1586. }
  1587. if msglen < 0 {
  1588. return ErrInvalidLengthRaftInternal
  1589. }
  1590. postIndex := iNdEx + msglen
  1591. if postIndex > l {
  1592. return io.ErrUnexpectedEOF
  1593. }
  1594. if m.AuthRoleGet == nil {
  1595. m.AuthRoleGet = &AuthRoleGetRequest{}
  1596. }
  1597. if err := m.AuthRoleGet.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1598. return err
  1599. }
  1600. iNdEx = postIndex
  1601. case 1203:
  1602. if wireType != 2 {
  1603. return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleGrantPermission", wireType)
  1604. }
  1605. var msglen int
  1606. for shift := uint(0); ; shift += 7 {
  1607. if shift >= 64 {
  1608. return ErrIntOverflowRaftInternal
  1609. }
  1610. if iNdEx >= l {
  1611. return io.ErrUnexpectedEOF
  1612. }
  1613. b := data[iNdEx]
  1614. iNdEx++
  1615. msglen |= (int(b) & 0x7F) << shift
  1616. if b < 0x80 {
  1617. break
  1618. }
  1619. }
  1620. if msglen < 0 {
  1621. return ErrInvalidLengthRaftInternal
  1622. }
  1623. postIndex := iNdEx + msglen
  1624. if postIndex > l {
  1625. return io.ErrUnexpectedEOF
  1626. }
  1627. if m.AuthRoleGrantPermission == nil {
  1628. m.AuthRoleGrantPermission = &AuthRoleGrantPermissionRequest{}
  1629. }
  1630. if err := m.AuthRoleGrantPermission.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1631. return err
  1632. }
  1633. iNdEx = postIndex
  1634. case 1204:
  1635. if wireType != 2 {
  1636. return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleRevokePermission", wireType)
  1637. }
  1638. var msglen int
  1639. for shift := uint(0); ; shift += 7 {
  1640. if shift >= 64 {
  1641. return ErrIntOverflowRaftInternal
  1642. }
  1643. if iNdEx >= l {
  1644. return io.ErrUnexpectedEOF
  1645. }
  1646. b := data[iNdEx]
  1647. iNdEx++
  1648. msglen |= (int(b) & 0x7F) << shift
  1649. if b < 0x80 {
  1650. break
  1651. }
  1652. }
  1653. if msglen < 0 {
  1654. return ErrInvalidLengthRaftInternal
  1655. }
  1656. postIndex := iNdEx + msglen
  1657. if postIndex > l {
  1658. return io.ErrUnexpectedEOF
  1659. }
  1660. if m.AuthRoleRevokePermission == nil {
  1661. m.AuthRoleRevokePermission = &AuthRoleRevokePermissionRequest{}
  1662. }
  1663. if err := m.AuthRoleRevokePermission.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1664. return err
  1665. }
  1666. iNdEx = postIndex
  1667. default:
  1668. iNdEx = preIndex
  1669. skippy, err := skipRaftInternal(data[iNdEx:])
  1670. if err != nil {
  1671. return err
  1672. }
  1673. if skippy < 0 {
  1674. return ErrInvalidLengthRaftInternal
  1675. }
  1676. if (iNdEx + skippy) > l {
  1677. return io.ErrUnexpectedEOF
  1678. }
  1679. iNdEx += skippy
  1680. }
  1681. }
  1682. if iNdEx > l {
  1683. return io.ErrUnexpectedEOF
  1684. }
  1685. return nil
  1686. }
  1687. func (m *EmptyResponse) Unmarshal(data []byte) error {
  1688. l := len(data)
  1689. iNdEx := 0
  1690. for iNdEx < l {
  1691. preIndex := iNdEx
  1692. var wire uint64
  1693. for shift := uint(0); ; shift += 7 {
  1694. if shift >= 64 {
  1695. return ErrIntOverflowRaftInternal
  1696. }
  1697. if iNdEx >= l {
  1698. return io.ErrUnexpectedEOF
  1699. }
  1700. b := data[iNdEx]
  1701. iNdEx++
  1702. wire |= (uint64(b) & 0x7F) << shift
  1703. if b < 0x80 {
  1704. break
  1705. }
  1706. }
  1707. fieldNum := int32(wire >> 3)
  1708. wireType := int(wire & 0x7)
  1709. if wireType == 4 {
  1710. return fmt.Errorf("proto: EmptyResponse: wiretype end group for non-group")
  1711. }
  1712. if fieldNum <= 0 {
  1713. return fmt.Errorf("proto: EmptyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1714. }
  1715. switch fieldNum {
  1716. default:
  1717. iNdEx = preIndex
  1718. skippy, err := skipRaftInternal(data[iNdEx:])
  1719. if err != nil {
  1720. return err
  1721. }
  1722. if skippy < 0 {
  1723. return ErrInvalidLengthRaftInternal
  1724. }
  1725. if (iNdEx + skippy) > l {
  1726. return io.ErrUnexpectedEOF
  1727. }
  1728. iNdEx += skippy
  1729. }
  1730. }
  1731. if iNdEx > l {
  1732. return io.ErrUnexpectedEOF
  1733. }
  1734. return nil
  1735. }
  1736. func (m *InternalAuthenticateRequest) Unmarshal(data []byte) error {
  1737. l := len(data)
  1738. iNdEx := 0
  1739. for iNdEx < l {
  1740. preIndex := iNdEx
  1741. var wire uint64
  1742. for shift := uint(0); ; shift += 7 {
  1743. if shift >= 64 {
  1744. return ErrIntOverflowRaftInternal
  1745. }
  1746. if iNdEx >= l {
  1747. return io.ErrUnexpectedEOF
  1748. }
  1749. b := data[iNdEx]
  1750. iNdEx++
  1751. wire |= (uint64(b) & 0x7F) << shift
  1752. if b < 0x80 {
  1753. break
  1754. }
  1755. }
  1756. fieldNum := int32(wire >> 3)
  1757. wireType := int(wire & 0x7)
  1758. if wireType == 4 {
  1759. return fmt.Errorf("proto: InternalAuthenticateRequest: wiretype end group for non-group")
  1760. }
  1761. if fieldNum <= 0 {
  1762. return fmt.Errorf("proto: InternalAuthenticateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1763. }
  1764. switch fieldNum {
  1765. case 1:
  1766. if wireType != 2 {
  1767. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1768. }
  1769. var stringLen uint64
  1770. for shift := uint(0); ; shift += 7 {
  1771. if shift >= 64 {
  1772. return ErrIntOverflowRaftInternal
  1773. }
  1774. if iNdEx >= l {
  1775. return io.ErrUnexpectedEOF
  1776. }
  1777. b := data[iNdEx]
  1778. iNdEx++
  1779. stringLen |= (uint64(b) & 0x7F) << shift
  1780. if b < 0x80 {
  1781. break
  1782. }
  1783. }
  1784. intStringLen := int(stringLen)
  1785. if intStringLen < 0 {
  1786. return ErrInvalidLengthRaftInternal
  1787. }
  1788. postIndex := iNdEx + intStringLen
  1789. if postIndex > l {
  1790. return io.ErrUnexpectedEOF
  1791. }
  1792. m.Name = string(data[iNdEx:postIndex])
  1793. iNdEx = postIndex
  1794. case 2:
  1795. if wireType != 2 {
  1796. return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
  1797. }
  1798. var stringLen uint64
  1799. for shift := uint(0); ; shift += 7 {
  1800. if shift >= 64 {
  1801. return ErrIntOverflowRaftInternal
  1802. }
  1803. if iNdEx >= l {
  1804. return io.ErrUnexpectedEOF
  1805. }
  1806. b := data[iNdEx]
  1807. iNdEx++
  1808. stringLen |= (uint64(b) & 0x7F) << shift
  1809. if b < 0x80 {
  1810. break
  1811. }
  1812. }
  1813. intStringLen := int(stringLen)
  1814. if intStringLen < 0 {
  1815. return ErrInvalidLengthRaftInternal
  1816. }
  1817. postIndex := iNdEx + intStringLen
  1818. if postIndex > l {
  1819. return io.ErrUnexpectedEOF
  1820. }
  1821. m.Password = string(data[iNdEx:postIndex])
  1822. iNdEx = postIndex
  1823. case 3:
  1824. if wireType != 2 {
  1825. return fmt.Errorf("proto: wrong wireType = %d for field SimpleToken", wireType)
  1826. }
  1827. var stringLen uint64
  1828. for shift := uint(0); ; shift += 7 {
  1829. if shift >= 64 {
  1830. return ErrIntOverflowRaftInternal
  1831. }
  1832. if iNdEx >= l {
  1833. return io.ErrUnexpectedEOF
  1834. }
  1835. b := data[iNdEx]
  1836. iNdEx++
  1837. stringLen |= (uint64(b) & 0x7F) << shift
  1838. if b < 0x80 {
  1839. break
  1840. }
  1841. }
  1842. intStringLen := int(stringLen)
  1843. if intStringLen < 0 {
  1844. return ErrInvalidLengthRaftInternal
  1845. }
  1846. postIndex := iNdEx + intStringLen
  1847. if postIndex > l {
  1848. return io.ErrUnexpectedEOF
  1849. }
  1850. m.SimpleToken = string(data[iNdEx:postIndex])
  1851. iNdEx = postIndex
  1852. default:
  1853. iNdEx = preIndex
  1854. skippy, err := skipRaftInternal(data[iNdEx:])
  1855. if err != nil {
  1856. return err
  1857. }
  1858. if skippy < 0 {
  1859. return ErrInvalidLengthRaftInternal
  1860. }
  1861. if (iNdEx + skippy) > l {
  1862. return io.ErrUnexpectedEOF
  1863. }
  1864. iNdEx += skippy
  1865. }
  1866. }
  1867. if iNdEx > l {
  1868. return io.ErrUnexpectedEOF
  1869. }
  1870. return nil
  1871. }
  1872. func skipRaftInternal(data []byte) (n int, err error) {
  1873. l := len(data)
  1874. iNdEx := 0
  1875. for iNdEx < l {
  1876. var wire uint64
  1877. for shift := uint(0); ; shift += 7 {
  1878. if shift >= 64 {
  1879. return 0, ErrIntOverflowRaftInternal
  1880. }
  1881. if iNdEx >= l {
  1882. return 0, io.ErrUnexpectedEOF
  1883. }
  1884. b := data[iNdEx]
  1885. iNdEx++
  1886. wire |= (uint64(b) & 0x7F) << shift
  1887. if b < 0x80 {
  1888. break
  1889. }
  1890. }
  1891. wireType := int(wire & 0x7)
  1892. switch wireType {
  1893. case 0:
  1894. for shift := uint(0); ; shift += 7 {
  1895. if shift >= 64 {
  1896. return 0, ErrIntOverflowRaftInternal
  1897. }
  1898. if iNdEx >= l {
  1899. return 0, io.ErrUnexpectedEOF
  1900. }
  1901. iNdEx++
  1902. if data[iNdEx-1] < 0x80 {
  1903. break
  1904. }
  1905. }
  1906. return iNdEx, nil
  1907. case 1:
  1908. iNdEx += 8
  1909. return iNdEx, nil
  1910. case 2:
  1911. var length int
  1912. for shift := uint(0); ; shift += 7 {
  1913. if shift >= 64 {
  1914. return 0, ErrIntOverflowRaftInternal
  1915. }
  1916. if iNdEx >= l {
  1917. return 0, io.ErrUnexpectedEOF
  1918. }
  1919. b := data[iNdEx]
  1920. iNdEx++
  1921. length |= (int(b) & 0x7F) << shift
  1922. if b < 0x80 {
  1923. break
  1924. }
  1925. }
  1926. iNdEx += length
  1927. if length < 0 {
  1928. return 0, ErrInvalidLengthRaftInternal
  1929. }
  1930. return iNdEx, nil
  1931. case 3:
  1932. for {
  1933. var innerWire uint64
  1934. var start int = iNdEx
  1935. for shift := uint(0); ; shift += 7 {
  1936. if shift >= 64 {
  1937. return 0, ErrIntOverflowRaftInternal
  1938. }
  1939. if iNdEx >= l {
  1940. return 0, io.ErrUnexpectedEOF
  1941. }
  1942. b := data[iNdEx]
  1943. iNdEx++
  1944. innerWire |= (uint64(b) & 0x7F) << shift
  1945. if b < 0x80 {
  1946. break
  1947. }
  1948. }
  1949. innerWireType := int(innerWire & 0x7)
  1950. if innerWireType == 4 {
  1951. break
  1952. }
  1953. next, err := skipRaftInternal(data[start:])
  1954. if err != nil {
  1955. return 0, err
  1956. }
  1957. iNdEx = start + next
  1958. }
  1959. return iNdEx, nil
  1960. case 4:
  1961. return iNdEx, nil
  1962. case 5:
  1963. iNdEx += 4
  1964. return iNdEx, nil
  1965. default:
  1966. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1967. }
  1968. }
  1969. panic("unreachable")
  1970. }
  1971. var (
  1972. ErrInvalidLengthRaftInternal = fmt.Errorf("proto: negative length found during unmarshaling")
  1973. ErrIntOverflowRaftInternal = fmt.Errorf("proto: integer overflow")
  1974. )
  1975. var fileDescriptorRaftInternal = []byte{
  1976. // 824 bytes of a gzipped FileDescriptorProto
  1977. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x96, 0xdd, 0x4e, 0xdb, 0x48,
  1978. 0x14, 0xc7, 0x49, 0xf8, 0xcc, 0x24, 0x64, 0xd9, 0x01, 0x76, 0x67, 0x83, 0x94, 0x85, 0xac, 0x76,
  1979. 0x97, 0x7e, 0xd1, 0x0a, 0x2e, 0x7b, 0xd1, 0xa6, 0x04, 0x01, 0x12, 0x42, 0xc8, 0xa2, 0x52, 0xa5,
  1980. 0x5e, 0x58, 0x43, 0x7c, 0x48, 0x5c, 0x1c, 0xdb, 0xb5, 0x27, 0x29, 0x7d, 0x93, 0x3e, 0x46, 0xbf,
  1981. 0x1e, 0x82, 0x8b, 0x7e, 0xd0, 0xf6, 0x05, 0x5a, 0x7a, 0xd3, 0xab, 0xde, 0xb4, 0x0f, 0x50, 0xcd,
  1982. 0x87, 0xc7, 0x71, 0x32, 0xe1, 0xce, 0x3e, 0xe7, 0x7f, 0x7e, 0xe7, 0x4c, 0xe6, 0x3f, 0x9e, 0xa0,
  1983. 0xf9, 0x88, 0x1e, 0x33, 0xdb, 0xf5, 0x19, 0x44, 0x3e, 0xf5, 0xd6, 0xc2, 0x28, 0x60, 0x01, 0x2e,
  1984. 0x01, 0x6b, 0x3a, 0x31, 0x44, 0x3d, 0x88, 0xc2, 0xa3, 0xca, 0x42, 0x2b, 0x68, 0x05, 0x22, 0x71,
  1985. 0x93, 0x3f, 0x49, 0x4d, 0x65, 0x2e, 0xd5, 0xa8, 0x48, 0x21, 0x0a, 0x9b, 0xf2, 0xb1, 0x76, 0x1b,
  1986. 0xcd, 0x5a, 0xf0, 0xb8, 0x0b, 0x31, 0xdb, 0x01, 0xea, 0x40, 0x84, 0xcb, 0x28, 0xbf, 0xdb, 0x20,
  1987. 0xb9, 0xe5, 0xdc, 0xea, 0x84, 0x95, 0x77, 0x1b, 0xb8, 0x82, 0x66, 0xba, 0x31, 0x6f, 0xd9, 0x01,
  1988. 0x92, 0x5f, 0xce, 0xad, 0x16, 0x2c, 0xfd, 0x5e, 0xfb, 0x5e, 0x46, 0xf3, 0xbb, 0x6a, 0x20, 0x8b,
  1989. 0x1e, 0x33, 0x45, 0x1a, 0x62, 0xfc, 0x8b, 0xf2, 0xbd, 0x75, 0x51, 0x5d, 0x5c, 0x5f, 0x5c, 0xeb,
  1990. 0x1f, 0x79, 0x4d, 0x95, 0x58, 0xf9, 0xde, 0x3a, 0xbe, 0x85, 0x26, 0x23, 0xea, 0xb7, 0x80, 0x8c,
  1991. 0x0b, 0x65, 0x65, 0x40, 0xc9, 0x53, 0x89, 0x5c, 0x0a, 0xf1, 0x55, 0x34, 0x1e, 0x76, 0x19, 0x99,
  1992. 0x10, 0x7a, 0x92, 0xd5, 0x1f, 0x74, 0x93, 0x79, 0x2c, 0x2e, 0xc2, 0x9b, 0xa8, 0xe4, 0x80, 0x07,
  1993. 0x0c, 0x6c, 0xd9, 0x64, 0x52, 0x14, 0x2d, 0x67, 0x8b, 0x1a, 0x42, 0x91, 0x69, 0x55, 0x74, 0xd2,
  1994. 0x18, 0x6f, 0xc8, 0x4e, 0x7d, 0x32, 0x65, 0x6a, 0x78, 0x78, 0xea, 0xeb, 0x86, 0xec, 0xd4, 0xc7,
  1995. 0x77, 0x10, 0x6a, 0x06, 0x9d, 0x90, 0x36, 0x99, 0x1b, 0xf8, 0x64, 0x5a, 0x94, 0xfc, 0x9d, 0x2d,
  1996. 0xd9, 0xd4, 0xf9, 0xa4, 0xb2, 0xaf, 0x04, 0xdf, 0x45, 0x45, 0x0f, 0x68, 0x0c, 0x76, 0x2b, 0xa2,
  1997. 0x3e, 0x23, 0x33, 0x26, 0xc2, 0x1e, 0x17, 0x6c, 0xf3, 0xbc, 0x26, 0x78, 0x3a, 0xc4, 0xd7, 0x2c,
  1998. 0x09, 0x11, 0xf4, 0x82, 0x13, 0x20, 0x05, 0xd3, 0x9a, 0x05, 0xc2, 0x12, 0x02, 0xbd, 0x66, 0x2f,
  1999. 0x8d, 0xf1, 0x6d, 0xa1, 0x1e, 0x8d, 0x3a, 0x04, 0x99, 0xb6, 0xa5, 0xce, 0x53, 0x7a, 0x5b, 0x84,
  2000. 0x10, 0x6f, 0xa0, 0xa9, 0xb6, 0x70, 0x13, 0x71, 0x44, 0xc9, 0x92, 0x71, 0xcf, 0xa5, 0xe1, 0x2c,
  2001. 0x25, 0xc5, 0x75, 0x54, 0xa4, 0x5d, 0xd6, 0xb6, 0xc1, 0xa7, 0x47, 0x1e, 0x90, 0x6f, 0xc6, 0x1f,
  2002. 0xac, 0xde, 0x65, 0xed, 0x2d, 0x21, 0xd0, 0xcb, 0xa5, 0x3a, 0x84, 0x1b, 0xa8, 0x24, 0x10, 0x8e,
  2003. 0x1b, 0x0b, 0xc6, 0x8f, 0x69, 0xd3, 0x7a, 0x39, 0xa3, 0x21, 0x15, 0x7a, 0xbd, 0x34, 0x8d, 0xe1,
  2004. 0x7d, 0x49, 0x01, 0x9f, 0xb9, 0x4d, 0xca, 0x80, 0xfc, 0x94, 0x94, 0x2b, 0x59, 0x4a, 0xe2, 0xfb,
  2005. 0x7a, 0x9f, 0x34, 0xc1, 0x65, 0xea, 0xf1, 0x16, 0x9a, 0x15, 0x53, 0xf1, 0x63, 0x63, 0x53, 0xc7,
  2006. 0x21, 0x6f, 0x66, 0x46, 0x8d, 0x75, 0x3f, 0x86, 0xa8, 0xee, 0x38, 0x99, 0xb1, 0x54, 0x0c, 0xef,
  2007. 0xa3, 0xb9, 0x14, 0x23, 0x3d, 0x49, 0xde, 0x4a, 0xd2, 0x3f, 0x66, 0x92, 0x32, 0xb3, 0x82, 0x95,
  2008. 0x69, 0x26, 0x9c, 0x1d, 0xab, 0x05, 0x8c, 0xbc, 0xbb, 0x74, 0xac, 0x6d, 0x60, 0x43, 0x63, 0x6d,
  2009. 0x03, 0xc3, 0x2d, 0xf4, 0x57, 0x8a, 0x69, 0xb6, 0xf9, 0x29, 0xb1, 0x43, 0x1a, 0xc7, 0x4f, 0x82,
  2010. 0xc8, 0x21, 0xef, 0x25, 0xf2, 0x9a, 0x19, 0xb9, 0x29, 0xd4, 0x07, 0x4a, 0x9c, 0xd0, 0xff, 0xa0,
  2011. 0xc6, 0x34, 0x7e, 0x80, 0x16, 0xfa, 0xe6, 0xe5, 0xf6, 0xb6, 0xa3, 0xc0, 0x03, 0x72, 0x2e, 0x7b,
  2012. 0xfc, 0x37, 0x62, 0x6c, 0x71, 0x34, 0x82, 0x74, 0xab, 0x7f, 0xa7, 0x83, 0x19, 0xfc, 0x10, 0x2d,
  2013. 0xa6, 0x64, 0x79, 0x52, 0x24, 0xfa, 0x83, 0x44, 0xff, 0x6f, 0x46, 0xab, 0x23, 0xd3, 0xc7, 0xc6,
  2014. 0x74, 0x28, 0x85, 0x77, 0x50, 0x39, 0x85, 0x7b, 0x6e, 0xcc, 0xc8, 0x47, 0x49, 0x5d, 0x31, 0x53,
  2015. 0xf7, 0xdc, 0x98, 0x65, 0x7c, 0x94, 0x04, 0x35, 0x89, 0x8f, 0x26, 0x49, 0x9f, 0x46, 0x92, 0x78,
  2016. 0xeb, 0x21, 0x52, 0x12, 0xd4, 0x5b, 0x2f, 0x48, 0xdc, 0x91, 0xcf, 0x0b, 0xa3, 0xb6, 0x9e, 0xd7,
  2017. 0x0c, 0x3a, 0x52, 0xc5, 0xb4, 0x23, 0x05, 0x46, 0x39, 0xf2, 0x45, 0x61, 0x94, 0x23, 0x79, 0x95,
  2018. 0xc1, 0x91, 0x69, 0x38, 0x3b, 0x16, 0x77, 0xe4, 0xcb, 0x4b, 0xc7, 0x1a, 0x74, 0xa4, 0x8a, 0xe1,
  2019. 0x47, 0xa8, 0xd2, 0x87, 0x11, 0x46, 0x09, 0x21, 0xea, 0xb8, 0x71, 0xcc, 0xbf, 0xc3, 0xaf, 0x24,
  2020. 0xf3, 0xfa, 0x08, 0x26, 0x97, 0x1f, 0x68, 0x75, 0xc2, 0xff, 0x93, 0x9a, 0xf3, 0xb8, 0x83, 0x96,
  2021. 0xd2, 0x5e, 0xca, 0x3a, 0x7d, 0xcd, 0x5e, 0xcb, 0x66, 0x37, 0xcc, 0xcd, 0xa4, 0x4b, 0x86, 0xbb,
  2022. 0x11, 0x3a, 0x42, 0x50, 0xfb, 0x0d, 0xcd, 0x6e, 0x75, 0x42, 0xf6, 0xd4, 0x82, 0x38, 0x0c, 0xfc,
  2023. 0x18, 0x6a, 0x21, 0x5a, 0xba, 0xe4, 0x43, 0x84, 0x31, 0x9a, 0x10, 0x17, 0x77, 0x4e, 0x5c, 0xdc,
  2024. 0xe2, 0x99, 0x5f, 0xe8, 0xfa, 0x7c, 0xaa, 0x0b, 0x3d, 0x79, 0xc7, 0x2b, 0xa8, 0x14, 0xbb, 0x9d,
  2025. 0xd0, 0x03, 0x9b, 0x05, 0x27, 0xe0, 0x8b, 0x8b, 0xb8, 0x60, 0x15, 0x65, 0xec, 0x90, 0x87, 0xee,
  2026. 0x2d, 0x9c, 0x7d, 0xa9, 0x8e, 0x9d, 0x5d, 0x54, 0x73, 0xe7, 0x17, 0xd5, 0xdc, 0xe7, 0x8b, 0x6a,
  2027. 0xee, 0xd9, 0xd7, 0xea, 0xd8, 0xd1, 0x94, 0xf8, 0x37, 0xb1, 0xf1, 0x2b, 0x00, 0x00, 0xff, 0xff,
  2028. 0x54, 0x8c, 0x4a, 0x7f, 0xa5, 0x08, 0x00, 0x00,
  2029. }