api.pb.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: app/admin/main/manager/api/api.proto
  3. package api
  4. import proto "github.com/gogo/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _ "github.com/gogo/protobuf/gogoproto"
  8. import (
  9. context "golang.org/x/net/context"
  10. grpc "google.golang.org/grpc"
  11. )
  12. import io "io"
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  22. type LoginReq struct {
  23. Mngsid string `protobuf:"bytes,1,opt,name=mngsid,proto3" json:"mngsid,omitempty"`
  24. Dsbsid string `protobuf:"bytes,2,opt,name=dsbsid,proto3" json:"dsbsid,omitempty"`
  25. }
  26. func (m *LoginReq) Reset() { *m = LoginReq{} }
  27. func (m *LoginReq) String() string { return proto.CompactTextString(m) }
  28. func (*LoginReq) ProtoMessage() {}
  29. func (*LoginReq) Descriptor() ([]byte, []int) {
  30. return fileDescriptor_api_2329f30e789e58b5, []int{0}
  31. }
  32. func (m *LoginReq) GetMngsid() string {
  33. if m != nil {
  34. return m.Mngsid
  35. }
  36. return ""
  37. }
  38. func (m *LoginReq) GetDsbsid() string {
  39. if m != nil {
  40. return m.Dsbsid
  41. }
  42. return ""
  43. }
  44. type LoginReply struct {
  45. Sid string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`
  46. Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
  47. }
  48. func (m *LoginReply) Reset() { *m = LoginReply{} }
  49. func (m *LoginReply) String() string { return proto.CompactTextString(m) }
  50. func (*LoginReply) ProtoMessage() {}
  51. func (*LoginReply) Descriptor() ([]byte, []int) {
  52. return fileDescriptor_api_2329f30e789e58b5, []int{1}
  53. }
  54. func (m *LoginReply) GetSid() string {
  55. if m != nil {
  56. return m.Sid
  57. }
  58. return ""
  59. }
  60. func (m *LoginReply) GetUsername() string {
  61. if m != nil {
  62. return m.Username
  63. }
  64. return ""
  65. }
  66. type PermissionReq struct {
  67. Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
  68. }
  69. func (m *PermissionReq) Reset() { *m = PermissionReq{} }
  70. func (m *PermissionReq) String() string { return proto.CompactTextString(m) }
  71. func (*PermissionReq) ProtoMessage() {}
  72. func (*PermissionReq) Descriptor() ([]byte, []int) {
  73. return fileDescriptor_api_2329f30e789e58b5, []int{2}
  74. }
  75. func (m *PermissionReq) GetUsername() string {
  76. if m != nil {
  77. return m.Username
  78. }
  79. return ""
  80. }
  81. type PermissionReply struct {
  82. Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"`
  83. Perms []string `protobuf:"bytes,2,rep,name=perms" json:"perms,omitempty"`
  84. }
  85. func (m *PermissionReply) Reset() { *m = PermissionReply{} }
  86. func (m *PermissionReply) String() string { return proto.CompactTextString(m) }
  87. func (*PermissionReply) ProtoMessage() {}
  88. func (*PermissionReply) Descriptor() ([]byte, []int) {
  89. return fileDescriptor_api_2329f30e789e58b5, []int{3}
  90. }
  91. func (m *PermissionReply) GetUid() int64 {
  92. if m != nil {
  93. return m.Uid
  94. }
  95. return 0
  96. }
  97. func (m *PermissionReply) GetPerms() []string {
  98. if m != nil {
  99. return m.Perms
  100. }
  101. return nil
  102. }
  103. func init() {
  104. proto.RegisterType((*LoginReq)(nil), "main.manager.admin.LoginReq")
  105. proto.RegisterType((*LoginReply)(nil), "main.manager.admin.LoginReply")
  106. proto.RegisterType((*PermissionReq)(nil), "main.manager.admin.PermissionReq")
  107. proto.RegisterType((*PermissionReply)(nil), "main.manager.admin.PermissionReply")
  108. }
  109. // Reference imports to suppress errors if they are not otherwise used.
  110. var _ context.Context
  111. var _ grpc.ClientConn
  112. // This is a compile-time assertion to ensure that this generated file
  113. // is compatible with the grpc package it is being compiled against.
  114. const _ = grpc.SupportPackageIsVersion4
  115. // PermitClient is the client API for Permit service.
  116. //
  117. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  118. type PermitClient interface {
  119. Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginReply, error)
  120. Permissions(ctx context.Context, in *PermissionReq, opts ...grpc.CallOption) (*PermissionReply, error)
  121. }
  122. type permitClient struct {
  123. cc *grpc.ClientConn
  124. }
  125. func NewPermitClient(cc *grpc.ClientConn) PermitClient {
  126. return &permitClient{cc}
  127. }
  128. func (c *permitClient) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginReply, error) {
  129. out := new(LoginReply)
  130. err := c.cc.Invoke(ctx, "/main.manager.admin.Permit/Login", in, out, opts...)
  131. if err != nil {
  132. return nil, err
  133. }
  134. return out, nil
  135. }
  136. func (c *permitClient) Permissions(ctx context.Context, in *PermissionReq, opts ...grpc.CallOption) (*PermissionReply, error) {
  137. out := new(PermissionReply)
  138. err := c.cc.Invoke(ctx, "/main.manager.admin.Permit/Permissions", in, out, opts...)
  139. if err != nil {
  140. return nil, err
  141. }
  142. return out, nil
  143. }
  144. // PermitServer is the server API for Permit service.
  145. type PermitServer interface {
  146. Login(context.Context, *LoginReq) (*LoginReply, error)
  147. Permissions(context.Context, *PermissionReq) (*PermissionReply, error)
  148. }
  149. func RegisterPermitServer(s *grpc.Server, srv PermitServer) {
  150. s.RegisterService(&_Permit_serviceDesc, srv)
  151. }
  152. func _Permit_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  153. in := new(LoginReq)
  154. if err := dec(in); err != nil {
  155. return nil, err
  156. }
  157. if interceptor == nil {
  158. return srv.(PermitServer).Login(ctx, in)
  159. }
  160. info := &grpc.UnaryServerInfo{
  161. Server: srv,
  162. FullMethod: "/main.manager.admin.Permit/Login",
  163. }
  164. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  165. return srv.(PermitServer).Login(ctx, req.(*LoginReq))
  166. }
  167. return interceptor(ctx, in, info, handler)
  168. }
  169. func _Permit_Permissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  170. in := new(PermissionReq)
  171. if err := dec(in); err != nil {
  172. return nil, err
  173. }
  174. if interceptor == nil {
  175. return srv.(PermitServer).Permissions(ctx, in)
  176. }
  177. info := &grpc.UnaryServerInfo{
  178. Server: srv,
  179. FullMethod: "/main.manager.admin.Permit/Permissions",
  180. }
  181. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  182. return srv.(PermitServer).Permissions(ctx, req.(*PermissionReq))
  183. }
  184. return interceptor(ctx, in, info, handler)
  185. }
  186. var _Permit_serviceDesc = grpc.ServiceDesc{
  187. ServiceName: "main.manager.admin.Permit",
  188. HandlerType: (*PermitServer)(nil),
  189. Methods: []grpc.MethodDesc{
  190. {
  191. MethodName: "Login",
  192. Handler: _Permit_Login_Handler,
  193. },
  194. {
  195. MethodName: "Permissions",
  196. Handler: _Permit_Permissions_Handler,
  197. },
  198. },
  199. Streams: []grpc.StreamDesc{},
  200. Metadata: "app/admin/main/manager/api/api.proto",
  201. }
  202. func (m *LoginReq) Marshal() (dAtA []byte, err error) {
  203. size := m.Size()
  204. dAtA = make([]byte, size)
  205. n, err := m.MarshalTo(dAtA)
  206. if err != nil {
  207. return nil, err
  208. }
  209. return dAtA[:n], nil
  210. }
  211. func (m *LoginReq) MarshalTo(dAtA []byte) (int, error) {
  212. var i int
  213. _ = i
  214. var l int
  215. _ = l
  216. if len(m.Mngsid) > 0 {
  217. dAtA[i] = 0xa
  218. i++
  219. i = encodeVarintApi(dAtA, i, uint64(len(m.Mngsid)))
  220. i += copy(dAtA[i:], m.Mngsid)
  221. }
  222. if len(m.Dsbsid) > 0 {
  223. dAtA[i] = 0x12
  224. i++
  225. i = encodeVarintApi(dAtA, i, uint64(len(m.Dsbsid)))
  226. i += copy(dAtA[i:], m.Dsbsid)
  227. }
  228. return i, nil
  229. }
  230. func (m *LoginReply) Marshal() (dAtA []byte, err error) {
  231. size := m.Size()
  232. dAtA = make([]byte, size)
  233. n, err := m.MarshalTo(dAtA)
  234. if err != nil {
  235. return nil, err
  236. }
  237. return dAtA[:n], nil
  238. }
  239. func (m *LoginReply) MarshalTo(dAtA []byte) (int, error) {
  240. var i int
  241. _ = i
  242. var l int
  243. _ = l
  244. if len(m.Sid) > 0 {
  245. dAtA[i] = 0xa
  246. i++
  247. i = encodeVarintApi(dAtA, i, uint64(len(m.Sid)))
  248. i += copy(dAtA[i:], m.Sid)
  249. }
  250. if len(m.Username) > 0 {
  251. dAtA[i] = 0x12
  252. i++
  253. i = encodeVarintApi(dAtA, i, uint64(len(m.Username)))
  254. i += copy(dAtA[i:], m.Username)
  255. }
  256. return i, nil
  257. }
  258. func (m *PermissionReq) Marshal() (dAtA []byte, err error) {
  259. size := m.Size()
  260. dAtA = make([]byte, size)
  261. n, err := m.MarshalTo(dAtA)
  262. if err != nil {
  263. return nil, err
  264. }
  265. return dAtA[:n], nil
  266. }
  267. func (m *PermissionReq) MarshalTo(dAtA []byte) (int, error) {
  268. var i int
  269. _ = i
  270. var l int
  271. _ = l
  272. if len(m.Username) > 0 {
  273. dAtA[i] = 0xa
  274. i++
  275. i = encodeVarintApi(dAtA, i, uint64(len(m.Username)))
  276. i += copy(dAtA[i:], m.Username)
  277. }
  278. return i, nil
  279. }
  280. func (m *PermissionReply) Marshal() (dAtA []byte, err error) {
  281. size := m.Size()
  282. dAtA = make([]byte, size)
  283. n, err := m.MarshalTo(dAtA)
  284. if err != nil {
  285. return nil, err
  286. }
  287. return dAtA[:n], nil
  288. }
  289. func (m *PermissionReply) MarshalTo(dAtA []byte) (int, error) {
  290. var i int
  291. _ = i
  292. var l int
  293. _ = l
  294. if m.Uid != 0 {
  295. dAtA[i] = 0x8
  296. i++
  297. i = encodeVarintApi(dAtA, i, uint64(m.Uid))
  298. }
  299. if len(m.Perms) > 0 {
  300. for _, s := range m.Perms {
  301. dAtA[i] = 0x12
  302. i++
  303. l = len(s)
  304. for l >= 1<<7 {
  305. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  306. l >>= 7
  307. i++
  308. }
  309. dAtA[i] = uint8(l)
  310. i++
  311. i += copy(dAtA[i:], s)
  312. }
  313. }
  314. return i, nil
  315. }
  316. func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
  317. for v >= 1<<7 {
  318. dAtA[offset] = uint8(v&0x7f | 0x80)
  319. v >>= 7
  320. offset++
  321. }
  322. dAtA[offset] = uint8(v)
  323. return offset + 1
  324. }
  325. func (m *LoginReq) Size() (n int) {
  326. if m == nil {
  327. return 0
  328. }
  329. var l int
  330. _ = l
  331. l = len(m.Mngsid)
  332. if l > 0 {
  333. n += 1 + l + sovApi(uint64(l))
  334. }
  335. l = len(m.Dsbsid)
  336. if l > 0 {
  337. n += 1 + l + sovApi(uint64(l))
  338. }
  339. return n
  340. }
  341. func (m *LoginReply) Size() (n int) {
  342. if m == nil {
  343. return 0
  344. }
  345. var l int
  346. _ = l
  347. l = len(m.Sid)
  348. if l > 0 {
  349. n += 1 + l + sovApi(uint64(l))
  350. }
  351. l = len(m.Username)
  352. if l > 0 {
  353. n += 1 + l + sovApi(uint64(l))
  354. }
  355. return n
  356. }
  357. func (m *PermissionReq) Size() (n int) {
  358. if m == nil {
  359. return 0
  360. }
  361. var l int
  362. _ = l
  363. l = len(m.Username)
  364. if l > 0 {
  365. n += 1 + l + sovApi(uint64(l))
  366. }
  367. return n
  368. }
  369. func (m *PermissionReply) Size() (n int) {
  370. if m == nil {
  371. return 0
  372. }
  373. var l int
  374. _ = l
  375. if m.Uid != 0 {
  376. n += 1 + sovApi(uint64(m.Uid))
  377. }
  378. if len(m.Perms) > 0 {
  379. for _, s := range m.Perms {
  380. l = len(s)
  381. n += 1 + l + sovApi(uint64(l))
  382. }
  383. }
  384. return n
  385. }
  386. func sovApi(x uint64) (n int) {
  387. for {
  388. n++
  389. x >>= 7
  390. if x == 0 {
  391. break
  392. }
  393. }
  394. return n
  395. }
  396. func sozApi(x uint64) (n int) {
  397. return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  398. }
  399. func (m *LoginReq) Unmarshal(dAtA []byte) error {
  400. l := len(dAtA)
  401. iNdEx := 0
  402. for iNdEx < l {
  403. preIndex := iNdEx
  404. var wire uint64
  405. for shift := uint(0); ; shift += 7 {
  406. if shift >= 64 {
  407. return ErrIntOverflowApi
  408. }
  409. if iNdEx >= l {
  410. return io.ErrUnexpectedEOF
  411. }
  412. b := dAtA[iNdEx]
  413. iNdEx++
  414. wire |= (uint64(b) & 0x7F) << shift
  415. if b < 0x80 {
  416. break
  417. }
  418. }
  419. fieldNum := int32(wire >> 3)
  420. wireType := int(wire & 0x7)
  421. if wireType == 4 {
  422. return fmt.Errorf("proto: LoginReq: wiretype end group for non-group")
  423. }
  424. if fieldNum <= 0 {
  425. return fmt.Errorf("proto: LoginReq: illegal tag %d (wire type %d)", fieldNum, wire)
  426. }
  427. switch fieldNum {
  428. case 1:
  429. if wireType != 2 {
  430. return fmt.Errorf("proto: wrong wireType = %d for field Mngsid", wireType)
  431. }
  432. var stringLen uint64
  433. for shift := uint(0); ; shift += 7 {
  434. if shift >= 64 {
  435. return ErrIntOverflowApi
  436. }
  437. if iNdEx >= l {
  438. return io.ErrUnexpectedEOF
  439. }
  440. b := dAtA[iNdEx]
  441. iNdEx++
  442. stringLen |= (uint64(b) & 0x7F) << shift
  443. if b < 0x80 {
  444. break
  445. }
  446. }
  447. intStringLen := int(stringLen)
  448. if intStringLen < 0 {
  449. return ErrInvalidLengthApi
  450. }
  451. postIndex := iNdEx + intStringLen
  452. if postIndex > l {
  453. return io.ErrUnexpectedEOF
  454. }
  455. m.Mngsid = string(dAtA[iNdEx:postIndex])
  456. iNdEx = postIndex
  457. case 2:
  458. if wireType != 2 {
  459. return fmt.Errorf("proto: wrong wireType = %d for field Dsbsid", wireType)
  460. }
  461. var stringLen uint64
  462. for shift := uint(0); ; shift += 7 {
  463. if shift >= 64 {
  464. return ErrIntOverflowApi
  465. }
  466. if iNdEx >= l {
  467. return io.ErrUnexpectedEOF
  468. }
  469. b := dAtA[iNdEx]
  470. iNdEx++
  471. stringLen |= (uint64(b) & 0x7F) << shift
  472. if b < 0x80 {
  473. break
  474. }
  475. }
  476. intStringLen := int(stringLen)
  477. if intStringLen < 0 {
  478. return ErrInvalidLengthApi
  479. }
  480. postIndex := iNdEx + intStringLen
  481. if postIndex > l {
  482. return io.ErrUnexpectedEOF
  483. }
  484. m.Dsbsid = string(dAtA[iNdEx:postIndex])
  485. iNdEx = postIndex
  486. default:
  487. iNdEx = preIndex
  488. skippy, err := skipApi(dAtA[iNdEx:])
  489. if err != nil {
  490. return err
  491. }
  492. if skippy < 0 {
  493. return ErrInvalidLengthApi
  494. }
  495. if (iNdEx + skippy) > l {
  496. return io.ErrUnexpectedEOF
  497. }
  498. iNdEx += skippy
  499. }
  500. }
  501. if iNdEx > l {
  502. return io.ErrUnexpectedEOF
  503. }
  504. return nil
  505. }
  506. func (m *LoginReply) Unmarshal(dAtA []byte) error {
  507. l := len(dAtA)
  508. iNdEx := 0
  509. for iNdEx < l {
  510. preIndex := iNdEx
  511. var wire uint64
  512. for shift := uint(0); ; shift += 7 {
  513. if shift >= 64 {
  514. return ErrIntOverflowApi
  515. }
  516. if iNdEx >= l {
  517. return io.ErrUnexpectedEOF
  518. }
  519. b := dAtA[iNdEx]
  520. iNdEx++
  521. wire |= (uint64(b) & 0x7F) << shift
  522. if b < 0x80 {
  523. break
  524. }
  525. }
  526. fieldNum := int32(wire >> 3)
  527. wireType := int(wire & 0x7)
  528. if wireType == 4 {
  529. return fmt.Errorf("proto: LoginReply: wiretype end group for non-group")
  530. }
  531. if fieldNum <= 0 {
  532. return fmt.Errorf("proto: LoginReply: illegal tag %d (wire type %d)", fieldNum, wire)
  533. }
  534. switch fieldNum {
  535. case 1:
  536. if wireType != 2 {
  537. return fmt.Errorf("proto: wrong wireType = %d for field Sid", wireType)
  538. }
  539. var stringLen uint64
  540. for shift := uint(0); ; shift += 7 {
  541. if shift >= 64 {
  542. return ErrIntOverflowApi
  543. }
  544. if iNdEx >= l {
  545. return io.ErrUnexpectedEOF
  546. }
  547. b := dAtA[iNdEx]
  548. iNdEx++
  549. stringLen |= (uint64(b) & 0x7F) << shift
  550. if b < 0x80 {
  551. break
  552. }
  553. }
  554. intStringLen := int(stringLen)
  555. if intStringLen < 0 {
  556. return ErrInvalidLengthApi
  557. }
  558. postIndex := iNdEx + intStringLen
  559. if postIndex > l {
  560. return io.ErrUnexpectedEOF
  561. }
  562. m.Sid = string(dAtA[iNdEx:postIndex])
  563. iNdEx = postIndex
  564. case 2:
  565. if wireType != 2 {
  566. return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
  567. }
  568. var stringLen uint64
  569. for shift := uint(0); ; shift += 7 {
  570. if shift >= 64 {
  571. return ErrIntOverflowApi
  572. }
  573. if iNdEx >= l {
  574. return io.ErrUnexpectedEOF
  575. }
  576. b := dAtA[iNdEx]
  577. iNdEx++
  578. stringLen |= (uint64(b) & 0x7F) << shift
  579. if b < 0x80 {
  580. break
  581. }
  582. }
  583. intStringLen := int(stringLen)
  584. if intStringLen < 0 {
  585. return ErrInvalidLengthApi
  586. }
  587. postIndex := iNdEx + intStringLen
  588. if postIndex > l {
  589. return io.ErrUnexpectedEOF
  590. }
  591. m.Username = string(dAtA[iNdEx:postIndex])
  592. iNdEx = postIndex
  593. default:
  594. iNdEx = preIndex
  595. skippy, err := skipApi(dAtA[iNdEx:])
  596. if err != nil {
  597. return err
  598. }
  599. if skippy < 0 {
  600. return ErrInvalidLengthApi
  601. }
  602. if (iNdEx + skippy) > l {
  603. return io.ErrUnexpectedEOF
  604. }
  605. iNdEx += skippy
  606. }
  607. }
  608. if iNdEx > l {
  609. return io.ErrUnexpectedEOF
  610. }
  611. return nil
  612. }
  613. func (m *PermissionReq) Unmarshal(dAtA []byte) error {
  614. l := len(dAtA)
  615. iNdEx := 0
  616. for iNdEx < l {
  617. preIndex := iNdEx
  618. var wire uint64
  619. for shift := uint(0); ; shift += 7 {
  620. if shift >= 64 {
  621. return ErrIntOverflowApi
  622. }
  623. if iNdEx >= l {
  624. return io.ErrUnexpectedEOF
  625. }
  626. b := dAtA[iNdEx]
  627. iNdEx++
  628. wire |= (uint64(b) & 0x7F) << shift
  629. if b < 0x80 {
  630. break
  631. }
  632. }
  633. fieldNum := int32(wire >> 3)
  634. wireType := int(wire & 0x7)
  635. if wireType == 4 {
  636. return fmt.Errorf("proto: PermissionReq: wiretype end group for non-group")
  637. }
  638. if fieldNum <= 0 {
  639. return fmt.Errorf("proto: PermissionReq: illegal tag %d (wire type %d)", fieldNum, wire)
  640. }
  641. switch fieldNum {
  642. case 1:
  643. if wireType != 2 {
  644. return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
  645. }
  646. var stringLen uint64
  647. for shift := uint(0); ; shift += 7 {
  648. if shift >= 64 {
  649. return ErrIntOverflowApi
  650. }
  651. if iNdEx >= l {
  652. return io.ErrUnexpectedEOF
  653. }
  654. b := dAtA[iNdEx]
  655. iNdEx++
  656. stringLen |= (uint64(b) & 0x7F) << shift
  657. if b < 0x80 {
  658. break
  659. }
  660. }
  661. intStringLen := int(stringLen)
  662. if intStringLen < 0 {
  663. return ErrInvalidLengthApi
  664. }
  665. postIndex := iNdEx + intStringLen
  666. if postIndex > l {
  667. return io.ErrUnexpectedEOF
  668. }
  669. m.Username = string(dAtA[iNdEx:postIndex])
  670. iNdEx = postIndex
  671. default:
  672. iNdEx = preIndex
  673. skippy, err := skipApi(dAtA[iNdEx:])
  674. if err != nil {
  675. return err
  676. }
  677. if skippy < 0 {
  678. return ErrInvalidLengthApi
  679. }
  680. if (iNdEx + skippy) > l {
  681. return io.ErrUnexpectedEOF
  682. }
  683. iNdEx += skippy
  684. }
  685. }
  686. if iNdEx > l {
  687. return io.ErrUnexpectedEOF
  688. }
  689. return nil
  690. }
  691. func (m *PermissionReply) Unmarshal(dAtA []byte) error {
  692. l := len(dAtA)
  693. iNdEx := 0
  694. for iNdEx < l {
  695. preIndex := iNdEx
  696. var wire uint64
  697. for shift := uint(0); ; shift += 7 {
  698. if shift >= 64 {
  699. return ErrIntOverflowApi
  700. }
  701. if iNdEx >= l {
  702. return io.ErrUnexpectedEOF
  703. }
  704. b := dAtA[iNdEx]
  705. iNdEx++
  706. wire |= (uint64(b) & 0x7F) << shift
  707. if b < 0x80 {
  708. break
  709. }
  710. }
  711. fieldNum := int32(wire >> 3)
  712. wireType := int(wire & 0x7)
  713. if wireType == 4 {
  714. return fmt.Errorf("proto: PermissionReply: wiretype end group for non-group")
  715. }
  716. if fieldNum <= 0 {
  717. return fmt.Errorf("proto: PermissionReply: illegal tag %d (wire type %d)", fieldNum, wire)
  718. }
  719. switch fieldNum {
  720. case 1:
  721. if wireType != 0 {
  722. return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
  723. }
  724. m.Uid = 0
  725. for shift := uint(0); ; shift += 7 {
  726. if shift >= 64 {
  727. return ErrIntOverflowApi
  728. }
  729. if iNdEx >= l {
  730. return io.ErrUnexpectedEOF
  731. }
  732. b := dAtA[iNdEx]
  733. iNdEx++
  734. m.Uid |= (int64(b) & 0x7F) << shift
  735. if b < 0x80 {
  736. break
  737. }
  738. }
  739. case 2:
  740. if wireType != 2 {
  741. return fmt.Errorf("proto: wrong wireType = %d for field Perms", wireType)
  742. }
  743. var stringLen uint64
  744. for shift := uint(0); ; shift += 7 {
  745. if shift >= 64 {
  746. return ErrIntOverflowApi
  747. }
  748. if iNdEx >= l {
  749. return io.ErrUnexpectedEOF
  750. }
  751. b := dAtA[iNdEx]
  752. iNdEx++
  753. stringLen |= (uint64(b) & 0x7F) << shift
  754. if b < 0x80 {
  755. break
  756. }
  757. }
  758. intStringLen := int(stringLen)
  759. if intStringLen < 0 {
  760. return ErrInvalidLengthApi
  761. }
  762. postIndex := iNdEx + intStringLen
  763. if postIndex > l {
  764. return io.ErrUnexpectedEOF
  765. }
  766. m.Perms = append(m.Perms, string(dAtA[iNdEx:postIndex]))
  767. iNdEx = postIndex
  768. default:
  769. iNdEx = preIndex
  770. skippy, err := skipApi(dAtA[iNdEx:])
  771. if err != nil {
  772. return err
  773. }
  774. if skippy < 0 {
  775. return ErrInvalidLengthApi
  776. }
  777. if (iNdEx + skippy) > l {
  778. return io.ErrUnexpectedEOF
  779. }
  780. iNdEx += skippy
  781. }
  782. }
  783. if iNdEx > l {
  784. return io.ErrUnexpectedEOF
  785. }
  786. return nil
  787. }
  788. func skipApi(dAtA []byte) (n int, err error) {
  789. l := len(dAtA)
  790. iNdEx := 0
  791. for iNdEx < l {
  792. var wire uint64
  793. for shift := uint(0); ; shift += 7 {
  794. if shift >= 64 {
  795. return 0, ErrIntOverflowApi
  796. }
  797. if iNdEx >= l {
  798. return 0, io.ErrUnexpectedEOF
  799. }
  800. b := dAtA[iNdEx]
  801. iNdEx++
  802. wire |= (uint64(b) & 0x7F) << shift
  803. if b < 0x80 {
  804. break
  805. }
  806. }
  807. wireType := int(wire & 0x7)
  808. switch wireType {
  809. case 0:
  810. for shift := uint(0); ; shift += 7 {
  811. if shift >= 64 {
  812. return 0, ErrIntOverflowApi
  813. }
  814. if iNdEx >= l {
  815. return 0, io.ErrUnexpectedEOF
  816. }
  817. iNdEx++
  818. if dAtA[iNdEx-1] < 0x80 {
  819. break
  820. }
  821. }
  822. return iNdEx, nil
  823. case 1:
  824. iNdEx += 8
  825. return iNdEx, nil
  826. case 2:
  827. var length int
  828. for shift := uint(0); ; shift += 7 {
  829. if shift >= 64 {
  830. return 0, ErrIntOverflowApi
  831. }
  832. if iNdEx >= l {
  833. return 0, io.ErrUnexpectedEOF
  834. }
  835. b := dAtA[iNdEx]
  836. iNdEx++
  837. length |= (int(b) & 0x7F) << shift
  838. if b < 0x80 {
  839. break
  840. }
  841. }
  842. iNdEx += length
  843. if length < 0 {
  844. return 0, ErrInvalidLengthApi
  845. }
  846. return iNdEx, nil
  847. case 3:
  848. for {
  849. var innerWire uint64
  850. var start int = iNdEx
  851. for shift := uint(0); ; shift += 7 {
  852. if shift >= 64 {
  853. return 0, ErrIntOverflowApi
  854. }
  855. if iNdEx >= l {
  856. return 0, io.ErrUnexpectedEOF
  857. }
  858. b := dAtA[iNdEx]
  859. iNdEx++
  860. innerWire |= (uint64(b) & 0x7F) << shift
  861. if b < 0x80 {
  862. break
  863. }
  864. }
  865. innerWireType := int(innerWire & 0x7)
  866. if innerWireType == 4 {
  867. break
  868. }
  869. next, err := skipApi(dAtA[start:])
  870. if err != nil {
  871. return 0, err
  872. }
  873. iNdEx = start + next
  874. }
  875. return iNdEx, nil
  876. case 4:
  877. return iNdEx, nil
  878. case 5:
  879. iNdEx += 4
  880. return iNdEx, nil
  881. default:
  882. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  883. }
  884. }
  885. panic("unreachable")
  886. }
  887. var (
  888. ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
  889. ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
  890. )
  891. func init() {
  892. proto.RegisterFile("app/admin/main/manager/api/api.proto", fileDescriptor_api_2329f30e789e58b5)
  893. }
  894. var fileDescriptor_api_2329f30e789e58b5 = []byte{
  895. // 297 bytes of a gzipped FileDescriptorProto
  896. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xcf, 0x4a, 0xc4, 0x30,
  897. 0x10, 0xc6, 0xc9, 0x96, 0x2d, 0xbb, 0x23, 0xa2, 0x06, 0x91, 0xa5, 0x48, 0x59, 0xab, 0x87, 0x05,
  898. 0x31, 0x05, 0x3d, 0xb9, 0x47, 0xc1, 0x9b, 0x07, 0x29, 0x78, 0xf1, 0x96, 0xda, 0x18, 0x03, 0x9b,
  899. 0x26, 0x26, 0xed, 0x61, 0x5f, 0xc8, 0x67, 0xf1, 0xe8, 0x23, 0x48, 0x9f, 0x44, 0x92, 0x46, 0x77,
  900. 0xfd, 0x83, 0x7b, 0x68, 0x99, 0x6f, 0xe6, 0xf7, 0xf5, 0x4b, 0x27, 0x70, 0x42, 0xb5, 0xce, 0x69,
  901. 0x25, 0x45, 0x9d, 0x4b, 0xea, 0x5f, 0x35, 0xe5, 0xcc, 0xe4, 0x54, 0x0b, 0xf7, 0x10, 0x6d, 0x54,
  902. 0xa3, 0x30, 0x76, 0x33, 0x12, 0x66, 0xc4, 0xe3, 0xc9, 0x19, 0x17, 0xcd, 0x53, 0x5b, 0x92, 0x07,
  903. 0x25, 0x73, 0xae, 0xb8, 0xca, 0x3d, 0x5a, 0xb6, 0x8f, 0x5e, 0x79, 0xe1, 0xab, 0xfe, 0x13, 0xd9,
  904. 0x1c, 0x46, 0x37, 0x8a, 0x8b, 0xba, 0x60, 0xcf, 0xf8, 0x00, 0x62, 0x59, 0x73, 0x2b, 0xaa, 0x09,
  905. 0x9a, 0xa2, 0xd9, 0xb8, 0x08, 0xca, 0xf5, 0x2b, 0x5b, 0xba, 0xfe, 0xa0, 0xef, 0xf7, 0x2a, 0x9b,
  906. 0x03, 0x04, 0xaf, 0x5e, 0x2c, 0xf1, 0x2e, 0x44, 0x2b, 0xab, 0x2b, 0x71, 0x02, 0xa3, 0xd6, 0x32,
  907. 0x53, 0x53, 0xc9, 0x82, 0xf3, 0x4b, 0x67, 0xa7, 0xb0, 0x7d, 0xcb, 0x8c, 0x14, 0xd6, 0x0a, 0xe5,
  908. 0xc3, 0xd7, 0x61, 0xf4, 0x03, 0xbe, 0x84, 0x9d, 0x75, 0x38, 0xa4, 0xb5, 0x21, 0x2d, 0x2a, 0x5c,
  909. 0x89, 0xf7, 0x61, 0xa8, 0x99, 0x91, 0x76, 0x32, 0x98, 0x46, 0xb3, 0x71, 0xd1, 0x8b, 0xf3, 0x17,
  910. 0x04, 0xb1, 0xf7, 0x36, 0xf8, 0x1a, 0x86, 0xfe, 0xb8, 0xf8, 0x90, 0xfc, 0xde, 0x1b, 0xf9, 0xdc,
  911. 0x42, 0x92, 0xfe, 0x33, 0x75, 0xc9, 0x77, 0xb0, 0xb5, 0x3a, 0x8c, 0xc5, 0x47, 0x7f, 0xe1, 0xdf,
  912. 0x7e, 0x2d, 0x39, 0xde, 0x84, 0xe8, 0xc5, 0xf2, 0x6a, 0xef, 0xb5, 0x4b, 0xd1, 0x5b, 0x97, 0xa2,
  913. 0xf7, 0x2e, 0x45, 0xf7, 0x11, 0xd5, 0xa2, 0x8c, 0xfd, 0x15, 0x5d, 0x7c, 0x04, 0x00, 0x00, 0xff,
  914. 0xff, 0xc2, 0xa5, 0xc9, 0x91, 0x0d, 0x02, 0x00, 0x00,
  915. }