arg.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package model
  2. // ArgCluster .
  3. type ArgCluster struct {
  4. Cluster string `form:"cluster" validate:"required"`
  5. }
  6. // ArgAddVolume add volume
  7. type ArgAddVolume struct {
  8. Group string `form:"group" validate:"required"`
  9. Num int64 `form:"num" validate:"required"`
  10. }
  11. // ArgAddFreeVolume add free volume
  12. type ArgAddFreeVolume struct {
  13. Group string `form:"group" validate:"required"`
  14. Dir string `form:"dir" validate:"required"`
  15. Num int64 `form:"num" validate:"required"`
  16. }
  17. // ArgCompact group compact
  18. type ArgCompact struct {
  19. Group string `form:"group" validate:"required"`
  20. Vid int64 `form:"vid"`
  21. }
  22. // ArgGroupStatus group status
  23. type ArgGroupStatus struct {
  24. Group string `form:"group" validate:"required"`
  25. Status string `form:"status" validate:"required"`
  26. }
  27. // RespRack .
  28. type RespRack struct {
  29. Racks map[string]*Rack `json:"racks"`
  30. }
  31. // RespGroup .
  32. type RespGroup struct {
  33. Groups map[string]*Group `json:"groups"`
  34. }
  35. // RespVolume .
  36. type RespVolume struct {
  37. Volumes map[string]*VolumeState `json:"volumes"`
  38. }
  39. // RespTotal .
  40. type RespTotal struct {
  41. Space int64 `json:"space"`
  42. FreeSpace int64 `json:"free_space"`
  43. Groups int64 `json:"groups"`
  44. Stores int64 `json:"stores"`
  45. Volumes int64 `json:"volumes"`
  46. }