types.go 11 KB

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