melloi.go 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. package model
  2. //PaginateScripts page script
  3. type PaginateScripts struct {
  4. Total int `json:"total"`
  5. Pn int `json:"page_num"`
  6. Ps int `json:"page_size"`
  7. Scripts []*Script `json:"scripts"`
  8. }
  9. //PaginateReports page report
  10. type PaginateReports struct {
  11. Total int `json:"total"`
  12. Pn int `json:"page_num"`
  13. Ps int `json:"page_size"`
  14. ReportSummarys []*ReportSummary `json:"reportInfos"`
  15. }
  16. //ReducePtest model for test stress reduce
  17. type ReducePtest struct {
  18. ID int `json:"id" form:"id"`
  19. JobName string `json:"job_name" form:"job_name"`
  20. }
  21. //PtestBatch ptest batch
  22. type PtestBatch struct {
  23. UserName string `json:"user_name"`
  24. IDArr []int `json:"id_arr"`
  25. }
  26. //JobBatch batch job
  27. type JobBatch struct {
  28. JobNames []string `json:"job_names"`
  29. ReportSuIDs []int `json:"report_su_ids" form:"report_su_ids"`
  30. }
  31. //DockerStats model for container status
  32. type DockerStats struct {
  33. Container string `json:"container" form:"container"`
  34. Memory interface{} `json:"memory" form:"memory"`
  35. CPU string `json:"cpu" form:"cpu"`
  36. }
  37. //DoPtestParam ptest param
  38. type DoPtestParam struct {
  39. UserName string `json:"user_name"`
  40. LoadTime int `json:"load_time"`
  41. TestNames []string `json:"test_names"` // 人工上传的脚本,可能会有很多接口名
  42. SceneName string `json:"scene_name"`
  43. TestNameNick string `json:"test_name_nick"`
  44. TestNameNicks []string `json:"test_name_nicks"`
  45. FileName string `json:"file_name"`
  46. Upload bool `json:"upload"`
  47. ProjectName string `json:"project_name"`
  48. ResLog string `json:"res_log"`
  49. ResJtl string `json:"res_jtl"`
  50. JmeterLog string `json:"jmeter_log"`
  51. Department string `json:"department"`
  52. Project string `json:"project"`
  53. APP string `json:"app"`
  54. ScriptID int `json:"script_id"`
  55. AddPtest bool `json:"add_ptest"`
  56. IsDebug bool `json:"is_debug"`
  57. Cookie string `json:"cookie"`
  58. URL string `json:"url"`
  59. Domain string `json:"domain"`
  60. LabelIDs []int `json:"label_ids"`
  61. FileSplit bool `json:"file_split"`
  62. SplitNum int `json:"split_num"`
  63. DockerSum int `json:"docker_sum"`
  64. JarPath string `json:"jar_path"`
  65. EnvInfo string `json:"env_info"`
  66. IsScene bool `json:"is_scene"` //场景压测
  67. Type int `json:"type"` // 0.http单接口 1.场景报告 2.grpc报告 3.全链路
  68. Scripts []*Script `json:"scripts"`
  69. SceneID int `json:"scene_id"`
  70. Fusing int `json:"fusing"`
  71. APIHeader string `json:"api_header"`
  72. ExecuDockerSum int `json:"execu_docker_sum"`
  73. UseBusinessStop bool `json:"use_business_stop"`
  74. BusinessStopPercent int `json:"business_stop_percent"`
  75. }
  76. //QueryReGraphParam query ReGraphParam
  77. type QueryReGraphParam struct {
  78. TestNameNicks []string `json:"test_name_nicks" form:"test_name_nicks"`
  79. }
  80. //UploadParam uplaod param
  81. type UploadParam struct {
  82. Path string `json:"path" form:"path" params:"path"`
  83. IsPtest bool `json:"is_ptest" form:"is_ptest" params:"is_ptest"`
  84. UserName string `json:"user_name" form:"user_name" params:"user_name"`
  85. TestName string `json:"test_name" form:"test_name" params:"test_name"`
  86. Department string `json:"department" form:"department" params:"department"`
  87. Project string `json:"project" form:"project" params:"project"`
  88. APP string `json:"app" form:"app" params:"app"`
  89. ScriptPath string `json:"script_path" form:"script_path" params:"script_path"`
  90. Domains string `json:"domains" form:"domains" params:"domains"`
  91. Fusing int `json:"fusing" form:"fusing"`
  92. UseBusinessStop bool `json:"use_business_stop" form:"use_business_stop"`
  93. BusinessStopPercent int `json:"business_stop_percent" form:"business_stop_percent"`
  94. }
  95. //QueryReportsRequest query report request
  96. type QueryReportsRequest struct {
  97. ID string `params:"id" form:"id" json:"id"`
  98. TestNameNick string `params:"test_name_nick" form:"test_name_nick" json:"test_name_nick"`
  99. TestName string `params:"test_name" form:"test_name" json:"test_name"`
  100. Ps int `params:"page_size" form:"page_size" json:"page_size"`
  101. Pn int `params:"page_num" form:"page_num" json:"page_num"`
  102. }
  103. //BfsUploadParam bfs upload param
  104. type BfsUploadParam struct {
  105. BfsIP string `json:"bfs_ip" form:"bfs_ip" params:"bfs_ip"`
  106. BfsPort int `json:"bfs_port" form:"bfs_port" params:"bfs_port"`
  107. BucketName string `json:"bucket_name" form:"bucket_name" params:"bucket_name"`
  108. FileName string `json:"file_name" form:"file_name" params:"file_name"`
  109. AccessKey string `json:"access_key" form:"access_key" params:"access_key"`
  110. AccessSecret string `json:"access_secret" form:"access_secret" params:"access_secret"`
  111. Method string `json:"method" form:"method" params:"method"`
  112. }
  113. //JSONExtractor JSON Extractor
  114. type JSONExtractor struct {
  115. JSONName string `json:"json_name"`
  116. JSONPath string `json:"json_path"`
  117. }
  118. //ReportGraphAdd Report Graph Add
  119. type ReportGraphAdd struct {
  120. ReportSuID int `json:"report_su_id"`
  121. JobName string `json:"job_name"`
  122. TestName string `json:"test_name"`
  123. BeginTime string `json:"begin_time"`
  124. AfterTime string `json:"after_time"`
  125. TestNameNick string `json:"test_name_nick"`
  126. PodNames []string `json:"pod_names"`
  127. ElapsedTime int `json:"elapsed_time"`
  128. Fusing int `json:"fusing"`
  129. UseBusinessStop bool `json:"use_business_stop"`
  130. BusinessStopPercent int `json:"business_stop_percent"`
  131. }
  132. //AllPtestStop all ptest stop
  133. type AllPtestStop struct {
  134. ReportSuID int `json:"report_su_id" form:"report_su_id"`
  135. }