Merge remote-tracking branch 'origin/master' into master-wq
Former-commit-id: e150842727f39e6ad9eb4b83db0197c97af108ea
This commit is contained in:
commit
f66138afa0
|
@ -712,6 +712,7 @@ type (
|
||||||
Id string `form:"id,optional" db:"id"`
|
Id string `form:"id,optional" db:"id"`
|
||||||
Name string `form:"name,optional"`
|
Name string `form:"name,optional"`
|
||||||
Type string `form:"type,optional"`
|
Type string `form:"type,optional"`
|
||||||
|
ResourceType string `form:"resourceType,optional"`
|
||||||
Nickname string `form:"nickname,optional"`
|
Nickname string `form:"nickname,optional"`
|
||||||
Version string `form:"version,optional"`
|
Version string `form:"version,optional"`
|
||||||
Server string `form:"server,optional"`
|
Server string `form:"server,optional"`
|
||||||
|
@ -721,6 +722,7 @@ type (
|
||||||
Id string `form:"id,optional" db:"id"`
|
Id string `form:"id,optional" db:"id"`
|
||||||
Name string `form:"name,optional"`
|
Name string `form:"name,optional"`
|
||||||
Type string `form:"type,optional"`
|
Type string `form:"type,optional"`
|
||||||
|
ResourceType string `form:"resourceType,optional"`
|
||||||
Nickname string `form:"nickname,optional"`
|
Nickname string `form:"nickname,optional"`
|
||||||
Version string `form:"version,optional"`
|
Version string `form:"version,optional"`
|
||||||
Server string `form:"server,optional"`
|
Server string `form:"server,optional"`
|
||||||
|
@ -729,6 +731,7 @@ type (
|
||||||
Id string `json:"id,optional" db:"id"`
|
Id string `json:"id,optional" db:"id"`
|
||||||
Name string `json:"name,optional"`
|
Name string `json:"name,optional"`
|
||||||
Type string `json:"type,optional"`
|
Type string `json:"type,optional"`
|
||||||
|
ResourceType string `json:"resourceType,optional"`
|
||||||
Nickname string `json:"nickname,optional"`
|
Nickname string `json:"nickname,optional"`
|
||||||
Version string `json:"version,optional"`
|
Version string `json:"version,optional"`
|
||||||
Server string `json:"server,optional"`
|
Server string `json:"server,optional"`
|
||||||
|
@ -737,6 +740,7 @@ type (
|
||||||
Id string `json:"id,optional" db:"id"`
|
Id string `json:"id,optional" db:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
|
ResourceType string `json:"resourceType"`
|
||||||
Nickname string `json:"nickname"`
|
Nickname string `json:"nickname"`
|
||||||
Version string `json:"version"`
|
Version string `json:"version"`
|
||||||
Server string `json:"server"`
|
Server string `json:"server"`
|
||||||
|
@ -748,6 +752,7 @@ type (
|
||||||
Id string `json:"id,omitempty" db:"id"`
|
Id string `json:"id,omitempty" db:"id"`
|
||||||
Name string `json:"name,omitempty" db:"name"`
|
Name string `json:"name,omitempty" db:"name"`
|
||||||
Type string `json:"type,omitempty" db:"type"`
|
Type string `json:"type,omitempty" db:"type"`
|
||||||
|
ResourceType string `json:"resourceType,omitempty" db:"resource_type"`
|
||||||
Nickname string `json:"nickname,omitempty" db:"nickname"`
|
Nickname string `json:"nickname,omitempty" db:"nickname"`
|
||||||
Version string `json:"version,omitempty" db:"version"`
|
Version string `json:"version,omitempty" db:"version"`
|
||||||
Server string `json:"server,omitempty" db:"server"`
|
Server string `json:"server,omitempty" db:"server"`
|
||||||
|
@ -766,6 +771,7 @@ type (
|
||||||
Id string `json:"id,omitempty" db:"id"`
|
Id string `json:"id,omitempty" db:"id"`
|
||||||
Name string `json:"name,omitempty" db:"name"`
|
Name string `json:"name,omitempty" db:"name"`
|
||||||
Type string `json:"type,omitempty" db:"type"`
|
Type string `json:"type,omitempty" db:"type"`
|
||||||
|
ResourceType string `json:"resourceType" db:"resource_type"`
|
||||||
Nickname string `json:"nickname,omitempty" db:"nickname"`
|
Nickname string `json:"nickname,omitempty" db:"nickname"`
|
||||||
Version string `json:"version,omitempty" db:"version"`
|
Version string `json:"version,omitempty" db:"version"`
|
||||||
Server string `json:"server,omitempty" db:"server"`
|
Server string `json:"server,omitempty" db:"server"`
|
||||||
|
@ -797,6 +803,7 @@ type (
|
||||||
Type string `form:"type,optional"`
|
Type string `form:"type,optional"`
|
||||||
ProducerDict string `form:"producerDict,optional"`
|
ProducerDict string `form:"producerDict,optional"`
|
||||||
RegionDict string `form:"regionDict,optional"`
|
RegionDict string `form:"regionDict,optional"`
|
||||||
|
ResourceType string `form:"resourceType,optional"`
|
||||||
PageInfo
|
PageInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -955,6 +962,7 @@ type (
|
||||||
ParentId string `json:"parentId,omitempty"`
|
ParentId string `json:"parentId,omitempty"`
|
||||||
Status string `json:"status,omitempty" db:"status"`
|
Status string `json:"status,omitempty" db:"status"`
|
||||||
CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
||||||
|
Children []DictItemInfo `json:"children,omitempty" gorm:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
DictItemReq {
|
DictItemReq {
|
||||||
|
@ -967,7 +975,6 @@ type (
|
||||||
Type string `form:"type,optional"`
|
Type string `form:"type,optional"`
|
||||||
ParentId string `form:"parentId,optional"`
|
ParentId string `form:"parentId,optional"`
|
||||||
Status string `form:"status,optional"`
|
Status string `form:"status,optional"`
|
||||||
PageInfo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DictItemEditReq {
|
DictItemEditReq {
|
||||||
|
|
|
@ -55,6 +55,9 @@ func (l *ClusterListLogic) ClusterList(req *types.ClusterReq) (resp *types.PageR
|
||||||
if req.Type != "" {
|
if req.Type != "" {
|
||||||
db = db.Where("t_adapter.type = ?", req.Type)
|
db = db.Where("t_adapter.type = ?", req.Type)
|
||||||
}
|
}
|
||||||
|
if req.ResourceType != "" {
|
||||||
|
db = db.Where("t_adapter.resource_type = ?", req.ResourceType)
|
||||||
|
}
|
||||||
|
|
||||||
//count total
|
//count total
|
||||||
var total int64
|
var total int64
|
||||||
|
|
|
@ -2,10 +2,12 @@ package adapters
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"github.com/pkg/errors"
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils"
|
||||||
|
"gorm.io/gorm"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -26,6 +28,34 @@ func NewCreateAdapterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Cre
|
||||||
func (l *CreateAdapterLogic) CreateAdapter(req *types.AdapterCreateReq) (resp *types.AdapterResp, err error) {
|
func (l *CreateAdapterLogic) CreateAdapter(req *types.AdapterCreateReq) (resp *types.AdapterResp, err error) {
|
||||||
adapter := types.AdapterInfo{}
|
adapter := types.AdapterInfo{}
|
||||||
utils.Convert(req, &adapter)
|
utils.Convert(req, &adapter)
|
||||||
|
//check name
|
||||||
|
exist := l.svcCtx.DbEngin.Table("t_adapter").Where("name = ?", req.Name).First(&types.AdapterInfo{}).Error
|
||||||
|
if !errors.Is(exist, gorm.ErrRecordNotFound) {
|
||||||
|
return nil, errors.New("name already exists")
|
||||||
|
}
|
||||||
|
//check type
|
||||||
|
var arr = [...]string{"0", "1", "2"}
|
||||||
|
found := false
|
||||||
|
for _, str := range arr {
|
||||||
|
if str == req.Type {
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if found == false {
|
||||||
|
return nil, errors.New("type not found")
|
||||||
|
}
|
||||||
|
|
||||||
|
//check resourceTypeDict
|
||||||
|
sql := `select t_dict_item.item_value
|
||||||
|
from t_dict
|
||||||
|
join t_dict_item on t_dict.id = t_dict_item.dict_id
|
||||||
|
where dict_code = 'adapter_type' and item_value = ?
|
||||||
|
and t_dict_item.parent_id != 0`
|
||||||
|
err = l.svcCtx.DbEngin.Raw(sql, req.ResourceType).First(&types.DictItemInfo{}).Error
|
||||||
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
|
return nil, errors.New("resourceType error, please check!")
|
||||||
|
}
|
||||||
adapter.Id = utils.GenSnowflakeIDStr()
|
adapter.Id = utils.GenSnowflakeIDStr()
|
||||||
adapter.CreateTime = time.Now().Format("2006-01-02 15:04:05")
|
adapter.CreateTime = time.Now().Format("2006-01-02 15:04:05")
|
||||||
result := l.svcCtx.DbEngin.Table("t_adapter").Create(&adapter)
|
result := l.svcCtx.DbEngin.Table("t_adapter").Create(&adapter)
|
||||||
|
|
|
@ -32,28 +32,28 @@ func (l *GetClusterSumLogic) GetClusterSum(req *types.ClusterSumReq) (resp *type
|
||||||
var vmSum int //
|
var vmSum int //
|
||||||
var TaskSum int //
|
var TaskSum int //
|
||||||
//
|
//
|
||||||
sqlStr := "SELECT COUNT(*) FROM `t_adapter` t where t.type = 0"
|
sqlStr := "SELECT COUNT(*) FROM `t_adapter` t where t.type ='0' and deleted_at is null"
|
||||||
tx := l.svcCtx.DbEngin.Raw(sqlStr).Scan(&AdapterSum)
|
tx := l.svcCtx.DbEngin.Raw(sqlStr).Scan(&AdapterSum)
|
||||||
if tx.Error != nil {
|
if tx.Error != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return nil, tx.Error
|
return nil, tx.Error
|
||||||
}
|
}
|
||||||
//vm
|
//vm
|
||||||
sqlStrVm := "SELECT COUNT(*) FROM `t_adapter` t left join t_cluster tc on t.id=tc.adapter_id where t.type='3' and tc.deleted_at is null"
|
sqlStrVm := "SELECT COUNT(*) FROM `t_adapter` t left join t_cluster tc on t.id=tc.adapter_id where t.type = '0' and t.resource_type='02' and tc.deleted_at is null"
|
||||||
txClusterVm := l.svcCtx.DbEngin.Raw(sqlStrVm).Scan(&vmSum)
|
txClusterVm := l.svcCtx.DbEngin.Raw(sqlStrVm).Scan(&vmSum)
|
||||||
if txClusterVm.Error != nil {
|
if txClusterVm.Error != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return nil, txClusterVm.Error
|
return nil, txClusterVm.Error
|
||||||
}
|
}
|
||||||
//pod
|
//pod
|
||||||
sqlStrPod := "SELECT COUNT(*) FROM `t_adapter` t left join t_cluster tc on t.id=tc.adapter_id where t.type='0' and tc.deleted_at is null"
|
sqlStrPod := "SELECT COUNT(*) FROM `t_adapter` t left join t_cluster tc on t.id=tc.adapter_id where t.type = '0' and t.resource_type='02' and tc.deleted_at is null"
|
||||||
txClusterPod := l.svcCtx.DbEngin.Raw(sqlStrPod).Scan(&podSum)
|
txClusterPod := l.svcCtx.DbEngin.Raw(sqlStrPod).Scan(&podSum)
|
||||||
if txClusterPod.Error != nil {
|
if txClusterPod.Error != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
return nil, txClusterPod.Error
|
return nil, txClusterPod.Error
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
sqlStrTask := "SELECT COUNT(*) FROM `task`"
|
sqlStrTask := "SELECT COUNT(*) FROM `task` where adapter_type_dict = '0'"
|
||||||
txTask := l.svcCtx.DbEngin.Raw(sqlStrTask).Scan(&TaskSum)
|
txTask := l.svcCtx.DbEngin.Raw(sqlStrTask).Scan(&TaskSum)
|
||||||
if txTask.Error != nil {
|
if txTask.Error != nil {
|
||||||
logx.Error(err)
|
logx.Error(err)
|
||||||
|
|
|
@ -37,12 +37,13 @@ func (l *TaskDetailsLogic) TaskDetails(req *types.FId) (resp *types.TaskDetailsR
|
||||||
switch task.AdapterTypeDict {
|
switch task.AdapterTypeDict {
|
||||||
case 0:
|
case 0:
|
||||||
l.svcCtx.DbEngin.Table("task_cloud").Select("cluster_id").Where("task_id", task.Id).Scan(&clusterIds)
|
l.svcCtx.DbEngin.Table("task_cloud").Select("cluster_id").Where("task_id", task.Id).Scan(&clusterIds)
|
||||||
|
if len(clusterIds) <= 0 {
|
||||||
|
l.svcCtx.DbEngin.Table("task_vm").Select("cluster_id").Where("task_id", task.Id).Find(&clusterIds)
|
||||||
|
}
|
||||||
case 1:
|
case 1:
|
||||||
l.svcCtx.DbEngin.Table("task_ai").Select("cluster_id").Where("task_id", task.Id).Scan(&clusterIds)
|
l.svcCtx.DbEngin.Table("task_ai").Select("cluster_id").Where("task_id", task.Id).Scan(&clusterIds)
|
||||||
case 2:
|
case 2:
|
||||||
l.svcCtx.DbEngin.Table("task_hpc").Select("cluster_id").Where("task_id", task.Id).Scan(&clusterIds)
|
l.svcCtx.DbEngin.Table("task_hpc").Select("cluster_id").Where("task_id", task.Id).Scan(&clusterIds)
|
||||||
case 3:
|
|
||||||
l.svcCtx.DbEngin.Table("task_vm").Select("cluster_id").Where("task_id", task.Id).Find(&clusterIds)
|
|
||||||
}
|
}
|
||||||
err = l.svcCtx.DbEngin.Table("t_cluster").Where("id in ?", clusterIds).Scan(&cList).Error
|
err = l.svcCtx.DbEngin.Table("t_cluster").Where("id in ?", clusterIds).Scan(&cList).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -3,6 +3,7 @@ package dictionary
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
"sort"
|
||||||
|
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
|
||||||
|
@ -38,6 +39,22 @@ func (l *ListDictItemByCodeLogic) ListDictItemByCode(req *types.DictCodeReq) (re
|
||||||
logx.Errorf("ListDictItemByCode()=> failed %s", err.Error())
|
logx.Errorf("ListDictItemByCode()=> failed %s", err.Error())
|
||||||
return nil, errors.New("description Failed to query dictionary entry data")
|
return nil, errors.New("description Failed to query dictionary entry data")
|
||||||
}
|
}
|
||||||
resp.List = dictList
|
|
||||||
|
// 找出第一级字典项,(父字典项id为0)
|
||||||
|
dictItemFormat := make([]types.DictItemInfo, 0)
|
||||||
|
for _, item := range dictList {
|
||||||
|
if item.ParentId == "0" {
|
||||||
|
dictItemFormat = append(dictItemFormat, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 排序
|
||||||
|
sort.Slice(dictItemFormat, func(i, j int) bool {
|
||||||
|
return dictItemFormat[i].SortOrder < dictItemFormat[j].SortOrder
|
||||||
|
})
|
||||||
|
|
||||||
|
// 递归找出一级路由下面的子路由
|
||||||
|
getTreeMap(dictItemFormat, dictList)
|
||||||
|
|
||||||
|
resp.List = dictItemFormat
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
|
||||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
|
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
|
||||||
|
"sort"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
||||||
|
@ -23,8 +24,6 @@ func NewListDictItemLogic(ctx context.Context, svcCtx *svc.ServiceContext) *List
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *ListDictItemLogic) ListDictItem(req *types.DictItemReq) (resp *types.PageResult, err error) {
|
func (l *ListDictItemLogic) ListDictItem(req *types.DictItemReq) (resp *types.PageResult, err error) {
|
||||||
limit := req.PageSize
|
|
||||||
offset := req.PageSize * (req.PageNum - 1)
|
|
||||||
resp = &types.PageResult{}
|
resp = &types.PageResult{}
|
||||||
var dictList []types.DictItemInfo
|
var dictList []types.DictItemInfo
|
||||||
db := l.svcCtx.DbEngin.Model(&types.DictItemInfo{}).Table("t_dict_item")
|
db := l.svcCtx.DbEngin.Model(&types.DictItemInfo{}).Table("t_dict_item")
|
||||||
|
@ -47,19 +46,43 @@ func (l *ListDictItemLogic) ListDictItem(req *types.DictItemReq) (resp *types.Pa
|
||||||
if req.DictId != "" {
|
if req.DictId != "" {
|
||||||
db = db.Where("dict_id = ?", req.DictId)
|
db = db.Where("dict_id = ?", req.DictId)
|
||||||
}
|
}
|
||||||
var total int64
|
|
||||||
err = db.Count(&total).Error
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return resp, err
|
|
||||||
}
|
|
||||||
db = db.Limit(limit).Offset(offset)
|
|
||||||
err = db.Order("sort_order").Find(&dictList).Error
|
err = db.Order("sort_order").Find(&dictList).Error
|
||||||
|
|
||||||
resp.List = dictList
|
// 找出第一级字典项,(父字典项id为0)
|
||||||
resp.PageSize = req.PageSize
|
dictItemFormat := make([]types.DictItemInfo, 0)
|
||||||
resp.PageNum = req.PageNum
|
for _, item := range dictList {
|
||||||
resp.Total = total
|
if item.ParentId == "0" {
|
||||||
|
dictItemFormat = append(dictItemFormat, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 排序
|
||||||
|
sort.Slice(dictItemFormat, func(i, j int) bool {
|
||||||
|
return dictItemFormat[i].SortOrder < dictItemFormat[j].SortOrder
|
||||||
|
})
|
||||||
|
|
||||||
|
// 递归找出一级路由下面的子路由
|
||||||
|
getTreeMap(dictItemFormat, dictList)
|
||||||
|
|
||||||
|
resp.List = dictItemFormat
|
||||||
|
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getTreeMap(dictItemFormat []types.DictItemInfo, dictItems []types.DictItemInfo) {
|
||||||
|
for index, itemF := range dictItemFormat {
|
||||||
|
for _, dictItem := range dictItems {
|
||||||
|
if itemF.Id == dictItem.ParentId {
|
||||||
|
// itemF 只是个复制值
|
||||||
|
//itemF.Children = append(itemF.Children, dictItem)
|
||||||
|
dictItemFormat[index].Children = append(dictItemFormat[index].Children, dictItem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(dictItemFormat[index].Children) > 0 {
|
||||||
|
// 排序
|
||||||
|
sort.Slice(dictItemFormat[index].Children, func(i, j int) bool {
|
||||||
|
return dictItemFormat[index].Children[i].SortOrder < dictItemFormat[index].Children[j].SortOrder
|
||||||
|
})
|
||||||
|
getTreeMap(dictItemFormat[index].Children, dictItems)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -639,40 +639,44 @@ type AppResp struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdapterQueryReq struct {
|
type AdapterQueryReq struct {
|
||||||
Id string `form:"id,optional" db:"id"`
|
Id string `form:"id,optional" db:"id"`
|
||||||
Name string `form:"name,optional"`
|
Name string `form:"name,optional"`
|
||||||
Type string `form:"type,optional"`
|
Type string `form:"type,optional"`
|
||||||
Nickname string `form:"nickname,optional"`
|
ResourceType string `form:"resourceType,optional"`
|
||||||
Version string `form:"version,optional"`
|
Nickname string `form:"nickname,optional"`
|
||||||
Server string `form:"server,optional"`
|
Version string `form:"version,optional"`
|
||||||
|
Server string `form:"server,optional"`
|
||||||
PageInfo
|
PageInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdapterRelationQueryReq struct {
|
type AdapterRelationQueryReq struct {
|
||||||
Id string `form:"id,optional" db:"id"`
|
Id string `form:"id,optional" db:"id"`
|
||||||
Name string `form:"name,optional"`
|
Name string `form:"name,optional"`
|
||||||
Type string `form:"type,optional"`
|
Type string `form:"type,optional"`
|
||||||
Nickname string `form:"nickname,optional"`
|
ResourceType string `form:"resourceType,optional"`
|
||||||
Version string `form:"version,optional"`
|
Nickname string `form:"nickname,optional"`
|
||||||
Server string `form:"server,optional"`
|
Version string `form:"version,optional"`
|
||||||
|
Server string `form:"server,optional"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdapterReq struct {
|
type AdapterReq struct {
|
||||||
Id string `json:"id,optional" db:"id"`
|
Id string `json:"id,optional" db:"id"`
|
||||||
Name string `json:"name,optional"`
|
Name string `json:"name,optional"`
|
||||||
Type string `json:"type,optional"`
|
Type string `json:"type,optional"`
|
||||||
Nickname string `json:"nickname,optional"`
|
ResourceType string `json:"resourceType,optional"`
|
||||||
Version string `json:"version,optional"`
|
Nickname string `json:"nickname,optional"`
|
||||||
Server string `json:"server,optional"`
|
Version string `json:"version,optional"`
|
||||||
|
Server string `json:"server,optional"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdapterCreateReq struct {
|
type AdapterCreateReq struct {
|
||||||
Id string `json:"id,optional" db:"id"`
|
Id string `json:"id,optional" db:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Nickname string `json:"nickname"`
|
ResourceType string `json:"resourceType"`
|
||||||
Version string `json:"version"`
|
Nickname string `json:"nickname"`
|
||||||
Server string `json:"server"`
|
Version string `json:"version"`
|
||||||
|
Server string `json:"server"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdapterDelReq struct {
|
type AdapterDelReq struct {
|
||||||
|
@ -680,13 +684,14 @@ type AdapterDelReq struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdapterInfo struct {
|
type AdapterInfo struct {
|
||||||
Id string `json:"id,omitempty" db:"id"`
|
Id string `json:"id,omitempty" db:"id"`
|
||||||
Name string `json:"name,omitempty" db:"name"`
|
Name string `json:"name,omitempty" db:"name"`
|
||||||
Type string `json:"type,omitempty" db:"type"`
|
Type string `json:"type,omitempty" db:"type"`
|
||||||
Nickname string `json:"nickname,omitempty" db:"nickname"`
|
ResourceType string `json:"resourceType,omitempty" db:"resource_type"`
|
||||||
Version string `json:"version,omitempty" db:"version"`
|
Nickname string `json:"nickname,omitempty" db:"nickname"`
|
||||||
Server string `json:"server,omitempty" db:"server"`
|
Version string `json:"version,omitempty" db:"version"`
|
||||||
CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"`
|
Server string `json:"server,omitempty" db:"server"`
|
||||||
|
CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdapterResp struct {
|
type AdapterResp struct {
|
||||||
|
@ -702,14 +707,15 @@ type AdapterRelationResp struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type AdapterRelation struct {
|
type AdapterRelation struct {
|
||||||
Id string `json:"id,omitempty" db:"id"`
|
Id string `json:"id,omitempty" db:"id"`
|
||||||
Name string `json:"name,omitempty" db:"name"`
|
Name string `json:"name,omitempty" db:"name"`
|
||||||
Type string `json:"type,omitempty" db:"type"`
|
Type string `json:"type,omitempty" db:"type"`
|
||||||
Nickname string `json:"nickname,omitempty" db:"nickname"`
|
ResourceType string `json:"resourceType" db:"resource_type"`
|
||||||
Version string `json:"version,omitempty" db:"version"`
|
Nickname string `json:"nickname,omitempty" db:"nickname"`
|
||||||
Server string `json:"server,omitempty" db:"server"`
|
Version string `json:"version,omitempty" db:"version"`
|
||||||
CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"`
|
Server string `json:"server,omitempty" db:"server"`
|
||||||
Clusters []*ClusterInfo `json:"clusters,omitempty"`
|
CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"`
|
||||||
|
Clusters []*ClusterInfo `json:"clusters,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ClusterReq struct {
|
type ClusterReq struct {
|
||||||
|
@ -734,6 +740,7 @@ type ClusterReq struct {
|
||||||
Type string `form:"type,optional"`
|
Type string `form:"type,optional"`
|
||||||
ProducerDict string `form:"producerDict,optional"`
|
ProducerDict string `form:"producerDict,optional"`
|
||||||
RegionDict string `form:"regionDict,optional"`
|
RegionDict string `form:"regionDict,optional"`
|
||||||
|
ResourceType string `form:"resourceType,optional"`
|
||||||
PageInfo
|
PageInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -882,15 +889,16 @@ type Dicts struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type DictItemInfo struct {
|
type DictItemInfo struct {
|
||||||
Id string `json:"id,omitempty"`
|
Id string `json:"id,omitempty"`
|
||||||
DictId string `json:"dictId,omitempty"`
|
DictId string `json:"dictId,omitempty"`
|
||||||
ItemText string `json:"itemText,omitempty"`
|
ItemText string `json:"itemText,omitempty"`
|
||||||
ItemValue string `json:"itemValue,omitempty"`
|
ItemValue string `json:"itemValue,omitempty"`
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
SortOrder string `json:"sortOrder,omitempty"`
|
SortOrder string `json:"sortOrder,omitempty"`
|
||||||
ParentId string `json:"parentId,omitempty"`
|
ParentId string `json:"parentId,omitempty"`
|
||||||
Status string `json:"status,omitempty" db:"status"`
|
Status string `json:"status,omitempty" db:"status"`
|
||||||
CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
||||||
|
Children []DictItemInfo `json:"children,omitempty" gorm:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DictItemReq struct {
|
type DictItemReq struct {
|
||||||
|
@ -903,7 +911,6 @@ type DictItemReq struct {
|
||||||
Type string `form:"type,optional"`
|
Type string `form:"type,optional"`
|
||||||
ParentId string `form:"parentId,optional"`
|
ParentId string `form:"parentId,optional"`
|
||||||
Status string `form:"status,optional"`
|
Status string `form:"status,optional"`
|
||||||
PageInfo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type DictItemEditReq struct {
|
type DictItemEditReq struct {
|
||||||
|
|
Loading…
Reference in New Issue