business_apiProxy.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. package model
  2. //应用鉴权
  3. type LoginRequest struct {
  4. AppId string `json:"appId"`
  5. AppSecret string `json:"appSecret"`
  6. }
  7. //token刷新
  8. type RefreshTokenRequest struct {
  9. RefreshToken string `json:"refreshToken"`
  10. }
  11. //第三方接口服务
  12. type KeyVal struct {
  13. KeyStr string `json:"keyStr"`
  14. KeyVal string `json:"keyVal"`
  15. }
  16. //eq:= gt:> lt:< like
  17. type SearchParam struct {
  18. OR []KeyVal `json:"or"` //[{"xml.like":"张%"}]
  19. AND []KeyVal `json:"and"`//[{"xml.like":"张%"},{"xml.eq":"张%"}]
  20. }
  21. type RequestBody struct{
  22. Page
  23. Search SearchParam `json:"search"`
  24. }
  25. type RequestBody2 struct {
  26. RequestParam string `json:"requestParam"`
  27. }
  28. //type DesensitizationRule struct{
  29. // Left int `json:"left"` //左边保留的字符串长度
  30. // Right int `json:"right"` //右边保留的字符串长度
  31. // Fill string `json:"fill"` //填充的字符串
  32. //}
  33. type DesensitizationRule struct{
  34. RegStr string `json:"reqStr"`
  35. FillStr string `json:"fillStr"`
  36. }
  37. type ColNumDet struct {
  38. Name string `json:"name"`
  39. Type string `json:"type"`
  40. IsDesensitization int `json:"isDesensitization"`
  41. DesensitizationRule DesensitizationRule `json:"desensitizationRule"`
  42. }
  43. type AccessInfo struct {
  44. Enable int `json:"enable"`
  45. DbId int `json:"dbId"`
  46. TbName string `json:"tbName"`
  47. Colnum []ColNumDet `json:"colnum"`
  48. }
  49. //{
  50. // "enable":1,
  51. // "dbId":1,
  52. // "tbName":"zztest",
  53. // "colnum":[
  54. // {
  55. // "name":"identifyId",
  56. // "type":"varchar",
  57. // "isDesensitization":1 , //是否脱敏
  58. // "desensitizationRule":{
  59. // "left":3, //左边保留的字符串长度
  60. // "fill":"******", //填充字符
  61. // "right":4, //右边保留的字符串长度
  62. // }
  63. // }
  64. // ]
  65. //}
  66. //总队标准接口服务
  67. type CQ119Response struct{
  68. Code interface{} `json:"code"`
  69. Page int `json:"page"`
  70. Size int `json:"size"`
  71. Total int `json:"total"`
  72. Data []interface{} `json:"data"`
  73. Columns []interface{} `json:"columns"`
  74. }
  75. type DataShareNormalResponse struct{
  76. Code interface{} `json:"code"`
  77. Page int `json:"page"`
  78. Size int `json:"size"`
  79. Total int `json:"total"`
  80. Data []map[string]interface{} `json:"data"`
  81. Columns []interface{} `json:"columns"`
  82. }
  83. //服务调试接口
  84. type ApiTranslateRequest struct{
  85. ServiceUrl string `json:"serviceUrl"`
  86. RequestMethod string `json:"requestMethod"`
  87. ParamForm string `json:"paramForm"`
  88. AuthWay string `json:"authWay"`
  89. RequestParam string `json:"requestParam"`
  90. }