log.go 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. package model
  2. // LogParams .
  3. type LogParams struct {
  4. Bsp *BasicSearchParams
  5. Business int `form:"business" params:"business"`
  6. CTimeFrom string `form:"ctime_from" params:"ctime_from"`
  7. CTimeTo string `form:"ctime_to" params:"ctime_to"`
  8. }
  9. // Business .
  10. type Business struct {
  11. ID int
  12. AppID string
  13. Name string
  14. AdditionalMapping string
  15. Mapping map[string]string
  16. IndexFormat string
  17. IndexCluster string
  18. PermissionPoint string
  19. }
  20. // UDepTsData .
  21. type UDepTsData struct {
  22. Code int `json:"code"`
  23. Data map[string]string
  24. }
  25. // IPData .
  26. type IPData struct {
  27. Code int `json:"code"`
  28. Data map[string]struct {
  29. Country string `json:"country"`
  30. Province string `json:"province"`
  31. City string `json:"city"`
  32. Isp string `json:"isp"`
  33. }
  34. }
  35. // LogAuditDefaultMapping .
  36. var LogAuditDefaultMapping = map[string]string{
  37. "uname": "string",
  38. "uid": "string",
  39. "type": "string",
  40. "oid": "string",
  41. "action": "string",
  42. "ctime": "time",
  43. "int_0": "int",
  44. "int_1": "int",
  45. "int_2": "int",
  46. "str_0": "string",
  47. "str_1": "string",
  48. "str_2": "string",
  49. "extra_data": "string",
  50. }
  51. // LogUserActionDefaultMapping .
  52. var LogUserActionDefaultMapping = map[string]string{
  53. "mid": "string",
  54. "platform": "string",
  55. "build": "string",
  56. "buvid": "string",
  57. "type": "string",
  58. "oid": "string",
  59. "action": "string",
  60. "ip": "string",
  61. "ctime": "time",
  62. "int_0": "int",
  63. "int_1": "int",
  64. "int_2": "int",
  65. "str_0": "string",
  66. "str_1": "string",
  67. "str_2": "string",
  68. "extra_data": "string",
  69. }