types.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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 string `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. Directories []string `json:"directories,optional"`
  22. }
  23. type DbPingResponse struct {
  24. Ok bool `json:"ok"`
  25. Version string `json:"version"`
  26. Database string `json:"database"`
  27. }
  28. type DeleteResp struct {
  29. Ok bool `json:"ok"`
  30. }
  31. type DirectoryIdReq struct {
  32. Id int64 `path:"id"`
  33. }
  34. type DirectoryListResp struct {
  35. List []DirectoryResp `json:"list"`
  36. Total int64 `json:"total"`
  37. }
  38. type DirectoryNode struct {
  39. Name string `json:"name"`
  40. SmbPath string `json:"smbPath"` // SMB 路径: \\ip\share\dir
  41. LocalMount string `json:"localMount"` // 真实挂载点: /var/ude/mnt/svc-123/data
  42. IsDir bool `json:"isDir"`
  43. Children []DirectoryNode `json:"children,optional"`
  44. }
  45. type DirectoryResp struct {
  46. Id int64 `json:"id"`
  47. ServiceId int64 `json:"serviceId"`
  48. Directory string `json:"directory"`
  49. }
  50. type KeyIdReq struct {
  51. Id int64 `json:"id"`
  52. }
  53. type KeyListResp struct {
  54. List []KeyResp `json:"list"`
  55. Total int64 `json:"total"`
  56. }
  57. type KeyResp struct {
  58. Id int64 `json:"id"`
  59. Iden string `json:"iden"`
  60. Name string `json:"name"`
  61. Content string `json:"content"`
  62. Status string `json:"status"`
  63. CreateAt string `json:"createAt"`
  64. }
  65. type ListDirectoryReq struct {
  66. Page int64 `form:"page,optional"`
  67. PageSize int64 `form:"pageSize,optional"`
  68. }
  69. type ListKeysReq struct {
  70. Page int64 `json:"page,optional"`
  71. PageSize int64 `json:"pageSize,optional"`
  72. Name string `json:"name,optional"`
  73. Status string `json:"status,optional"`
  74. }
  75. type ListServiceReq struct {
  76. Page int64 `form:"page,optional"`
  77. PageSize int64 `form:"pageSize,optional"`
  78. }
  79. type Request struct {
  80. Name string `path:"name,options=you|me"`
  81. }
  82. type Response struct {
  83. Message string `json:"message"`
  84. }
  85. // 本地目录懒加载(udeServer 所在 Linux 主机文件系统,只列目录不列文件)
  86. type ListDirChildrenReq struct {
  87. Path string `form:"path"` // 空或 "/" 表示根目录
  88. }
  89. type LocalDirNode struct {
  90. Name string `json:"name"` // 目录名,如 "usr"
  91. Path string `json:"path"` // 完整绝对路径,如 "/usr"
  92. IsDir bool `json:"isDir"` // 恒 true
  93. HasChildren bool `json:"hasChildren"` // 是否含子目录(前端据此决定是否显示展开箭头)
  94. }
  95. type DirChildrenResp struct {
  96. Nodes []LocalDirNode `json:"nodes"`
  97. }
  98. type ServiceIdReq struct {
  99. Id int64 `path:"id"`
  100. }
  101. type ServiceListResp struct {
  102. List []ServiceResp `json:"list"`
  103. Total int64 `json:"total"`
  104. }
  105. type ServiceResp struct {
  106. Id int64 `json:"id"`
  107. Name string `json:"name"`
  108. Ip string `json:"ip"`
  109. Port string `json:"port"`
  110. Iden string `json:"iden"`
  111. KeyIden string `json:"keyIden"`
  112. KeyAlgo string `json:"keyAlgo"`
  113. Status string `json:"status"`
  114. CreateAt string `json:"createAt"`
  115. }
  116. type UpdateDirectoryReq struct {
  117. Id int64 `path:"id"`
  118. ServiceId int64 `json:"serviceId,optional"`
  119. Directory string `json:"directory,optional"`
  120. }
  121. type UpdateKeyReq struct {
  122. Id int64 `json:"id"`
  123. Status string `json:"status"`
  124. }
  125. type UpdateServiceReq struct {
  126. Id int64 `path:"id"`
  127. Name string `json:"name,optional"`
  128. Ip string `json:"ip,optional"`
  129. Port string `json:"port,optional"`
  130. Iden string `json:"iden,optional"`
  131. KeyIden string `json:"keyIden,optional"`
  132. KeyAlgo string `json:"keyAlgo,optional"`
  133. Status string `json:"status,optional"`
  134. }