types.go 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. // Code generated by goctl. DO NOT EDIT.
  2. // goctl 1.10.2
  3. package types
  4. type CreateDirectoryReq struct {
  5. Id int64 `json:"id,optional"`
  6. ServiceId int64 `json:"serviceId,optional"`
  7. Directory string `json:"directory,optional"`
  8. }
  9. type CreateKeyReq struct {
  10. Name string `json:"name"`
  11. }
  12. type CreateServiceReq struct {
  13. Id int64 `json:"id,optional"`
  14. Name string `json:"name,optional"`
  15. Ip string `json:"ip,optional"`
  16. Port int64 `json:"port,optional"`
  17. Iden string `json:"iden,optional"`
  18. KeyIden string `json:"keyIden,optional"`
  19. KeyAlgo string `json:"keyAlgo,optional"`
  20. Status string `json:"status,optional"`
  21. // 一键刷库:0=否(默认),1=创建后自动下发刷库(存量明文加密,外挂侧能力就绪后生效)
  22. Brush int64 `json:"brush,optional"`
  23. Directories []string `json:"directories,optional"`
  24. }
  25. type DbPingResponse struct {
  26. Ok bool `json:"ok"`
  27. Version string `json:"version"`
  28. Database string `json:"database"`
  29. }
  30. type DeleteResp struct {
  31. Ok bool `json:"ok"`
  32. // 联动卸载失败等非致命警告(删除本身已成功),前端弹黄色警告;
  33. // 目录/密钥删除等其他共用本结构体的接口不填此字段。
  34. UnmountWarning string `json:"unmountWarning,optional"`
  35. }
  36. type DirectoryIdReq struct {
  37. Id int64 `path:"id"`
  38. }
  39. type DirectoryListResp struct {
  40. List []DirectoryResp `json:"list"`
  41. Total int64 `json:"total"`
  42. }
  43. type DirectoryResp struct {
  44. Id int64 `json:"id"`
  45. ServiceId int64 `json:"serviceId"`
  46. Directory string `json:"directory"`
  47. }
  48. type KeyIdReq struct {
  49. Id int64 `json:"id"`
  50. }
  51. type KeyListResp struct {
  52. List []KeyResp `json:"list"`
  53. Total int64 `json:"total"`
  54. }
  55. type KeyResp struct {
  56. Id int64 `json:"id"`
  57. Iden string `json:"iden"`
  58. Name string `json:"name"`
  59. Content string `json:"content"`
  60. Status string `json:"status"`
  61. CreateAt string `json:"createAt"`
  62. }
  63. type ListDirectoryReq struct {
  64. Page int64 `form:"page,optional"`
  65. PageSize int64 `form:"pageSize,optional"`
  66. }
  67. type ListKeysReq struct {
  68. Page int64 `json:"page,optional"`
  69. PageSize int64 `json:"pageSize,optional"`
  70. Name string `json:"name,optional"`
  71. Status string `json:"status,optional"`
  72. }
  73. type ListServiceReq struct {
  74. Page int64 `form:"page,optional"`
  75. PageSize int64 `form:"pageSize,optional"`
  76. }
  77. type Request struct {
  78. Name string `path:"name,options=you|me"`
  79. }
  80. type Response struct {
  81. Message string `json:"message"`
  82. }
  83. // 本地目录懒加载(udeServer 所在 Linux 主机文件系统,只列目录不列文件)
  84. type ListDirChildrenReq struct {
  85. Ip string `form:"ip"` // 目标 Linux 主机 IP
  86. Port string `form:"port"`
  87. Path string `form:"path"` // 空或 "/" 表示根目录
  88. Ip string `form:"ip"` // ip
  89. Port string `form:"port"` // port
  90. }
  91. type LocalDirNode struct {
  92. Name string `json:"name"` // 目录名,如 "usr"
  93. Path string `json:"path"` // 完整绝对路径,如 "/usr"
  94. IsDir bool `json:"isDir"` // 恒 true
  95. HasChildren bool `json:"hasChildren"` // 是否含子目录(前端据此决定是否显示展开箭头)
  96. }
  97. type DirChildrenResp struct {
  98. Nodes []LocalDirNode `json:"nodes"`
  99. }
  100. type ServiceIdReq struct {
  101. Id int64 `path:"id"`
  102. }
  103. type ServiceListResp struct {
  104. List []ServiceResp `json:"list"`
  105. Total int64 `json:"total"`
  106. }
  107. type ServiceResp struct {
  108. Id int64 `json:"id"`
  109. Name string `json:"name"`
  110. Ip string `json:"ip"`
  111. Port int64 `json:"port"`
  112. Iden string `json:"iden"`
  113. KeyIden string `json:"keyIden"`
  114. KeyAlgo string `json:"keyAlgo"`
  115. Status string `json:"status"`
  116. CreateAt string `json:"createAt"`
  117. // 挂载状态: mounted=已挂载 unmounted=未挂载 failed=挂载失败
  118. MountStatus string `json:"mountStatus,optional"`
  119. // 挂载通知失败等非致命警告(如「服务已创建,但通知外挂程序挂载失败」),
  120. // 服务创建本身成功;前端收到后弹黄色警告,不弹红色错误。
  121. MountWarning string `json:"mountWarning,optional"`
  122. // 一键刷库配置:0=否(默认),1=是
  123. Brush int64 `json:"brush"`
  124. }
  125. type UpdateDirectoryReq struct {
  126. Id int64 `path:"id"`
  127. ServiceId int64 `json:"serviceId,optional"`
  128. Directory string `json:"directory,optional"`
  129. }
  130. type UpdateKeyReq struct {
  131. Id int64 `json:"id"`
  132. Status string `json:"status"`
  133. }
  134. type UpdateServiceReq struct {
  135. Id int64 `path:"id"`
  136. Name string `json:"name,optional"`
  137. Ip string `json:"ip,optional"`
  138. Port int64 `json:"port,optional"`
  139. Iden string `json:"iden,optional"`
  140. KeyIden string `json:"keyIden,optional"`
  141. KeyAlgo string `json:"keyAlgo,optional"`
  142. Status string `json:"status,optional"`
  143. // 一键刷库:0=否(默认),1=是。编辑只落库改配置,不追溯触发刷库(刷库编排仅在创建流程)。
  144. Brush int64 `json:"brush,optional"`
  145. // 编辑时全量提交保护目录列表(与新增同款后端收口模式):
  146. // nil = 未提交,不动目录;空数组 = 清空目录;非空 = 全量重写。
  147. // 落库与挂载联动(卸载被删目录/挂载新目录)由后端在同一接口完成。
  148. Directories []string `json:"directories,optional"`
  149. }