types.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. // Code generated by goctl. DO NOT EDIT.
  2. // goctl 1.10.2
  3. package types
  4. type AuditResult struct {
  5. LogIden string `json:"logIden"`
  6. Valid bool `json:"valid"`
  7. Reason string `json:"reason"`
  8. }
  9. type CreateDirectoryReq struct {
  10. Id int64 `json:"id,optional"`
  11. ServiceId int64 `json:"serviceId,optional"`
  12. Directory string `json:"directory,optional"`
  13. }
  14. type CreateKeyReq struct {
  15. Name string `json:"name"`
  16. }
  17. type CreateServiceReq struct {
  18. Id int64 `json:"id,optional"`
  19. Name string `json:"name,optional"`
  20. Ip string `json:"ip,optional"`
  21. Port int64 `json:"port,optional"`
  22. Iden string `json:"iden,optional"`
  23. KeyIden string `json:"keyIden,optional"`
  24. KeyAlgo string `json:"keyAlgo,optional"`
  25. Status string `json:"status,optional"`
  26. // 一键刷库:0=否(默认),1=创建后自动下发刷库(存量明文加密,外挂侧能力就绪后生效)
  27. Brush int64 `json:"brush,optional"`
  28. Directories []string `json:"directories,optional"`
  29. }
  30. type DbPingResponse struct {
  31. Ok bool `json:"ok"`
  32. Version string `json:"version"`
  33. Database string `json:"database"`
  34. }
  35. type DeleteResp struct {
  36. Ok bool `json:"ok"`
  37. // 联动卸载失败等非致命警告(删除本身已成功),前端弹黄色警告;
  38. // 目录/密钥删除等其他共用本结构体的接口不填此字段。
  39. UnmountWarning string `json:"unmountWarning,optional"`
  40. }
  41. type DirChildrenResp struct {
  42. Nodes []LocalDirNode `json:"nodes"`
  43. }
  44. type DirectoryIdReq struct {
  45. Id int64 `path:"id"`
  46. }
  47. type DirectoryListResp struct {
  48. List []DirectoryResp `json:"list"`
  49. Total int64 `json:"total"`
  50. }
  51. type DirectoryResp struct {
  52. Id int64 `json:"id"`
  53. ServiceId int64 `json:"serviceId"`
  54. Directory string `json:"directory"`
  55. }
  56. type KeyIdReq struct {
  57. Id int64 `json:"id"`
  58. }
  59. type KeyListResp struct {
  60. List []KeyResp `json:"list"`
  61. Total int64 `json:"total"`
  62. }
  63. type KeyResp struct {
  64. Id int64 `json:"id"`
  65. Iden string `json:"iden"`
  66. Name string `json:"name"`
  67. Content string `json:"content"`
  68. Status string `json:"status"`
  69. CreateAt string `json:"createAt"`
  70. }
  71. type ListDirectoryReq struct {
  72. Page int64 `form:"page,optional"`
  73. PageSize int64 `form:"pageSize,optional"`
  74. }
  75. type ListKeysReq struct {
  76. Page int64 `json:"page,optional"`
  77. PageSize int64 `json:"pageSize,optional"`
  78. Name string `json:"name,optional"`
  79. Status string `json:"status,optional"`
  80. }
  81. type ListServiceReq struct {
  82. Page int64 `form:"page,optional"`
  83. PageSize int64 `form:"pageSize,optional"`
  84. }
  85. type Request struct {
  86. Name string `path:"name,options=you|me"`
  87. }
  88. type Response struct {
  89. Message string `json:"message"`
  90. }
  91. // 本地目录懒加载(udeServer 所在 Linux 主机文件系统,只列目录不列文件)
  92. type ListDirChildrenReq struct {
  93. Ip string `form:"ip"` // 目标 Linux 主机 IP
  94. Port string `form:"port"`
  95. Path string `form:"path"` // 空或 "/" 表示根目录
  96. Iden string `form:"iden"` // 接入标识:转发外挂时作为 X-TOKEN 头的值(外挂侧与环境变量 TOKEN 比对)
  97. }
  98. type LocalDirNode struct {
  99. Name string `json:"name"` // 目录名,如 "usr"
  100. Path string `json:"path"` // 完整绝对路径,如 "/usr"
  101. IsDir bool `json:"isDir"` // 恒 true
  102. HasChildren bool `json:"hasChildren"` // 是否含子目录(前端据此决定是否显示展开箭头)
  103. }
  104. type LogArchive struct {
  105. Id int64 `json:"id"`
  106. ArchiveName string `json:"archiveName"`
  107. RecordCount int64 `json:"recordCount"`
  108. ArchiveFileKey string `json:"archiveFileKey"`
  109. ArchiveMode int `json:"archiveMode"` // 归档模式:1.手动,2.自动
  110. BatchSize int `json:"batchSize"`
  111. ArchivedBy string `json:"archivedBy"`
  112. ArchivedAt string `json:"archivedAt"`
  113. }
  114. type LogArchiveDownloadReq struct {
  115. Ids []int64 `json:"ids"`
  116. }
  117. type LogArchiveListReq struct {
  118. ArchiveName string `json:"archiveName,optional"`
  119. ArchivedBy string `json:"archivedBy,optional"`
  120. ArchivedStartTime string `json:"archivedStartTime,optional"`
  121. ArchivedEndTime string `json:"archivedEndTime,optional"`
  122. Page int64 `json:"page,optional"`
  123. PageSize int64 `json:"pageSize,optional"`
  124. }
  125. type LogArchiveListResp struct {
  126. Total int64 `json:"total"`
  127. LogArchives []LogArchive `json:"logArchives"`
  128. }
  129. type LogArchiveRestoreReq struct {
  130. Ids []int64 `json:"ids"`
  131. }
  132. type LogArchiveRestoreResp struct {
  133. RestoreMsg string `json:"restoreMsg"`
  134. }
  135. type LogRestore struct {
  136. Id int64 `json:"id"`
  137. ArchiveId int64 `json:"archiveId"`
  138. RestoreStatus int `json:"restoreStatus"` // 1.成功,2.失败,3.恢复中
  139. RestoreMessage string `json:"restoreMessage"`
  140. RestoredBy string `json:"restoredBy"`
  141. RestoredAt string `json:"restoredAt"`
  142. }
  143. type LogRestoreListReq struct {
  144. RestoreStatus int64 `json:"restoreStatus,optional"`
  145. RestoreMessage string `json:"restoreMessage,optional"`
  146. Page int64 `json:"page,optional"`
  147. PageSize int64 `json:"pageSize,optional"`
  148. }
  149. type LogRestoreListResp struct {
  150. Total int64 `json:"total"`
  151. LogRestores []LogRestore `json:"logRestores"`
  152. }
  153. type ServiceIdReq struct {
  154. Id int64 `path:"id"`
  155. }
  156. type ServiceListResp struct {
  157. List []ServiceResp `json:"list"`
  158. Total int64 `json:"total"`
  159. }
  160. type ServiceResp struct {
  161. Id int64 `json:"id"`
  162. Name string `json:"name"`
  163. Ip string `json:"ip"`
  164. Port int64 `json:"port"`
  165. Iden string `json:"iden"`
  166. KeyIden string `json:"keyIden"`
  167. KeyAlgo string `json:"keyAlgo"`
  168. Status string `json:"status"`
  169. CreateAt string `json:"createAt"`
  170. // 挂载状态: mounted=已挂载 unmounted=未挂载 failed=挂载失败
  171. MountStatus string `json:"mountStatus,optional"`
  172. // 挂载通知失败等非致命警告(如「服务已创建,但通知外挂程序挂载失败」),
  173. // 服务创建本身成功;前端收到后弹黄色警告,不弹红色错误。
  174. MountWarning string `json:"mountWarning,optional"`
  175. // 一键刷库配置:0=否(默认),1=是
  176. Brush int64 `json:"brush"`
  177. }
  178. type SystemLog struct {
  179. Id int64 `json:"id"` // 主键
  180. Iden string `json:"iden"` // 日志标识
  181. TraceId string `json:"traceId"` // 全链路TraceId
  182. SpanId string `json:"spanId"` // 子链路SpanId
  183. ParentSpanId string `json:"parentSpanId"` // 父SpanId
  184. Type int `json:"type"` // 日志类型:1.系统日志;2.接口日志
  185. ServiceName string `json:"serviceName"` // 所属服务名称/模块名称
  186. UriPath string `json:"uriPath"` // 接口请求路径
  187. HttpMethod string `json:"httpMethod"` // 请求方法
  188. Method string `json:"method"` // 业务方法名
  189. Level string `json:"level"` // 日志级别
  190. AppKey string `json:"appKey"` // 调用接口应用标识
  191. UserId string `json:"userId"` // 系统用户ID
  192. UserName string `json:"userName"` // 系统用户名
  193. ClientIp string `json:"clientIp"` // 客户端IP
  194. RequestHeader string `json:"requestHeader"` // 请求头
  195. RequestBodyDigest string `json:"requestBodyDigest"` // 请求体摘要
  196. RequestBodyFileKey string `json:"requestBodyFileKey"` // 请求体FileKey
  197. ResponseCode int64 `json:"responseCode"` // 响应业务码
  198. ResponseBodyDigest string `json:"responseBodyDigest"` // 响应体摘要
  199. ResponseBodyFileKey string `json:"responseBodyFileKey"` // 响应体FileKey
  200. ErrorMsg string `json:"errorMsg"` // 错误信息
  201. DurationMs int64 `json:"durationMs"` // 请求耗时
  202. CreatedAt string `json:"createdAt"` // 日志写入时间
  203. Hmac string `json:"hmac"` // Hmac值
  204. AuditStatus int `json:"auditStatus"` // 审计状态:1.未审计;2.审计通过;3.审计异常
  205. }
  206. type SystemLogArchiveReq struct {
  207. Name string `json:"name"` // 归档任务名称
  208. Ids []int64 `json:"ids,optional"` // 日志ID集合
  209. StartDate string `json:"startDate,optional"` // 归档开始日期
  210. EndDate string `json:"endDate,optional"` // 归档结束日期
  211. }
  212. type SystemLogArchiveResp struct {
  213. Count int `json:"count"`
  214. }
  215. type SystemLogAuditReq struct {
  216. Idens []string `json:"idens"`
  217. }
  218. type SystemLogAuditResp struct {
  219. TotalCount int64 `json:"totalCount"`
  220. ValidCount int64 `json:"validCount"`
  221. InValidCount int64 `json:"inValidCount"`
  222. AuditResults []AuditResult `json:"auditResults"`
  223. }
  224. type SystemLogDetailReq struct {
  225. Iden string `json:"iden"`
  226. }
  227. type SystemLogDetailResp struct {
  228. SystemLog
  229. }
  230. type SystemLogLinkReq struct {
  231. TraceId string `json:"traceId"`
  232. }
  233. type SystemLogLinkResp struct {
  234. LogLinks []SystemLog `json:"logLinks"`
  235. }
  236. type SystemLogListReq struct {
  237. Iden string `json:"iden,optional"` // 日志标识
  238. Type int64 `json:"type,optional"` // 日志类型
  239. UserName string `json:"userName,optional"` // 用户名称
  240. AppKey string `json:"appKey,optional"` // 应用标识
  241. UriPath string `json:"uriPath,optional"` // 接口请求路径
  242. HttpMethod string `json:"httpMethod,optional"` // 请求方式
  243. CreatedStartTime string `json:"createdStartTime,optional"` // 写入开始时间
  244. CreatedEndTime string `json:"createdEndTime,optional"` // 写入结束时间
  245. ClientIp string `json:"clientIp,optional"` // 客户端IP
  246. ErrorMsg string `json:"errorMsg,optional"` // 错误信息
  247. AuditStatus string `json:"auditStatus,optional"` // 审计状态
  248. Page int64 `json:"page,optional"`
  249. PageSize int64 `json:"pageSize,optional"`
  250. }
  251. type SystemLogListResp struct {
  252. Total int64 `json:"total"`
  253. Logs []SystemLog `json:"logs"`
  254. }
  255. type UpdateDirectoryReq struct {
  256. Id int64 `path:"id"`
  257. ServiceId int64 `json:"serviceId,optional"`
  258. Directory string `json:"directory,optional"`
  259. }
  260. type UpdateKeyReq struct {
  261. Id int64 `json:"id"`
  262. Status string `json:"status"`
  263. }
  264. type UpdateServiceReq struct {
  265. Id int64 `path:"id"`
  266. Name string `json:"name,optional"`
  267. Ip string `json:"ip,optional"`
  268. Port int64 `json:"port,optional"`
  269. Iden string `json:"iden,optional"`
  270. KeyIden string `json:"keyIden,optional"`
  271. KeyAlgo string `json:"keyAlgo,optional"`
  272. Status string `json:"status,optional"`
  273. // 一键刷库:0=否(默认),1=是。编辑只落库改配置,不追溯触发刷库(刷库编排仅在创建流程)。
  274. Brush int64 `json:"brush,optional"`
  275. // 编辑时全量提交保护目录列表(与新增同款后端收口模式):
  276. // nil = 未提交,不动目录;空数组 = 清空目录;非空 = 全量重写。
  277. // 落库与挂载联动(卸载被删目录/挂载新目录)由后端在同一接口完成。
  278. Directories []string `json:"directories,optional"`
  279. }