rbac.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. package v1
  2. import (
  3. "cp-organization-management-gateway/param/base"
  4. "cp-organization-management-gateway/pb/v1"
  5. )
  6. type RbacNodeListQuery struct {
  7. GroupId int64 `form:"group_id" json:"group_id"`
  8. OnlySelect bool `form:"only_select" json:"only_select"`
  9. }
  10. type RbacNodeListRequest struct {
  11. base.Header
  12. RbacNodeListQuery
  13. }
  14. type RbacNodeListResponse struct {
  15. base.Result
  16. Data v1.RbacNodeListReply `json:"data"`
  17. }
  18. type RbacGroupListRequest struct {
  19. base.Header
  20. }
  21. type RbacGroupListResponse struct {
  22. base.Result
  23. Data v1.RbacGroupListReply `json:"data"`
  24. }
  25. type RbacNodeListByGroupOrUserRequest struct {
  26. base.Header
  27. }
  28. type RbacNodeListByGroupOrUserResponse struct {
  29. base.Result
  30. Data v1.RbacNodeListByGroupOrUserReply `json:"data"`
  31. }
  32. type RbacGroupAddBody struct {
  33. Name string `from:"name"json:"name"`
  34. NodeList string `form:"node_list" json:"node_list"`
  35. }
  36. type RbacGroupAddRequest struct {
  37. base.Header
  38. RbacGroupAddBody
  39. }
  40. type RbacGroupAddResponse struct {
  41. base.Result
  42. Data v1.RbacGroupAddReply `json:"data"`
  43. }
  44. type RbacGroupUpdateBody struct {
  45. Id int64 `form:"id"`
  46. Name string `from:"name"json:"name"`
  47. NodeList string `form:"node_list" json:"node_list"`
  48. }
  49. type RbacGroupUpdateRequest struct {
  50. base.Header
  51. RbacGroupUpdateBody
  52. }
  53. type RbacGroupUpdateResponse struct {
  54. base.Result
  55. }
  56. type RbacGroupDelPath struct {
  57. Id int64 `uri:"id"`
  58. }
  59. type RbacGroupDelRequest struct {
  60. base.Header
  61. RbacGroupDelPath
  62. }
  63. type RbacGroupDelResponse struct {
  64. base.Result
  65. }