try_api.go 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. package apis
  2. type TryApi struct {
  3. Id int64 `orm:"auto,column(id)" json:"id"`
  4. Type int `orm:"column(type)" json:"type"`
  5. FileName string `orm:"column(file_name)" json:"file_name"`
  6. ApiName string `orm:"column(api_name)" json:"api_name"`
  7. ApiHost string `orm:"column(api_host)" json:"api_host"`
  8. ApiRouter string `orm:"column(api_router)" json:"api_router"`
  9. StatusCode int `orm:"column(status)" json:"status_code"`
  10. DownloadFile string `orm:"column(download_file)" json:"download_file"`
  11. OriginFile string `json:"origin_file"`
  12. RequestInfo string `json:"request_info"`
  13. CreatedAt string `orm:"column(created_at)" json:"created_at"`
  14. UpdatedAt string `orm:"column(updated_at)" json:"updated_at"`
  15. TaskName string `json:"task_name"`
  16. Merchant string `json:"merchant"`
  17. MerchantId int64 `json:"merchant_id"`
  18. }
  19. func (o *TryApi) TableName() string {
  20. return "t_gd_try_api_task"
  21. }
  22. type ManagementTryBaseApiReq struct {
  23. Method string `json:"method"`
  24. Router string `json:"router"`
  25. Params []ManagementBaseApiParam `json:"request_param"`
  26. AppKey string `json:"app_key"`
  27. AppSecret string `json:"app_secret"`
  28. AppPassword string `json:"app_password"`
  29. IsCrypto bool `json:"is_crypto"`
  30. EncryptoType int `json:"encrypto_type"`
  31. MerchantAccount bool `json:"merchant_account"`
  32. }
  33. type ManagementTryBaseApiReply struct {
  34. Data string `json:"data"`
  35. OrderNo string `json:"order_no,omitempty"`
  36. }
  37. type ManagementBatchTryApiReq struct {
  38. TaskId int64 `json:"task_id"`
  39. Method string `json:"method"`
  40. Router string `json:"router"`
  41. Params []string `json:"params"`
  42. AppKey string `json:"app_key"`
  43. AppSecret string `json:"app_secret"`
  44. AppPassword string `json:"app_password"`
  45. IsCrypto bool `json:"is_crypto"`
  46. MerchantAccount bool `json:"merchant_account"`
  47. MultiMode bool `json:"multi_mode"`
  48. EncryptoType int `json:"encrypto_type"`
  49. }
  50. type BatchTryApiParams struct {
  51. Requset string `json:"request"`
  52. Response string `json:"response"`
  53. OriginResponse string `json:"origin_response"`
  54. }
  55. type ManagementBatchTryApiReply struct {
  56. Params []BatchTryApiParams `json:"params"`
  57. Stop bool `json:"stop"`
  58. }
  59. type ManagementUpdateTryApiTaskReq struct {
  60. Status int `json:"status"`
  61. DownloadFile string `json:"download_file"`
  62. TaskId int64 `json:"task_id"`
  63. ErrMsg string `json:"err_msg"`
  64. }
  65. type ManagementUpdateTryApiTaskReply struct {
  66. }
  67. type ManagementCreateTryApiTaskReq struct {
  68. FileName string `json:"file_name"`
  69. ApiName string `json:"api_name"`
  70. Router string `json:"router"`
  71. Method string `json:"method"`
  72. DownloadFile string `json:"download_file"`
  73. OriginFile string `json:"origin_file"`
  74. RequestInfo string `json:"request_info"`
  75. AppKey string `json:"app_key"`
  76. IsMerchant bool `json:"is_merchant"`
  77. TaskName string `json:"task_name"`
  78. MerchantId int64 `json:"merchant_id"`
  79. }
  80. type ManagementCreateTryApiTaskReply struct {
  81. Id int64 `json:"id"`
  82. }
  83. type ManagementGetTryApiTaskListReq struct {
  84. IsAll bool `json:"is_all"`
  85. PageNumber int `json:"page_number"`
  86. PageSize int `json:"page_size"`
  87. ApiName string `json:"api_name" in:"query" require:"false"`
  88. Type int `json:"type"`
  89. MerchantId int64 `json:"merchant_id"`
  90. }
  91. type TryApiTaskAddReq struct {
  92. Type int `json:"type"`
  93. FileName string `json:"file_name"`
  94. ApiName string `json:"api_name"`
  95. ApiHost string `json:"api_host"`
  96. ApiRouter string `json:"api_router"`
  97. Status int `json:"status"`
  98. }
  99. type TryApiTaskAddReply struct {
  100. Id int64 `json:"id"`
  101. }
  102. type TryApiTaskUpdateReq struct {
  103. Id int64 `json:"id"`
  104. Status int `json:"status"`
  105. DownloadFile string `json:"download_file"`
  106. }
  107. type TryApiTaskUpdateReply struct {
  108. }
  109. type GetTryApiTaskListReq struct {
  110. Type int `json:"type"`
  111. PageSize int64 `json:"page_size"`
  112. PageNumber int64 `json:"page_number"`
  113. }
  114. type GetTryApiTaskList struct {
  115. Id int64 `json:"id"`
  116. FileName string `json:"file_name"`
  117. ApiName string `json:"api_name"`
  118. ApiHost string `json:"api_host"`
  119. ApiRouter string `json:"api_router"`
  120. Status int `json:"status"`
  121. DownloadFile string `json:"download_file"`
  122. CreatedAt string `json:"create_at"`
  123. UpdatedAt string `json:"update_at"`
  124. }
  125. type ManagementGetTryApiTaskListReply struct {
  126. Total int `json:"total"`
  127. PageNumber int `json:"page_number"`
  128. PageSize int `json:"page_size"`
  129. Tasks []TryApiItem `json:"tasks"`
  130. }
  131. type ManagementDeleteTryApiTaskReq struct {
  132. TaskId int64 `json:"task_id"`
  133. }
  134. type ManagementDeleteTryApiTaskReply struct {
  135. DownloadFile string `json:"download_file"`
  136. OriginFile string `json:"origin_file"`
  137. TaskType int `json:"task_type"`
  138. }
  139. type GetTryApiTaskListReply struct {
  140. PageSize int64 `json:"page_size"`
  141. PageNumber int64 `json:"page_number"`
  142. Total int64 `json:"total"`
  143. List []GetTryApiTaskList
  144. }
  145. type TryApiItem struct {
  146. Id int64 `json:"id"`
  147. FileName string `json:"file_name"`
  148. ApiName string `json:"api_name"`
  149. ApiHost string `json:"api_host"`
  150. ApiRouter string `json:"api_router"`
  151. Status string `json:"status"`
  152. StatusCode int `json:"status_code"`
  153. DownloadFile string `json:"download_file"`
  154. CreatedAt string `json:"created_at"`
  155. TaskName string `json:"task_name"`
  156. Merchant string `json:"merchant"`
  157. }
  158. type ManagementGetApiTaskReq struct {
  159. TaskId int64 `json:"task_id"`
  160. }
  161. type ManagementGetApiTaskReply struct {
  162. Data TryApi `json:"data"`
  163. }