types.go 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  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 string `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. Directories []string `json:"directories,optional"`
  27. }
  28. type DbPingResponse struct {
  29. Ok bool `json:"ok"`
  30. Version string `json:"version"`
  31. Database string `json:"database"`
  32. }
  33. type DeleteResp struct {
  34. Ok bool `json:"ok"`
  35. }
  36. type DirChildrenResp struct {
  37. Nodes []LocalDirNode `json:"nodes"`
  38. }
  39. type DirectoryIdReq struct {
  40. Id int64 `path:"id"`
  41. }
  42. type DirectoryListResp struct {
  43. List []DirectoryResp `json:"list"`
  44. Total int64 `json:"total"`
  45. }
  46. type DirectoryResp struct {
  47. Id int64 `json:"id"`
  48. ServiceId int64 `json:"serviceId"`
  49. Directory string `json:"directory"`
  50. }
  51. type KeyIdReq struct {
  52. Id int64 `json:"id"`
  53. }
  54. type KeyListResp struct {
  55. List []KeyResp `json:"list"`
  56. Total int64 `json:"total"`
  57. }
  58. type KeyResp struct {
  59. Id int64 `json:"id"`
  60. Iden string `json:"iden"`
  61. Name string `json:"name"`
  62. Content string `json:"content"`
  63. Status string `json:"status"`
  64. CreateAt string `json:"createAt"`
  65. }
  66. type ListDirChildrenReq struct {
  67. Ip string `form:"ip"` // 目标 Linux 主机 IP
  68. Port string `form:"port"` // 目标主机 /api/v1 端口
  69. Path string `form:"path"` // 空或 "/" 表示根目录
  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 LocalDirNode struct {
  86. Name string `json:"name"` // 目录名,如 "usr"
  87. Path string `json:"path"` // 完整绝对路径,如 "/usr"
  88. IsDir bool `json:"isDir"` // 恒 true
  89. HasChildren bool `json:"hasChildren"` // 是否含子目录(前端据此决定是否显示展开箭头)
  90. }
  91. type LogArchive struct {
  92. Id int64 `json:"id"`
  93. ArchiveName string `json:"archiveName"`
  94. RecordCount int64 `json:"recordCount"`
  95. ArchiveFileKey string `json:"archiveFileKey"`
  96. ArchiveMode int `json:"archiveMode"` // 归档模式:1.手动,2.自动
  97. BatchSize int `json:"batchSize"`
  98. ArchivedBy string `json:"archivedBy"`
  99. ArchivedAt string `json:"archivedAt"`
  100. }
  101. type LogArchiveDownloadReq struct {
  102. Ids []int64 `json:"ids"`
  103. }
  104. type LogArchiveListReq struct {
  105. ArchiveName string `json:"archiveName,optional"`
  106. ArchivedBy string `json:"archivedBy,optional"`
  107. ArchivedStartTime string `json:"archivedStartTime,optional"`
  108. ArchivedEndTime string `json:"archivedEndTime,optional"`
  109. Page int64 `json:"page,optional"`
  110. PageSize int64 `json:"pageSize,optional"`
  111. }
  112. type LogArchiveListResp struct {
  113. Total int64 `json:"total"`
  114. LogArchives []LogArchive `json:"logArchives"`
  115. }
  116. type LogArchiveRestoreReq struct {
  117. Ids []int64 `json:"ids"`
  118. }
  119. type LogArchiveRestoreResp struct {
  120. RestoreMsg string `json:"restoreMsg"`
  121. }
  122. type LogRestore struct {
  123. Id int64 `json:"id"`
  124. ArchiveId int64 `json:"archiveId"`
  125. RestoreStatus int `json:"restoreStatus"` // 1.成功,2.失败,3.恢复中
  126. RestoreMessage string `json:"restoreMessage"`
  127. RestoredBy string `json:"restoredBy"`
  128. RestoredAt string `json:"restoredAt"`
  129. }
  130. type LogRestoreListReq struct {
  131. RestoreStatus int64 `json:"restoreStatus,optional"`
  132. RestoreMessage string `json:"restoreMessage,optional"`
  133. Page int64 `json:"page,optional"`
  134. PageSize int64 `json:"pageSize,optional"`
  135. }
  136. type LogRestoreListResp struct {
  137. Total int64 `json:"total"`
  138. LogRestores []LogRestore `json:"logRestores"`
  139. }
  140. type Request struct {
  141. Name string `path:"name,options=you|me"`
  142. }
  143. type Response struct {
  144. Message string `json:"message"`
  145. }
  146. type ServiceIdReq struct {
  147. Id int64 `path:"id"`
  148. }
  149. type ServiceListResp struct {
  150. List []ServiceResp `json:"list"`
  151. Total int64 `json:"total"`
  152. }
  153. type ServiceResp struct {
  154. Id int64 `json:"id"`
  155. Name string `json:"name"`
  156. Ip string `json:"ip"`
  157. Port string `json:"port"`
  158. Iden string `json:"iden"`
  159. KeyIden string `json:"keyIden"`
  160. KeyAlgo string `json:"keyAlgo"`
  161. Status string `json:"status"`
  162. CreateAt string `json:"createAt"`
  163. }
  164. type SystemLog struct {
  165. Id int64 `json:"id"` // 主键
  166. Iden string `json:"iden"` // 日志标识
  167. TraceId string `json:"traceId"` // 全链路TraceId
  168. SpanId string `json:"spanId"` // 子链路SpanId
  169. ParentSpanId string `json:"parentSpanId"` // 父SpanId
  170. Type int `json:"type"` // 日志类型:1.系统日志;2.接口日志
  171. ServiceName string `json:"serviceName"` // 所属服务名称/模块名称
  172. UriPath string `json:"uriPath"` // 接口请求路径
  173. HttpMethod string `json:"httpMethod"` // 请求方法
  174. Method string `json:"method"` // 业务方法名
  175. Level string `json:"level"` // 日志级别
  176. AppKey string `json:"appKey"` // 调用接口应用标识
  177. UserId string `json:"userId"` // 系统用户ID
  178. UserName string `json:"userName"` // 系统用户名
  179. ClientIp string `json:"clientIp"` // 客户端IP
  180. RequestHeader string `json:"requestHeader"` // 请求头
  181. RequestBodyDigest string `json:"requestBodyDigest"` // 请求体摘要
  182. RequestBodyFileKey string `json:"requestBodyFileKey"` // 请求体FileKey
  183. ResponseCode int64 `json:"responseCode"` // 响应业务码
  184. ResponseBodyDigest string `json:"responseBodyDigest"` // 响应体摘要
  185. ResponseBodyFileKey string `json:"responseBodyFileKey"` // 响应体FileKey
  186. ErrorMsg string `json:"errorMsg"` // 错误信息
  187. DurationMs int64 `json:"durationMs"` // 请求耗时
  188. CreatedAt string `json:"createdAt"` // 日志写入时间
  189. Hmac string `json:"hmac"` // Hmac值
  190. AuditStatus int `json:"auditStatus"` // 审计状态:1.未审计;2.审计通过;3.审计异常
  191. }
  192. type SystemLogArchiveReq struct {
  193. Name string `json:"name"` // 归档任务名称
  194. Ids []int64 `json:"ids,optional"` // 日志ID集合
  195. StartDate string `json:"startDate,optional"` // 归档开始日期
  196. EndDate string `json:"endDate,optional"` // 归档结束日期
  197. }
  198. type SystemLogArchiveResp struct {
  199. Count int `json:"count"`
  200. }
  201. type SystemLogAuditReq struct {
  202. Idens []string `json:"idens"`
  203. }
  204. type SystemLogAuditResp struct {
  205. TotalCount int64 `json:"totalCount"`
  206. ValidCount int64 `json:"validCount"`
  207. InValidCount int64 `json:"inValidCount"`
  208. AuditResults []AuditResult `json:"auditResults"`
  209. }
  210. type SystemLogDetailReq struct {
  211. Iden string `json:"iden"`
  212. }
  213. type SystemLogDetailResp struct {
  214. SystemLog
  215. }
  216. type SystemLogLinkReq struct {
  217. TraceId string `json:"traceId"`
  218. }
  219. type SystemLogLinkResp struct {
  220. LogLinks []SystemLog `json:"logLinks"`
  221. }
  222. type SystemLogListReq struct {
  223. Iden string `json:"iden,optional"` // 日志标识
  224. Type int64 `json:"type,optional"` // 日志类型
  225. UserName string `json:"userName,optional"` // 用户名称
  226. AppKey string `json:"appKey,optional"` // 应用标识
  227. UriPath string `json:"uriPath,optional"` // 接口请求路径
  228. HttpMethod string `json:"httpMethod,optional"` // 请求方式
  229. CreatedStartTime string `json:"createdStartTime,optional"` // 写入开始时间
  230. CreatedEndTime string `json:"createdEndTime,optional"` // 写入结束时间
  231. ClientIp string `json:"clientIp,optional"` // 客户端IP
  232. ErrorMsg string `json:"errorMsg,optional"` // 错误信息
  233. AuditStatus string `json:"auditStatus,optional"` // 审计状态
  234. Page int64 `json:"page,optional"`
  235. PageSize int64 `json:"pageSize,optional"`
  236. }
  237. type SystemLogListResp struct {
  238. Total int64 `json:"total"`
  239. Logs []SystemLog `json:"logs"`
  240. }
  241. type UpdateDirectoryReq struct {
  242. Id int64 `path:"id"`
  243. ServiceId int64 `json:"serviceId,optional"`
  244. Directory string `json:"directory,optional"`
  245. }
  246. type UpdateKeyReq struct {
  247. Id int64 `json:"id"`
  248. Status string `json:"status"`
  249. }
  250. type UpdateServiceReq struct {
  251. Id int64 `path:"id"`
  252. Name string `json:"name,optional"`
  253. Ip string `json:"ip,optional"`
  254. Port string `json:"port,optional"`
  255. Iden string `json:"iden,optional"`
  256. KeyIden string `json:"keyIden,optional"`
  257. KeyAlgo string `json:"keyAlgo,optional"`
  258. Status string `json:"status,optional"`
  259. }