tree.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package model
  2. // TreeResponse service tree response model
  3. type TreeResponse struct {
  4. Code int `json:"code"`
  5. Data UserTree `json:"data"`
  6. }
  7. // UserTree user tree model
  8. type UserTree struct {
  9. Bilibili map[string]interface{} `json:"bilibili"`
  10. }
  11. // TreeSonResponse tree son response model
  12. type TreeSonResponse struct {
  13. Code int `json:"code"`
  14. Data map[string]interface{} `json:"data"`
  15. }
  16. // TreeConf service tree conf model
  17. type TreeConf struct {
  18. Host string
  19. }
  20. // TokenResponse service tree token response model
  21. type TokenResponse struct {
  22. Token string `json:"token"`
  23. UserName string `json:"user_name"`
  24. Secret string `json:"secret"`
  25. Expired int64 `json:"expired"`
  26. }
  27. // TreeAdminResponse service tree admin response model
  28. type TreeAdminResponse struct {
  29. Code int `json:"code"`
  30. Data []*TreeRole `json:"data"`
  31. }
  32. // TreeRole service tree role
  33. type TreeRole struct {
  34. UserName string `json:"user_name"`
  35. Role int `json:"role"`
  36. OldRole int `json:"old_role"`
  37. }
  38. // TreeRoleApp tree role app
  39. type TreeRoleApp struct {
  40. Code int `json:"code"`
  41. Data []*RoleApp `json:"data"`
  42. }
  43. // RoleApp role app
  44. type RoleApp struct {
  45. ID int `json:"id"`
  46. Name string `json:"name"`
  47. Path string `json:"path"`
  48. Type int `json:"type"` // Type 1.公司 2.部门 3.项目 4. 应用 5.环境 6.挂载点
  49. Role int `json:"role"` // Role 1:管理员 2:研发 3:测试 4:运维 5:访客
  50. }