mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
[REV] Update swagger
This commit is contained in:
parent
f156e4592c
commit
a1a6414bc1
@ -6864,6 +6864,14 @@
|
||||
"ftp_username": {
|
||||
"type": "string",
|
||||
"x-go-name": "FTPUserName"
|
||||
},
|
||||
"inner_registry": {
|
||||
"type": "string",
|
||||
"x-go-name": "InnerRegistry"
|
||||
},
|
||||
"outer_registry": {
|
||||
"type": "string",
|
||||
"x-go-name": "OuterRegistry"
|
||||
}
|
||||
},
|
||||
"x-go-package": "github.com/goodrain/rainbond/pkg/api/model"
|
||||
|
@ -69,7 +69,7 @@ func (s *ServiceAction) ServiceCheck(scs *api_model.ServiceCheckStruct) (string,
|
||||
//GetServiceCheckInfo 获取应用源检测信息
|
||||
func (s *ServiceAction) GetServiceCheckInfo(uuid string)(*exector.ServiceCheckResult, *util.APIHandleError) {
|
||||
k := fmt.Sprintf("/servicecheck/%s", uuid)
|
||||
si := exector.ServiceCheckResult
|
||||
var si exector.ServiceCheckResult
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10 * time.Second)
|
||||
resp, err := s.EtcdCli.Get(ctx, k)
|
||||
cancel()
|
||||
@ -78,11 +78,11 @@ func (s *ServiceAction) GetServiceCheckInfo(uuid string)(*exector.ServiceCheckRe
|
||||
return nil, util.CreateAPIHandleError(500, err)
|
||||
}
|
||||
if resp.Count == 0 {
|
||||
return si, nil
|
||||
return &si, nil
|
||||
}
|
||||
v := resp.Kvs[0].Value
|
||||
if err := ffjson.Unmarshal(v, &si); err != nil {
|
||||
return nil, util.CreateAPIHandleError(500, err)
|
||||
}
|
||||
return si, nil
|
||||
return &si, nil
|
||||
}
|
Loading…
Reference in New Issue
Block a user