From 151ed1f96514fcbfad50e439d0c27cf2f1680cb0 Mon Sep 17 00:00:00 2001 From: tzwang Date: Fri, 20 Sep 2024 16:22:35 +0800 Subject: [PATCH] added isFileExist rpc --- etc/hpcac.yaml | 1 + internal/config/shuguangConfig.go | 1 + pb/hpcAC.proto | 15 +++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/etc/hpcac.yaml b/etc/hpcac.yaml index 2f33c5d..6fe62c8 100644 --- a/etc/hpcac.yaml +++ b/etc/hpcac.yaml @@ -59,6 +59,7 @@ GetQueueNames: "/hpc/openapi/v2/queuenames/users/{username}" #查询用户可 GetFileList : "/openapi/v2/file/list" GetFile: "/openapi/v2/file/download" UploadFile : "/openapi/v2/file/upload" +ExistFile : "/efile/openapi/v2/file/exist" # 容器 GetInstanceAi : "/sothisai/api/instance-service" diff --git a/internal/config/shuguangConfig.go b/internal/config/shuguangConfig.go index 12bdef6..e5cd3b8 100644 --- a/internal/config/shuguangConfig.go +++ b/internal/config/shuguangConfig.go @@ -51,6 +51,7 @@ type FileConf struct { GetFileList string GetFile string UploadFile string + ExistFile string } // 曙光用户资源 diff --git a/pb/hpcAC.proto b/pb/hpcAC.proto index ec714af..1c177a9 100644 --- a/pb/hpcAC.proto +++ b/pb/hpcAC.proto @@ -1052,6 +1052,20 @@ message UploadFileResp { message UploadFileData { } + +message IsExistFileReq { + string path = 1; +} + +message IsExistFileResp { + string code = 1; + Exist data = 2; + string msg = 3; +} + +message Exist { + bool exist = 1; +} /******************曙光文件接口 End*************************/ /******************曙光容器 Start*************************/ @@ -1349,6 +1363,7 @@ service hpcAC { rpc GetFileList (GetFileListReq) returns (GetFileListResp); rpc GetFile (GetFileReq) returns (GetFileResp); rpc UploadFile (UploadFileReq) returns (UploadFileResp); + rpc IsExistFile (IsExistFileReq) returns (IsExistFileResp); //用户资源