mng.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. package model
  2. const (
  3. // MngAssetTypeDB .
  4. MngAssetTypeDB = 1
  5. // MngAssetTypeES .
  6. MngAssetTypeES = 2
  7. // MngAssetTypeDatabus .
  8. MngAssetTypeDatabus = 3
  9. // MngAssetTypeTable .
  10. MngAssetTypeTable = 4
  11. )
  12. // MngBusiness .
  13. type MngBusiness struct {
  14. ID int64 `json:"id"`
  15. Name string `json:"name"`
  16. Desc string `json:"desc"`
  17. Apps []*MngBusinessApp `json:"apps"`
  18. AppsJSON string `json:"-"`
  19. }
  20. // MngBusinessApp .
  21. type MngBusinessApp struct {
  22. AppID string `json:"appid"`
  23. IncrWay string `json:"incr_way"`
  24. IncrOpen bool `json:"incr_open"`
  25. }
  26. // MngAsset .
  27. type MngAsset struct {
  28. ID int64 `json:"id"`
  29. Name string `json:"name"`
  30. Type int `json:"type"`
  31. Config string `json:"config"`
  32. Desc string `json:"desc"`
  33. }
  34. // MngAssetTable .
  35. type MngAssetTable struct {
  36. TablePrefix string `json:"prefix"`
  37. TableFormat string `json:"format"`
  38. }
  39. // MngAssetDatabus .
  40. type MngAssetDatabus struct {
  41. DatabusInfo string `json:"info"`
  42. DatabusIndexID string `json:"index_id"`
  43. }
  44. // MngApp .
  45. type MngApp struct {
  46. ID int64 `json:"id" form:"id"`
  47. Business string `json:"business" form:"business"`
  48. AppID string `json:"appid" form:"appid"`
  49. Desc string `json:"desc" form:"desc"`
  50. DBName string `json:"db_name" form:"db_name"`
  51. ESName string `json:"es_name" form:"es_name"`
  52. TableName string `json:"table_name" form:"table_name"`
  53. TablePrefix string `json:"-"`
  54. TableFormat string `json:"-"`
  55. DatabusName string `json:"databus_name" form:"databus_name"`
  56. DatabusInfo string `json:"-"`
  57. DatabusIndexID string `json:"-"`
  58. IndexPrefix string `json:"index_prefix" form:"index_prefix"`
  59. IndexVersion string `json:"index_version" form:"index_version"`
  60. IndexFormat string `json:"index_format" form:"index_format"`
  61. IndexType string `json:"index_type" form:"index_type"`
  62. IndexID string `json:"index_id" form:"index_id"`
  63. DataIndexSuffix string `json:"data_index_suffix" form:"data_index_suffix"`
  64. IndexMapping string `json:"index_mapping" form:"index_mapping"`
  65. DataFields string `json:"data_fields" form:"data_fields"`
  66. DataExtra string `json:"data_extra" form:"data_extra"`
  67. ReviewNum int `json:"review_num" form:"review_num"`
  68. ReviewTime int `json:"review_time" form:"review_time"`
  69. Sleep float64 `json:"sleep" form:"sleep"`
  70. Size int `json:"size" form:"size"`
  71. SQLByID string `json:"sql_by_id" form:"sql_by_id"`
  72. SQLByMtime string `json:"sql_by_mtime" form:"sql_by_mtime"`
  73. SQLByIDMtime string `json:"sql_by_idmtime" form:"sql_by_idmtime"`
  74. QueryMaxIndexes int `json:"query_max_indexes" form:"query_max_indexes"`
  75. }
  76. // MngCount .
  77. type MngCount struct {
  78. Business string `json:"business" form:"business"`
  79. Type string `json:"type" form:"type"`
  80. Name string `json:"name"`
  81. Chart string `json:"chart"`
  82. Param string `json:"param"`
  83. }
  84. // MngCountRes .
  85. type MngCountRes struct {
  86. Time string `json:"time"`
  87. Count string `json:"count"`
  88. }
  89. // MngPercentRes .
  90. type MngPercentRes struct {
  91. Name string `json:"name"`
  92. Count string `json:"count"`
  93. }
  94. // UnamesData .
  95. type UnamesData struct {
  96. Code int `json:"code"`
  97. Data map[string]string
  98. }