types.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  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 ClearCacheResp struct {
  66. Name string `json:"name"` // 页面标题(复位后为空)
  67. Logo string `json:"logo"` // logo(复位后为空)
  68. }
  69. type Config struct {
  70. Id int64 `json:"id"` // 主键
  71. ConfigItem string `json:"configItem"` // 配置项
  72. ConfigValue string `json:"configValue"` // 配置值
  73. EditFlag int64 `json:"editFlag"` // 是否可编辑:1=禁止编辑(配置项名锁定);2=允许编辑
  74. Description string `json:"descritpion"` // 描述(字段名 descritpion 沿袭 sdf 契约)
  75. UpdatedBy string `json:"updatedBy"` // 更新人
  76. UpdatedAt string `json:"updatedAt"` // 更新时间
  77. }
  78. type ConfigAddReq struct {
  79. ConfigItem string `json:"configItem"` // 配置项
  80. ConfigValue string `json:"configValue"` // 配置值
  81. Description string `json:"description,optional"` // 描述
  82. }
  83. type ConfigAddResp struct {
  84. Id int64 `json:"id"`
  85. }
  86. type ConfigDeleteReq struct {
  87. Id int64 `json:"id"`
  88. }
  89. type ConfigDeleteResp struct {
  90. Id int64 `json:"id"`
  91. }
  92. type ConfigListReq struct {
  93. ConfigItem string `json:"configItem,optional"` // 配置项精确筛选
  94. Description string `json:"description,optional"` // 描述模糊筛选
  95. Page int64 `json:"page,optional"`
  96. PageSize int64 `json:"pageSize,optional"`
  97. }
  98. type ConfigListResp struct {
  99. Total int64 `json:"total"`
  100. Configs []Config `json:"configs"`
  101. }
  102. type ConfigUpdateReq struct {
  103. Id int64 `json:"id"` // 配置ID
  104. ConfigItem string `json:"configItem"` // 配置项
  105. ConfigValue string `json:"configValue"` // 配置值
  106. Description string `json:"description,optional"` // 描述
  107. }
  108. type ConfigUpdateResp struct {
  109. Id int64 `json:"id"`
  110. }
  111. type CreateDirectoryReq struct {
  112. Id int64 `json:"id,optional"`
  113. ServiceId int64 `json:"serviceId,optional"`
  114. Directory string `json:"directory,optional"`
  115. }
  116. type CreateKeyReq struct {
  117. Name string `json:"name"`
  118. }
  119. type CreateServiceReq struct {
  120. Id int64 `json:"id,optional"`
  121. Name string `json:"name,optional"`
  122. Ip string `json:"ip,optional"`
  123. Port int64 `json:"port,optional"`
  124. Iden string `json:"iden,optional"`
  125. KeyIden string `json:"keyIden,optional"`
  126. KeyAlgo string `json:"keyAlgo,optional"`
  127. Status string `json:"status,optional"`
  128. Brush int64 `json:"brush,optional"`
  129. Directories []string `json:"directories,optional"`
  130. }
  131. type DbPingResponse struct {
  132. Ok bool `json:"ok"`
  133. Version string `json:"version"`
  134. Database string `json:"database"`
  135. }
  136. type DeleteResp struct {
  137. Ok bool `json:"ok"`
  138. UnmountWarning string `json:"unmountWarning,optional"`
  139. }
  140. type DirChildrenResp struct {
  141. Nodes []LocalDirNode `json:"nodes"`
  142. }
  143. type DirectoryIdReq struct {
  144. Id int64 `path:"id"`
  145. }
  146. type DirectoryListResp struct {
  147. List []DirectoryResp `json:"list"`
  148. Total int64 `json:"total"`
  149. }
  150. type DirectoryResp struct {
  151. Id int64 `json:"id"`
  152. ServiceId int64 `json:"serviceId"`
  153. Directory string `json:"directory"`
  154. }
  155. type GetCacheResp struct {
  156. Name string `json:"name"` // 页面标题
  157. Logo string `json:"logo"` // logo
  158. }
  159. type KeyIdReq struct {
  160. Id int64 `json:"id"`
  161. }
  162. type KeyListResp struct {
  163. List []KeyResp `json:"list"`
  164. Total int64 `json:"total"`
  165. }
  166. type KeyResp struct {
  167. Id int64 `json:"id"`
  168. Iden string `json:"iden"`
  169. Name string `json:"name"`
  170. Content string `json:"content"`
  171. Status string `json:"status"`
  172. CreateAt string `json:"createAt"`
  173. }
  174. type ListDirChildrenReq struct {
  175. Ip string `form:"ip"` // 目标 Linux 主机 IP
  176. Port string `form:"port"` // 目标主机 /api/v1 端口
  177. Path string `form:"path"` // 空或 "/" 表示根目录
  178. Iden string `form:"iden,optional"` // 接入标识:转发外挂时作为 X-TOKEN 头的值;外挂 /path/lists 已免鉴权,未选接入标识(空值)也放行
  179. }
  180. type ListDirectoryReq struct {
  181. Page int64 `form:"page,optional"`
  182. PageSize int64 `form:"pageSize,optional"`
  183. }
  184. type ListKeysReq struct {
  185. Page int64 `json:"page,optional"`
  186. PageSize int64 `json:"pageSize,optional"`
  187. Name string `json:"name,optional"`
  188. Status string `json:"status,optional"`
  189. }
  190. type ListServiceReq struct {
  191. Page int64 `form:"page,optional"`
  192. PageSize int64 `form:"pageSize,optional"`
  193. }
  194. type LocalDirNode struct {
  195. Name string `json:"name"` // 目录名,如 "usr"
  196. Path string `json:"path"` // 完整绝对路径,如 "/usr"
  197. IsDir bool `json:"isDir"` // 恒 true
  198. HasChildren bool `json:"hasChildren"` // 是否含子目录(前端据此决定是否显示展开箭头)
  199. }
  200. type LogArchive struct {
  201. Id int64 `json:"id"`
  202. ArchiveName string `json:"archiveName"`
  203. RecordCount int64 `json:"recordCount"`
  204. ArchiveFileKey string `json:"archiveFileKey"`
  205. ArchiveMode int `json:"archiveMode"` // 归档模式:1.手动,2.自动
  206. BatchSize int `json:"batchSize"`
  207. ArchivedBy string `json:"archivedBy"`
  208. ArchivedAt string `json:"archivedAt"`
  209. }
  210. type LogArchiveDownloadReq struct {
  211. Ids []int64 `json:"ids"`
  212. }
  213. type LogArchiveListReq struct {
  214. ArchiveName string `json:"archiveName,optional"`
  215. ArchivedBy string `json:"archivedBy,optional"`
  216. ArchivedStartTime string `json:"archivedStartTime,optional"`
  217. ArchivedEndTime string `json:"archivedEndTime,optional"`
  218. Page int64 `json:"page,optional"`
  219. PageSize int64 `json:"pageSize,optional"`
  220. }
  221. type LogArchiveListResp struct {
  222. Total int64 `json:"total"`
  223. LogArchives []LogArchive `json:"logArchives"`
  224. }
  225. type LogArchiveRestoreReq struct {
  226. Ids []int64 `json:"ids"`
  227. }
  228. type LogArchiveRestoreResp struct {
  229. RestoreMsg string `json:"restoreMsg"`
  230. }
  231. type LogRestore struct {
  232. Id int64 `json:"id"`
  233. ArchiveId int64 `json:"archiveId"`
  234. RestoreStatus int `json:"restoreStatus"` // 1.成功,2.失败,3.恢复中
  235. RestoreMessage string `json:"restoreMessage"`
  236. RestoredBy string `json:"restoredBy"`
  237. RestoredAt string `json:"restoredAt"`
  238. }
  239. type LogRestoreListReq struct {
  240. RestoreStatus int64 `json:"restoreStatus,optional"`
  241. RestoreMessage string `json:"restoreMessage,optional"`
  242. Page int64 `json:"page,optional"`
  243. PageSize int64 `json:"pageSize,optional"`
  244. }
  245. type LogRestoreListResp struct {
  246. Total int64 `json:"total"`
  247. LogRestores []LogRestore `json:"logRestores"`
  248. }
  249. type PageCache struct {
  250. Name string `json:"name"` // 页面标题
  251. Logo string `json:"logo"` // logo 路径或编码
  252. }
  253. type Request struct {
  254. Name string `path:"name,options=you|me"`
  255. }
  256. type Response struct {
  257. Message string `json:"message"`
  258. }
  259. type ServiceIdReq struct {
  260. Id int64 `path:"id"`
  261. }
  262. type ServiceListResp struct {
  263. List []ServiceResp `json:"list"`
  264. Total int64 `json:"total"`
  265. }
  266. type ServiceResp struct {
  267. Id int64 `json:"id"`
  268. Name string `json:"name"`
  269. Ip string `json:"ip"`
  270. Port int64 `json:"port"`
  271. Iden string `json:"iden"`
  272. KeyIden string `json:"keyIden"`
  273. KeyAlgo string `json:"keyAlgo"`
  274. Status string `json:"status"`
  275. CreateAt string `json:"createAt"`
  276. MountStatus string `json:"mountStatus,optional"`
  277. MountWarning string `json:"mountWarning,optional"`
  278. Brush int64 `json:"brush"`
  279. }
  280. type SetCacheReq struct {
  281. Name string `json:"name"` // 页面标题
  282. Logo string `json:"logo"` // logo
  283. }
  284. type SetCacheResp struct {
  285. Name string `json:"name"` // 页面标题
  286. Logo string `json:"logo"` // logo
  287. }
  288. type SystemLog struct {
  289. Id int64 `json:"id"` // 主键
  290. Iden string `json:"iden"` // 日志标识
  291. TraceId string `json:"traceId"` // 全链路TraceId
  292. SpanId string `json:"spanId"` // 子链路SpanId
  293. ParentSpanId string `json:"parentSpanId"` // 父SpanId
  294. Type int `json:"type"` // 日志类型:1.系统日志;2.接口日志
  295. ServiceName string `json:"serviceName"` // 所属服务名称/模块名称
  296. UriPath string `json:"uriPath"` // 接口请求路径
  297. HttpMethod string `json:"httpMethod"` // 请求方法
  298. Method string `json:"method"` // 业务方法名
  299. Level string `json:"level"` // 日志级别
  300. AppKey string `json:"appKey"` // 调用接口应用标识
  301. UserId string `json:"userId"` // 系统用户ID
  302. UserName string `json:"userName"` // 系统用户名
  303. ClientIp string `json:"clientIp"` // 客户端IP
  304. RequestHeader string `json:"requestHeader"` // 请求头
  305. RequestBodyDigest string `json:"requestBodyDigest"` // 请求体摘要
  306. RequestBodyFileKey string `json:"requestBodyFileKey"` // 请求体FileKey
  307. ResponseCode int64 `json:"responseCode"` // 响应业务码
  308. ResponseBodyDigest string `json:"responseBodyDigest"` // 响应体摘要
  309. ResponseBodyFileKey string `json:"responseBodyFileKey"` // 响应体FileKey
  310. ErrorMsg string `json:"errorMsg"` // 错误信息
  311. DurationMs int64 `json:"durationMs"` // 请求耗时
  312. CreatedAt string `json:"createdAt"` // 日志写入时间
  313. Hmac string `json:"hmac"` // Hmac值
  314. AuditStatus int `json:"auditStatus"` // 审计状态:1.未审计;2.审计通过;3.审计异常
  315. }
  316. type SystemLogArchiveReq struct {
  317. Name string `json:"name"` // 归档任务名称
  318. Ids []int64 `json:"ids,optional"` // 日志ID集合
  319. StartDate string `json:"startDate,optional"` // 归档开始日期
  320. EndDate string `json:"endDate,optional"` // 归档结束日期
  321. }
  322. type SystemLogArchiveResp struct {
  323. Count int `json:"count"`
  324. }
  325. type SystemLogAuditReq struct {
  326. Idens []string `json:"idens"`
  327. }
  328. type SystemLogAuditResp struct {
  329. TotalCount int64 `json:"totalCount"`
  330. ValidCount int64 `json:"validCount"`
  331. InValidCount int64 `json:"inValidCount"`
  332. AuditResults []AuditResult `json:"auditResults"`
  333. }
  334. type SystemLogDetailReq struct {
  335. Iden string `json:"iden"`
  336. }
  337. type SystemLogDetailResp struct {
  338. SystemLog
  339. }
  340. type SystemLogLinkReq struct {
  341. TraceId string `json:"traceId"`
  342. }
  343. type SystemLogLinkResp struct {
  344. LogLinks []SystemLog `json:"logLinks"`
  345. }
  346. type SystemLogListReq struct {
  347. Iden string `json:"iden,optional"` // 日志标识
  348. Type int64 `json:"type,optional"` // 日志类型
  349. UserName string `json:"userName,optional"` // 用户名称
  350. AppKey string `json:"appKey,optional"` // 应用标识
  351. UriPath string `json:"uriPath,optional"` // 接口请求路径
  352. HttpMethod string `json:"httpMethod,optional"` // 请求方式
  353. CreatedStartTime string `json:"createdStartTime,optional"` // 写入开始时间
  354. CreatedEndTime string `json:"createdEndTime,optional"` // 写入结束时间
  355. ClientIp string `json:"clientIp,optional"` // 客户端IP
  356. ErrorMsg string `json:"errorMsg,optional"` // 错误信息
  357. AuditStatus string `json:"auditStatus,optional"` // 审计状态
  358. Page int64 `json:"page,optional"`
  359. PageSize int64 `json:"pageSize,optional"`
  360. }
  361. type SystemLogListResp struct {
  362. Total int64 `json:"total"`
  363. Logs []SystemLog `json:"logs"`
  364. }
  365. type UpdateDirectoryReq struct {
  366. Id int64 `path:"id"`
  367. ServiceId int64 `json:"serviceId,optional"`
  368. Directory string `json:"directory,optional"`
  369. }
  370. type UpdateKeyReq struct {
  371. Id int64 `json:"id"`
  372. Status string `json:"status"`
  373. }
  374. type UpdateServiceReq struct {
  375. Id int64 `path:"id"`
  376. Name string `json:"name,optional"`
  377. Ip string `json:"ip,optional"`
  378. Port int64 `json:"port,optional"`
  379. Iden string `json:"iden,optional"`
  380. KeyIden string `json:"keyIden,optional"`
  381. KeyAlgo string `json:"keyAlgo,optional"`
  382. Status string `json:"status,optional"`
  383. Brush int64 `json:"brush,optional"`
  384. Directories []string `json:"directories,optional"`
  385. }
  386. type WSRequest struct {
  387. Action string `json:"action"` // 命令类型:ping;traceroute;telnet
  388. Target string `json:"target"` // IP或域名,ping/traceroute 用
  389. Count int `json:"count,optional"` // ping 次数,默认 4
  390. Host string `json:"host"` // telnet host
  391. Port int `json:"port"` // telnet port
  392. MaxHops int `json:"maxHops,optional"` // traceroute 最大跳数,默认 30
  393. }
  394. type WSResponse struct {
  395. Action string `json:"action"` // 命令类型
  396. Status string `json:"status"` // 状态:running;done;error
  397. Output string `json:"output"` // 输出信息
  398. }