param.go 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. package model
  2. // ArgRegister define register param.
  3. type ArgRegister struct {
  4. Region string `form:"region"`
  5. Zone string `form:"zone" validate:"required"`
  6. Env string `form:"env" validate:"required"`
  7. Appid string `form:"appid" validate:"required"`
  8. Treeid int64 `form:"treeid"`
  9. Hostname string `form:"hostname" validate:"required"`
  10. Status uint32 `form:"status" validate:"required"`
  11. HTTP string `form:"http"`
  12. RPC string `form:"rpc"`
  13. Version string `form:"version"`
  14. Metadata string `form:"metadata"`
  15. Replication bool `form:"replication"`
  16. Addrs []string `form:"addrs,split"`
  17. LatestTimestamp int64 `form:"latest_timestamp"`
  18. DirtyTimestamp int64 `form:"dirty_timestamp"`
  19. }
  20. // ArgRenew define renew params.
  21. type ArgRenew struct {
  22. Region string `form:"region"`
  23. Zone string `form:"zone" validate:"required"`
  24. Env string `form:"env" validate:"required"`
  25. Appid string `form:"appid" validate:"required"`
  26. Treeid int64 `form:"treeid"`
  27. Hostname string `form:"hostname" validate:"required"`
  28. Replication bool `form:"replication"`
  29. DirtyTimestamp int64 `form:"dirty_timestamp"`
  30. }
  31. // ArgCancel define cancel params.
  32. type ArgCancel struct {
  33. Region string `form:"region"`
  34. Zone string `form:"zone" validate:"required"`
  35. Env string `form:"env" validate:"required"`
  36. Appid string `form:"appid" validate:"required"`
  37. Treeid int64 `form:"treeid"`
  38. Hostname string `form:"hostname" validate:"required"`
  39. Replication bool `form:"replication"`
  40. LatestTimestamp int64 `form:"latest_timestamp"`
  41. }
  42. // ArgFetch define fetch param.
  43. type ArgFetch struct {
  44. Region string `form:"region"`
  45. Zone string `form:"zone"`
  46. Env string `form:"env" validate:"required"`
  47. Appid string `form:"appid"`
  48. Treeid int64 `form:"treeid"`
  49. Status uint32 `form:"status" validate:"required"`
  50. }
  51. // ArgFetchs define fetchs arg.
  52. type ArgFetchs struct {
  53. Zone string `form:"zone"`
  54. Env string `form:"env" validate:"required"`
  55. Appid []string `form:"appid,split"`
  56. Status uint32 `form:"status" validate:"required"`
  57. }
  58. // ArgPoll define poll param.
  59. type ArgPoll struct {
  60. Region string `form:"region"`
  61. Zone string `form:"zone"`
  62. Env string `form:"env" validate:"required"`
  63. Appid string `form:"appid"`
  64. Treeid int64 `form:"treeid"`
  65. Hostname string `form:"hostname" validate:"required"`
  66. LatestTimestamp int64 `form:"latest_timestamp"`
  67. }
  68. // ArgPolling define polling arg.
  69. type ArgPolling struct {
  70. Zone string `form:"zone"`
  71. Env string `form:"env" validate:"required"`
  72. Appid string `form:"appid"`
  73. }
  74. // ArgPolls define poll param.
  75. type ArgPolls struct {
  76. Region string `form:"region"`
  77. Zone string `form:"zone"`
  78. Env string `form:"env" validate:"required"`
  79. Appid []string `form:"appid,split"`
  80. Treeid []int64 `form:"treeid,split"`
  81. Hostname string `form:"hostname,split" validate:"required"`
  82. LatestTimestamp []int64 `form:"latest_timestamp,split"`
  83. }
  84. // ArgSet define set param.
  85. type ArgSet struct {
  86. Region string `form:"region"`
  87. Zone string `form:"zone" validate:"required"`
  88. Env string `form:"env" validate:"required"`
  89. Appid string `form:"appid" validate:"required"`
  90. Hostname []string `form:"hostname,split"`
  91. Status []int64 `form:"status,split"`
  92. Metadata []string `form:"metadata"`
  93. Replication bool `form:"replication"`
  94. SetTimestamp int64 `form:"set_timestamp"`
  95. }