From 156bfc9f2094e0d541b69725f2e07495c475b929 Mon Sep 17 00:00:00 2001 From: "894646498@qq.com" <13786100335> Date: Fri, 21 Apr 2023 17:19:42 +0800 Subject: [PATCH 01/22] =?UTF-8?q?nacos=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adaptor/PCM-CORE/api/desc/core/pcm-core.api | 11 +++++++---- adaptor/PCM-CORE/rpc/pcmcore.go | 16 ++++++++++++++++ common/config/nacos.go | 13 +++++++++++++ 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/adaptor/PCM-CORE/api/desc/core/pcm-core.api b/adaptor/PCM-CORE/api/desc/core/pcm-core.api index 49845f2f..e1c8a886 100644 --- a/adaptor/PCM-CORE/api/desc/core/pcm-core.api +++ b/adaptor/PCM-CORE/api/desc/core/pcm-core.api @@ -173,12 +173,15 @@ type ( type ( scheduleTaskReq { TaskId int64 `yaml:"taskId"` - Operate string `yaml:"operate"` - Kind string `yaml:"kind"` Name string `yaml:"name"` + strategy string `yaml:"strategy"` + synergy string `yaml:"synergy"` Description string `yaml:"description"` - ServiceName string `yaml:"serviceName"` - Metadata interface{} `yaml:"metadata"` + tasks []task `yaml:"tasks"` + } + task { + serviceName string `yaml:"serviceName"` + metadata interface{} `yaml:"metadata"` } scheduleTaskResp { Code int32 `json:"code"` diff --git a/adaptor/PCM-CORE/rpc/pcmcore.go b/adaptor/PCM-CORE/rpc/pcmcore.go index 8ccd688e..5bf627dd 100644 --- a/adaptor/PCM-CORE/rpc/pcmcore.go +++ b/adaptor/PCM-CORE/rpc/pcmcore.go @@ -8,6 +8,7 @@ import ( commonConfig "PCM/common/config" "PCM/common/interceptor/rpcserver" "flag" + "github.com/nacos-group/nacos-sdk-go/v2/vo" "github.com/zeromicro/go-zero/core/conf" "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/core/service" @@ -58,7 +59,22 @@ func main() { s.AddUnaryInterceptors(rpcserver.LoggerInterceptor) defer s.Stop() + namingClient := nacosConfig.GetClient() + infos, err := namingClient.GetAllServicesInfo(vo.GetAllServiceInfoParam{ + NameSpace: "zhangwei", + PageNo: 1, + PageSize: 10}) + if err != nil { + return + } + for _, dom := range infos.Doms { + println(dom) + } + //for _, info := range infos { + // logx.Info(info) + //} logx.Infof("Starting rpc server at %s...\n", c.ListenOn) s.Start() + } diff --git a/common/config/nacos.go b/common/config/nacos.go index a60b2722..153f6e5e 100644 --- a/common/config/nacos.go +++ b/common/config/nacos.go @@ -2,6 +2,7 @@ package config import ( "fmt" + "github.com/nacos-group/nacos-sdk-go/v2/clients/naming_client" "github.com/zeromicro/go-zero/rest" "github.com/zeromicro/go-zero/zrpc" @@ -41,6 +42,18 @@ type ( } ) +func (n *NacosConfig) GetClient() naming_client.INamingClient { + sc, cc := n.buildConfig() + namingClient, err := clients.NewNamingClient(vo.NacosClientParam{ + ClientConfig: &cc, + ServerConfigs: sc, + }) + if err != nil { + return nil + } + return namingClient +} + func (n *NacosConfig) Discovery(c *zrpc.RpcServerConf) { sc, cc := n.buildConfig() opts := nacos.NewNacosConfig(c.Name, c.ListenOn, sc, &cc) From fc81eae5aaa4dc4d9d0eb3446f8d9b70cdb8a6fd Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Tue, 4 Jul 2023 16:30:31 +0800 Subject: [PATCH 02/22] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 4d246847cd2379c6df4d4ab9277ede9ceaeebe65 --- .../internal/handler/image/chunkhandler.go | 23 ++++---------- .../internal/handler/image/uploadhandler.go | 17 ++--------- common/tool/file.go | 30 +++++++++++++++++++ 3 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 common/tool/file.go diff --git a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go index 3a62dceb..3c272e8a 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" @@ -32,7 +33,7 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { name := r.PostFormValue("name") dataType := r.PostFormValue("dataType") // 对比合并请求的文件大小和已上传文件夹大小 - toSize, _ := getDirSize(filepath.Join(uploadTempPath, hash)) + toSize, _ := tool.GetDirSize(filepath.Join(uploadTempPath, hash)) if size != toSize { fmt.Fprintf(w, "文件上传错误") } @@ -45,7 +46,7 @@ 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) @@ -62,7 +63,6 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { data, err := ioutil.ReadFile(fileName) fmt.Println(err) fs.Write(data) - wg.Done() } wg.Wait() @@ -90,7 +90,7 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return } // 删除本地文件 避免占用本地存储资源 - err = os.Remove(filepath.Join(uploadPath, name)) + go os.Remove(filepath.Join(uploadPath, name)) result2.HttpResult(r, w, nil, err) } } @@ -108,14 +108,15 @@ func pushImage(svcCtx *svc.ServiceContext, name string) error { fileInfo, err := os.Open(filepath.Join(uploadPath, name)) defer fileInfo.Close() reader := bufio.NewReader(fileInfo) + if err != nil { return err } body, err := svcCtx.DockerClient.ImageLoad(context.Background(), reader, false) + if err != nil { return err } - bytes, err := ioutil.ReadAll(body.Body) loadBody := LoadBody{} @@ -150,15 +151,3 @@ func pushImage(svcCtx *svc.ServiceContext, name string) error { } 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..a9001b5e 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go @@ -2,6 +2,7 @@ package image import ( result2 "PCM/common/result" + "PCM/common/tool" "bufio" "fmt" "io" @@ -32,12 +33,12 @@ 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) } // 检查文件是否存在 - exists, err := PathExists(filePath) + exists, err := tool.PathExists(filePath) // 文件存在 进行断点续传 if exists { fileInfo, _ := os.Stat(filePath) @@ -86,15 +87,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/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 +} From 1a759c39a3f7a1aa67d04c8bf7fc06dc04b10ddc Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Tue, 4 Jul 2023 17:11:19 +0800 Subject: [PATCH 03/22] =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=88=B0=E4=BA=91=E9=9B=86=E5=AD=98=E5=82=A8=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: e35fb35fe37138dcaf3fd5306979efaf634689c8 --- .../PCM-CORE/api/internal/handler/image/chunkhandler.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go index 3c272e8a..e20780d4 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go @@ -96,10 +96,17 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { } func uploadStorage(svcCtx *svc.ServiceContext, name string) error { - svcCtx.Uploader.Upload(&s3manager.UploadInput{ + fileInfo, err := os.Open(filepath.Join(uploadPath, name)) + upload, err := svcCtx.Uploader.Upload(&s3manager.UploadInput{ Bucket: aws.String("pcm"), Key: aws.String(name), + Body: fileInfo, }) + + if err != nil { + return err + } + println(upload.UploadID) return nil } From ca15e45d58094ac552b87ad800ec2bc89efbbeb4 Mon Sep 17 00:00:00 2001 From: devad Date: Wed, 5 Jul 2023 11:23:54 +0800 Subject: [PATCH 04/22] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=85=BE?= =?UTF-8?q?=E8=AE=AF=E4=BA=91=E4=BA=91=E5=87=BD=E6=95=B0=EF=BC=8C=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E6=9F=A5=E8=AF=A2=E5=87=BD=E6=95=B0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: devad Former-commit-id: a0b8934eb3ddf91d9457c55c4be1975238e2f6de --- adaptor/PCM-FC/PCM-SCF/Dockerfile | 20 + adaptor/PCM-FC/PCM-SCF/Makefile | 2 + adaptor/PCM-FC/PCM-SCF/READM.md | 23 + adaptor/PCM-FC/PCM-SCF/etc/pcmscf.yaml | 15 + .../PCM-FC/PCM-SCF/internal/config/config.go | 18 + .../internal/logic/listfunctionslogic.go | 58 ++ .../PCM-SCF/internal/server/scfserver.go | 29 + .../PCM-SCF/internal/svc/servicecontext.go | 24 + adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto | 60 ++ adaptor/PCM-FC/PCM-SCF/pcmscf.go | 67 ++ adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go | 663 ++++++++++++++++++ adaptor/PCM-FC/PCM-SCF/scf/pcm-scf_grpc.pb.go | 111 +++ adaptor/PCM-FC/PCM-SCF/scfclient/scf.go | 42 ++ deploy/README.md | 23 +- go.mod | 21 +- go.sum | 42 +- 16 files changed, 1150 insertions(+), 68 deletions(-) create mode 100644 adaptor/PCM-FC/PCM-SCF/Dockerfile create mode 100644 adaptor/PCM-FC/PCM-SCF/Makefile create mode 100644 adaptor/PCM-FC/PCM-SCF/READM.md create mode 100644 adaptor/PCM-FC/PCM-SCF/etc/pcmscf.yaml create mode 100755 adaptor/PCM-FC/PCM-SCF/internal/config/config.go create mode 100644 adaptor/PCM-FC/PCM-SCF/internal/logic/listfunctionslogic.go create mode 100644 adaptor/PCM-FC/PCM-SCF/internal/server/scfserver.go create mode 100644 adaptor/PCM-FC/PCM-SCF/internal/svc/servicecontext.go create mode 100644 adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto create mode 100644 adaptor/PCM-FC/PCM-SCF/pcmscf.go create mode 100644 adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go create mode 100644 adaptor/PCM-FC/PCM-SCF/scf/pcm-scf_grpc.pb.go create mode 100644 adaptor/PCM-FC/PCM-SCF/scfclient/scf.go diff --git a/adaptor/PCM-FC/PCM-SCF/Dockerfile b/adaptor/PCM-FC/PCM-SCF/Dockerfile new file mode 100644 index 00000000..29f9333c --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/Dockerfile @@ -0,0 +1,20 @@ +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 && \ + apk update && \ + apk upgrade && \ + apk add --no-cache ca-certificates && update-ca-certificates && \ + apk add --update tzdata && \ + rm -rf /var/cache/apk/* + + +COPY pcm-modelarts /home/ +COPY etc/scf.yaml /home/ + +ENV TZ=Asia/Shanghai + +EXPOSE 2003 + +ENTRYPOINT ./pcm-scf -f scf.yaml \ No newline at end of file diff --git a/adaptor/PCM-FC/PCM-SCF/Makefile b/adaptor/PCM-FC/PCM-SCF/Makefile new file mode 100644 index 00000000..ca998c42 --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/Makefile @@ -0,0 +1,2 @@ +rpc-gen: + goctl rpc protoc ./pb/*.proto --go_out=./ --go-grpc_out=./ --zrpc_out=. \ No newline at end of file diff --git a/adaptor/PCM-FC/PCM-SCF/READM.md b/adaptor/PCM-FC/PCM-SCF/READM.md new file mode 100644 index 00000000..647a448a --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/READM.md @@ -0,0 +1,23 @@ +# pcm对接腾讯云云函数 SCF + +### 腾讯云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 获取函数详细信息 +- [ ] Invoke 运行函数 +- [x] ListFunctions 获取函数列表 +- [ ] UpdateFunctionCode 更新函数代码 +- [ ] UpdateFunctionConfiguration 更新函数配置 \ No newline at end of file diff --git a/adaptor/PCM-FC/PCM-SCF/etc/pcmscf.yaml b/adaptor/PCM-FC/PCM-SCF/etc/pcmscf.yaml new file mode 100644 index 00000000..50614b26 --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/etc/pcmscf.yaml @@ -0,0 +1,15 @@ +NacosConfig: + DataId: pcm-scf-rpc.yaml + Group: DEFAULT_GROUP + ServerConfigs: + # - IpAddr: 127.0.0.1 + # Port: 8848 + - IpAddr: nacos.jcce.dev + Port: 8848 + ClientConfig: + NamespaceId: test + TimeoutMs: 5000 + NotLoadCacheAtStart: true + LogDir: + CacheDir: + LogLevel: debug \ No newline at end of file diff --git a/adaptor/PCM-FC/PCM-SCF/internal/config/config.go b/adaptor/PCM-FC/PCM-SCF/internal/config/config.go new file mode 100755 index 00000000..f75f3c68 --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/internal/config/config.go @@ -0,0 +1,18 @@ +package config + +import ( + "github.com/zeromicro/go-zero/core/logx" + "github.com/zeromicro/go-zero/zrpc" +) + +type Config struct { + zrpc.RpcServerConf + LogConf logx.LogConf + PcmCoreRpcConf zrpc.RpcClientConf + SecretConfig SecretConfig +} + +type SecretConfig struct { + SecretId string `json:"secretId"` + SecretKey string `json:"secretKey"` +} diff --git a/adaptor/PCM-FC/PCM-SCF/internal/logic/listfunctionslogic.go b/adaptor/PCM-FC/PCM-SCF/internal/logic/listfunctionslogic.go new file mode 100644 index 00000000..a79b5b8f --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/internal/logic/listfunctionslogic.go @@ -0,0 +1,58 @@ +package logic + +import ( + "PCM/adaptor/PCM-FC/PCM-SCF/internal/svc" + "PCM/adaptor/PCM-FC/PCM-SCF/scf" + "PCM/common/tool" + "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" +) + +type ListFunctionsLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListFunctionsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListFunctionsLogic { + return &ListFunctionsLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// 查询腾讯云云函数列表 +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) + + // 实例化一个请求对象,每个接口都会对应一个request对象 + request := tscf.NewListFunctionsRequest() + + request.Limit = common.Int64Ptr(in.Limit) + if in.Namespace != "" { + request.Namespace = common.StringPtr(in.Namespace) + } + + // 返回的resp是一个ListFunctionsResponse的实例,与请求对象对应 + response, err := client.ListFunctions(request) + if _, ok := err.(*errors.TencentCloudSDKError); ok { + logx.Error(l.ctx, "An API error has returned: ", 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/server/scfserver.go b/adaptor/PCM-FC/PCM-SCF/internal/server/scfserver.go new file mode 100644 index 00000000..c55b8f29 --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/internal/server/scfserver.go @@ -0,0 +1,29 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: pcm-scf.proto + +package server + +import ( + "context" + + "PCM/adaptor/PCM-FC/PCM-SCF/internal/logic" + "PCM/adaptor/PCM-FC/PCM-SCF/internal/svc" + "PCM/adaptor/PCM-FC/PCM-SCF/scf" +) + +type ScfServer struct { + svcCtx *svc.ServiceContext + scf.UnimplementedScfServer +} + +func NewScfServer(svcCtx *svc.ServiceContext) *ScfServer { + return &ScfServer{ + svcCtx: svcCtx, + } +} + +// 查询腾讯云云函数列表 +func (s *ScfServer) ListFunctions(ctx context.Context, in *scf.ListFunctionsReq) (*scf.ListFunctionsResp, error) { + l := logic.NewListFunctionsLogic(ctx, s.svcCtx) + return l.ListFunctions(in) +} diff --git a/adaptor/PCM-FC/PCM-SCF/internal/svc/servicecontext.go b/adaptor/PCM-FC/PCM-SCF/internal/svc/servicecontext.go new file mode 100644 index 00000000..77088ce8 --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/internal/svc/servicecontext.go @@ -0,0 +1,24 @@ +package svc + +import ( + "PCM/adaptor/PCM-FC/PCM-SCF/internal/config" + "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" +) + +type ServiceContext struct { + Config config.Config + Credential *common.Credential +} + +func NewServiceContext(c config.Config) *ServiceContext { + + credential := common.NewCredential( + c.SecretConfig.SecretId, + c.SecretConfig.SecretKey, + ) + + return &ServiceContext{ + Credential: credential, + Config: c, + } +} diff --git a/adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto b/adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto new file mode 100644 index 00000000..999cb183 --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; + +package scf; +option go_package = "/scf"; + +message ListFunctionsReq { + string order = 1; + string orderby = 2; + int32 offset = 3; + int64 limit = 4; + string searchKey = 5; + string namespace = 6; + string description = 7; + repeated Filters filters = 8; + string region = 9; +} + +message Filters { + string name = 1; + repeated int32 values = 2; +} + + +message ListFunctionsResp { + Response response = 1; +} + +message Functions { + string addTime = 1; + string asyncRunEnable = 2; + string description = 3; + string functionId = 4; + string functionName = 5; + string modTime = 6; + string namespace = 7; + int32 reservedConcurrencyMem = 8; + string runtime = 9; + string status = 10; + string statusDesc = 11; + repeated string statusReasons = 12; + repeated string tags = 13; + int32 totalProvisionedConcurrencyMem = 14; + string traceEnable = 15; + string type = 16; +} + +message Response { + repeated Functions functions = 1; + string requestId = 2; + int32 totalCount = 3; +} + + +// scf +service Scf { + + //查询腾讯云云函数列表 + rpc ListFunctions(ListFunctionsReq) returns (ListFunctionsResp); + +} diff --git a/adaptor/PCM-FC/PCM-SCF/pcmscf.go b/adaptor/PCM-FC/PCM-SCF/pcmscf.go new file mode 100644 index 00000000..344e6af3 --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/pcmscf.go @@ -0,0 +1,67 @@ +package main + +import ( + "PCM/adaptor/PCM-FC/PCM-SCF/internal/server" + "PCM/adaptor/PCM-FC/PCM-SCF/internal/svc" + "PCM/adaptor/PCM-FC/PCM-SCF/scf" + commonConfig "PCM/common/config" + "PCM/common/interceptor/rpcserver" + "flag" + + "github.com/zeromicro/go-zero/core/logx" + + "PCM/adaptor/PCM-FC/PCM-SCF/internal/config" + + "github.com/zeromicro/go-zero/core/conf" + "github.com/zeromicro/go-zero/core/service" + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" +) + +var configFile = flag.String("f", "adaptor/PCM-FC/PCM-SCF/etc/pcmscf.yaml", "the config file") + +func main() { + + flag.Parse() + + var bootstrapConfig commonConfig.BootstrapConfig + conf.MustLoad(*configFile, &bootstrapConfig) + + //解析业务配置 + var c config.Config + nacosConfig := bootstrapConfig.NacosConfig + + serviceConfigContent := nacosConfig.InitConfig(func(data string) { + err := conf.LoadFromYamlBytes([]byte(data), &c) + if err != nil { + panic(err) + } + }) + err := conf.LoadFromYamlBytes([]byte(serviceConfigContent), &c) + if err != nil { + panic(err) + } + // start log component + logx.MustSetup(c.LogConf) + // 注册到nacos + nacosConfig.Discovery(&c.RpcServerConf) + + ctx := svc.NewServiceContext(c) + + s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { + scf.RegisterScfServer(grpcServer, server.NewScfServer(ctx)) + + if c.Mode == service.DevMode || c.Mode == service.TestMode { + reflection.Register(grpcServer) + } + }) + + //rpc log + s.AddUnaryInterceptors(rpcserver.LoggerInterceptor) + + defer s.Stop() + + logx.Infof("Starting rpc server at %s...\n", c.ListenOn) + s.Start() +} diff --git a/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go b/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go new file mode 100644 index 00000000..9cf29a8c --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go @@ -0,0 +1,663 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: pb/pcm-scf.proto + +package scf + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListFunctionsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Order string `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` + Orderby string `protobuf:"bytes,2,opt,name=orderby,proto3" json:"orderby,omitempty"` + Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` + Limit int64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` + SearchKey string `protobuf:"bytes,5,opt,name=searchKey,proto3" json:"searchKey,omitempty"` + Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` + Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` + Filters []*Filters `protobuf:"bytes,8,rep,name=filters,proto3" json:"filters,omitempty"` + Region string `protobuf:"bytes,9,opt,name=region,proto3" json:"region,omitempty"` +} + +func (x *ListFunctionsReq) Reset() { + *x = ListFunctionsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFunctionsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFunctionsReq) ProtoMessage() {} + +func (x *ListFunctionsReq) 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 ListFunctionsReq.ProtoReflect.Descriptor instead. +func (*ListFunctionsReq) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{0} +} + +func (x *ListFunctionsReq) GetOrder() string { + if x != nil { + return x.Order + } + return "" +} + +func (x *ListFunctionsReq) GetOrderby() string { + if x != nil { + return x.Orderby + } + return "" +} + +func (x *ListFunctionsReq) GetOffset() int32 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ListFunctionsReq) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ListFunctionsReq) GetSearchKey() string { + if x != nil { + return x.SearchKey + } + return "" +} + +func (x *ListFunctionsReq) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListFunctionsReq) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ListFunctionsReq) GetFilters() []*Filters { + if x != nil { + return x.Filters + } + return nil +} + +func (x *ListFunctionsReq) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +type Filters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Values []int32 `protobuf:"varint,2,rep,packed,name=values,proto3" json:"values,omitempty"` +} + +func (x *Filters) Reset() { + *x = Filters{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Filters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Filters) ProtoMessage() {} + +func (x *Filters) 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 Filters.ProtoReflect.Descriptor instead. +func (*Filters) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{1} +} + +func (x *Filters) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Filters) GetValues() []int32 { + if x != nil { + return x.Values + } + return nil +} + +type ListFunctionsResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *Response `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] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFunctionsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFunctionsResp) ProtoMessage() {} + +func (x *ListFunctionsResp) 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 ListFunctionsResp.ProtoReflect.Descriptor instead. +func (*ListFunctionsResp) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{2} +} + +func (x *ListFunctionsResp) GetResponse() *Response { + if x != nil { + return x.Response + } + return nil +} + +type Functions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddTime string `protobuf:"bytes,1,opt,name=addTime,proto3" json:"addTime,omitempty"` + AsyncRunEnable string `protobuf:"bytes,2,opt,name=asyncRunEnable,proto3" json:"asyncRunEnable,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + FunctionId string `protobuf:"bytes,4,opt,name=functionId,proto3" json:"functionId,omitempty"` + FunctionName string `protobuf:"bytes,5,opt,name=functionName,proto3" json:"functionName,omitempty"` + ModTime string `protobuf:"bytes,6,opt,name=modTime,proto3" json:"modTime,omitempty"` + Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` + ReservedConcurrencyMem int32 `protobuf:"varint,8,opt,name=reservedConcurrencyMem,proto3" json:"reservedConcurrencyMem,omitempty"` + Runtime string `protobuf:"bytes,9,opt,name=runtime,proto3" json:"runtime,omitempty"` + Status string `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"` + StatusDesc string `protobuf:"bytes,11,opt,name=statusDesc,proto3" json:"statusDesc,omitempty"` + StatusReasons []string `protobuf:"bytes,12,rep,name=statusReasons,proto3" json:"statusReasons,omitempty"` + Tags []string `protobuf:"bytes,13,rep,name=tags,proto3" json:"tags,omitempty"` + TotalProvisionedConcurrencyMem int32 `protobuf:"varint,14,opt,name=totalProvisionedConcurrencyMem,proto3" json:"totalProvisionedConcurrencyMem,omitempty"` + TraceEnable string `protobuf:"bytes,15,opt,name=traceEnable,proto3" json:"traceEnable,omitempty"` + Type string `protobuf:"bytes,16,opt,name=type,proto3" json:"type,omitempty"` +} + +func (x *Functions) Reset() { + *x = Functions{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Functions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Functions) ProtoMessage() {} + +func (x *Functions) 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 Functions.ProtoReflect.Descriptor instead. +func (*Functions) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{3} +} + +func (x *Functions) GetAddTime() string { + if x != nil { + return x.AddTime + } + return "" +} + +func (x *Functions) GetAsyncRunEnable() string { + if x != nil { + return x.AsyncRunEnable + } + return "" +} + +func (x *Functions) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Functions) GetFunctionId() string { + if x != nil { + return x.FunctionId + } + return "" +} + +func (x *Functions) GetFunctionName() string { + if x != nil { + return x.FunctionName + } + return "" +} + +func (x *Functions) GetModTime() string { + if x != nil { + return x.ModTime + } + return "" +} + +func (x *Functions) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Functions) GetReservedConcurrencyMem() int32 { + if x != nil { + return x.ReservedConcurrencyMem + } + return 0 +} + +func (x *Functions) GetRuntime() string { + if x != nil { + return x.Runtime + } + return "" +} + +func (x *Functions) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Functions) GetStatusDesc() string { + if x != nil { + return x.StatusDesc + } + return "" +} + +func (x *Functions) GetStatusReasons() []string { + if x != nil { + return x.StatusReasons + } + return nil +} + +func (x *Functions) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Functions) GetTotalProvisionedConcurrencyMem() int32 { + if x != nil { + return x.TotalProvisionedConcurrencyMem + } + return 0 +} + +func (x *Functions) GetTraceEnable() string { + if x != nil { + return x.TraceEnable + } + return "" +} + +func (x *Functions) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Functions []*Functions `protobuf:"bytes,1,rep,name=functions,proto3" json:"functions,omitempty"` + RequestId string `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId,omitempty"` + TotalCount int32 `protobuf:"varint,3,opt,name=totalCount,proto3" json:"totalCount,omitempty"` +} + +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_pcm_scf_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) 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 Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_pb_pcm_scf_proto_rawDescGZIP(), []int{4} +} + +func (x *Response) GetFunctions() []*Functions { + if x != nil { + return x.Functions + } + return nil +} + +func (x *Response) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *Response) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +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, + 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, + 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x36, 0x0a, + 0x16, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x4d, 0x65, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x16, 0x72, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x4d, 0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x44, 0x65, 0x73, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x44, 0x65, 0x73, 0x63, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, + 0x73, 0x12, 0x46, 0x0a, 0x1e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x4d, 0x65, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1e, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4d, 0x65, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, 0x61, + 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, +} + +var ( + file_pb_pcm_scf_proto_rawDescOnce sync.Once + file_pb_pcm_scf_proto_rawDescData = file_pb_pcm_scf_proto_rawDesc +) + +func file_pb_pcm_scf_proto_rawDescGZIP() []byte { + file_pb_pcm_scf_proto_rawDescOnce.Do(func() { + file_pb_pcm_scf_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_pcm_scf_proto_rawDescData) + }) + return file_pb_pcm_scf_proto_rawDescData +} + +var file_pb_pcm_scf_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +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 +} +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 +} + +func init() { file_pb_pcm_scf_proto_init() } +func file_pb_pcm_scf_proto_init() { + if File_pb_pcm_scf_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pb_pcm_scf_proto_msgTypes[0].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[1].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[2].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[3].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[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pb_pcm_scf_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_pb_pcm_scf_proto_goTypes, + DependencyIndexes: file_pb_pcm_scf_proto_depIdxs, + MessageInfos: file_pb_pcm_scf_proto_msgTypes, + }.Build() + File_pb_pcm_scf_proto = out.File + file_pb_pcm_scf_proto_rawDesc = nil + file_pb_pcm_scf_proto_goTypes = nil + file_pb_pcm_scf_proto_depIdxs = nil +} 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 new file mode 100644 index 00000000..f42227ed --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/scf/pcm-scf_grpc.pb.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.21.12 +// source: pb/pcm-scf.proto + +package scf + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Scf_ListFunctions_FullMethodName = "/scf.Scf/ListFunctions" +) + +// 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(ctx context.Context, in *ListFunctionsReq, opts ...grpc.CallOption) (*ListFunctionsResp, error) +} + +type scfClient struct { + cc grpc.ClientConnInterface +} + +func NewScfClient(cc grpc.ClientConnInterface) ScfClient { + return &scfClient{cc} +} + +func (c *scfClient) ListFunctions(ctx context.Context, in *ListFunctionsReq, opts ...grpc.CallOption) (*ListFunctionsResp, error) { + out := new(ListFunctionsResp) + err := c.cc.Invoke(ctx, Scf_ListFunctions_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(context.Context, *ListFunctionsReq) (*ListFunctionsResp, error) + mustEmbedUnimplementedScfServer() +} + +// UnimplementedScfServer must be embedded to have forward compatible implementations. +type UnimplementedScfServer struct { +} + +func (UnimplementedScfServer) ListFunctions(context.Context, *ListFunctionsReq) (*ListFunctionsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFunctions not implemented") +} +func (UnimplementedScfServer) mustEmbedUnimplementedScfServer() {} + +// UnsafeScfServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ScfServer will +// result in compilation errors. +type UnsafeScfServer interface { + mustEmbedUnimplementedScfServer() +} + +func RegisterScfServer(s grpc.ServiceRegistrar, srv ScfServer) { + s.RegisterService(&Scf_ServiceDesc, srv) +} + +func _Scf_ListFunctions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFunctionsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ScfServer).ListFunctions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Scf_ListFunctions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ScfServer).ListFunctions(ctx, req.(*ListFunctionsReq)) + } + 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) +var Scf_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "scf.Scf", + HandlerType: (*ScfServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListFunctions", + Handler: _Scf_ListFunctions_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 new file mode 100644 index 00000000..380cede7 --- /dev/null +++ b/adaptor/PCM-FC/PCM-SCF/scfclient/scf.go @@ -0,0 +1,42 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: pcm-scf.proto + +package scfclient + +import ( + "context" + + "PCM/adaptor/PCM-FC/PCM-SCF/scf" + + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" +) + +type ( + Filters = scf.Filters + Functions = scf.Functions + ListFunctionsReq = scf.ListFunctionsReq + ListFunctionsResp = scf.ListFunctionsResp + Response = scf.Response + + Scf interface { + // 查询腾讯云云函数列表 + ListFunctions(ctx context.Context, in *ListFunctionsReq, opts ...grpc.CallOption) (*ListFunctionsResp, error) + } + + defaultScf struct { + cli zrpc.Client + } +) + +func NewScf(cli zrpc.Client) Scf { + return &defaultScf{ + cli: cli, + } +} + +// 查询腾讯云云函数列表 +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...) +} diff --git a/deploy/README.md b/deploy/README.md index 3286d641..e38a5741 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -1,11 +1,12 @@ -| 服务名 | 端口号 | -|--------------------|------| -| pcm-core-api | 8999 | -| pcm-ac-rpc | 2001 | -| pcm-modelarts-rpc | 2002 | -| pcm-kubenative-rpc | 2003 | -| pcm-core-rpc | 2004 | -| pcm-hanwuji-rpc | 2005 | -| pcm-octopus-rpc | 2006 | -| pcm-th-rpc | 2007 | -| pcm-ceph-rpc | 2008 | \ No newline at end of file +| 服务名 | 端口号 | +|---------------------|------| +| pcm-core-api | 8999 | +| pcm-ac-rpc | 2001 | +| pcm-modelarts-rpc | 2002 | +| pcm-kubenative-rpc | 2003 | +| pcm-core-rpc | 2004 | +| pcm-hanwuji-rpc | 2005 | +| pcm-octopus-rpc | 2006 | +| pcm-th-rpc | 2007 | +| pcm-ceph-rpc | 2008 | +| pcm-scf-rpc | 2009 | \ No newline at end of file diff --git a/go.mod b/go.mod index 3b4be10b..057489f9 100644 --- a/go.mod +++ b/go.mod @@ -8,9 +8,6 @@ require ( github.com/Masterminds/squirrel v1.5.4 github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704 github.com/aws/aws-sdk-go v1.44.294 - github.com/aws/aws-sdk-go-v2/config v1.18.25 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.67 - github.com/aws/aws-sdk-go-v2/service/s3 v1.33.1 github.com/bitly/go-simplejson v0.5.0 github.com/docker/docker v20.10.24+incompatible github.com/go-redis/redis v6.15.9+incompatible @@ -23,6 +20,8 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/shopspring/decimal v1.3.1 github.com/sirupsen/logrus v1.9.0 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.693 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf v1.0.693 github.com/zeromicro/go-queue v1.1.8 github.com/zeromicro/go-zero v1.5.1 go.opentelemetry.io/otel/trace v1.14.0 @@ -38,22 +37,6 @@ require ( require ( github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/aws/aws-sdk-go-v2 v1.18.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.24 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.25 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.28 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.19.0 // indirect - github.com/aws/smithy-go v1.13.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect github.com/buger/jsonparser v1.1.1 // indirect diff --git a/go.sum b/go.sum index 80ccb5cf..91f5a7d1 100644 --- a/go.sum +++ b/go.sum @@ -435,44 +435,6 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.44.294 h1:3x7GaEth+pDU9HwFcAU0awZlEix5CEdyIZvV08SlHa8= github.com/aws/aws-sdk-go v1.44.294/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go-v2 v1.18.0 h1:882kkTpSFhdgYRKVZ/VCgf7sd0ru57p2JCxz4/oN5RY= -github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= -github.com/aws/aws-sdk-go-v2/config v1.18.25 h1:JuYyZcnMPBiFqn87L2cRppo+rNwgah6YwD3VuyvaW6Q= -github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/credentials v1.13.24 h1:PjiYyls3QdCrzqUN35jMWtUK1vqVZ+zLfdOa/UPFDp0= -github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 h1:jJPgroehGvjrde3XufFIJUZVK5A2L9a3KwSFgKy9n8w= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.67 h1:fI9/5BDEaAv/pv1VO1X1n3jfP9it+IGqWsCuuBQI8wM= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.67/go.mod h1:zQClPRIwQZfJlZq6WZve+s4Tb4JW+3V6eS+4+KrYeP8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 h1:kG5eQilShqmJbv11XL1VpyDbaEJzWxd4zRiCG30GSn4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 h1:vFQlirhuM8lLlpI7imKOMsjdQLuN9CPi+k44F/OFVsk= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 h1:gGLG7yKaXG02/jBlg210R7VgQIotiQntNhsCFejawx8= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.25 h1:AzwRi5OKKwo4QNqPf7TjeO+tK8AyOK3GVSwmRPo7/Cs= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.25/go.mod h1:SUbB4wcbSEyCvqBxv/O/IBf93RbEze7U7OnoTlpPB+g= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.28 h1:vGWm5vTpMr39tEZfQeDiDAMgk+5qsnvRny3FjLpnH5w= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.28/go.mod h1:spfrICMD6wCAhjhzHuy6DOZZ+LAIY10UxhUmLzpJTTs= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 h1:0iKliEXAcCa2qVtRs7Ot5hItA2MsufrphbRFlz1Owxo= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2 h1:NbWkRxEEIRSCqxhsHQuMiTH7yo+JZW1gp8v3elSVMTQ= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2/go.mod h1:4tfW5l4IAB32VWCDEBxCRtR9T4BWy4I4kr1spr8NgZM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.33.1 h1:O+9nAy9Bb6bJFTpeNFtd9UfHbgxO1o4ZDAM9rQp5NsY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.33.1/go.mod h1:J9kLNzEiHSeGMyN7238EjJmBpCniVzFda75Gxl/NqB8= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 h1:UBQjaMTCKwyUYwiVnUt6toEJwGXsLBI6al083tpjJzY= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 h1:PkHIIJs8qvq0e5QybnZoG1K/9QTrLr9OsqCIo59jOBA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.0 h1:2DQLAKDteoEDI8zpCzqBMaZlJuoE9iTYD0gFmXVax9E= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= -github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beanstalkd/go-beanstalk v0.2.0/go.mod h1:/G8YTyChOtpOArwLTQPY1CHB+i212+av35bkPXXj56Y= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -1030,6 +992,10 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.693 h1:RHMxHLQFonA430D1prj5ROhFDmdob3glrIwzYTGILWE= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.693/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf v1.0.693 h1:2UUZsALzyOTRdFrPb7LOxaMYR5Lc0GLKY7Y3M6bQFsY= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf v1.0.693/go.mod h1:+90Hl/2wOw2brDEs5yAxMkk9YfFTBWERNSYc4p3ovvI= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= From 848d28259f7ab84d0a5e634bb2329f3d7b88ace3 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Thu, 6 Jul 2023 10:03:21 +0800 Subject: [PATCH 05/22] =?UTF-8?q?=E9=95=9C=E5=83=8F=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 1611ce4e7cf257152006896583b84d3861b113c9 --- .../internal/handler/image/chunkhandler.go | 98 ++++++++++++------- adaptor/PCM-CORE/model/file.go | 8 +- 2 files changed, 68 insertions(+), 38 deletions(-) diff --git a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go index e20780d4..40eb2b99 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go @@ -11,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" @@ -19,6 +20,7 @@ import ( "strconv" "strings" "sync" + "time" "PCM/adaptor/PCM-CORE/api/internal/svc" ) @@ -32,6 +34,7 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { hash := r.PostFormValue("hash") name := r.PostFormValue("name") dataType := r.PostFormValue("dataType") + kind := r.PostFormValue("kind") // 对比合并请求的文件大小和已上传文件夹大小 toSize, _ := tool.GetDirSize(filepath.Join(uploadTempPath, hash)) if size != toSize { @@ -50,7 +53,7 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { 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) { @@ -70,73 +73,89 @@ 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 { + var err error + 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) } // 删除本地文件 避免占用本地存储资源 - go 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 { +// 同步数据集到modelArts +func syncDataSet() { + +} + +// 上传文件到云集存储 +func uploadStorage(svcCtx *svc.ServiceContext, hash string, name string) error { fileInfo, err := os.Open(filepath.Join(uploadPath, name)) - upload, err := svcCtx.Uploader.Upload(&s3manager.UploadInput{ + 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 } - println(upload.UploadID) + // 更新数据状态 + 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 := "hub.jcce.dev:18445/repository/docker-hub/" + 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 @@ -145,16 +164,27 @@ func pushImage(svcCtx *svc.ServiceContext, name string) error { Password: "Nudt@123", } 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("传输完成!") + println(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 } 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 From 5b10e312d25c6780c035c472f35da5950b5b9783 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Thu, 6 Jul 2023 10:32:44 +0800 Subject: [PATCH 06/22] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 64242fd9191716bed005825c4b6ff8346bec93c8 --- .../api/internal/handler/image/uploadhandler.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go b/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go index a9001b5e..90e841a2 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go @@ -5,6 +5,7 @@ import ( "PCM/common/tool" "bufio" "fmt" + "github.com/zeromicro/go-zero/core/logx" "io" "net/http" "os" @@ -36,9 +37,19 @@ func UploadHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { 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 := tool.PathExists(filePath) + if err != nil { + logx.Error(err) + result2.HttpResult(r, w, nil, err) + return + } // 文件存在 进行断点续传 if exists { fileInfo, _ := os.Stat(filePath) From 597ffb14895c09735528c0082945462abc205dfd Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Thu, 6 Jul 2023 10:40:41 +0800 Subject: [PATCH 07/22] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 474a2bc77ba597a0e41cc3e5407b776b0dffaf0b --- adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go b/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go index 90e841a2..07da4755 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/uploadhandler.go @@ -25,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") From 33112bada516506b7a014c118a19c4403944c4b3 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Thu, 6 Jul 2023 16:07:05 +0800 Subject: [PATCH 08/22] =?UTF-8?q?docker=20client=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: e49440f47fa3edbcd5434b339f2775568374a497 --- adaptor/PCM-CORE/api/internal/config/config.go | 4 ++++ adaptor/PCM-CORE/api/internal/svc/servicecontext.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/adaptor/PCM-CORE/api/internal/config/config.go b/adaptor/PCM-CORE/api/internal/config/config.go index 4199d3da..de16da22 100644 --- a/adaptor/PCM-CORE/api/internal/config/config.go +++ b/adaptor/PCM-CORE/api/internal/config/config.go @@ -39,4 +39,8 @@ type Config struct { AccessKey string Endpoint string } + + DockerConf struct { + Host string + } } diff --git a/adaptor/PCM-CORE/api/internal/svc/servicecontext.go b/adaptor/PCM-CORE/api/internal/svc/servicecontext.go index b79ef681..96bedd83 100644 --- a/adaptor/PCM-CORE/api/internal/svc/servicecontext.go +++ b/adaptor/PCM-CORE/api/internal/svc/servicecontext.go @@ -57,7 +57,7 @@ func NewServiceContext(c config.Config) *ServiceContext { SingularTable: true, // 使用单数表名,启用该选项,此时,`User` 的表名应该是 `t_user` }, }) - dockerClient, err := client.NewClientWithOpts() + dockerClient, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation(), client.WithHost(c.DockerConf.Host)) if err != nil { logx.Error(err.Error()) return nil From a64ade055e5d1ab29138c560c53a82abf3858d0f Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Fri, 7 Jul 2023 09:41:38 +0800 Subject: [PATCH 09/22] =?UTF-8?q?docker=20client=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E4=BF=AE=E6=94=B9=E6=88=90=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: b65d509bd6a3e72232ae9c074bf33256fe1b23eb --- .../PCM-CORE/api/internal/handler/image/chunkhandler.go | 8 ++++++-- adaptor/PCM-CORE/api/internal/svc/servicecontext.go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go index 40eb2b99..6eb85a12 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go @@ -36,7 +36,12 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { dataType := r.PostFormValue("dataType") kind := r.PostFormValue("kind") // 对比合并请求的文件大小和已上传文件夹大小 - toSize, _ := tool.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, "文件上传错误") } @@ -81,7 +86,6 @@ func ChunkHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { Bucket: "pcm"}) // 根据数据类型按需上传(镜像推送到nexus 数据集和算法推送到云际存储) - var err error switch kind { case "image": err = pushImage(svcCtx, hash, name) diff --git a/adaptor/PCM-CORE/api/internal/svc/servicecontext.go b/adaptor/PCM-CORE/api/internal/svc/servicecontext.go index 96bedd83..b79ef681 100644 --- a/adaptor/PCM-CORE/api/internal/svc/servicecontext.go +++ b/adaptor/PCM-CORE/api/internal/svc/servicecontext.go @@ -57,7 +57,7 @@ func NewServiceContext(c config.Config) *ServiceContext { SingularTable: true, // 使用单数表名,启用该选项,此时,`User` 的表名应该是 `t_user` }, }) - dockerClient, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation(), client.WithHost(c.DockerConf.Host)) + dockerClient, err := client.NewClientWithOpts() if err != nil { logx.Error(err.Error()) return nil From b42e78fef7f9069c2833ad616a954cdefe353f3a Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Fri, 7 Jul 2023 09:45:37 +0800 Subject: [PATCH 10/22] =?UTF-8?q?pcm-core-api=20yaml=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 6d2088c033d8c8006337b5ee670fa76404c3e0c0 --- deploy/pcm-core-deployment.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deploy/pcm-core-deployment.yaml b/deploy/pcm-core-deployment.yaml index 2ed893ec..ddeb3a83 100644 --- a/deploy/pcm-core-deployment.yaml +++ b/deploy/pcm-core-deployment.yaml @@ -35,10 +35,16 @@ spec: volumeMounts: - mountPath: /home/uploads name: pcm-image-storage + - mountPath: /var/run/docker.sock + name: docker-sock-volume volumes: - name: pcm-image-storage persistentVolumeClaim: claimName: pcm-image-storage + - name: docker-sock-volume + hostPath: + path: /var/run/docker.sock + type: FileOrCreate restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst From a3b4d29a24d65aadf656b365ea2382a26234c861 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Fri, 7 Jul 2023 10:24:10 +0800 Subject: [PATCH 11/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9docker=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 3a5cf8cbee8ecc91d0439b0fff6cd9f8c0b94339 --- adaptor/PCM-CORE/api/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 && \ From c8f3eff9f2bb76d9bbb56202b4c3644cad3e58cd Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Fri, 7 Jul 2023 15:47:41 +0800 Subject: [PATCH 12/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=82=E8=BD=BD?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 426cab62bab1f9e76806c479c8c03fbdda2da65e --- deploy/pcm-core-deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/pcm-core-deployment.yaml b/deploy/pcm-core-deployment.yaml index ddeb3a83..2d8bd29b 100644 --- a/deploy/pcm-core-deployment.yaml +++ b/deploy/pcm-core-deployment.yaml @@ -36,12 +36,12 @@ spec: - mountPath: /home/uploads name: pcm-image-storage - mountPath: /var/run/docker.sock - name: docker-sock-volume + name: sock-volume volumes: - name: pcm-image-storage persistentVolumeClaim: claimName: pcm-image-storage - - name: docker-sock-volume + - name: sock-volume hostPath: path: /var/run/docker.sock type: FileOrCreate From 202a89ed182f9716be2805710711783184adb910 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Fri, 7 Jul 2023 15:55:13 +0800 Subject: [PATCH 13/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=82=E8=BD=BD?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 9c3325b8f4fa4a4e8d4900831c54e96aa60762e0 --- deploy/pcm-core-deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/pcm-core-deployment.yaml b/deploy/pcm-core-deployment.yaml index 2d8bd29b..cfc8d3ac 100644 --- a/deploy/pcm-core-deployment.yaml +++ b/deploy/pcm-core-deployment.yaml @@ -42,9 +42,9 @@ spec: persistentVolumeClaim: claimName: pcm-image-storage - name: sock-volume - hostPath: - path: /var/run/docker.sock - type: FileOrCreate + hostPath: + path: /var/run/docker.sock + type: FileOrCreate restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst From 33415610e9584dc6ca9e133b3132f80dbeedfc1a Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Fri, 7 Jul 2023 16:02:09 +0800 Subject: [PATCH 14/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=82=E8=BD=BD?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: fba1807a5d7e59b4fad7012c6acc457eeea9bcf8 --- deploy/pcm-core-deployment.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/deploy/pcm-core-deployment.yaml b/deploy/pcm-core-deployment.yaml index cfc8d3ac..d9720e7c 100644 --- a/deploy/pcm-core-deployment.yaml +++ b/deploy/pcm-core-deployment.yaml @@ -44,7 +44,6 @@ spec: - name: sock-volume hostPath: path: /var/run/docker.sock - type: FileOrCreate restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst From 1f15bad31be0d83cd7e8390d563a19dae179a3e3 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Fri, 7 Jul 2023 16:29:50 +0800 Subject: [PATCH 15/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: fdd81a6b333816d434a8e1bde6be625c8a5f6ee9 --- adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go index 6eb85a12..5299dbef 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go @@ -149,7 +149,7 @@ func pushImage(svcCtx *svc.ServiceContext, hash string, name string) error { return err } //time.Sleep(12 * 100 * time.Millisecond) - privateImageName := "hub.jcce.dev:18445/repository/docker-hub/" + name + privateImageName := "registry.cn-hangzhou.aliyuncs.com/jointcloud/pcm:" + name // 给镜像打上私有仓库的tag err = svcCtx.DockerClient.ImageTag(context.Background(), name, privateImageName) if err != nil { @@ -164,7 +164,7 @@ func pushImage(svcCtx *svc.ServiceContext, hash string, name string) error { } // 推送镜像到registry authConfig := types2.AuthConfig{ - Username: "admin", + Username: "jointcloudNudt", Password: "Nudt@123", } authConfigBytes, err := json.Marshal(authConfig) From 3795fc64aa85e55012e54253049bdb0ab1592138 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Fri, 7 Jul 2023 16:46:16 +0800 Subject: [PATCH 16/22] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: ec6172833842042d3d17c04462781730def61af3 --- adaptor/PCM-CORE/api/internal/config/config.go | 5 +++-- adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/adaptor/PCM-CORE/api/internal/config/config.go b/adaptor/PCM-CORE/api/internal/config/config.go index de16da22..8ffc6adb 100644 --- a/adaptor/PCM-CORE/api/internal/config/config.go +++ b/adaptor/PCM-CORE/api/internal/config/config.go @@ -40,7 +40,8 @@ type Config struct { Endpoint string } - DockerConf struct { - Host 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 5299dbef..bc3bd297 100644 --- a/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go +++ b/adaptor/PCM-CORE/api/internal/handler/image/chunkhandler.go @@ -164,15 +164,15 @@ func pushImage(svcCtx *svc.ServiceContext, hash string, name string) error { } // 推送镜像到registry authConfig := types2.AuthConfig{ - Username: "jointcloudNudt", - Password: "Nudt@123", + Username: svcCtx.Config.RegistryConf.Username, + Password: svcCtx.Config.RegistryConf.Password, } authConfigBytes, err := json.Marshal(authConfig) if err != nil { logx.Error(err) return err } - println(fmt.Sprintln("传输开始", time.Now())) + 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) From c3cf9946c9e7aa3347381c07b78825a843ba94f1 Mon Sep 17 00:00:00 2001 From: tzwang Date: Mon, 10 Jul 2023 10:28:37 +0800 Subject: [PATCH 17/22] =?UTF-8?q?octopus=E4=BF=AE=E6=94=B9tokenservice?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: c6fb5065a61bf84a0a083a3b22cc098ac59320a4 --- .../rpc/internal/common/tokenService.go | 16 ++++-- .../rpc/internal/logic/createdatasetlogic.go | 6 ++ .../logic/createdatasetversionlogic.go | 6 ++ .../rpc/internal/logic/createimagelogic.go | 6 ++ .../internal/logic/createmodeldeploylogic.go | 6 ++ .../internal/logic/createmyalgorithmlogic.go | 6 ++ .../rpc/internal/logic/createnotebooklogic.go | 6 ++ .../rpc/internal/logic/createtrainjoblogic.go | 6 ++ .../rpc/internal/logic/deletedatasetlogic.go | 6 ++ .../logic/deletedatasetversionlogic.go | 6 ++ .../rpc/internal/logic/deleteimagelogic.go | 6 ++ .../internal/logic/deletemodeldeploylogic.go | 6 ++ .../internal/logic/deletemodelversionlogic.go | 6 ++ .../internal/logic/deletemyalgorithmlogic.go | 6 ++ .../rpc/internal/logic/deletemymodellogic.go | 6 ++ .../rpc/internal/logic/deletenotebooklogic.go | 6 ++ .../rpc/internal/logic/deletetrainjoblogic.go | 7 +++ .../internal/logic/downloadalgorithmlogic.go | 6 ++ .../logic/downloadmodelversionlogic.go | 6 ++ .../logic/getalgorithmapplylistlogic.go | 6 ++ .../logic/getalgorithmframeworklistlogic.go | 6 ++ .../internal/logic/getalgorithmlistlogic.go | 6 ++ .../rpc/internal/logic/getalgorithmlogic.go | 6 ++ .../internal/logic/getcomputingpowerlogic.go | 3 + .../logic/getdatasetapplylistlogic.go | 6 ++ .../internal/logic/getdatasettypelistlogic.go | 6 ++ .../logic/getdatasetversionlistlogic.go | 6 ++ .../rpc/internal/logic/getgeneralinfologic.go | 3 + .../logic/getmodeldeployeventlogic.go | 6 ++ .../internal/logic/getmodeldeploylistlogic.go | 6 ++ .../rpc/internal/logic/getmodeldeploylogic.go | 6 ++ .../logic/getmodelversionlistlogic.go | 6 ++ .../internal/logic/getmyalgorithmlistlogic.go | 6 ++ .../internal/logic/getmydatasetlistlogic.go | 6 ++ .../rpc/internal/logic/getmymodellistlogic.go | 6 ++ .../internal/logic/getnotebooklistlogic.go | 6 ++ .../rpc/internal/logic/getnotebooklogic.go | 6 ++ .../internal/logic/gettrainjobeventlogic.go | 6 ++ .../internal/logic/gettrainjoblistlogic.go | 6 ++ .../rpc/internal/logic/gettrainjoblogic.go | 6 ++ .../internal/logic/gettrainjobmetriclogic.go | 6 ++ .../internal/logic/getuserimagelistlogic.go | 6 ++ .../internal/logic/infermodeldeploylogic.go | 6 ++ .../rpc/internal/logic/startnotebooklogic.go | 6 ++ .../internal/logic/stopmodeldeploylogic.go | 6 ++ .../rpc/internal/logic/stopnotebooklogic.go | 6 ++ .../rpc/internal/logic/stoptrainjoblogic.go | 6 ++ .../logic/uploadalgorithmconfirmlogic.go | 6 ++ .../internal/logic/uploadalgorithmlogic.go | 6 ++ .../logic/uploaddatasetconfirmlogic.go | 6 ++ .../rpc/internal/logic/uploaddatasetlogic.go | 6 ++ .../internal/logic/uploadimageconfirmlogic.go | 6 ++ .../rpc/internal/logic/uploadimagelogic.go | 6 ++ .../logic/core/getcomputingpowerlogic.go | 57 +++++++++++++++++-- 54 files changed, 369 insertions(+), 11 deletions(-) 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/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 } From d51c5aed5584eb509f6fcd4e6c60a684fc6a232c Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Mon, 10 Jul 2023 17:05:34 +0800 Subject: [PATCH 18/22] =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B3=A8=E9=87=8A=20=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 0df5d171dc5ae18ee9245d8d519bc9986694ff15 --- .../internal/logic/image/imagelistlogic.go | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go b/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go index f2e2b363..3081d2ba 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" ) @@ -32,29 +29,29 @@ func NewImageListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ImageLi func (l *ImageListLogic) ImageList() (resp *types.ImageListResp, err error) { // 获取镜像列表 - 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) - } - } - return &result, nil + //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("registry.cn-hangzhou.aliyuncs.com/jointcloud/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) + // } + //} + return nil, nil } From 976e9b2b09638356ceb9c92439645a3cc84b95fa Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Mon, 10 Jul 2023 17:27:02 +0800 Subject: [PATCH 19/22] =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 7ee7b0c5c4c5838ca0e5316427141579ab1b653e --- .../internal/logic/image/imagelistlogic.go | 33 ++++--------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go b/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go index 3081d2ba..859b4548 100644 --- a/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go +++ b/adaptor/PCM-CORE/api/internal/logic/image/imagelistlogic.go @@ -27,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("registry.cn-hangzhou.aliyuncs.com/jointcloud/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) - // } - //} - return nil, nil + result := types.ImageListResp{ + Repositories: images, + } + + return &result, nil } From f656d056bd50958c199ba2ddb5ef9239462296f1 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Tue, 11 Jul 2023 10:33:41 +0800 Subject: [PATCH 20/22] =?UTF-8?q?=E5=A4=96=E9=83=A8=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9E=9A=E4=B8=BE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 9e6d65053cd507a78c7337421719e6b4be1b96cb --- .../api/internal/logic/core/jobtotallogic.go | 2 +- common/enum/externalStatusEnum.go | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 common/enum/externalStatusEnum.go 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/common/enum/externalStatusEnum.go b/common/enum/externalStatusEnum.go new file mode 100644 index 00000000..6325fdb3 --- /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 "Succeeded" + case EXTERNAL_FAILED: + return "Failed" + default: + return "" + } +} From 1adcf288da1a6d5ddf05195ab2d9a5d4a74637d4 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Tue, 11 Jul 2023 11:21:31 +0800 Subject: [PATCH 21/22] =?UTF-8?q?=E5=A4=96=E9=83=A8=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9E=9A=E4=B8=BE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 28f048bdfcaf32dfd7288dbfe5a56ad3e9b25fdc --- common/enum/externalStatusEnum.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/enum/externalStatusEnum.go b/common/enum/externalStatusEnum.go index 6325fdb3..8ddb4dd0 100644 --- a/common/enum/externalStatusEnum.go +++ b/common/enum/externalStatusEnum.go @@ -19,7 +19,7 @@ func (s ExternalStatus) String() string { case EXTERNAL_PENDING: return "Pending" case EXTERNAL_SUCCEEDED: - return "Succeeded" + return "Completed" case EXTERNAL_FAILED: return "Failed" default: From 61c5fc033d19e43f5d629000df03a7d983096918 Mon Sep 17 00:00:00 2001 From: devad Date: Tue, 11 Jul 2023 12:29:07 +0800 Subject: [PATCH 22/22] =?UTF-8?q?feat:=20=E5=AF=B9=E6=8E=A5=E8=85=BE?= =?UTF-8?q?=E8=AE=AF=E4=BA=91=E6=9F=A5=E8=AF=A2=E5=87=BD=E6=95=B0=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: devad Former-commit-id: 9cfe3e0a5f67030246cf121cd155c4ea1db36c03 --- adaptor/PCM-FC/PCM-SCF/READM.md | 2 +- .../internal/logic/getfunctionslogic.go | 52 + .../internal/logic/listfunctionslogic.go | 11 +- .../PCM-SCF/internal/server/scfserver.go | 8 +- .../PCM-SCF/internal/svc/servicecontext.go | 8 + adaptor/PCM-FC/PCM-SCF/pb/pcm-scf.proto | 172 +- adaptor/PCM-FC/PCM-SCF/scf/pcm-scf.pb.go | 2257 ++++++++++++++++- adaptor/PCM-FC/PCM-SCF/scf/pcm-scf_grpc.pb.go | 45 +- adaptor/PCM-FC/PCM-SCF/scfclient/scf.go | 41 +- 9 files changed, 2483 insertions(+), 113 deletions(-) create mode 100644 adaptor/PCM-FC/PCM-SCF/internal/logic/getfunctionslogic.go diff --git a/adaptor/PCM-FC/PCM-SCF/READM.md b/adaptor/PCM-FC/PCM-SCF/READM.md index 647a448a..79d6612f 100644 --- a/adaptor/PCM-FC/PCM-SCF/READM.md +++ b/adaptor/PCM-FC/PCM-SCF/READM.md @@ -16,7 +16,7 @@ - [ ] 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...) +}