raft_internal.pb.go 54 KB

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