|
|
@@ -3,6 +3,75 @@
|
|
|
|
|
|
package types
|
|
|
|
|
|
+type ApplicationCredentials struct {
|
|
|
+ Id int64 `json:"id"`
|
|
|
+ CredIden string `json:"credIden"`
|
|
|
+ Name string `json:"name"`
|
|
|
+ ApiKey string `json:"apiKey"`
|
|
|
+ ApiSecret string `json:"apiSecret"` // 掩码后的密钥,原文走下发接口
|
|
|
+ Status int `json:"status"` // 启用状态:1.启用;2.禁用
|
|
|
+ Description string `json:"description"`
|
|
|
+ CreatedBy string `json:"createdBy"`
|
|
|
+ CreatedAt string `json:"createdAt"`
|
|
|
+ UpdatedBy string `json:"updatedBy"`
|
|
|
+ UpdatedAt string `json:"updatedAt"`
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsAddReq struct {
|
|
|
+ Name string `json:"name"` // 应用名称
|
|
|
+ Status int `json:"status,optional"` // 应用状态(1启用,2禁用),缺省启用
|
|
|
+ Description string `json:"description,optional"` // 应用描述
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsAddResp struct {
|
|
|
+ Iden string `json:"iden"` // 应用凭证标识
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsDeleteReq struct {
|
|
|
+ Id int64 `json:"id"`
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsDeleteResp struct {
|
|
|
+ Iden string `json:"iden"` // 应用凭证标识
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsDistributeReq struct {
|
|
|
+ Id int64 `json:"id"`
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsDistributeResp struct {
|
|
|
+ ApiSecret string `json:"apiSecret"` // 应用凭证密钥(明文,仅下发接口返回)
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsResetReq struct {
|
|
|
+ Id int64 `json:"id"`
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsResetResp struct {
|
|
|
+ Iden string `json:"iden"` // 应用凭证标识
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsUpdateStatusReq struct {
|
|
|
+ Id int64 `json:"id"`
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationCredentialsUpdateStatusResp struct {
|
|
|
+ Iden string `json:"iden"` // 应用凭证标识
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationListReq struct {
|
|
|
+ Status int64 `json:"status,optional"` // 启用状态筛选
|
|
|
+ CredIden string `json:"credIden,optional"` // 应用凭证标识筛选
|
|
|
+ Name string `json:"name,optional"` // 应用名称模糊筛选
|
|
|
+ Page int64 `json:"page,optional"`
|
|
|
+ PageSize int64 `json:"pageSize,optional"`
|
|
|
+}
|
|
|
+
|
|
|
+type ApplicationListResp struct {
|
|
|
+ Total int64 `json:"total"`
|
|
|
+ ApplicationLists []ApplicationCredentials `json:"applicationLists"`
|
|
|
+}
|
|
|
+
|
|
|
type AuditResult struct {
|
|
|
LogIden string `json:"logIden"`
|
|
|
Valid bool `json:"valid"`
|
|
|
@@ -20,15 +89,14 @@ type CreateKeyReq struct {
|
|
|
}
|
|
|
|
|
|
type CreateServiceReq struct {
|
|
|
- Id int64 `json:"id,optional"`
|
|
|
- Name string `json:"name,optional"`
|
|
|
- Ip string `json:"ip,optional"`
|
|
|
- Port int64 `json:"port,optional"`
|
|
|
- Iden string `json:"iden,optional"`
|
|
|
- KeyIden string `json:"keyIden,optional"`
|
|
|
- KeyAlgo string `json:"keyAlgo,optional"`
|
|
|
- Status string `json:"status,optional"`
|
|
|
- // 一键刷库:0=否(默认),1=创建后自动下发刷库(存量明文加密,外挂侧能力就绪后生效)
|
|
|
+ Id int64 `json:"id,optional"`
|
|
|
+ Name string `json:"name,optional"`
|
|
|
+ Ip string `json:"ip,optional"`
|
|
|
+ Port int64 `json:"port,optional"`
|
|
|
+ Iden string `json:"iden,optional"`
|
|
|
+ KeyIden string `json:"keyIden,optional"`
|
|
|
+ KeyAlgo string `json:"keyAlgo,optional"`
|
|
|
+ Status string `json:"status,optional"`
|
|
|
Brush int64 `json:"brush,optional"`
|
|
|
Directories []string `json:"directories,optional"`
|
|
|
}
|
|
|
@@ -40,10 +108,7 @@ type DbPingResponse struct {
|
|
|
}
|
|
|
|
|
|
type DeleteResp struct {
|
|
|
- Ok bool `json:"ok"`
|
|
|
-
|
|
|
- // 联动卸载失败等非致命警告(删除本身已成功),前端弹黄色警告;
|
|
|
- // 目录/密钥删除等其他共用本结构体的接口不填此字段。
|
|
|
+ Ok bool `json:"ok"`
|
|
|
UnmountWarning string `json:"unmountWarning,optional"`
|
|
|
}
|
|
|
|
|
|
@@ -84,6 +149,13 @@ type KeyResp struct {
|
|
|
CreateAt string `json:"createAt"`
|
|
|
}
|
|
|
|
|
|
+type ListDirChildrenReq struct {
|
|
|
+ Ip string `form:"ip"` // 目标 Linux 主机 IP
|
|
|
+ Port string `form:"port"` // 目标主机 /api/v1 端口
|
|
|
+ Path string `form:"path"` // 空或 "/" 表示根目录
|
|
|
+ Iden string `form:"iden"` // 接入标识:转发外挂时作为 X-TOKEN 头的值
|
|
|
+}
|
|
|
+
|
|
|
type ListDirectoryReq struct {
|
|
|
Page int64 `form:"page,optional"`
|
|
|
PageSize int64 `form:"pageSize,optional"`
|
|
|
@@ -101,22 +173,6 @@ type ListServiceReq struct {
|
|
|
PageSize int64 `form:"pageSize,optional"`
|
|
|
}
|
|
|
|
|
|
-type Request struct {
|
|
|
- Name string `path:"name,options=you|me"`
|
|
|
-}
|
|
|
-
|
|
|
-type Response struct {
|
|
|
- Message string `json:"message"`
|
|
|
-}
|
|
|
-
|
|
|
-// 本地目录懒加载(udeServer 所在 Linux 主机文件系统,只列目录不列文件)
|
|
|
-type ListDirChildrenReq struct {
|
|
|
- Ip string `form:"ip"` // 目标 Linux 主机 IP
|
|
|
- Port string `form:"port"`
|
|
|
- Path string `form:"path"` // 空或 "/" 表示根目录
|
|
|
- Iden string `form:"iden"` // 接入标识:转发外挂时作为 X-TOKEN 头的值(外挂侧与环境变量 TOKEN 比对)
|
|
|
-}
|
|
|
-
|
|
|
type LocalDirNode struct {
|
|
|
Name string `json:"name"` // 目录名,如 "usr"
|
|
|
Path string `json:"path"` // 完整绝对路径,如 "/usr"
|
|
|
@@ -182,6 +238,14 @@ type LogRestoreListResp struct {
|
|
|
LogRestores []LogRestore `json:"logRestores"`
|
|
|
}
|
|
|
|
|
|
+type Request struct {
|
|
|
+ Name string `path:"name,options=you|me"`
|
|
|
+}
|
|
|
+
|
|
|
+type Response struct {
|
|
|
+ Message string `json:"message"`
|
|
|
+}
|
|
|
+
|
|
|
type ServiceIdReq struct {
|
|
|
Id int64 `path:"id"`
|
|
|
}
|
|
|
@@ -192,25 +256,18 @@ type ServiceListResp struct {
|
|
|
}
|
|
|
|
|
|
type ServiceResp struct {
|
|
|
- Id int64 `json:"id"`
|
|
|
- Name string `json:"name"`
|
|
|
- Ip string `json:"ip"`
|
|
|
- Port int64 `json:"port"`
|
|
|
- Iden string `json:"iden"`
|
|
|
- KeyIden string `json:"keyIden"`
|
|
|
- KeyAlgo string `json:"keyAlgo"`
|
|
|
- Status string `json:"status"`
|
|
|
- CreateAt string `json:"createAt"`
|
|
|
-
|
|
|
- // 挂载状态: mounted=已挂载 unmounted=未挂载 failed=挂载失败
|
|
|
- MountStatus string `json:"mountStatus,optional"`
|
|
|
-
|
|
|
- // 挂载通知失败等非致命警告(如「服务已创建,但通知外挂程序挂载失败」),
|
|
|
- // 服务创建本身成功;前端收到后弹黄色警告,不弹红色错误。
|
|
|
+ Id int64 `json:"id"`
|
|
|
+ Name string `json:"name"`
|
|
|
+ Ip string `json:"ip"`
|
|
|
+ Port int64 `json:"port"`
|
|
|
+ Iden string `json:"iden"`
|
|
|
+ KeyIden string `json:"keyIden"`
|
|
|
+ KeyAlgo string `json:"keyAlgo"`
|
|
|
+ Status string `json:"status"`
|
|
|
+ CreateAt string `json:"createAt"`
|
|
|
+ MountStatus string `json:"mountStatus,optional"`
|
|
|
MountWarning string `json:"mountWarning,optional"`
|
|
|
-
|
|
|
- // 一键刷库配置:0=否(默认),1=是
|
|
|
- Brush int64 `json:"brush"`
|
|
|
+ Brush int64 `json:"brush"`
|
|
|
}
|
|
|
|
|
|
type SystemLog struct {
|
|
|
@@ -313,20 +370,14 @@ type UpdateKeyReq struct {
|
|
|
}
|
|
|
|
|
|
type UpdateServiceReq struct {
|
|
|
- Id int64 `path:"id"`
|
|
|
- Name string `json:"name,optional"`
|
|
|
- Ip string `json:"ip,optional"`
|
|
|
- Port int64 `json:"port,optional"`
|
|
|
- Iden string `json:"iden,optional"`
|
|
|
- KeyIden string `json:"keyIden,optional"`
|
|
|
- KeyAlgo string `json:"keyAlgo,optional"`
|
|
|
- Status string `json:"status,optional"`
|
|
|
-
|
|
|
- // 一键刷库:0=否(默认),1=是。编辑只落库改配置,不追溯触发刷库(刷库编排仅在创建流程)。
|
|
|
- Brush int64 `json:"brush,optional"`
|
|
|
-
|
|
|
- // 编辑时全量提交保护目录列表(与新增同款后端收口模式):
|
|
|
- // nil = 未提交,不动目录;空数组 = 清空目录;非空 = 全量重写。
|
|
|
- // 落库与挂载联动(卸载被删目录/挂载新目录)由后端在同一接口完成。
|
|
|
+ Id int64 `path:"id"`
|
|
|
+ Name string `json:"name,optional"`
|
|
|
+ Ip string `json:"ip,optional"`
|
|
|
+ Port int64 `json:"port,optional"`
|
|
|
+ Iden string `json:"iden,optional"`
|
|
|
+ KeyIden string `json:"keyIden,optional"`
|
|
|
+ KeyAlgo string `json:"keyAlgo,optional"`
|
|
|
+ Status string `json:"status,optional"`
|
|
|
+ Brush int64 `json:"brush,optional"`
|
|
|
Directories []string `json:"directories,optional"`
|
|
|
}
|