types.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. // Code generated by goctl. DO NOT EDIT.
  2. // goctl 1.10.2
  3. package types
  4. type ApplicationCredentials struct {
  5. Id int64 `json:"id"`
  6. CredIden string `json:"credIden"`
  7. Name string `json:"name"`
  8. ApiKey string `json:"apiKey"`
  9. ApiSecret string `json:"apiSecret"` // 掩码后的密钥,原文走下发接口
  10. Status int `json:"status"` // 启用状态:1.启用;2.禁用
  11. Description string `json:"description"`
  12. CreatedBy string `json:"createdBy"`
  13. CreatedAt string `json:"createdAt"`
  14. UpdatedBy string `json:"updatedBy"`
  15. UpdatedAt string `json:"updatedAt"`
  16. }
  17. type ApplicationCredentialsAddReq struct {
  18. Name string `json:"name"` // 应用名称
  19. Status int `json:"status,optional"` // 应用状态(1启用,2禁用),缺省启用
  20. Description string `json:"description,optional"` // 应用描述
  21. }
  22. type ApplicationCredentialsAddResp struct {
  23. Iden string `json:"iden"` // 应用凭证标识
  24. }
  25. type ApplicationCredentialsDeleteReq struct {
  26. Id int64 `json:"id"`
  27. }
  28. type ApplicationCredentialsDeleteResp struct {
  29. Iden string `json:"iden"` // 应用凭证标识
  30. }
  31. type ApplicationCredentialsDistributeReq struct {
  32. Id int64 `json:"id"`
  33. }
  34. type ApplicationCredentialsDistributeResp struct {
  35. ApiSecret string `json:"apiSecret"` // 应用凭证密钥(明文,仅下发接口返回)
  36. }
  37. type ApplicationCredentialsResetReq struct {
  38. Id int64 `json:"id"`
  39. }
  40. type ApplicationCredentialsResetResp struct {
  41. Iden string `json:"iden"` // 应用凭证标识
  42. }
  43. type ApplicationCredentialsUpdateStatusReq struct {
  44. Id int64 `json:"id"`
  45. }
  46. type ApplicationCredentialsUpdateStatusResp struct {
  47. Iden string `json:"iden"` // 应用凭证标识
  48. }
  49. type ApplicationListReq struct {
  50. Status int64 `json:"status,optional"` // 启用状态筛选
  51. CredIden string `json:"credIden,optional"` // 应用凭证标识筛选
  52. Name string `json:"name,optional"` // 应用名称模糊筛选
  53. Page int64 `json:"page,optional"`
  54. PageSize int64 `json:"pageSize,optional"`
  55. }
  56. type ApplicationListResp struct {
  57. Total int64 `json:"total"`
  58. ApplicationLists []ApplicationCredentials `json:"applicationLists"`
  59. }
  60. type AuditResult struct {
  61. LogIden string `json:"logIden"`
  62. Valid bool `json:"valid"`
  63. Reason string `json:"reason"`
  64. }
  65. type CreateDirectoryReq struct {
  66. Id int64 `json:"id,optional"`
  67. ServiceId int64 `json:"serviceId,optional"`
  68. Directory string `json:"directory,optional"`
  69. }
  70. type CreateKeyReq struct {
  71. Name string `json:"name"`
  72. }
  73. type CreateServiceReq struct {
  74. Id int64 `json:"id,optional"`
  75. Name string `json:"name,optional"`
  76. Ip string `json:"ip,optional"`
  77. Port int64 `json:"port,optional"`
  78. Iden string `json:"iden,optional"`
  79. KeyIden string `json:"keyIden,optional"`
  80. KeyAlgo string `json:"keyAlgo,optional"`
  81. Status string `json:"status,optional"`
  82. Brush int64 `json:"brush,optional"`
  83. Directories []string `json:"directories,optional"`
  84. }
  85. type DbPingResponse struct {
  86. Ok bool `json:"ok"`
  87. Version string `json:"version"`
  88. Database string `json:"database"`
  89. }
  90. type DeleteResp struct {
  91. Ok bool `json:"ok"`
  92. UnmountWarning string `json:"unmountWarning,optional"`
  93. }
  94. type DirChildrenResp struct {
  95. Nodes []LocalDirNode `json:"nodes"`
  96. }
  97. type DirectoryIdReq struct {
  98. Id int64 `path:"id"`
  99. }
  100. type DirectoryListResp struct {
  101. List []DirectoryResp `json:"list"`
  102. Total int64 `json:"total"`
  103. }
  104. type DirectoryResp struct {
  105. Id int64 `json:"id"`
  106. ServiceId int64 `json:"serviceId"`
  107. Directory string `json:"directory"`
  108. }
  109. type KeyIdReq struct {
  110. Id int64 `json:"id"`
  111. }
  112. type KeyListResp struct {
  113. List []KeyResp `json:"list"`
  114. Total int64 `json:"total"`
  115. }
  116. type KeyResp struct {
  117. Id int64 `json:"id"`
  118. Iden string `json:"iden"`
  119. Name string `json:"name"`
  120. Content string `json:"content"`
  121. Status string `json:"status"`
  122. CreateAt string `json:"createAt"`
  123. }
  124. type ListDirChildrenReq struct {
  125. Ip string `form:"ip"` // 目标 Linux 主机 IP
  126. Port string `form:"port"` // 目标主机 /api/v1 端口
  127. Path string `form:"path"` // 空或 "/" 表示根目录
  128. Iden string `form:"iden,optional"` // 接入标识:转发外挂时作为 X-TOKEN 头的值;外挂 /path/lists 已免鉴权,未选接入标识(空值)也放行
  129. }
  130. type ListDirectoryReq struct {
  131. Page int64 `form:"page,optional"`
  132. PageSize int64 `form:"pageSize,optional"`
  133. }
  134. type ListKeysReq struct {
  135. Page int64 `json:"page,optional"`
  136. PageSize int64 `json:"pageSize,optional"`
  137. Name string `json:"name,optional"`
  138. Status string `json:"status,optional"`
  139. }
  140. type ListServiceReq struct {
  141. Page int64 `form:"page,optional"`
  142. PageSize int64 `form:"pageSize,optional"`
  143. }
  144. type LocalDirNode struct {
  145. Name string `json:"name"` // 目录名,如 "usr"
  146. Path string `json:"path"` // 完整绝对路径,如 "/usr"
  147. IsDir bool `json:"isDir"` // 恒 true
  148. HasChildren bool `json:"hasChildren"` // 是否含子目录(前端据此决定是否显示展开箭头)
  149. }
  150. type LogArchive struct {
  151. Id int64 `json:"id"`
  152. ArchiveName string `json:"archiveName"`
  153. RecordCount int64 `json:"recordCount"`
  154. ArchiveFileKey string `json:"archiveFileKey"`
  155. ArchiveMode int `json:"archiveMode"` // 归档模式:1.手动,2.自动
  156. BatchSize int `json:"batchSize"`
  157. ArchivedBy string `json:"archivedBy"`
  158. ArchivedAt string `json:"archivedAt"`
  159. }
  160. type LogArchiveDownloadReq struct {
  161. Ids []int64 `json:"ids"`
  162. }
  163. type LogArchiveListReq struct {
  164. ArchiveName string `json:"archiveName,optional"`
  165. ArchivedBy string `json:"archivedBy,optional"`
  166. ArchivedStartTime string `json:"archivedStartTime,optional"`
  167. ArchivedEndTime string `json:"archivedEndTime,optional"`
  168. Page int64 `json:"page,optional"`
  169. PageSize int64 `json:"pageSize,optional"`
  170. }
  171. type LogArchiveListResp struct {
  172. Total int64 `json:"total"`
  173. LogArchives []LogArchive `json:"logArchives"`
  174. }
  175. type LogArchiveRestoreReq struct {
  176. Ids []int64 `json:"ids"`
  177. }
  178. type LogArchiveRestoreResp struct {
  179. RestoreMsg string `json:"restoreMsg"`
  180. }
  181. type LogRestore struct {
  182. Id int64 `json:"id"`
  183. ArchiveId int64 `json:"archiveId"`
  184. RestoreStatus int `json:"restoreStatus"` // 1.成功,2.失败,3.恢复中
  185. RestoreMessage string `json:"restoreMessage"`
  186. RestoredBy string `json:"restoredBy"`
  187. RestoredAt string `json:"restoredAt"`
  188. }
  189. type LogRestoreListReq struct {
  190. RestoreStatus int64 `json:"restoreStatus,optional"`
  191. RestoreMessage string `json:"restoreMessage,optional"`
  192. Page int64 `json:"page,optional"`
  193. PageSize int64 `json:"pageSize,optional"`
  194. }
  195. type LogRestoreListResp struct {
  196. Total int64 `json:"total"`
  197. LogRestores []LogRestore `json:"logRestores"`
  198. }
  199. type Request struct {
  200. Name string `path:"name,options=you|me"`
  201. }
  202. type Response struct {
  203. Message string `json:"message"`
  204. }
  205. type ServiceIdReq struct {
  206. Id int64 `path:"id"`
  207. }
  208. type ServiceListResp struct {
  209. List []ServiceResp `json:"list"`
  210. Total int64 `json:"total"`
  211. }
  212. type ServiceResp struct {
  213. Id int64 `json:"id"`
  214. Name string `json:"name"`
  215. Ip string `json:"ip"`
  216. Port int64 `json:"port"`
  217. Iden string `json:"iden"`
  218. KeyIden string `json:"keyIden"`
  219. KeyAlgo string `json:"keyAlgo"`
  220. Status string `json:"status"`
  221. CreateAt string `json:"createAt"`
  222. MountStatus string `json:"mountStatus,optional"`
  223. MountWarning string `json:"mountWarning,optional"`
  224. Brush int64 `json:"brush"`
  225. }
  226. type SystemLog struct {
  227. Id int64 `json:"id"` // 主键
  228. Iden string `json:"iden"` // 日志标识
  229. TraceId string `json:"traceId"` // 全链路TraceId
  230. SpanId string `json:"spanId"` // 子链路SpanId
  231. ParentSpanId string `json:"parentSpanId"` // 父SpanId
  232. Type int `json:"type"` // 日志类型:1.系统日志;2.接口日志
  233. ServiceName string `json:"serviceName"` // 所属服务名称/模块名称
  234. UriPath string `json:"uriPath"` // 接口请求路径
  235. HttpMethod string `json:"httpMethod"` // 请求方法
  236. Method string `json:"method"` // 业务方法名
  237. Level string `json:"level"` // 日志级别
  238. AppKey string `json:"appKey"` // 调用接口应用标识
  239. UserId string `json:"userId"` // 系统用户ID
  240. UserName string `json:"userName"` // 系统用户名
  241. ClientIp string `json:"clientIp"` // 客户端IP
  242. RequestHeader string `json:"requestHeader"` // 请求头
  243. RequestBodyDigest string `json:"requestBodyDigest"` // 请求体摘要
  244. RequestBodyFileKey string `json:"requestBodyFileKey"` // 请求体FileKey
  245. ResponseCode int64 `json:"responseCode"` // 响应业务码
  246. ResponseBodyDigest string `json:"responseBodyDigest"` // 响应体摘要
  247. ResponseBodyFileKey string `json:"responseBodyFileKey"` // 响应体FileKey
  248. ErrorMsg string `json:"errorMsg"` // 错误信息
  249. DurationMs int64 `json:"durationMs"` // 请求耗时
  250. CreatedAt string `json:"createdAt"` // 日志写入时间
  251. Hmac string `json:"hmac"` // Hmac值
  252. AuditStatus int `json:"auditStatus"` // 审计状态:1.未审计;2.审计通过;3.审计异常
  253. }
  254. type SystemLogArchiveReq struct {
  255. Name string `json:"name"` // 归档任务名称
  256. Ids []int64 `json:"ids,optional"` // 日志ID集合
  257. StartDate string `json:"startDate,optional"` // 归档开始日期
  258. EndDate string `json:"endDate,optional"` // 归档结束日期
  259. }
  260. type SystemLogArchiveResp struct {
  261. Count int `json:"count"`
  262. }
  263. type SystemLogAuditReq struct {
  264. Idens []string `json:"idens"`
  265. }
  266. type SystemLogAuditResp struct {
  267. TotalCount int64 `json:"totalCount"`
  268. ValidCount int64 `json:"validCount"`
  269. InValidCount int64 `json:"inValidCount"`
  270. AuditResults []AuditResult `json:"auditResults"`
  271. }
  272. type SystemLogDetailReq struct {
  273. Iden string `json:"iden"`
  274. }
  275. type SystemLogDetailResp struct {
  276. SystemLog
  277. }
  278. type SystemLogLinkReq struct {
  279. TraceId string `json:"traceId"`
  280. }
  281. type SystemLogLinkResp struct {
  282. LogLinks []SystemLog `json:"logLinks"`
  283. }
  284. type SystemLogListReq struct {
  285. Iden string `json:"iden,optional"` // 日志标识
  286. Type int64 `json:"type,optional"` // 日志类型
  287. UserName string `json:"userName,optional"` // 用户名称
  288. AppKey string `json:"appKey,optional"` // 应用标识
  289. UriPath string `json:"uriPath,optional"` // 接口请求路径
  290. HttpMethod string `json:"httpMethod,optional"` // 请求方式
  291. CreatedStartTime string `json:"createdStartTime,optional"` // 写入开始时间
  292. CreatedEndTime string `json:"createdEndTime,optional"` // 写入结束时间
  293. ClientIp string `json:"clientIp,optional"` // 客户端IP
  294. ErrorMsg string `json:"errorMsg,optional"` // 错误信息
  295. AuditStatus string `json:"auditStatus,optional"` // 审计状态
  296. Page int64 `json:"page,optional"`
  297. PageSize int64 `json:"pageSize,optional"`
  298. }
  299. type SystemLogListResp struct {
  300. Total int64 `json:"total"`
  301. Logs []SystemLog `json:"logs"`
  302. }
  303. type UpdateDirectoryReq struct {
  304. Id int64 `path:"id"`
  305. ServiceId int64 `json:"serviceId,optional"`
  306. Directory string `json:"directory,optional"`
  307. }
  308. type UpdateKeyReq struct {
  309. Id int64 `json:"id"`
  310. Status string `json:"status"`
  311. }
  312. type UpdateServiceReq struct {
  313. Id int64 `path:"id"`
  314. Name string `json:"name,optional"`
  315. Ip string `json:"ip,optional"`
  316. Port int64 `json:"port,optional"`
  317. Iden string `json:"iden,optional"`
  318. KeyIden string `json:"keyIden,optional"`
  319. KeyAlgo string `json:"keyAlgo,optional"`
  320. Status string `json:"status,optional"`
  321. Brush int64 `json:"brush,optional"`
  322. Directories []string `json:"directories,optional"`
  323. }