raft_internal.pb.go 62 KB

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