types.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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. }
  97. type LocalDirNode struct {
  98. Name string `json:"name"` // 目录名,如 "usr"
  99. Path string `json:"path"` // 完整绝对路径,如 "/usr"
  100. IsDir bool `json:"isDir"` // 恒 true
  101. HasChildren bool `json:"hasChildren"` // 是否含子目录(前端据此决定是否显示展开箭头)
  102. }
  103. type LogArchive struct {
  104. Id int64 `json:"id"`
  105. ArchiveName string `json:"archiveName"`
  106. RecordCount int64 `json:"recordCount"`
  107. ArchiveFileKey string `json:"archiveFileKey"`
  108. ArchiveMode int `json:"archiveMode"` // 归档模式:1.手动,2.自动
  109. BatchSize int `json:"batchSize"`
  110. ArchivedBy string `json:"archivedBy"`
  111. ArchivedAt string `json:"archivedAt"`
  112. }
  113. type LogArchiveDownloadReq struct {
  114. Ids []int64 `json:"ids"`
  115. }
  116. type LogArchiveListReq struct {
  117. ArchiveName string `json:"archiveName,optional"`
  118. ArchivedBy string `json:"archivedBy,optional"`
  119. ArchivedStartTime string `json:"archivedStartTime,optional"`
  120. ArchivedEndTime string `json:"archivedEndTime,optional"`
  121. Page int64 `json:"page,optional"`
  122. PageSize int64 `json:"pageSize,optional"`
  123. }
  124. type LogArchiveListResp struct {
  125. Total int64 `json:"total"`
  126. LogArchives []LogArchive `json:"logArchives"`
  127. }
  128. type LogArchiveRestoreReq struct {
  129. Ids []int64 `json:"ids"`
  130. }
  131. type LogArchiveRestoreResp struct {
  132. RestoreMsg string `json:"restoreMsg"`
  133. }
  134. type LogRestore struct {
  135. Id int64 `json:"id"`
  136. ArchiveId int64 `json:"archiveId"`
  137. RestoreStatus int `json:"restoreStatus"` // 1.成功,2.失败,3.恢复中
  138. RestoreMessage string `json:"restoreMessage"`
  139. RestoredBy string `json:"restoredBy"`
  140. RestoredAt string `json:"restoredAt"`
  141. }
  142. type LogRestoreListReq struct {
  143. RestoreStatus int64 `json:"restoreStatus,optional"`
  144. RestoreMessage string `json:"restoreMessage,optional"`
  145. Page int64 `json:"page,optional"`
  146. PageSize int64 `json:"pageSize,optional"`
  147. }
  148. type LogRestoreListResp struct {
  149. Total int64 `json:"total"`
  150. LogRestores []LogRestore `json:"logRestores"`
  151. }
  152. type ServiceIdReq struct {
  153. Id int64 `path:"id"`
  154. }
  155. type ServiceListResp struct {
  156. List []ServiceResp `json:"list"`
  157. Total int64 `json:"total"`
  158. }
  159. type ServiceResp struct {
  160. Id int64 `json:"id"`
  161. Name string `json:"name"`
  162. Ip string `json:"ip"`
  163. Port int64 `json:"port"`
  164. Iden string `json:"iden"`
  165. KeyIden string `json:"keyIden"`
  166. KeyAlgo string `json:"keyAlgo"`
  167. Status string `json:"status"`
  168. CreateAt string `json:"createAt"`
  169. // 挂载状态: mounted=已挂载 unmounted=未挂载 failed=挂载失败
  170. MountStatus string `json:"mountStatus,optional"`
  171. // 挂载通知失败等非致命警告(如「服务已创建,但通知外挂程序挂载失败」),
  172. // 服务创建本身成功;前端收到后弹黄色警告,不弹红色错误。
  173. MountWarning string `json:"mountWarning,optional"`
  174. // 一键刷库配置:0=否(默认),1=是
  175. Brush int64 `json:"brush"`
  176. }
  177. type SystemLog struct {
  178. Id int64 `json:"id"` // 主键
  179. Iden string `json:"iden"` // 日志标识
  180. TraceId string `json:"traceId"` // 全链路TraceId
  181. SpanId string `json:"spanId"` // 子链路SpanId
  182. ParentSpanId string `json:"parentSpanId"` // 父SpanId
  183. Type int `json:"type"` // 日志类型:1.系统日志;2.接口日志
  184. ServiceName string `json:"serviceName"` // 所属服务名称/模块名称
  185. UriPath string `json:"uriPath"` // 接口请求路径
  186. HttpMethod string `json:"httpMethod"` // 请求方法
  187. Method string `json:"method"` // 业务方法名
  188. Level string `json:"level"` // 日志级别
  189. AppKey string `json:"appKey"` // 调用接口应用标识
  190. UserId string `json:"userId"` // 系统用户ID
  191. UserName string `json:"userName"` // 系统用户名
  192. ClientIp string `json:"clientIp"` // 客户端IP
  193. RequestHeader string `json:"requestHeader"` // 请求头
  194. RequestBodyDigest string `json:"requestBodyDigest"` // 请求体摘要
  195. RequestBodyFileKey string `json:"requestBodyFileKey"` // 请求体FileKey
  196. ResponseCode int64 `json:"responseCode"` // 响应业务码
  197. ResponseBodyDigest string `json:"responseBodyDigest"` // 响应体摘要
  198. ResponseBodyFileKey string `json:"responseBodyFileKey"` // 响应体FileKey
  199. ErrorMsg string `json:"errorMsg"` // 错误信息
  200. DurationMs int64 `json:"durationMs"` // 请求耗时
  201. CreatedAt string `json:"createdAt"` // 日志写入时间
  202. Hmac string `json:"hmac"` // Hmac值
  203. AuditStatus int `json:"auditStatus"` // 审计状态:1.未审计;2.审计通过;3.审计异常
  204. }
  205. type SystemLogArchiveReq struct {
  206. Name string `json:"name"` // 归档任务名称
  207. Ids []int64 `json:"ids,optional"` // 日志ID集合
  208. StartDate string `json:"startDate,optional"` // 归档开始日期
  209. EndDate string `json:"endDate,optional"` // 归档结束日期
  210. }
  211. type SystemLogArchiveResp struct {
  212. Count int `json:"count"`
  213. }
  214. type SystemLogAuditReq struct {
  215. Idens []string `json:"idens"`
  216. }
  217. type SystemLogAuditResp struct {
  218. TotalCount int64 `json:"totalCount"`
  219. ValidCount int64 `json:"validCount"`
  220. InValidCount int64 `json:"inValidCount"`
  221. AuditResults []AuditResult `json:"auditResults"`
  222. }
  223. type SystemLogDetailReq struct {
  224. Iden string `json:"iden"`
  225. }
  226. type SystemLogDetailResp struct {
  227. SystemLog
  228. }
  229. type SystemLogLinkReq struct {
  230. TraceId string `json:"traceId"`
  231. }
  232. type SystemLogLinkResp struct {
  233. LogLinks []SystemLog `json:"logLinks"`
  234. }
  235. type SystemLogListReq struct {
  236. Iden string `json:"iden,optional"` // 日志标识
  237. Type int64 `json:"type,optional"` // 日志类型
  238. UserName string `json:"userName,optional"` // 用户名称
  239. AppKey string `json:"appKey,optional"` // 应用标识
  240. UriPath string `json:"uriPath,optional"` // 接口请求路径
  241. HttpMethod string `json:"httpMethod,optional"` // 请求方式
  242. CreatedStartTime string `json:"createdStartTime,optional"` // 写入开始时间
  243. CreatedEndTime string `json:"createdEndTime,optional"` // 写入结束时间
  244. ClientIp string `json:"clientIp,optional"` // 客户端IP
  245. ErrorMsg string `json:"errorMsg,optional"` // 错误信息
  246. AuditStatus string `json:"auditStatus,optional"` // 审计状态
  247. Page int64 `json:"page,optional"`
  248. PageSize int64 `json:"pageSize,optional"`
  249. }
  250. type SystemLogListResp struct {
  251. Total int64 `json:"total"`
  252. Logs []SystemLog `json:"logs"`
  253. }
  254. type UpdateDirectoryReq struct {
  255. Id int64 `path:"id"`
  256. ServiceId int64 `json:"serviceId,optional"`
  257. Directory string `json:"directory,optional"`
  258. }
  259. type UpdateKeyReq struct {
  260. Id int64 `json:"id"`
  261. Status string `json:"status"`
  262. }
  263. type UpdateServiceReq struct {
  264. Id int64 `path:"id"`
  265. Name string `json:"name,optional"`
  266. Ip string `json:"ip,optional"`
  267. Port int64 `json:"port,optional"`
  268. Iden string `json:"iden,optional"`
  269. KeyIden string `json:"keyIden,optional"`
  270. KeyAlgo string `json:"keyAlgo,optional"`
  271. Status string `json:"status,optional"`
  272. // 一键刷库:0=否(默认),1=是。编辑只落库改配置,不追溯触发刷库(刷库编排仅在创建流程)。
  273. Brush int64 `json:"brush,optional"`
  274. // 编辑时全量提交保护目录列表(与新增同款后端收口模式):
  275. // nil = 未提交,不动目录;空数组 = 清空目录;非空 = 全量重写。
  276. // 落库与挂载联动(卸载被删目录/挂载新目录)由后端在同一接口完成。
  277. Directories []string `json:"directories,optional"`
  278. }