diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common/tokenService.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common/tokenService.go index f71622f9..b2a1d38e 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common/tokenService.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common/tokenService.go @@ -40,6 +40,9 @@ func generateTokenMap() map[string]TokenTimePair { } for k, v := range urlMap { token, expiredAt := generateToken(jsonStr, v) + if token == "" { + continue + } tokenTimePair := TokenTimePair{ Token: token, ExpiredAt: expiredAt, @@ -67,18 +70,21 @@ func generateToken(jsonStr []byte, tokenUrl string) (string, time.Time) { func GetToken(kForToken string) string { if tokenMap[kForToken].Token == "" { - tokenMap = generateTokenMap() + return "" } tokenTimePair := tokenMap[kForToken] - if tokenTimePair.Token == "" { - return "" - } - if time.Now().After(tokenTimePair.ExpiredAt) { tokenMap = generateTokenMap() + + if tokenMap[kForToken].Token == "" { + return "" + } else { + return tokenMap[kForToken].Token + } } + return tokenTimePair.Token } diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createdatasetlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createdatasetlogic.go index 4c0b0ebf..a71c8653 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createdatasetlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createdatasetlogic.go @@ -6,7 +6,9 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" "PCM/common/tool" "context" + "errors" "github.com/zeromicro/go-zero/core/logx" + "log" ) type CreateDataSetLogic struct { @@ -30,6 +32,10 @@ func (l *CreateDataSetLogic) CreateDataSet(in *octopus.CreateDataSetReq) (*octop var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.CreateDataSet token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createdatasetversionlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createdatasetversionlogic.go index 3764ade8..cab68be7 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createdatasetversionlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createdatasetversionlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *CreateDataSetVersionLogic) CreateDataSetVersion(in *octopus.CreateDataS var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.CreateDataSetVersion token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createimagelogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createimagelogic.go index 4c7b0c07..91caf1bd 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createimagelogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createimagelogic.go @@ -6,6 +6,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" "PCM/common/tool" "context" + "errors" + "log" "github.com/zeromicro/go-zero/core/logx" ) @@ -31,6 +33,10 @@ func (l *CreateImageLogic) CreateImage(in *octopus.CreateImageReq) (*octopus.Cre var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.CreateImage token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createmodeldeploylogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createmodeldeploylogic.go index 192e41fc..fd503ad0 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createmodeldeploylogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createmodeldeploylogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -33,6 +35,10 @@ func (l *CreateModelDeployLogic) CreateModelDeploy(in *octopus.CreateModelDeploy var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.CreateModelDeploy token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createmyalgorithmlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createmyalgorithmlogic.go index 3afb5863..08237334 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createmyalgorithmlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createmyalgorithmlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *CreateMyAlgorithmLogic) CreateMyAlgorithm(in *octopus.CreateMyAlgorithm var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.CreateMyAlgorithm token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createnotebooklogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createnotebooklogic.go index 585f307e..b172dca2 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createnotebooklogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createnotebooklogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *CreateNotebookLogic) CreateNotebook(in *octopus.CreateNotebookReq) (*oc var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.CreateNotebook token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createtrainjoblogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createtrainjoblogic.go index 316c2590..7f7657a1 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createtrainjoblogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/createtrainjoblogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -33,6 +35,10 @@ func (l *CreateTrainJobLogic) CreateTrainJob(in *octopus.CreateTrainJobReq) (*oc var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.CreateTrainJob token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletedatasetlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletedatasetlogic.go index c8d135cb..ee947cb8 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletedatasetlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletedatasetlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *DeleteDataSetLogic) DeleteDataSet(in *octopus.DeleteDataSetReq) (*octop var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteDataSet token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletedatasetversionlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletedatasetversionlogic.go index 07202690..b8c1acd6 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletedatasetversionlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletedatasetversionlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *DeleteDataSetVersionLogic) DeleteDataSetVersion(in *octopus.DeleteDataS var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteDataSetVersion token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deleteimagelogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deleteimagelogic.go index 5c56ae0a..7069e275 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deleteimagelogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deleteimagelogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *DeleteImageLogic) DeleteImage(in *octopus.DeleteImageReq) (*octopus.Del var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteImage token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemodeldeploylogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemodeldeploylogic.go index f4f8cffc..e9b93e2d 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemodeldeploylogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemodeldeploylogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *DeleteModelDeployLogic) DeleteModelDeploy(in *octopus.DeleteModelDeploy var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteModelDeploy token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } var queryStr string for _, s := range in.GetJobIds() { diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemodelversionlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemodelversionlogic.go index 884dbfd7..76b15e76 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemodelversionlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemodelversionlogic.go @@ -6,6 +6,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" "PCM/common/tool" "context" + "errors" + "log" "github.com/zeromicro/go-zero/core/logx" ) @@ -31,6 +33,10 @@ func (l *DeleteModelVersionLogic) DeleteModelVersion(in *octopus.DeleteModelVers var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteModelVersion token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemyalgorithmlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemyalgorithmlogic.go index 5b528960..b658a7b9 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemyalgorithmlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemyalgorithmlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *DeleteMyAlgorithmLogic) DeleteMyAlgorithm(in *octopus.DeleteMyAlgorithm var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteMyAlgorithm token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemymodellogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemymodellogic.go index a9ea4a9c..67ade2e1 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemymodellogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletemymodellogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *DeleteMyModelLogic) DeleteMyModel(in *octopus.DeleteMyModelReq) (*octop var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteMyModel token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletenotebooklogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletenotebooklogic.go index 61696497..355ca4bc 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletenotebooklogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletenotebooklogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *DeleteNotebookLogic) DeleteNotebook(in *octopus.DeleteNotebookReq) (*oc var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteNotebook token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletetrainjoblogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletetrainjoblogic.go index 48367b66..36b87b41 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletetrainjoblogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/deletetrainjoblogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,11 @@ func (l *DeleteTrainJobLogic) DeleteTrainJob(in *octopus.DeleteTrainJobReq) (*oc var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteTrainJob token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } + req := tool.GetACHttpRequest() var queryStr string diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/downloadalgorithmlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/downloadalgorithmlogic.go index 183d3aea..9ea620ea 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/downloadalgorithmlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/downloadalgorithmlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *DownloadAlgorithmLogic) DownloadAlgorithm(in *octopus.DownloadAlgorithm var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DownloadAlgorithm token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/downloadmodelversionlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/downloadmodelversionlogic.go index 579ac430..557b2956 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/downloadmodelversionlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/downloadmodelversionlogic.go @@ -6,6 +6,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" "PCM/common/tool" "context" + "errors" + "log" "github.com/zeromicro/go-zero/core/logx" ) @@ -31,6 +33,10 @@ func (l *DownloadModelVersionLogic) DownloadModelVersion(in *octopus.DownloadMod var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DownloadModelVersion token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmapplylistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmapplylistlogic.go index 14e99329..8ff0c98a 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmapplylistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmapplylistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetAlgorithmApplyListLogic) GetAlgorithmApplyList(in *octopus.GetAlgori var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetAlgorithmApplyList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmframeworklistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmframeworklistlogic.go index 0b661edb..9323f8b3 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmframeworklistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmframeworklistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetAlgorithmFrameworkListLogic) GetAlgorithmFrameworkList(in *octopus.G var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetAlgorithmFrameworkList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmlistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmlistlogic.go index b78c6561..82359f23 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmlistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmlistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetAlgorithmListLogic) GetAlgorithmList(in *octopus.GetAlgorithmListReq var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetAlgorithmList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmlogic.go index 3da691fe..e70af2a2 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getalgorithmlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *GetAlgorithmLogic) GetAlgorithm(in *octopus.GetAlgorithmReq) (*octopus. var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetAlgorithm token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getcomputingpowerlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getcomputingpowerlogic.go index a861d518..db94c999 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getcomputingpowerlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getcomputingpowerlogic.go @@ -70,6 +70,9 @@ func getCPFromOctopus() float32 { var computingPowerInTops int32 for k, v := range urlMap { token := common.GetToken(k) + if token == "" { + continue + } body, err := common.OctopusHttpClient("GET", v, nil, token) if err != nil { continue diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasetapplylistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasetapplylistlogic.go index ae57156c..832ffd79 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasetapplylistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasetapplylistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetDatasetApplyListLogic) GetDatasetApplyList(in *octopus.GetDatasetApp var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetDatasetApplyList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasettypelistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasettypelistlogic.go index 5dcb148d..27a9333c 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasettypelistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasettypelistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetDatasetTypeListLogic) GetDatasetTypeList(in *octopus.GetDatasetTypeL var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetDatasetTypeList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasetversionlistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasetversionlistlogic.go index c953802e..18c05e87 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasetversionlistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getdatasetversionlistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetDatasetVersionListLogic) GetDatasetVersionList(in *octopus.GetDatase var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetDatasetVersionList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getgeneralinfologic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getgeneralinfologic.go index 1e02bc4d..9b85bd6c 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getgeneralinfologic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getgeneralinfologic.go @@ -89,6 +89,9 @@ func getGeneralInfoFromOctopus() (int32, int32) { var memoryInGib int32 for k, v := range urlMap { token := common.GetToken(k) + if token == "" { + continue + } body, err := common.OctopusHttpClient("GET", v, nil, token) if err != nil { continue diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeployeventlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeployeventlogic.go index 78fc6877..95b24444 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeployeventlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeployeventlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetModelDeployEventLogic) GetModelDeployEvent(in *octopus.GetModelDeplo var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetModelDeployEvent token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeploylistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeploylistlogic.go index a93e6e31..6f594bc1 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeploylistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeploylistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetModelDeployListLogic) GetModelDeployList(in *octopus.GetModelDeployL var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetModelDeployList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeploylogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeploylogic.go index 8e33c949..70fe0cdb 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeploylogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodeldeploylogic.go @@ -6,6 +6,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" "PCM/common/tool" "context" + "errors" + "log" "github.com/zeromicro/go-zero/core/logx" ) @@ -31,6 +33,10 @@ func (l *GetModelDeployLogic) GetModelDeploy(in *octopus.GetModelDeployReq) (*oc var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetModelDeploy token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodelversionlistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodelversionlistlogic.go index 5f5d9a06..6c6e331e 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodelversionlistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmodelversionlistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetModelVersionListLogic) GetModelVersionList(in *octopus.GetModelVersi var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetModelVersionList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmyalgorithmlistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmyalgorithmlistlogic.go index ad71dd68..2fbf5e48 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmyalgorithmlistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmyalgorithmlistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -34,6 +36,10 @@ func (l *GetMyAlgorithmListLogic) GetMyAlgorithmList(in *octopus.GetMyAlgorithmL var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetMyAlgorithmList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmydatasetlistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmydatasetlistlogic.go index 1bed0603..84a783c7 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmydatasetlistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmydatasetlistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -34,6 +36,10 @@ func (l *GetMyDatasetListLogic) GetMyDatasetList(in *octopus.GetMyDatasetListReq var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetMydatasetList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmymodellistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmymodellistlogic.go index ec807e0d..1b61ff8f 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmymodellistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getmymodellistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -34,6 +36,10 @@ func (l *GetMyModelListLogic) GetMyModelList(in *octopus.GetMyModelListReq) (*oc var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetMyModelList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getnotebooklistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getnotebooklistlogic.go index 47aa355c..fa569699 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getnotebooklistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getnotebooklistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -34,6 +36,10 @@ func (l *GetNotebookListLogic) GetNotebookList(in *octopus.GetNotebookListReq) ( var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetNotebookList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getnotebooklogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getnotebooklogic.go index 3e893d8f..798f9ba7 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getnotebooklogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getnotebooklogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *GetNotebookLogic) GetNotebook(in *octopus.GetNotebookReq) (*octopus.Get var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetNotebook token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjobeventlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjobeventlogic.go index c68ac202..feb8b1ae 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjobeventlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjobeventlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetTrainJobEventLogic) GetTrainJobEvent(in *octopus.GetTrainJobEventReq var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetTrainJobEvent token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjoblistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjoblistlogic.go index 84661f82..bd6e6bcb 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjoblistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjoblistlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetTrainJobListLogic) GetTrainJobList(in *octopus.GetTrainJobListReq) ( var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetTrainJobList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjoblogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjoblogic.go index c60cbae6..4ee7653e 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjoblogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjoblogic.go @@ -6,6 +6,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" "PCM/common/tool" "context" + "errors" + "log" "github.com/zeromicro/go-zero/core/logx" ) @@ -31,6 +33,10 @@ func (l *GetTrainJobLogic) GetTrainJob(in *octopus.GetTrainJobReq) (*octopus.Get var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetTrainJob token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjobmetriclogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjobmetriclogic.go index aa5c4fe9..16576d19 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjobmetriclogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/gettrainjobmetriclogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "strconv" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" @@ -33,6 +35,10 @@ func (l *GetTrainJobMetricLogic) GetTrainJobMetric(in *octopus.GetTrainJobMetric var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetTrainJobMetric token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getuserimagelistlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getuserimagelistlogic.go index 1a79eedf..55f0a698 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getuserimagelistlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/getuserimagelistlogic.go @@ -6,6 +6,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" "PCM/common/tool" "context" + "errors" + "log" "strconv" "github.com/zeromicro/go-zero/core/logx" @@ -33,6 +35,10 @@ func (l *GetUserImageListLogic) GetUserImageList(in *octopus.GetUserImageListReq var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetUserImageList token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/infermodeldeploylogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/infermodeldeploylogic.go index f4cdb58a..5fcd6ab7 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/infermodeldeploylogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/infermodeldeploylogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *InferModelDeployLogic) InferModelDeploy(in *octopus.InferModelDeployReq var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.InferModelDeploy token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/startnotebooklogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/startnotebooklogic.go index cb179912..a69aef5e 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/startnotebooklogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/startnotebooklogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *StartNotebookLogic) StartNotebook(in *octopus.StartNotebookReq) (*octop var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.StartNotebook token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stopmodeldeploylogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stopmodeldeploylogic.go index 59135fe9..f0a2359e 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stopmodeldeploylogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stopmodeldeploylogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *StopModelDeployLogic) StopModelDeploy(in *octopus.StopModelDeployReq) ( var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.StopModelDeploy token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stopnotebooklogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stopnotebooklogic.go index 4d6646fa..35812a88 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stopnotebooklogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stopnotebooklogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *StopNotebookLogic) StopNotebook(in *octopus.StopNotebookReq) (*octopus. var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.StopNotebook token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stoptrainjoblogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stoptrainjoblogic.go index e63c9d22..2d96b562 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stoptrainjoblogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/stoptrainjoblogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *StopTrainJobLogic) StopTrainJob(in *octopus.StopTrainJobReq) (*octopus. var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.StopTrainJob token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadalgorithmconfirmlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadalgorithmconfirmlogic.go index f648062d..23804f44 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadalgorithmconfirmlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadalgorithmconfirmlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *UploadAlgorithmConfirmLogic) UploadAlgorithmConfirm(in *octopus.UploadA var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.UploadAlgorithmConfirm token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadalgorithmlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadalgorithmlogic.go index 186011d2..fe68a0e8 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadalgorithmlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadalgorithmlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *UploadAlgorithmLogic) UploadAlgorithm(in *octopus.UploadAlgorithmReq) ( var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.UploadAlgorithm token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploaddatasetconfirmlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploaddatasetconfirmlogic.go index 1173f2f2..6bb11b71 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploaddatasetconfirmlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploaddatasetconfirmlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *UploadDataSetConfirmLogic) UploadDataSetConfirm(in *octopus.UploadDataS var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.UploadDataSetConfirm token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploaddatasetlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploaddatasetlogic.go index 4dea8b20..a592ac9f 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploaddatasetlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploaddatasetlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *UploadDataSetLogic) UploadDataSet(in *octopus.UploadDataSetReq) (*octop var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.UploadDataSet token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadimageconfirmlogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadimageconfirmlogic.go index 18cd099f..0c1ba6d4 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadimageconfirmlogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadimageconfirmlogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *UploadImageConfirmLogic) UploadImageConfirm(in *octopus.UploadImageConf var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.UploadImageConfirm token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadimagelogic.go b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadimagelogic.go index 1340962e..32527fe9 100644 --- a/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadimagelogic.go +++ b/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/logic/uploadimagelogic.go @@ -4,6 +4,8 @@ import ( "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common" "PCM/common/tool" "context" + "errors" + "log" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc" "PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus" @@ -32,6 +34,10 @@ func (l *UploadImageLogic) UploadImage(in *octopus.UploadImageReq) (*octopus.Upl var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.UploadImage token := common.GetToken(in.Platform) + if token == "" { + log.Println("获取token失败, platform : ", in.Platform) + return nil, errors.New("获取token失败") + } req := tool.GetACHttpRequest() _, err := req. diff --git a/adaptor/PCM-CORE/api/Dockerfile b/adaptor/PCM-CORE/api/Dockerfile index ae22cbd6..f7ca3a2c 100644 --- a/adaptor/PCM-CORE/api/Dockerfile +++ b/adaptor/PCM-CORE/api/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.16.2 WORKDIR /home # 修改alpine源为上海交通大学 -RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g' /etc/apk/repositories && \ +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \ apk update && \ apk upgrade && \ apk add --no-cache ca-certificates && update-ca-certificates && \ diff --git a/adaptor/PCM-CORE/api/internal/config/config.go b/adaptor/PCM-CORE/api/internal/config/config.go index 4199d3da..8ffc6adb 100644 --- a/adaptor/PCM-CORE/api/internal/config/config.go +++ b/adaptor/PCM-CORE/api/internal/config/config.go @@ -39,4 +39,9 @@ type Config struct { AccessKey string Endpoint string } + + RegistryConf struct { + Username string + Password string + } } diff --git a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go index 3a62dceb..bc3bd297 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go @@ -3,6 +3,7 @@ package image import ( "PCM/adaptor/PCM-CORE/model" result2 "PCM/common/result" + "PCM/common/tool" "bufio" "context" "encoding/base64" @@ -10,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3/s3manager" types2 "github.com/docker/docker/api/types" + "github.com/zeromicro/go-zero/core/logx" "io/ioutil" "k8s.io/apimachinery/pkg/util/json" "net/http" @@ -18,6 +20,7 @@ import ( "strconv" "strings" "sync" + "time" "PCM/adaptor/PCM-CORE/api/internal/svc" ) @@ -31,8 +34,14 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { hash := r.PostFormValue("hash") name := r.PostFormValue("name") dataType := r.PostFormValue("dataType") + kind := r.PostFormValue("kind") // 对比合并请求的文件大小和已上传文件夹大小 - toSize, _ := getDirSize(filepath.Join(uploadTempPath, hash)) + toSize, err := tool.GetDirSize(filepath.Join(uploadTempPath, hash)) + if err != nil { + logx.Error(err) + result2.HttpResult(r, w, nil, err) + return + } if size != toSize { fmt.Fprintf(w, "文件上传错误") } @@ -45,11 +54,11 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { filesSort[nameArr[1]] = f.Name() } saveFile := filepath.Join(uploadPath, name) - if exists, _ := PathExists(saveFile); exists { + if exists, _ := tool.PathExists(saveFile); exists { os.Remove(saveFile) } fs, _ := os.OpenFile(saveFile, os.O_CREATE|os.O_RDWR|os.O_APPEND, os.ModeAppend|os.ModePerm) - defer fs.Close() + var wg sync.WaitGroup filesCount := len(files) if filesCount != len(filesSort) { @@ -62,7 +71,6 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { data, err := ioutil.ReadFile(fileName) fmt.Println(err) fs.Write(data) - wg.Done() } wg.Wait() @@ -70,95 +78,117 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { // 保存到数据库表里 svcCtx.DbEngin.Create(&model.File{ - Name: name, - Hash: hash, - Type: dataType, - Status: "0", - Bucket: "pcm"}) + Name: name, + Hash: hash, + DataType: dataType, + Status: "local", + Kind: kind, + Bucket: "pcm"}) // 根据数据类型按需上传(镜像推送到nexus 数据集和算法推送到云际存储) - switch dataType { + switch kind { case "image": - pushImage(svcCtx, name) + err = pushImage(svcCtx, hash, name) case "dataSet", "algorithm": - uploadStorage(svcCtx, name) - } - - err := pushImage(svcCtx, name) - if err != nil { - result2.HttpResult(r, w, nil, err) - return + err = uploadStorage(svcCtx, hash, name) } // 删除本地文件 避免占用本地存储资源 - err = os.Remove(filepath.Join(uploadPath, name)) + defer os.Remove(filepath.Join(uploadPath, name)) + defer fs.Close() result2.HttpResult(r, w, nil, err) } } -func uploadStorage(svcCtx *svc.ServiceContext, name string) error { - svcCtx.Uploader.Upload(&s3manager.UploadInput{ +// 同步数据集到modelArts +func syncDataSet() { + +} + +// 上传文件到云集存储 +func uploadStorage(svcCtx *svc.ServiceContext, hash string, name string) error { + fileInfo, err := os.Open(filepath.Join(uploadPath, name)) + if err != nil { + logx.Error(err) + return err + } + _, err = svcCtx.Uploader.Upload(&s3manager.UploadInput{ Bucket: aws.String("pcm"), Key: aws.String(name), + Body: fileInfo, }) + if err != nil { + logx.Error(err) + return err + } + // 更新数据状态 + svcCtx.DbEngin.Model(&model.File{}).Where("hash = ?", hash).Update("status", "cloud") return nil } -func pushImage(svcCtx *svc.ServiceContext, name string) error { +// 推送镜像到nexus仓库 +func pushImage(svcCtx *svc.ServiceContext, hash string, name string) error { // 加载镜像文件到docker fileInfo, err := os.Open(filepath.Join(uploadPath, name)) + if err != nil { + logx.Error(err) + return err + } defer fileInfo.Close() reader := bufio.NewReader(fileInfo) - if err != nil { - return err - } + body, err := svcCtx.DockerClient.ImageLoad(context.Background(), reader, false) + if err != nil { + logx.Error(err) return err } - bytes, err := ioutil.ReadAll(body.Body) - - loadBody := LoadBody{} - err = json.Unmarshal(bytes, &loadBody) + println(string(bytes)) if err != nil { + logx.Error(err) return err } - - imageName := strings.TrimSpace(loadBody.Stream[13:]) - privateImageName := "hub.jcce.dev:18445/" + imageName + //time.Sleep(12 * 100 * time.Millisecond) + privateImageName := "registry.cn-hangzhou.aliyuncs.com/jointcloud/pcm:" + name // 给镜像打上私有仓库的tag - err = svcCtx.DockerClient.ImageTag(context.Background(), imageName, privateImageName) + err = svcCtx.DockerClient.ImageTag(context.Background(), name, privateImageName) if err != nil { + logx.Error(err) + return err + } + // 删除原镜像 + _, err = svcCtx.DockerClient.ImageRemove(context.Background(), name, types2.ImageRemoveOptions{}) + if err != nil { + logx.Error(err) return err } // 推送镜像到registry authConfig := types2.AuthConfig{ - Username: "admin", - Password: "Nudt@123", + Username: svcCtx.Config.RegistryConf.Username, + Password: svcCtx.Config.RegistryConf.Password, } authConfigBytes, err := json.Marshal(authConfig) - authStr := base64.URLEncoding.EncodeToString(authConfigBytes) - _, err = svcCtx.DockerClient.ImagePush(context.Background(), privateImageName, types2.ImagePushOptions{RegistryAuth: authStr}) if err != nil { + logx.Error(err) return err } - println("传输完成!") + logx.Infof(fmt.Sprintln("传输开始", time.Now())) + authStr := base64.URLEncoding.EncodeToString(authConfigBytes) + pushBody, err := svcCtx.DockerClient.ImagePush(context.Background(), privateImageName, types2.ImagePushOptions{RegistryAuth: authStr}) + pushBytes, _ := ioutil.ReadAll(pushBody) + println(string(pushBytes)) + if err != nil { + logx.Error(err) + return err + } + logx.Infof(fmt.Sprintln("传输完成", time.Now())) // 删除本地镜像 避免存储资源浪费 _, err = svcCtx.DockerClient.ImageRemove(context.Background(), privateImageName, types2.ImageRemoveOptions{}) if err != nil { + logx.Error(err) return err } + // 更新数据状态 + svcCtx.DbEngin.Model(&model.File{}).Where("hash = ?", hash).Update("status", "cloud") return nil } - -// DirSize 获取整体文件夹大小 -func getDirSize(path string) (int64, error) { - var size int64 - err := filepath.Walk(path, func(_ string, info os.FileInfo, err error) error { - if !info.IsDir() { - size += info.Size() - } - return err - }) - return size, err -} diff --git a/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go b/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go index 002f3711..07da4755 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go @@ -2,8 +2,10 @@ package image import ( result2 "PCM/common/result" + "PCM/common/tool" "bufio" "fmt" + "github.com/zeromicro/go-zero/core/logx" "io" "net/http" "os" @@ -23,6 +25,11 @@ var uploadTempPath = filepath.Join(uploadPath, "temp") func UploadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { file, fileHeader, err := r.FormFile("file") + if err != nil { + logx.Error(err) + result2.HttpResult(r, w, nil, err) + return + } index := r.PostFormValue("index") hash := r.PostFormValue("hash") @@ -32,12 +39,22 @@ func UploadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { // 文件路径 filePath := filepath.Join(chunksPath, hash+"-"+index) // 检查临时文件夹是否存在 不存在则创建文件夹 - isPathExists, err := PathExists(chunksPath) + isPathExists, err := tool.PathExists(chunksPath) if !isPathExists { err = os.MkdirAll(chunksPath, os.ModePerm) + if err != nil { + logx.Error(err) + result2.HttpResult(r, w, nil, err) + return + } } // 检查文件是否存在 - exists, err := PathExists(filePath) + exists, err := tool.PathExists(filePath) + if err != nil { + logx.Error(err) + result2.HttpResult(r, w, nil, err) + return + } // 文件存在 进行断点续传 if exists { fileInfo, _ := os.Stat(filePath) @@ -86,15 +103,3 @@ func UploadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { result2.HttpResult(r, w, nil, err) } } - -// PathExists 判断文件夹是否存在 -func PathExists(path string) (bool, error) { - _, err := os.Stat(path) - if err == nil { - return true, nil - } - if os.IsNotExist(err) { - return false, nil - } - return false, err -} diff --git a/adaptor/PCM-CORE/api/internal/logic/core/getcomputingpowerlogic.go b/adaptor/PCM-CORE/api/internal/logic/core/getcomputingpowerlogic.go index c199760e..0c85b8aa 100644 --- a/adaptor/PCM-CORE/api/internal/logic/core/getcomputingpowerlogic.go +++ b/adaptor/PCM-CORE/api/internal/logic/core/getcomputingpowerlogic.go @@ -25,25 +25,70 @@ func NewGetComputingPowerLogic(ctx context.Context, svcCtx *svc.ServiceContext) } } -func (l *GetComputingPowerLogic) GetComputingPower() (resp *types.CpResp, err error) { +type client struct { +} - apiResp := types.CpResp{} +func (c *client) getComputingPower(cp computingPower, l *GetComputingPowerLogic) float32 { + return cp.GetComputing(l) +} - //启智章鱼资源算力 +type OctopusComputingPower struct { +} + +type AcComputingPower struct { +} + +type computingPower interface { + GetComputing(l *GetComputingPowerLogic) float32 +} + +// 启智章鱼资源算力 +func (cp OctopusComputingPower) GetComputing(l *GetComputingPowerLogic) float32 { octopusCpReq := &octopus.ResourceReq{} octopusCpResp, err := l.svcCtx.OctopusRpc.GetComputingPower(l.ctx, octopusCpReq) if err != nil { log.Println("OctopusRpc 算力请求失败", err) } + return octopusCpResp.POpsAtFp16 +} - //曙光账号算力 +// 曙光账号算力 +func (cp AcComputingPower) GetComputing(l *GetComputingPowerLogic) float32 { acCpReq := &hpcAC.ResourceReq{} acCpResp, err := l.svcCtx.ACRpc.GetComputingPower(l.ctx, acCpReq) if err != nil { log.Println("ACRpc 算力请求失败", err) } + return acCpResp.POpsAtFp16 +} + +func (l *GetComputingPowerLogic) GetComputingPower() (resp *types.CpResp, err error) { + + apiResp := types.CpResp{} + + c := client{} + ot := OctopusComputingPower{} + ac := AcComputingPower{} + a := c.getComputingPower(ot, l) + b := c.getComputingPower(ac, l) + + apiResp.POpsAtFp16 = a + b + ////启智章鱼资源算力 + //octopusCpReq := &octopus.ResourceReq{} + //octopusCpResp, err := l.svcCtx.OctopusRpc.GetComputingPower(l.ctx, octopusCpReq) + //if err != nil { + // log.Println("OctopusRpc 算力请求失败", err) + //} + // + ////曙光账号算力 + //acCpReq := &hpcAC.ResourceReq{} + //acCpResp, err := l.svcCtx.ACRpc.GetComputingPower(l.ctx, acCpReq) + //if err != nil { + // log.Println("ACRpc 算力请求失败", err) + //} + // + //computingPowerAggregated := acCpResp.POpsAtFp16 + octopusCpResp.POpsAtFp16 + //apiResp.POpsAtFp16 = computingPowerAggregated - computingPowerAggregated := acCpResp.POpsAtFp16 + octopusCpResp.POpsAtFp16 - apiResp.POpsAtFp16 = computingPowerAggregated return &apiResp, nil } diff --git a/adaptor/PCM-CORE/api/internal/logic/core/jobtotallogic.go b/adaptor/PCM-CORE/api/internal/logic/core/jobtotallogic.go index f3e4f4d3..e7e542bf 100644 --- a/adaptor/PCM-CORE/api/internal/logic/core/jobtotallogic.go +++ b/adaptor/PCM-CORE/api/internal/logic/core/jobtotallogic.go @@ -63,7 +63,7 @@ func (l *JobTotalLogic) JobTotal() (resp *types.JobTotalResp, err error) { for _, job := range jobs.OtJobs { trainJob := types.TrainJob{ Name: job.Name, - Status: job.Status, + Status: enum.ExternalStatus(job.Status).String(), Strategy: 0, SynergyStatus: "未协同", } diff --git a/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go b/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go index f2e2b363..859b4548 100644 --- a/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go +++ b/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go @@ -3,10 +3,7 @@ package image import ( "PCM/adaptor/PCM-CORE/api/internal/svc" "PCM/adaptor/PCM-CORE/api/internal/types" - "PCM/common/tool" "context" - "encoding/json" - "fmt" "github.com/zeromicro/go-zero/core/logx" ) @@ -30,31 +27,12 @@ func NewImageListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ImageLi } func (l *ImageListLogic) ImageList() (resp *types.ImageListResp, err error) { + var images []string + l.svcCtx.DbEngin.Raw("select distinct name from file where kind = 'image'").Scan(&images) - // 获取镜像列表 - url := fmt.Sprintf("%s/repository/%s/v2/_catalog", l.svcCtx.Config.NexusUrl, "pcm") - bytes, err := tool.HttpClient("GET", url, nil, "") - json.Unmarshal(bytes, &resp) - result := types.ImageListResp{} - for _, image := range resp.Repositories { - // 获取镜像的tag列表 - url := fmt.Sprintf("%s/repository/%s/v2/%s/tags/list", l.svcCtx.Config.NexusUrl, "pcm", image) - bytes, err := tool.HttpClient("GET", url, nil, "") - if err != nil { - return nil, err - } - tags := ImageTags{} - json.Unmarshal(bytes, &tags) - // 拼接镜像名称 - for _, tag := range tags.Tags { - var name string - if tag != "latest" { - name = "hub.jcce.dev:18445/" + image + ":" + tag - } else { - name = "hub.jcce.dev:18445/" + image - } - result.Repositories = append(result.Repositories, name) - } + result := types.ImageListResp{ + Repositories: images, } + return &result, nil } diff --git a/adaptor/PCM-CORE/model/file.go b/adaptor/PCM-CORE/model/file.go index 0f0e2371..e878452b 100644 --- a/adaptor/PCM-CORE/model/file.go +++ b/adaptor/PCM-CORE/model/file.go @@ -13,14 +13,14 @@ import "time" // class:HongMouer.HIS.Models.DataSet // version:2023-05-06 09:58 type File struct { - Id *int `gorm:"column:id" json:"Id"` //type:*int comment:id version:2023-05-06 09:58 - Name string `gorm:"column:name" json:"Name"` //type:string comment:文件名称 version:2023-05-06 09:58 - Type string `gorm:"column:type" json:"Type"` //type:string comment: version:2023-05-06 09:58 + Id *int `gorm:"column:id" json:"Id"` //type:*int comment:id version:2023-05-06 09:58 + Name string `gorm:"column:name" json:"Name"` //type:string comment:文件名称 version:2023-05-06 09:58 + Kind string `gorm:"column:kind" json:"Kind"` + DataType string `gorm:"column:data_type" json:"dataType"` //type:string comment: version:2023-05-06 09:58 Suffix string `gorm:"column:suffix" json:"Suffix"` //type:string comment:后缀名 version:2023-05-06 09:58 Bucket string `gorm:"column:bucket" json:"Bucket"` //type:string comment:桶 version:2023-05-06 09:58 Hash string `gorm:"column:hash" json:"Hash"` //type:string comment:hash version:2023-05-06 09:58 Status string `gorm:"column:status" json:"Status"` //type:string comment:hash version:2023-05-06 09:58 - Size int64 `gorm:"column:size" json:"Size"` //type:*int comment:大小 version:2023-05-06 09:58 DeletedFlag *int `gorm:"column:deleted_flag" json:"DeletedFlag"` //type:*int comment:是否删除 version:2023-05-06 09:58 CreatedBy *int `gorm:"column:created_by" json:"CreatedBy"` //type:*int comment:创建人 version:2023-05-06 09:58 CreatedTime *time.Time `gorm:"column:created_time" json:"CreatedTime"` //type:*time.Time comment:创建时间 version:2023-05-06 09:58 diff --git a/adaptor/PCM-FC/PCM-SCF/READM.md b/adaptor/PCM-FC/PCM-SCF/READM.md index fe0e88a5..79d6612f 100644 --- a/adaptor/PCM-FC/PCM-SCF/READM.md +++ b/adaptor/PCM-FC/PCM-SCF/READM.md @@ -2,11 +2,21 @@ ### 腾讯云SCF 常用的 API 如下,更多 API 可参考 [API 文档](https://cloud.tencent.com/document/product/583/17234) +| 接口名称 | 接口功能 | +| ------------------------------------------------------------ | ---------------- | +| [CreateFunction](https://cloud.tencent.com/document/api/583/18586) | 创建函数 | +| [DeleteFunction](https://cloud.tencent.com/document/api/583/18585) | 删除函数 | +| [GetFunction](https://cloud.tencent.com/document/api/583/18584) | 获取函数详细信息 | +| [Invoke](https://cloud.tencent.com/document/api/583/17243) | 运行函数 | +| [ListFunctions](https://cloud.tencent.com/document/api/583/18582) | 获取函数列表 | +| [UpdateFunctionCode](https://cloud.tencent.com/document/api/583/18581) | 更新函数代码 | +| [UpdateFunctionConfiguration](https://cloud.tencent.com/document/api/583/18580) | 更新函数配置 | + > 接口对接进度 - [ ] CreateFunction 创建函数 - [ ] DeleteFunction 删除函数 -- [ ] GetFunction 获取函数详细信息 +- [x] GetFunction 获取函数详细信息 - [ ] Invoke 运行函数 - [x] ListFunctions 获取函数列表 - [ ] UpdateFunctionCode 更新函数代码 diff --git a/adaptor/PCM-FC/PCM-SCF/internal/logic/getfunctionslogic.go b/adaptor/PCM-FC/PCM-SCF/internal/logic/getfunctionslogic.go new file mode 100644 index 00000000..003df8e8 --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/internal/logic/getfunctionslogic.go @@ -0,0 +1,52 @@ +package logic + +import ( + "PCM/common/tool" + "context" + "fmt" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" + tscf "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf/v20180416" + + "PCM/adaptor/PCM-FC/PCM-SCF/internal/svc" + "PCM/adaptor/PCM-FC/PCM-SCF/scf" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetFunctionsLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetFunctionsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetFunctionsLogic { + return &GetFunctionsLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// GetFunctions 查询腾讯云云函数详情 +func (l *GetFunctionsLogic) GetFunctions(in *scf.GetFunctionsReq) (*scf.GetFunctionsResp, error) { + resp := &scf.GetFunctionsResp{} + // 实例化要请求产品的client对象,clientProfile是可选的k + client, _ := tscf.NewClient(l.svcCtx.Credential, in.Region, l.svcCtx.Cpf) + // 实例化一个请求对象,每个接口都会对应一个request对象 + request := tscf.NewGetFunctionRequest() + + request.FunctionName = common.StringPtr(in.FunctionName) + + // 返回的resp是一个GetFunctionResponse的实例,与请求对象对应 + response, err := client.GetFunction(request) + if _, ok := err.(*errors.TencentCloudSDKError); ok { + fmt.Printf("An API error has returned: %s", err) + return nil, nil + } + if err != nil { + panic(err) + } + tool.Convert(response.Response, &resp.Response) + return resp, nil +} diff --git a/adaptor/PCM-FC/PCM-SCF/internal/logic/listfunctionslogic.go b/adaptor/PCM-FC/PCM-SCF/internal/logic/listfunctionslogic.go index a79b5b8f..1b3fa46d 100644 --- a/adaptor/PCM-FC/PCM-SCF/internal/logic/listfunctionslogic.go +++ b/adaptor/PCM-FC/PCM-SCF/internal/logic/listfunctionslogic.go @@ -7,7 +7,6 @@ import ( "context" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" tscf "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf/v20180416" "github.com/zeromicro/go-zero/core/logx" ) @@ -26,15 +25,11 @@ func NewListFunctionsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Lis } } -// 查询腾讯云云函数列表 +// ListFunctions 查询腾讯云云函数列表 func (l *ListFunctionsLogic) ListFunctions(in *scf.ListFunctionsReq) (*scf.ListFunctionsResp, error) { resp := &scf.ListFunctionsResp{} - // 实例化一个client选项,可选的,没有特殊需求可以跳过 - cpf := profile.NewClientProfile() - //请求域名,表示用户的接入地域,默认就近接入 - cpf.HttpProfile.Endpoint = "scf.tencentcloudapi.com" - // 实例化要请求产品的client对象,clientProfile是可选的 - client, _ := tscf.NewClient(l.svcCtx.Credential, in.Region, cpf) + // 实例化要请求产品的client对象,clientProfile是可选的k + client, _ := tscf.NewClient(l.svcCtx.Credential, in.Region, l.svcCtx.Cpf) // 实例化一个请求对象,每个接口都会对应一个request对象 request := tscf.NewListFunctionsRequest() diff --git a/adaptor/PCM-FC/PCM-SCF/internal/server/scfserver.go b/adaptor/PCM-FC/PCM-SCF/internal/server/scfserver.go index c55b8f29..a5148ac3 100644 --- a/adaptor/PCM-FC/PCM-SCF/internal/server/scfserver.go +++ b/adaptor/PCM-FC/PCM-SCF/internal/server/scfserver.go @@ -22,8 +22,14 @@ func NewScfServer(svcCtx *svc.ServiceContext) *ScfServer { } } -// 查询腾讯云云函数列表 +// ListFunctions 查询腾讯云云函数列表 func (s *ScfServer) ListFunctions(ctx context.Context, in *scf.ListFunctionsReq) (*scf.ListFunctionsResp, error) { l := logic.NewListFunctionsLogic(ctx, s.svcCtx) return l.ListFunctions(in) } + +// GetFunctions 查询腾讯云云函数详情 +func (s *ScfServer) GetFunctions(ctx context.Context, in *scf.GetFunctionsReq) (*scf.GetFunctionsResp, error) { + l := logic.NewGetFunctionsLogic(ctx, s.svcCtx) + return l.GetFunctions(in) +} diff --git a/adaptor/PCM-FC/PCM-SCF/internal/svc/servicecontext.go b/adaptor/PCM-FC/PCM-SCF/internal/svc/servicecontext.go index 77088ce8..ef78f417 100644 --- a/adaptor/PCM-FC/PCM-SCF/internal/svc/servicecontext.go +++ b/adaptor/PCM-FC/PCM-SCF/internal/svc/servicecontext.go @@ -3,11 +3,13 @@ package svc import ( "PCM/adaptor/PCM-FC/PCM-SCF/internal/config" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile" ) type ServiceContext struct { Config config.Config Credential *common.Credential + Cpf *profile.ClientProfile } func NewServiceContext(c config.Config) *ServiceContext { @@ -17,8 +19,14 @@ func NewServiceContext(c config.Config) *ServiceContext { c.SecretConfig.SecretKey, ) + // 实例化一个client选项,可选的,没有特殊需求可以跳过 + cpf := profile.NewClientProfile() + //请求域名,表示用户的接入地域,默认就近接入 + cpf.HttpProfile.Endpoint = "scf.tencentcloudapi.com" + return &ServiceContext{ Credential: credential, Config: c, + Cpf: cpf, } } diff --git a/adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto b/adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto index 999cb183..ea00199e 100644 --- a/adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto +++ b/adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto @@ -3,6 +3,167 @@ syntax = "proto3"; package scf; option go_package = "/scf"; +message GetFunctionsReq { + string functionName = 1; + string qualifier = 2; + string namespace = 3; + string showCode = 4; + string region = 5; +} + +message Triggers { + string ModTime = 1; + string Type = 2; + string TriggerDesc = 3; + string TriggerName = 4; + string AddTime = 5; + uint32 Enable = 6; + string CustomArgument = 7; + string AvailableStatus = 8; + string ResourceId = 9; + string BindStatus = 10; + string TriggerAttribute = 11; + string Qualifier = 12; + string Description = 13; +} + +message Vpcconfig { + string VpcId = 1; + string SubnetId = 2; +} + +message Variables { + string Key = 1; + string Value = 2; +} + +message Environment { + repeated Variables Variables = 1; +} + +message Tags { + string Key = 1; + string Value = 2; +} + +message Eipconfig { + string EipFixed = 1; + repeated string Eips = 2; +} + +message Accessinfo { + string Host = 1; + string Vip = 2; +} + +message Layers { + repeated string CompatibleRuntimes = 1; + string AddTime = 2; + string Description = 3; + string LicenseInfo = 4; + uint32 LayerVersion = 5; + string LayerName = 6; + string Status = 7; + string Stamp = 8; +} + +message Deadletterconfig { + string Type = 1; + string Name = 2; + string FilterType = 3; +} + +message Eipconfig1 { + string EipStatus = 1; + repeated string EipAddress = 2; +} + +message Publicnetconfig { + string PublicNetStatus = 1; + Eipconfig1 EipConfig = 2; +} + +message Cfsinslist { + string UserId = 1; + string UserGroupId = 2; + string CfsId = 3; + string MountInsId = 4; + string LocalMountDir = 5; + string RemoteMountDir = 6; + string IpAddress = 7; + string MountVpcId = 8; + string MountSubnetId = 9; +} + +message Cfsconfig { + repeated Cfsinslist CfsInsList = 1; +} + +message Statusreasons { + string ErrorCode = 1; + string ErrorMessage = 2; +} + +message Wsparams { + uint32 IdleTimeOut = 1; +} + +message Protocolparams { + Wsparams WSParams = 1; +} + +message GetFunctionsResp { + GetFunctionsResponse Response = 1; +} + +message GetFunctionsResponse { + string ModTime = 1; + string CodeInfo = 2; + string Description = 3; + repeated Triggers Triggers = 4; + string Handler = 5; + uint32 CodeSize = 6; + uint32 Timeout = 7; + string FunctionVersion = 8; + uint32 MemorySize = 9; + string Runtime = 10; + string FunctionName = 11; + Vpcconfig VpcConfig = 12; + string UseGpu = 13; + Environment Environment = 14; + string CodeResult = 15; + string CodeError = 16; + uint32 ErrNo = 17; + string Namespace = 18; + string Role = 19; + string InstallDependency = 20; + string Status = 21; + string StatusDesc = 22; + string ClsLogsetId = 23; + string ClsTopicId = 24; + string FunctionId = 25; + repeated Tags Tags = 26; + Eipconfig EipConfig = 27; + Accessinfo AccessInfo = 28; + string Type = 29; + string L5Enable = 30; + repeated Layers Layers = 31; + Deadletterconfig DeadLetterConfig = 32; + string AddTime = 33; + Publicnetconfig PublicNetConfig = 34; + string OnsEnable = 35; + Cfsconfig CfsConfig = 36; + string AvailableStatus = 37; + string Qualifier = 38; + uint32 InitTimeout = 39; + repeated Statusreasons StatusReasons = 40; + string AsyncRunEnable = 41; + string TraceEnable = 42; + string ProtocolType = 43; + Protocolparams ProtocolParams = 44; + string RequestId = 45; +} + message ListFunctionsReq { string order = 1; string orderby = 2; @@ -22,7 +183,7 @@ message Filters { message ListFunctionsResp { - Response response = 1; + ListFunctionsResponse Response = 1; } message Functions { @@ -44,17 +205,20 @@ message Functions { string type = 16; } -message Response { +message ListFunctionsResponse { repeated Functions functions = 1; string requestId = 2; int32 totalCount = 3; } -// scf +// scf 腾讯云函数 service Scf { - //查询腾讯云云函数列表 + //ListFunctions 查询腾讯云云函数列表 rpc ListFunctions(ListFunctionsReq) returns (ListFunctionsResp); + //GetFunctions 查询腾讯云云函数详情 + rpc GetFunctions(GetFunctionsReq) returns (GetFunctionsResp); + } diff --git a/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go b/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go index 9cf29a8c..9ed803e6 100644 --- a/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go +++ b/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 -// protoc v3.21.12 +// protoc v4.23.4 // source: pb/pcm-scf.proto package scf @@ -20,6 +20,1579 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type GetFunctionsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FunctionName string `protobuf:"bytes,1,opt,name=functionName,proto3" json:"functionName,omitempty"` + Qualifier string `protobuf:"bytes,2,opt,name=qualifier,proto3" json:"qualifier,omitempty"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + ShowCode string `protobuf:"bytes,4,opt,name=showCode,proto3" json:"showCode,omitempty"` + Region string `protobuf:"bytes,5,opt,name=region,proto3" json:"region,omitempty"` +} + +func (x *GetFunctionsReq) Reset() { + *x = GetFunctionsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFunctionsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFunctionsReq) ProtoMessage() {} + +func (x *GetFunctionsReq) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFunctionsReq.ProtoReflect.Descriptor instead. +func (*GetFunctionsReq) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{0} +} + +func (x *GetFunctionsReq) GetFunctionName() string { + if x != nil { + return x.FunctionName + } + return "" +} + +func (x *GetFunctionsReq) GetQualifier() string { + if x != nil { + return x.Qualifier + } + return "" +} + +func (x *GetFunctionsReq) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetFunctionsReq) GetShowCode() string { + if x != nil { + return x.ShowCode + } + return "" +} + +func (x *GetFunctionsReq) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +type Triggers struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModTime string `protobuf:"bytes,1,opt,name=ModTime,proto3" json:"ModTime,omitempty"` + Type string `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"` + TriggerDesc string `protobuf:"bytes,3,opt,name=TriggerDesc,proto3" json:"TriggerDesc,omitempty"` + TriggerName string `protobuf:"bytes,4,opt,name=TriggerName,proto3" json:"TriggerName,omitempty"` + AddTime string `protobuf:"bytes,5,opt,name=AddTime,proto3" json:"AddTime,omitempty"` + Enable uint32 `protobuf:"varint,6,opt,name=Enable,proto3" json:"Enable,omitempty"` + CustomArgument string `protobuf:"bytes,7,opt,name=CustomArgument,proto3" json:"CustomArgument,omitempty"` + AvailableStatus string `protobuf:"bytes,8,opt,name=AvailableStatus,proto3" json:"AvailableStatus,omitempty"` + ResourceId string `protobuf:"bytes,9,opt,name=ResourceId,proto3" json:"ResourceId,omitempty"` + BindStatus string `protobuf:"bytes,10,opt,name=BindStatus,proto3" json:"BindStatus,omitempty"` + TriggerAttribute string `protobuf:"bytes,11,opt,name=TriggerAttribute,proto3" json:"TriggerAttribute,omitempty"` + Qualifier string `protobuf:"bytes,12,opt,name=Qualifier,proto3" json:"Qualifier,omitempty"` + Description string `protobuf:"bytes,13,opt,name=Description,proto3" json:"Description,omitempty"` +} + +func (x *Triggers) Reset() { + *x = Triggers{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Triggers) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Triggers) ProtoMessage() {} + +func (x *Triggers) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Triggers.ProtoReflect.Descriptor instead. +func (*Triggers) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{1} +} + +func (x *Triggers) GetModTime() string { + if x != nil { + return x.ModTime + } + return "" +} + +func (x *Triggers) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Triggers) GetTriggerDesc() string { + if x != nil { + return x.TriggerDesc + } + return "" +} + +func (x *Triggers) GetTriggerName() string { + if x != nil { + return x.TriggerName + } + return "" +} + +func (x *Triggers) GetAddTime() string { + if x != nil { + return x.AddTime + } + return "" +} + +func (x *Triggers) GetEnable() uint32 { + if x != nil { + return x.Enable + } + return 0 +} + +func (x *Triggers) GetCustomArgument() string { + if x != nil { + return x.CustomArgument + } + return "" +} + +func (x *Triggers) GetAvailableStatus() string { + if x != nil { + return x.AvailableStatus + } + return "" +} + +func (x *Triggers) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *Triggers) GetBindStatus() string { + if x != nil { + return x.BindStatus + } + return "" +} + +func (x *Triggers) GetTriggerAttribute() string { + if x != nil { + return x.TriggerAttribute + } + return "" +} + +func (x *Triggers) GetQualifier() string { + if x != nil { + return x.Qualifier + } + return "" +} + +func (x *Triggers) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type Vpcconfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VpcId string `protobuf:"bytes,1,opt,name=VpcId,proto3" json:"VpcId,omitempty"` + SubnetId string `protobuf:"bytes,2,opt,name=SubnetId,proto3" json:"SubnetId,omitempty"` +} + +func (x *Vpcconfig) Reset() { + *x = Vpcconfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Vpcconfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Vpcconfig) ProtoMessage() {} + +func (x *Vpcconfig) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Vpcconfig.ProtoReflect.Descriptor instead. +func (*Vpcconfig) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{2} +} + +func (x *Vpcconfig) GetVpcId() string { + if x != nil { + return x.VpcId + } + return "" +} + +func (x *Vpcconfig) GetSubnetId() string { + if x != nil { + return x.SubnetId + } + return "" +} + +type Variables struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` +} + +func (x *Variables) Reset() { + *x = Variables{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Variables) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Variables) ProtoMessage() {} + +func (x *Variables) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Variables.ProtoReflect.Descriptor instead. +func (*Variables) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{3} +} + +func (x *Variables) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Variables) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Environment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variables []*Variables `protobuf:"bytes,1,rep,name=Variables,proto3" json:"Variables,omitempty"` +} + +func (x *Environment) Reset() { + *x = Environment{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Environment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Environment) ProtoMessage() {} + +func (x *Environment) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Environment.ProtoReflect.Descriptor instead. +func (*Environment) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{4} +} + +func (x *Environment) GetVariables() []*Variables { + if x != nil { + return x.Variables + } + return nil +} + +type Tags struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` +} + +func (x *Tags) Reset() { + *x = Tags{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tags) ProtoMessage() {} + +func (x *Tags) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tags.ProtoReflect.Descriptor instead. +func (*Tags) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{5} +} + +func (x *Tags) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Tags) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Eipconfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EipFixed string `protobuf:"bytes,1,opt,name=EipFixed,proto3" json:"EipFixed,omitempty"` + Eips []string `protobuf:"bytes,2,rep,name=Eips,proto3" json:"Eips,omitempty"` +} + +func (x *Eipconfig) Reset() { + *x = Eipconfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Eipconfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Eipconfig) ProtoMessage() {} + +func (x *Eipconfig) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Eipconfig.ProtoReflect.Descriptor instead. +func (*Eipconfig) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{6} +} + +func (x *Eipconfig) GetEipFixed() string { + if x != nil { + return x.EipFixed + } + return "" +} + +func (x *Eipconfig) GetEips() []string { + if x != nil { + return x.Eips + } + return nil +} + +type Accessinfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Host string `protobuf:"bytes,1,opt,name=Host,proto3" json:"Host,omitempty"` + Vip string `protobuf:"bytes,2,opt,name=Vip,proto3" json:"Vip,omitempty"` +} + +func (x *Accessinfo) Reset() { + *x = Accessinfo{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Accessinfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Accessinfo) ProtoMessage() {} + +func (x *Accessinfo) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Accessinfo.ProtoReflect.Descriptor instead. +func (*Accessinfo) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{7} +} + +func (x *Accessinfo) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *Accessinfo) GetVip() string { + if x != nil { + return x.Vip + } + return "" +} + +type Layers struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CompatibleRuntimes []string `protobuf:"bytes,1,rep,name=CompatibleRuntimes,proto3" json:"CompatibleRuntimes,omitempty"` + AddTime string `protobuf:"bytes,2,opt,name=AddTime,proto3" json:"AddTime,omitempty"` + Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"` + LicenseInfo string `protobuf:"bytes,4,opt,name=LicenseInfo,proto3" json:"LicenseInfo,omitempty"` + LayerVersion uint32 `protobuf:"varint,5,opt,name=LayerVersion,proto3" json:"LayerVersion,omitempty"` + LayerName string `protobuf:"bytes,6,opt,name=LayerName,proto3" json:"LayerName,omitempty"` + Status string `protobuf:"bytes,7,opt,name=Status,proto3" json:"Status,omitempty"` + Stamp string `protobuf:"bytes,8,opt,name=Stamp,proto3" json:"Stamp,omitempty"` +} + +func (x *Layers) Reset() { + *x = Layers{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Layers) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Layers) ProtoMessage() {} + +func (x *Layers) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Layers.ProtoReflect.Descriptor instead. +func (*Layers) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{8} +} + +func (x *Layers) GetCompatibleRuntimes() []string { + if x != nil { + return x.CompatibleRuntimes + } + return nil +} + +func (x *Layers) GetAddTime() string { + if x != nil { + return x.AddTime + } + return "" +} + +func (x *Layers) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Layers) GetLicenseInfo() string { + if x != nil { + return x.LicenseInfo + } + return "" +} + +func (x *Layers) GetLayerVersion() uint32 { + if x != nil { + return x.LayerVersion + } + return 0 +} + +func (x *Layers) GetLayerName() string { + if x != nil { + return x.LayerName + } + return "" +} + +func (x *Layers) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Layers) GetStamp() string { + if x != nil { + return x.Stamp + } + return "" +} + +type Deadletterconfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"` + Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` + FilterType string `protobuf:"bytes,3,opt,name=FilterType,proto3" json:"FilterType,omitempty"` +} + +func (x *Deadletterconfig) Reset() { + *x = Deadletterconfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Deadletterconfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Deadletterconfig) ProtoMessage() {} + +func (x *Deadletterconfig) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Deadletterconfig.ProtoReflect.Descriptor instead. +func (*Deadletterconfig) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{9} +} + +func (x *Deadletterconfig) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Deadletterconfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Deadletterconfig) GetFilterType() string { + if x != nil { + return x.FilterType + } + return "" +} + +type Eipconfig1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EipStatus string `protobuf:"bytes,1,opt,name=EipStatus,proto3" json:"EipStatus,omitempty"` + EipAddress []string `protobuf:"bytes,2,rep,name=EipAddress,proto3" json:"EipAddress,omitempty"` +} + +func (x *Eipconfig1) Reset() { + *x = Eipconfig1{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Eipconfig1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Eipconfig1) ProtoMessage() {} + +func (x *Eipconfig1) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Eipconfig1.ProtoReflect.Descriptor instead. +func (*Eipconfig1) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{10} +} + +func (x *Eipconfig1) GetEipStatus() string { + if x != nil { + return x.EipStatus + } + return "" +} + +func (x *Eipconfig1) GetEipAddress() []string { + if x != nil { + return x.EipAddress + } + return nil +} + +type Publicnetconfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PublicNetStatus string `protobuf:"bytes,1,opt,name=PublicNetStatus,proto3" json:"PublicNetStatus,omitempty"` + EipConfig *Eipconfig1 `protobuf:"bytes,2,opt,name=EipConfig,proto3" json:"EipConfig,omitempty"` +} + +func (x *Publicnetconfig) Reset() { + *x = Publicnetconfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Publicnetconfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Publicnetconfig) ProtoMessage() {} + +func (x *Publicnetconfig) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Publicnetconfig.ProtoReflect.Descriptor instead. +func (*Publicnetconfig) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{11} +} + +func (x *Publicnetconfig) GetPublicNetStatus() string { + if x != nil { + return x.PublicNetStatus + } + return "" +} + +func (x *Publicnetconfig) GetEipConfig() *Eipconfig1 { + if x != nil { + return x.EipConfig + } + return nil +} + +type Cfsinslist struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=UserId,proto3" json:"UserId,omitempty"` + UserGroupId string `protobuf:"bytes,2,opt,name=UserGroupId,proto3" json:"UserGroupId,omitempty"` + CfsId string `protobuf:"bytes,3,opt,name=CfsId,proto3" json:"CfsId,omitempty"` + MountInsId string `protobuf:"bytes,4,opt,name=MountInsId,proto3" json:"MountInsId,omitempty"` + LocalMountDir string `protobuf:"bytes,5,opt,name=LocalMountDir,proto3" json:"LocalMountDir,omitempty"` + RemoteMountDir string `protobuf:"bytes,6,opt,name=RemoteMountDir,proto3" json:"RemoteMountDir,omitempty"` + IpAddress string `protobuf:"bytes,7,opt,name=IpAddress,proto3" json:"IpAddress,omitempty"` + MountVpcId string `protobuf:"bytes,8,opt,name=MountVpcId,proto3" json:"MountVpcId,omitempty"` + MountSubnetId string `protobuf:"bytes,9,opt,name=MountSubnetId,proto3" json:"MountSubnetId,omitempty"` +} + +func (x *Cfsinslist) Reset() { + *x = Cfsinslist{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cfsinslist) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cfsinslist) ProtoMessage() {} + +func (x *Cfsinslist) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cfsinslist.ProtoReflect.Descriptor instead. +func (*Cfsinslist) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{12} +} + +func (x *Cfsinslist) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *Cfsinslist) GetUserGroupId() string { + if x != nil { + return x.UserGroupId + } + return "" +} + +func (x *Cfsinslist) GetCfsId() string { + if x != nil { + return x.CfsId + } + return "" +} + +func (x *Cfsinslist) GetMountInsId() string { + if x != nil { + return x.MountInsId + } + return "" +} + +func (x *Cfsinslist) GetLocalMountDir() string { + if x != nil { + return x.LocalMountDir + } + return "" +} + +func (x *Cfsinslist) GetRemoteMountDir() string { + if x != nil { + return x.RemoteMountDir + } + return "" +} + +func (x *Cfsinslist) GetIpAddress() string { + if x != nil { + return x.IpAddress + } + return "" +} + +func (x *Cfsinslist) GetMountVpcId() string { + if x != nil { + return x.MountVpcId + } + return "" +} + +func (x *Cfsinslist) GetMountSubnetId() string { + if x != nil { + return x.MountSubnetId + } + return "" +} + +type Cfsconfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CfsInsList []*Cfsinslist `protobuf:"bytes,1,rep,name=CfsInsList,proto3" json:"CfsInsList,omitempty"` +} + +func (x *Cfsconfig) Reset() { + *x = Cfsconfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cfsconfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cfsconfig) ProtoMessage() {} + +func (x *Cfsconfig) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cfsconfig.ProtoReflect.Descriptor instead. +func (*Cfsconfig) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{13} +} + +func (x *Cfsconfig) GetCfsInsList() []*Cfsinslist { + if x != nil { + return x.CfsInsList + } + return nil +} + +type Statusreasons struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ErrorCode string `protobuf:"bytes,1,opt,name=ErrorCode,proto3" json:"ErrorCode,omitempty"` + ErrorMessage string `protobuf:"bytes,2,opt,name=ErrorMessage,proto3" json:"ErrorMessage,omitempty"` +} + +func (x *Statusreasons) Reset() { + *x = Statusreasons{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Statusreasons) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Statusreasons) ProtoMessage() {} + +func (x *Statusreasons) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Statusreasons.ProtoReflect.Descriptor instead. +func (*Statusreasons) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{14} +} + +func (x *Statusreasons) GetErrorCode() string { + if x != nil { + return x.ErrorCode + } + return "" +} + +func (x *Statusreasons) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +type Wsparams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdleTimeOut uint32 `protobuf:"varint,1,opt,name=IdleTimeOut,proto3" json:"IdleTimeOut,omitempty"` +} + +func (x *Wsparams) Reset() { + *x = Wsparams{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Wsparams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Wsparams) ProtoMessage() {} + +func (x *Wsparams) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Wsparams.ProtoReflect.Descriptor instead. +func (*Wsparams) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{15} +} + +func (x *Wsparams) GetIdleTimeOut() uint32 { + if x != nil { + return x.IdleTimeOut + } + return 0 +} + +type Protocolparams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WSParams *Wsparams `protobuf:"bytes,1,opt,name=WSParams,proto3" json:"WSParams,omitempty"` +} + +func (x *Protocolparams) Reset() { + *x = Protocolparams{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Protocolparams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Protocolparams) ProtoMessage() {} + +func (x *Protocolparams) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Protocolparams.ProtoReflect.Descriptor instead. +func (*Protocolparams) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{16} +} + +func (x *Protocolparams) GetWSParams() *Wsparams { + if x != nil { + return x.WSParams + } + return nil +} + +type GetFunctionsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *GetFunctionsResponse `protobuf:"bytes,1,opt,name=Response,proto3" json:"Response,omitempty"` +} + +func (x *GetFunctionsResp) Reset() { + *x = GetFunctionsResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFunctionsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFunctionsResp) ProtoMessage() {} + +func (x *GetFunctionsResp) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFunctionsResp.ProtoReflect.Descriptor instead. +func (*GetFunctionsResp) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{17} +} + +func (x *GetFunctionsResp) GetResponse() *GetFunctionsResponse { + if x != nil { + return x.Response + } + return nil +} + +type GetFunctionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModTime string `protobuf:"bytes,1,opt,name=ModTime,proto3" json:"ModTime,omitempty"` + CodeInfo string `protobuf:"bytes,2,opt,name=CodeInfo,proto3" json:"CodeInfo,omitempty"` + Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"` + Triggers []*Triggers `protobuf:"bytes,4,rep,name=Triggers,proto3" json:"Triggers,omitempty"` + Handler string `protobuf:"bytes,5,opt,name=Handler,proto3" json:"Handler,omitempty"` + CodeSize uint32 `protobuf:"varint,6,opt,name=CodeSize,proto3" json:"CodeSize,omitempty"` + Timeout uint32 `protobuf:"varint,7,opt,name=Timeout,proto3" json:"Timeout,omitempty"` + FunctionVersion string `protobuf:"bytes,8,opt,name=FunctionVersion,proto3" json:"FunctionVersion,omitempty"` + MemorySize uint32 `protobuf:"varint,9,opt,name=MemorySize,proto3" json:"MemorySize,omitempty"` + Runtime string `protobuf:"bytes,10,opt,name=Runtime,proto3" json:"Runtime,omitempty"` + FunctionName string `protobuf:"bytes,11,opt,name=FunctionName,proto3" json:"FunctionName,omitempty"` + VpcConfig *Vpcconfig `protobuf:"bytes,12,opt,name=VpcConfig,proto3" json:"VpcConfig,omitempty"` + UseGpu string `protobuf:"bytes,13,opt,name=UseGpu,proto3" json:"UseGpu,omitempty"` + Environment *Environment `protobuf:"bytes,14,opt,name=Environment,proto3" json:"Environment,omitempty"` + CodeResult string `protobuf:"bytes,15,opt,name=CodeResult,proto3" json:"CodeResult,omitempty"` + CodeError string `protobuf:"bytes,16,opt,name=CodeError,proto3" json:"CodeError,omitempty"` + ErrNo uint32 `protobuf:"varint,17,opt,name=ErrNo,proto3" json:"ErrNo,omitempty"` + Namespace string `protobuf:"bytes,18,opt,name=Namespace,proto3" json:"Namespace,omitempty"` + Role string `protobuf:"bytes,19,opt,name=Role,proto3" json:"Role,omitempty"` + InstallDependency string `protobuf:"bytes,20,opt,name=InstallDependency,proto3" json:"InstallDependency,omitempty"` + Status string `protobuf:"bytes,21,opt,name=Status,proto3" json:"Status,omitempty"` + StatusDesc string `protobuf:"bytes,22,opt,name=StatusDesc,proto3" json:"StatusDesc,omitempty"` + ClsLogsetId string `protobuf:"bytes,23,opt,name=ClsLogsetId,proto3" json:"ClsLogsetId,omitempty"` + ClsTopicId string `protobuf:"bytes,24,opt,name=ClsTopicId,proto3" json:"ClsTopicId,omitempty"` + FunctionId string `protobuf:"bytes,25,opt,name=FunctionId,proto3" json:"FunctionId,omitempty"` + Tags []*Tags `protobuf:"bytes,26,rep,name=Tags,proto3" json:"Tags,omitempty"` + EipConfig *Eipconfig `protobuf:"bytes,27,opt,name=EipConfig,proto3" json:"EipConfig,omitempty"` + AccessInfo *Accessinfo `protobuf:"bytes,28,opt,name=AccessInfo,proto3" json:"AccessInfo,omitempty"` + Type string `protobuf:"bytes,29,opt,name=Type,proto3" json:"Type,omitempty"` + L5Enable string `protobuf:"bytes,30,opt,name=L5Enable,proto3" json:"L5Enable,omitempty"` + Layers []*Layers `protobuf:"bytes,31,rep,name=Layers,proto3" json:"Layers,omitempty"` + DeadLetterConfig *Deadletterconfig `protobuf:"bytes,32,opt,name=DeadLetterConfig,proto3" json:"DeadLetterConfig,omitempty"` + AddTime string `protobuf:"bytes,33,opt,name=AddTime,proto3" json:"AddTime,omitempty"` + PublicNetConfig *Publicnetconfig `protobuf:"bytes,34,opt,name=PublicNetConfig,proto3" json:"PublicNetConfig,omitempty"` + OnsEnable string `protobuf:"bytes,35,opt,name=OnsEnable,proto3" json:"OnsEnable,omitempty"` + CfsConfig *Cfsconfig `protobuf:"bytes,36,opt,name=CfsConfig,proto3" json:"CfsConfig,omitempty"` + AvailableStatus string `protobuf:"bytes,37,opt,name=AvailableStatus,proto3" json:"AvailableStatus,omitempty"` + Qualifier string `protobuf:"bytes,38,opt,name=Qualifier,proto3" json:"Qualifier,omitempty"` + InitTimeout uint32 `protobuf:"varint,39,opt,name=InitTimeout,proto3" json:"InitTimeout,omitempty"` + StatusReasons []*Statusreasons `protobuf:"bytes,40,rep,name=StatusReasons,proto3" json:"StatusReasons,omitempty"` + AsyncRunEnable string `protobuf:"bytes,41,opt,name=AsyncRunEnable,proto3" json:"AsyncRunEnable,omitempty"` + TraceEnable string `protobuf:"bytes,42,opt,name=TraceEnable,proto3" json:"TraceEnable,omitempty"` + ProtocolType string `protobuf:"bytes,43,opt,name=ProtocolType,proto3" json:"ProtocolType,omitempty"` + ProtocolParams *Protocolparams `protobuf:"bytes,44,opt,name=ProtocolParams,proto3" json:"ProtocolParams,omitempty"` + RequestId string `protobuf:"bytes,45,opt,name=RequestId,proto3" json:"RequestId,omitempty"` +} + +func (x *GetFunctionsResponse) Reset() { + *x = GetFunctionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFunctionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFunctionsResponse) ProtoMessage() {} + +func (x *GetFunctionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFunctionsResponse.ProtoReflect.Descriptor instead. +func (*GetFunctionsResponse) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{18} +} + +func (x *GetFunctionsResponse) GetModTime() string { + if x != nil { + return x.ModTime + } + return "" +} + +func (x *GetFunctionsResponse) GetCodeInfo() string { + if x != nil { + return x.CodeInfo + } + return "" +} + +func (x *GetFunctionsResponse) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *GetFunctionsResponse) GetTriggers() []*Triggers { + if x != nil { + return x.Triggers + } + return nil +} + +func (x *GetFunctionsResponse) GetHandler() string { + if x != nil { + return x.Handler + } + return "" +} + +func (x *GetFunctionsResponse) GetCodeSize() uint32 { + if x != nil { + return x.CodeSize + } + return 0 +} + +func (x *GetFunctionsResponse) GetTimeout() uint32 { + if x != nil { + return x.Timeout + } + return 0 +} + +func (x *GetFunctionsResponse) GetFunctionVersion() string { + if x != nil { + return x.FunctionVersion + } + return "" +} + +func (x *GetFunctionsResponse) GetMemorySize() uint32 { + if x != nil { + return x.MemorySize + } + return 0 +} + +func (x *GetFunctionsResponse) GetRuntime() string { + if x != nil { + return x.Runtime + } + return "" +} + +func (x *GetFunctionsResponse) GetFunctionName() string { + if x != nil { + return x.FunctionName + } + return "" +} + +func (x *GetFunctionsResponse) GetVpcConfig() *Vpcconfig { + if x != nil { + return x.VpcConfig + } + return nil +} + +func (x *GetFunctionsResponse) GetUseGpu() string { + if x != nil { + return x.UseGpu + } + return "" +} + +func (x *GetFunctionsResponse) GetEnvironment() *Environment { + if x != nil { + return x.Environment + } + return nil +} + +func (x *GetFunctionsResponse) GetCodeResult() string { + if x != nil { + return x.CodeResult + } + return "" +} + +func (x *GetFunctionsResponse) GetCodeError() string { + if x != nil { + return x.CodeError + } + return "" +} + +func (x *GetFunctionsResponse) GetErrNo() uint32 { + if x != nil { + return x.ErrNo + } + return 0 +} + +func (x *GetFunctionsResponse) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetFunctionsResponse) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +func (x *GetFunctionsResponse) GetInstallDependency() string { + if x != nil { + return x.InstallDependency + } + return "" +} + +func (x *GetFunctionsResponse) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *GetFunctionsResponse) GetStatusDesc() string { + if x != nil { + return x.StatusDesc + } + return "" +} + +func (x *GetFunctionsResponse) GetClsLogsetId() string { + if x != nil { + return x.ClsLogsetId + } + return "" +} + +func (x *GetFunctionsResponse) GetClsTopicId() string { + if x != nil { + return x.ClsTopicId + } + return "" +} + +func (x *GetFunctionsResponse) GetFunctionId() string { + if x != nil { + return x.FunctionId + } + return "" +} + +func (x *GetFunctionsResponse) GetTags() []*Tags { + if x != nil { + return x.Tags + } + return nil +} + +func (x *GetFunctionsResponse) GetEipConfig() *Eipconfig { + if x != nil { + return x.EipConfig + } + return nil +} + +func (x *GetFunctionsResponse) GetAccessInfo() *Accessinfo { + if x != nil { + return x.AccessInfo + } + return nil +} + +func (x *GetFunctionsResponse) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *GetFunctionsResponse) GetL5Enable() string { + if x != nil { + return x.L5Enable + } + return "" +} + +func (x *GetFunctionsResponse) GetLayers() []*Layers { + if x != nil { + return x.Layers + } + return nil +} + +func (x *GetFunctionsResponse) GetDeadLetterConfig() *Deadletterconfig { + if x != nil { + return x.DeadLetterConfig + } + return nil +} + +func (x *GetFunctionsResponse) GetAddTime() string { + if x != nil { + return x.AddTime + } + return "" +} + +func (x *GetFunctionsResponse) GetPublicNetConfig() *Publicnetconfig { + if x != nil { + return x.PublicNetConfig + } + return nil +} + +func (x *GetFunctionsResponse) GetOnsEnable() string { + if x != nil { + return x.OnsEnable + } + return "" +} + +func (x *GetFunctionsResponse) GetCfsConfig() *Cfsconfig { + if x != nil { + return x.CfsConfig + } + return nil +} + +func (x *GetFunctionsResponse) GetAvailableStatus() string { + if x != nil { + return x.AvailableStatus + } + return "" +} + +func (x *GetFunctionsResponse) GetQualifier() string { + if x != nil { + return x.Qualifier + } + return "" +} + +func (x *GetFunctionsResponse) GetInitTimeout() uint32 { + if x != nil { + return x.InitTimeout + } + return 0 +} + +func (x *GetFunctionsResponse) GetStatusReasons() []*Statusreasons { + if x != nil { + return x.StatusReasons + } + return nil +} + +func (x *GetFunctionsResponse) GetAsyncRunEnable() string { + if x != nil { + return x.AsyncRunEnable + } + return "" +} + +func (x *GetFunctionsResponse) GetTraceEnable() string { + if x != nil { + return x.TraceEnable + } + return "" +} + +func (x *GetFunctionsResponse) GetProtocolType() string { + if x != nil { + return x.ProtocolType + } + return "" +} + +func (x *GetFunctionsResponse) GetProtocolParams() *Protocolparams { + if x != nil { + return x.ProtocolParams + } + return nil +} + +func (x *GetFunctionsResponse) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + type ListFunctionsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -39,7 +1612,7 @@ type ListFunctionsReq struct { func (x *ListFunctionsReq) Reset() { *x = ListFunctionsReq{} if protoimpl.UnsafeEnabled { - mi := &file_pb_pcm_scf_proto_msgTypes[0] + mi := &file_pb_pcm_scf_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -52,7 +1625,7 @@ func (x *ListFunctionsReq) String() string { func (*ListFunctionsReq) ProtoMessage() {} func (x *ListFunctionsReq) ProtoReflect() protoreflect.Message { - mi := &file_pb_pcm_scf_proto_msgTypes[0] + mi := &file_pb_pcm_scf_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -65,7 +1638,7 @@ func (x *ListFunctionsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFunctionsReq.ProtoReflect.Descriptor instead. func (*ListFunctionsReq) Descriptor() ([]byte, []int) { - return file_pb_pcm_scf_proto_rawDescGZIP(), []int{0} + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{19} } func (x *ListFunctionsReq) GetOrder() string { @@ -143,7 +1716,7 @@ type Filters struct { func (x *Filters) Reset() { *x = Filters{} if protoimpl.UnsafeEnabled { - mi := &file_pb_pcm_scf_proto_msgTypes[1] + mi := &file_pb_pcm_scf_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -156,7 +1729,7 @@ func (x *Filters) String() string { func (*Filters) ProtoMessage() {} func (x *Filters) ProtoReflect() protoreflect.Message { - mi := &file_pb_pcm_scf_proto_msgTypes[1] + mi := &file_pb_pcm_scf_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -169,7 +1742,7 @@ func (x *Filters) ProtoReflect() protoreflect.Message { // Deprecated: Use Filters.ProtoReflect.Descriptor instead. func (*Filters) Descriptor() ([]byte, []int) { - return file_pb_pcm_scf_proto_rawDescGZIP(), []int{1} + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{20} } func (x *Filters) GetName() string { @@ -191,13 +1764,13 @@ type ListFunctionsResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Response *ListFunctionsResponse `protobuf:"bytes,1,opt,name=Response,proto3" json:"Response,omitempty"` } func (x *ListFunctionsResp) Reset() { *x = ListFunctionsResp{} if protoimpl.UnsafeEnabled { - mi := &file_pb_pcm_scf_proto_msgTypes[2] + mi := &file_pb_pcm_scf_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -210,7 +1783,7 @@ func (x *ListFunctionsResp) String() string { func (*ListFunctionsResp) ProtoMessage() {} func (x *ListFunctionsResp) ProtoReflect() protoreflect.Message { - mi := &file_pb_pcm_scf_proto_msgTypes[2] + mi := &file_pb_pcm_scf_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -223,10 +1796,10 @@ func (x *ListFunctionsResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFunctionsResp.ProtoReflect.Descriptor instead. func (*ListFunctionsResp) Descriptor() ([]byte, []int) { - return file_pb_pcm_scf_proto_rawDescGZIP(), []int{2} + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{21} } -func (x *ListFunctionsResp) GetResponse() *Response { +func (x *ListFunctionsResp) GetResponse() *ListFunctionsResponse { if x != nil { return x.Response } @@ -259,7 +1832,7 @@ type Functions struct { func (x *Functions) Reset() { *x = Functions{} if protoimpl.UnsafeEnabled { - mi := &file_pb_pcm_scf_proto_msgTypes[3] + mi := &file_pb_pcm_scf_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -272,7 +1845,7 @@ func (x *Functions) String() string { func (*Functions) ProtoMessage() {} func (x *Functions) ProtoReflect() protoreflect.Message { - mi := &file_pb_pcm_scf_proto_msgTypes[3] + mi := &file_pb_pcm_scf_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -285,7 +1858,7 @@ func (x *Functions) ProtoReflect() protoreflect.Message { // Deprecated: Use Functions.ProtoReflect.Descriptor instead. func (*Functions) Descriptor() ([]byte, []int) { - return file_pb_pcm_scf_proto_rawDescGZIP(), []int{3} + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{22} } func (x *Functions) GetAddTime() string { @@ -400,7 +1973,7 @@ func (x *Functions) GetType() string { return "" } -type Response struct { +type ListFunctionsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -410,23 +1983,23 @@ type Response struct { TotalCount int32 `protobuf:"varint,3,opt,name=totalCount,proto3" json:"totalCount,omitempty"` } -func (x *Response) Reset() { - *x = Response{} +func (x *ListFunctionsResponse) Reset() { + *x = ListFunctionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pb_pcm_scf_proto_msgTypes[4] + mi := &file_pb_pcm_scf_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Response) String() string { +func (x *ListFunctionsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Response) ProtoMessage() {} +func (*ListFunctionsResponse) ProtoMessage() {} -func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_pb_pcm_scf_proto_msgTypes[4] +func (x *ListFunctionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_pb_pcm_scf_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -437,26 +2010,26 @@ func (x *Response) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { - return file_pb_pcm_scf_proto_rawDescGZIP(), []int{4} +// Deprecated: Use ListFunctionsResponse.ProtoReflect.Descriptor instead. +func (*ListFunctionsResponse) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{23} } -func (x *Response) GetFunctions() []*Functions { +func (x *ListFunctionsResponse) GetFunctions() []*Functions { if x != nil { return x.Functions } return nil } -func (x *Response) GetRequestId() string { +func (x *ListFunctionsResponse) GetRequestId() string { if x != nil { return x.RequestId } return "" } -func (x *Response) GetTotalCount() int32 { +func (x *ListFunctionsResponse) GetTotalCount() int32 { if x != nil { return x.TotalCount } @@ -467,31 +2040,266 @@ var File_pb_pcm_scf_proto protoreflect.FileDescriptor var file_pb_pcm_scf_proto_rawDesc = []byte{ 0x0a, 0x10, 0x70, 0x62, 0x2f, 0x70, 0x63, 0x6d, 0x2d, 0x73, 0x63, 0x66, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x03, 0x73, 0x63, 0x66, 0x22, 0x8e, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, - 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x79, 0x12, 0x16, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x73, 0x63, 0x66, 0x2e, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, - 0x3e, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x74, 0x6f, 0x12, 0x03, 0x73, 0x63, 0x66, 0x22, 0xa5, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x46, + 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x66, + 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x68, 0x6f, 0x77, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x68, 0x6f, 0x77, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x22, + 0xac, 0x03, 0x0a, 0x08, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x4d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, + 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x44, 0x65, 0x73, 0x63, 0x12, 0x20, 0x0a, 0x0b, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x41, 0x64, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x41, 0x64, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x42, 0x69, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x42, 0x69, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3d, + 0x0a, 0x09, 0x56, 0x70, 0x63, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x56, + 0x70, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x70, 0x63, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0x33, 0x0a, + 0x09, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x3b, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x52, 0x09, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, + 0x2e, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x3b, 0x0a, 0x09, 0x45, 0x69, 0x70, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, + 0x45, 0x69, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x45, 0x69, 0x70, 0x46, 0x69, 0x78, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x45, 0x69, 0x70, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x45, 0x69, 0x70, 0x73, 0x22, 0x32, 0x0a, 0x0a, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x6f, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x56, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x56, 0x69, 0x70, + 0x22, 0x86, 0x02, 0x0a, 0x06, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x43, + 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, + 0x62, 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x41, + 0x64, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x64, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x4c, 0x69, 0x63, 0x65, 0x6e, + 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4c, 0x69, + 0x63, 0x65, 0x6e, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x79, + 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, + 0x09, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x5a, 0x0a, 0x10, 0x44, 0x65, 0x61, + 0x64, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4a, 0x0a, 0x0a, 0x45, 0x69, 0x70, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x31, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x69, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x45, 0x69, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x45, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x45, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x22, 0x6a, 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x6e, 0x65, 0x74, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, + 0x0a, 0x09, 0x45, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x45, 0x69, 0x70, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x31, 0x52, 0x09, 0x45, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xae, 0x02, + 0x0a, 0x0a, 0x43, 0x66, 0x73, 0x69, 0x6e, 0x73, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x66, 0x73, 0x49, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x43, 0x66, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, + 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x73, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x69, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x44, + 0x69, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x6f, 0x75, 0x6e, + 0x74, 0x44, 0x69, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x52, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x69, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x70, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x49, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x6f, 0x75, 0x6e, + 0x74, 0x56, 0x70, 0x63, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4d, 0x6f, + 0x75, 0x6e, 0x74, 0x56, 0x70, 0x63, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x4d, 0x6f, 0x75, 0x6e, + 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0x3c, + 0x0a, 0x09, 0x43, 0x66, 0x73, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2f, 0x0a, 0x0a, 0x43, + 0x66, 0x73, 0x49, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x43, 0x66, 0x73, 0x69, 0x6e, 0x73, 0x6c, 0x69, 0x73, 0x74, + 0x52, 0x0a, 0x43, 0x66, 0x73, 0x49, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x0d, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, + 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, + 0x2c, 0x0a, 0x08, 0x57, 0x73, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x49, + 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0b, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x75, 0x74, 0x22, 0x3b, 0x0a, + 0x0e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x29, 0x0a, 0x08, 0x57, 0x53, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x57, 0x73, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x08, 0x57, 0x53, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x49, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, + 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe2, 0x0c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x4d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x4d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x08, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x52, 0x08, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x43, + 0x6f, 0x64, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x43, + 0x6f, 0x64, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x46, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0a, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x52, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x46, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x09, 0x56, 0x70, 0x63, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, + 0x63, 0x66, 0x2e, 0x56, 0x70, 0x63, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x56, 0x70, + 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x47, 0x70, + 0x75, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x47, 0x70, 0x75, 0x12, + 0x32, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x4e, 0x6f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x45, 0x72, 0x72, 0x4e, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x18, 0x13, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1e, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x65, 0x73, 0x63, 0x18, 0x16, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x65, 0x73, 0x63, 0x12, + 0x20, 0x0a, 0x0b, 0x43, 0x6c, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x65, 0x74, 0x49, 0x64, 0x18, 0x17, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6c, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x65, 0x74, 0x49, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x18, + 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x6c, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, + 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x09, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x52, 0x04, 0x54, 0x61, 0x67, 0x73, + 0x12, 0x2c, 0x0a, 0x09, 0x45, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x45, 0x69, 0x70, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x09, 0x45, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2f, + 0x0a, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x1c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, + 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x4c, 0x35, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4c, 0x35, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x23, 0x0a, 0x06, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x06, 0x4c, 0x61, + 0x79, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x10, 0x44, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x74, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x44, 0x65, 0x61, 0x64, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x44, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x74, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x64, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x3e, 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x63, 0x66, + 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x6e, 0x65, 0x74, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4e, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x4f, 0x6e, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x23, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4f, 0x6e, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x2c, 0x0a, 0x09, 0x43, 0x66, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x24, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x43, 0x66, 0x73, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x09, 0x43, 0x66, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, + 0x0f, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x51, 0x75, 0x61, 0x6c, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x18, 0x26, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x51, 0x75, 0x61, 0x6c, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x49, 0x6e, 0x69, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x38, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x73, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x41, 0x73, 0x79, 0x6e, 0x63, + 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x2b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x3b, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x0a, 0x09, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x8e, 0x02, 0x0a, 0x10, 0x4c, + 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, + 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x79, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x07, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x73, + 0x63, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x07, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x63, 0x66, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xad, 0x04, 0x0a, 0x09, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x73, 0x79, 0x6e, 0x63, @@ -527,19 +2335,24 @@ var file_pb_pcm_scf_proto_rawDesc = []byte{ 0x63, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, - 0x76, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x09, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x45, 0x0a, 0x03, 0x53, 0x63, 0x66, 0x12, 0x3e, - 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x15, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, - 0x5a, 0x04, 0x2f, 0x73, 0x63, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x83, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x09, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, + 0x63, 0x66, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x66, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x82, 0x01, 0x0a, 0x03, 0x53, 0x63, 0x66, 0x12, 0x3e, 0x0a, + 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x15, + 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x2e, + 0x73, 0x63, 0x66, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x63, 0x66, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2f, 0x73, + 0x63, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -554,25 +2367,63 @@ func file_pb_pcm_scf_proto_rawDescGZIP() []byte { return file_pb_pcm_scf_proto_rawDescData } -var file_pb_pcm_scf_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_pb_pcm_scf_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_pb_pcm_scf_proto_goTypes = []interface{}{ - (*ListFunctionsReq)(nil), // 0: scf.ListFunctionsReq - (*Filters)(nil), // 1: scf.Filters - (*ListFunctionsResp)(nil), // 2: scf.ListFunctionsResp - (*Functions)(nil), // 3: scf.Functions - (*Response)(nil), // 4: scf.Response + (*GetFunctionsReq)(nil), // 0: scf.GetFunctionsReq + (*Triggers)(nil), // 1: scf.Triggers + (*Vpcconfig)(nil), // 2: scf.Vpcconfig + (*Variables)(nil), // 3: scf.Variables + (*Environment)(nil), // 4: scf.Environment + (*Tags)(nil), // 5: scf.Tags + (*Eipconfig)(nil), // 6: scf.Eipconfig + (*Accessinfo)(nil), // 7: scf.Accessinfo + (*Layers)(nil), // 8: scf.Layers + (*Deadletterconfig)(nil), // 9: scf.Deadletterconfig + (*Eipconfig1)(nil), // 10: scf.Eipconfig1 + (*Publicnetconfig)(nil), // 11: scf.Publicnetconfig + (*Cfsinslist)(nil), // 12: scf.Cfsinslist + (*Cfsconfig)(nil), // 13: scf.Cfsconfig + (*Statusreasons)(nil), // 14: scf.Statusreasons + (*Wsparams)(nil), // 15: scf.Wsparams + (*Protocolparams)(nil), // 16: scf.Protocolparams + (*GetFunctionsResp)(nil), // 17: scf.GetFunctionsResp + (*GetFunctionsResponse)(nil), // 18: scf.GetFunctionsResponse + (*ListFunctionsReq)(nil), // 19: scf.ListFunctionsReq + (*Filters)(nil), // 20: scf.Filters + (*ListFunctionsResp)(nil), // 21: scf.ListFunctionsResp + (*Functions)(nil), // 22: scf.Functions + (*ListFunctionsResponse)(nil), // 23: scf.ListFunctionsResponse } var file_pb_pcm_scf_proto_depIdxs = []int32{ - 1, // 0: scf.ListFunctionsReq.filters:type_name -> scf.Filters - 4, // 1: scf.ListFunctionsResp.response:type_name -> scf.Response - 3, // 2: scf.Response.functions:type_name -> scf.Functions - 0, // 3: scf.Scf.ListFunctions:input_type -> scf.ListFunctionsReq - 2, // 4: scf.Scf.ListFunctions:output_type -> scf.ListFunctionsResp - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 3, // 0: scf.Environment.Variables:type_name -> scf.Variables + 10, // 1: scf.Publicnetconfig.EipConfig:type_name -> scf.Eipconfig1 + 12, // 2: scf.Cfsconfig.CfsInsList:type_name -> scf.Cfsinslist + 15, // 3: scf.Protocolparams.WSParams:type_name -> scf.Wsparams + 18, // 4: scf.GetFunctionsResp.Response:type_name -> scf.GetFunctionsResponse + 1, // 5: scf.GetFunctionsResponse.Triggers:type_name -> scf.Triggers + 2, // 6: scf.GetFunctionsResponse.VpcConfig:type_name -> scf.Vpcconfig + 4, // 7: scf.GetFunctionsResponse.Environment:type_name -> scf.Environment + 5, // 8: scf.GetFunctionsResponse.Tags:type_name -> scf.Tags + 6, // 9: scf.GetFunctionsResponse.EipConfig:type_name -> scf.Eipconfig + 7, // 10: scf.GetFunctionsResponse.AccessInfo:type_name -> scf.Accessinfo + 8, // 11: scf.GetFunctionsResponse.Layers:type_name -> scf.Layers + 9, // 12: scf.GetFunctionsResponse.DeadLetterConfig:type_name -> scf.Deadletterconfig + 11, // 13: scf.GetFunctionsResponse.PublicNetConfig:type_name -> scf.Publicnetconfig + 13, // 14: scf.GetFunctionsResponse.CfsConfig:type_name -> scf.Cfsconfig + 14, // 15: scf.GetFunctionsResponse.StatusReasons:type_name -> scf.Statusreasons + 16, // 16: scf.GetFunctionsResponse.ProtocolParams:type_name -> scf.Protocolparams + 20, // 17: scf.ListFunctionsReq.filters:type_name -> scf.Filters + 23, // 18: scf.ListFunctionsResp.Response:type_name -> scf.ListFunctionsResponse + 22, // 19: scf.ListFunctionsResponse.functions:type_name -> scf.Functions + 19, // 20: scf.Scf.ListFunctions:input_type -> scf.ListFunctionsReq + 0, // 21: scf.Scf.GetFunctions:input_type -> scf.GetFunctionsReq + 21, // 22: scf.Scf.ListFunctions:output_type -> scf.ListFunctionsResp + 17, // 23: scf.Scf.GetFunctions:output_type -> scf.GetFunctionsResp + 22, // [22:24] is the sub-list for method output_type + 20, // [20:22] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_pb_pcm_scf_proto_init() } @@ -582,7 +2433,7 @@ func file_pb_pcm_scf_proto_init() { } if !protoimpl.UnsafeEnabled { file_pb_pcm_scf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFunctionsReq); i { + switch v := v.(*GetFunctionsReq); i { case 0: return &v.state case 1: @@ -594,7 +2445,7 @@ func file_pb_pcm_scf_proto_init() { } } file_pb_pcm_scf_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filters); i { + switch v := v.(*Triggers); i { case 0: return &v.state case 1: @@ -606,7 +2457,7 @@ func file_pb_pcm_scf_proto_init() { } } file_pb_pcm_scf_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFunctionsResp); i { + switch v := v.(*Vpcconfig); i { case 0: return &v.state case 1: @@ -618,7 +2469,7 @@ func file_pb_pcm_scf_proto_init() { } } file_pb_pcm_scf_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Functions); i { + switch v := v.(*Variables); i { case 0: return &v.state case 1: @@ -630,7 +2481,235 @@ func file_pb_pcm_scf_proto_init() { } } file_pb_pcm_scf_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Response); i { + switch v := v.(*Environment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tags); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Eipconfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Accessinfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Layers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Deadletterconfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Eipconfig1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Publicnetconfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Cfsinslist); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Cfsconfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Statusreasons); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Wsparams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Protocolparams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFunctionsResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFunctionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFunctionsReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Filters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFunctionsResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Functions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_pcm_scf_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFunctionsResponse); i { case 0: return &v.state case 1: @@ -648,7 +2727,7 @@ func file_pb_pcm_scf_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pb_pcm_scf_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, diff --git a/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf_grpc.pb.go b/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf_grpc.pb.go index f42227ed..7ed325b9 100644 --- a/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf_grpc.pb.go +++ b/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.21.12 +// - protoc v4.23.4 // source: pb/pcm-scf.proto package scf @@ -20,14 +20,17 @@ const _ = grpc.SupportPackageIsVersion7 const ( Scf_ListFunctions_FullMethodName = "/scf.Scf/ListFunctions" + Scf_GetFunctions_FullMethodName = "/scf.Scf/GetFunctions" ) // ScfClient is the client API for Scf service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ScfClient interface { - // 查询腾讯云云函数列表 + // ListFunctions 查询腾讯云云函数列表 ListFunctions(ctx context.Context, in *ListFunctionsReq, opts ...grpc.CallOption) (*ListFunctionsResp, error) + // GetFunctions 查询腾讯云云函数详情 + GetFunctions(ctx context.Context, in *GetFunctionsReq, opts ...grpc.CallOption) (*GetFunctionsResp, error) } type scfClient struct { @@ -47,12 +50,23 @@ func (c *scfClient) ListFunctions(ctx context.Context, in *ListFunctionsReq, opt return out, nil } +func (c *scfClient) GetFunctions(ctx context.Context, in *GetFunctionsReq, opts ...grpc.CallOption) (*GetFunctionsResp, error) { + out := new(GetFunctionsResp) + err := c.cc.Invoke(ctx, Scf_GetFunctions_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ScfServer is the server API for Scf service. // All implementations must embed UnimplementedScfServer // for forward compatibility type ScfServer interface { - // 查询腾讯云云函数列表 + // ListFunctions 查询腾讯云云函数列表 ListFunctions(context.Context, *ListFunctionsReq) (*ListFunctionsResp, error) + // GetFunctions 查询腾讯云云函数详情 + GetFunctions(context.Context, *GetFunctionsReq) (*GetFunctionsResp, error) mustEmbedUnimplementedScfServer() } @@ -63,6 +77,9 @@ type UnimplementedScfServer struct { func (UnimplementedScfServer) ListFunctions(context.Context, *ListFunctionsReq) (*ListFunctionsResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFunctions not implemented") } +func (UnimplementedScfServer) GetFunctions(context.Context, *GetFunctionsReq) (*GetFunctionsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFunctions not implemented") +} func (UnimplementedScfServer) mustEmbedUnimplementedScfServer() {} // UnsafeScfServer may be embedded to opt out of forward compatibility for this service. @@ -94,6 +111,24 @@ func _Scf_ListFunctions_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Scf_GetFunctions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFunctionsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScfServer).GetFunctions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Scf_GetFunctions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScfServer).GetFunctions(ctx, req.(*GetFunctionsReq)) + } + return interceptor(ctx, in, info, handler) +} + // Scf_ServiceDesc is the grpc.ServiceDesc for Scf service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -105,6 +140,10 @@ var Scf_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListFunctions", Handler: _Scf_ListFunctions_Handler, }, + { + MethodName: "GetFunctions", + Handler: _Scf_GetFunctions_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/pcm-scf.proto", diff --git a/adaptor/PCM-FC/PCM-SCF/scfclient/scf.go b/adaptor/PCM-FC/PCM-SCF/scfclient/scf.go index 380cede7..3cac7507 100644 --- a/adaptor/PCM-FC/PCM-SCF/scfclient/scf.go +++ b/adaptor/PCM-FC/PCM-SCF/scfclient/scf.go @@ -13,15 +13,36 @@ import ( ) type ( - Filters = scf.Filters - Functions = scf.Functions - ListFunctionsReq = scf.ListFunctionsReq - ListFunctionsResp = scf.ListFunctionsResp - Response = scf.Response + Accessinfo = scf.Accessinfo + Cfsconfig = scf.Cfsconfig + Cfsinslist = scf.Cfsinslist + Deadletterconfig = scf.Deadletterconfig + Eipconfig = scf.Eipconfig + Eipconfig1 = scf.Eipconfig1 + Environment = scf.Environment + Filters = scf.Filters + Functions = scf.Functions + GetFunctionsReq = scf.GetFunctionsReq + GetFunctionsResp = scf.GetFunctionsResp + GetFunctionsResponse = scf.GetFunctionsResponse + Layers = scf.Layers + ListFunctionsReq = scf.ListFunctionsReq + ListFunctionsResp = scf.ListFunctionsResp + ListFunctionsResponse = scf.ListFunctionsResponse + Protocolparams = scf.Protocolparams + Publicnetconfig = scf.Publicnetconfig + Statusreasons = scf.Statusreasons + Tags = scf.Tags + Triggers = scf.Triggers + Variables = scf.Variables + Vpcconfig = scf.Vpcconfig + Wsparams = scf.Wsparams Scf interface { - // 查询腾讯云云函数列表 + // ListFunctions 查询腾讯云云函数列表 ListFunctions(ctx context.Context, in *ListFunctionsReq, opts ...grpc.CallOption) (*ListFunctionsResp, error) + // GetFunctions 查询腾讯云云函数详情 + GetFunctions(ctx context.Context, in *GetFunctionsReq, opts ...grpc.CallOption) (*GetFunctionsResp, error) } defaultScf struct { @@ -35,8 +56,14 @@ func NewScf(cli zrpc.Client) Scf { } } -// 查询腾讯云云函数列表 +// ListFunctions 查询腾讯云云函数列表 func (m *defaultScf) ListFunctions(ctx context.Context, in *ListFunctionsReq, opts ...grpc.CallOption) (*ListFunctionsResp, error) { client := scf.NewScfClient(m.cli.Conn()) return client.ListFunctions(ctx, in, opts...) } + +// GetFunctions 查询腾讯云云函数详情 +func (m *defaultScf) GetFunctions(ctx context.Context, in *GetFunctionsReq, opts ...grpc.CallOption) (*GetFunctionsResp, error) { + client := scf.NewScfClient(m.cli.Conn()) + return client.GetFunctions(ctx, in, opts...) +} diff --git a/common/enum/externalStatusEnum.go b/common/enum/externalStatusEnum.go new file mode 100644 index 00000000..8ddb4dd0 --- /dev/null +++ b/common/enum/externalStatusEnum.go @@ -0,0 +1,28 @@ +package enum + +type ExternalStatus string + +const ( + EXTERNAL_RUNNING ExternalStatus = "running" + EXTERNAL_COMPLETED ExternalStatus = "completed" + EXTERNAL_PENDING ExternalStatus = "pending" + EXTERNAL_SUCCEEDED ExternalStatus = "succeeded" + EXTERNAL_FAILED ExternalStatus = "failed" +) + +func (s ExternalStatus) String() string { + switch s { + case EXTERNAL_RUNNING: + return "Running" + case EXTERNAL_COMPLETED: + return "Completed" + case EXTERNAL_PENDING: + return "Pending" + case EXTERNAL_SUCCEEDED: + return "Completed" + case EXTERNAL_FAILED: + return "Failed" + default: + return "" + } +} diff --git a/common/tool/file.go b/common/tool/file.go new file mode 100644 index 00000000..58728acc --- /dev/null +++ b/common/tool/file.go @@ -0,0 +1,30 @@ +package tool + +import ( + "os" + "path/filepath" +) + +// DirSize 获取整体文件夹大小 +func GetDirSize(path string) (int64, error) { + var size int64 + err := filepath.Walk(path, func(_ string, info os.FileInfo, err error) error { + if !info.IsDir() { + size += info.Size() + } + return err + }) + return size, err +} + +// PathExists 判断文件夹是否存在 +func PathExists(path string) (bool, error) { + _, err := os.Stat(path) + if err == nil { + return true, nil + } + if os.IsNotExist(err) { + return false, nil + } + return false, err +} diff --git a/deploy/pcm-core-deployment.yaml b/deploy/pcm-core-deployment.yaml index 2ed893ec..d9720e7c 100644 --- a/deploy/pcm-core-deployment.yaml +++ b/deploy/pcm-core-deployment.yaml @@ -35,10 +35,15 @@ spec: volumeMounts: - mountPath: /home/uploads name: pcm-image-storage + - mountPath: /var/run/docker.sock + name: sock-volume volumes: - name: pcm-image-storage persistentVolumeClaim: claimName: pcm-image-storage + - name: sock-volume + hostPath: + path: /var/run/docker.sock restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst