refactor: 数据库实例与凭证关联至标签&其他问题修复重构等

This commit is contained in:
meilin.huang
2024-04-17 21:28:28 +08:00
parent f4162c38db
commit 01d3e1ad28
68 changed files with 1421 additions and 809 deletions

View File

@@ -10,7 +10,7 @@ type Redis struct {
Mode string `json:"mode"`
Db string `json:"db"`
SshTunnelMachineId int `json:"sshTunnelMachineId"` // ssh隧道机器id
TagId []uint64 `binding:"required" json:"tagId"`
TagCodePaths []string `binding:"required" json:"tagCodePaths"`
Remark string `json:"remark"`
FlowProcdefKey string `json:"flowProcdefKey"` // 审批流-流程定义key有值则说明关键操作需要进行审批执行,使用指针为了方便更新空字符串(取消流程审批)
}

View File

@@ -55,8 +55,7 @@ func (r *Redis) TestConn(rc *req.Ctx) {
redis := req.BindJsonAndCopyTo[*entity.Redis](rc, form, new(entity.Redis))
biz.ErrIsNil(r.RedisApp.TestConn(&application.SaveRedisParam{
Redis: redis,
TagIds: form.TagId,
Redis: redis,
AuthCert: &tagentity.ResourceAuthCert{
Name: fmt.Sprintf("redis_%s_ac", redis.Code),
Username: form.Username,
@@ -76,8 +75,8 @@ func (r *Redis) Save(rc *req.Ctx) {
rc.ReqParam = form
redisParam := &application.SaveRedisParam{
Redis: redis,
TagIds: form.TagId,
Redis: redis,
TagCodePaths: form.TagCodePaths,
AuthCert: &tagentity.ResourceAuthCert{
Name: fmt.Sprintf("redis_%s_ac", redis.Code),
Username: form.Username,