iam.proto 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. syntax = "proto3";
  2. package iam;
  3. option go_package = "./iam";
  4. service Iam {
  5. // 根据ID获取管理员信息
  6. rpc GetAdminUserByID(GetAdminUserByIDReq) returns (GetAdminUserByIDResp) {}
  7. // 批量获取管理员信息
  8. rpc BatchGetAdminUser(BatchGetAdminUserReq) returns (BatchGetAdminUserResp) {}
  9. // 根据昵称获取管理员信息
  10. rpc GetAdminUserByNickName(GetAdminUserByNickNameReq) returns (GetAdminUserByNickNameResp) {}
  11. // 获取角色拥有的系统权限
  12. rpc GetRoleSystems(GetRoleSystemsReq) returns (GetRoleSystemsResp) {}
  13. }
  14. message GetAdminUserByIDReq {
  15. int64 UID = 1;
  16. }
  17. message GetAdminUserByIDResp {
  18. int64 Code = 1;
  19. string Msg = 2;
  20. AdminUserInfo Data = 3;
  21. }
  22. message BatchGetAdminUserReq {
  23. repeated int64 UIds = 1;
  24. }
  25. message AdminUserInfo {
  26. int64 ID = 1;
  27. int64 RoleID = 2;
  28. string UserName = 3;
  29. string NickName = 4;
  30. int64 Status = 5;
  31. }
  32. message BatchGetAdminUserResp {
  33. int64 Code = 1;
  34. string Msg = 2;
  35. repeated AdminUserInfo Data = 3;
  36. }
  37. message GetAdminUserByNickNameReq {
  38. string NickName = 1;
  39. }
  40. message GetAdminUserByNickNameResp {
  41. int64 Code = 1;
  42. string Msg = 2;
  43. AdminUserInfo Data = 3;
  44. }
  45. message GetRoleSystemsReq {
  46. int64 RoleID = 1;
  47. }
  48. message SystemInfo {
  49. int64 ID = 1;
  50. string Name = 2;
  51. string Url = 3;
  52. }
  53. message GetRoleSystemsResp {
  54. int64 Code = 1;
  55. string Msg = 2;
  56. repeated SystemInfo Data = 3;
  57. }