forked from JointCloud/pcm-ac
generate rpc funcs
This commit is contained in:
parent
1c5b789b5c
commit
9d5a86ac23
1116
hpcAC/hpcAC.pb.go
1116
hpcAC/hpcAC.pb.go
File diff suppressed because it is too large
Load Diff
|
@ -49,6 +49,8 @@ const (
|
|||
HpcAC_GetResourceSpec_FullMethodName = "/hpcAC.hpcAC/GetResourceSpec"
|
||||
HpcAC_GetInstanceLog_FullMethodName = "/hpcAC.hpcAC/GetInstanceLog"
|
||||
HpcAC_GetFileList_FullMethodName = "/hpcAC.hpcAC/GetFileList"
|
||||
HpcAC_GetFile_FullMethodName = "/hpcAC.hpcAC/GetFile"
|
||||
HpcAC_UploadFile_FullMethodName = "/hpcAC.hpcAC/UploadFile"
|
||||
HpcAC_GetUserInfo_FullMethodName = "/hpcAC.hpcAC/GetUserInfo"
|
||||
HpcAC_GetMemberJobs_FullMethodName = "/hpcAC.hpcAC/GetMemberJobs"
|
||||
HpcAC_GetNodeResources_FullMethodName = "/hpcAC.hpcAC/GetNodeResources"
|
||||
|
@ -107,6 +109,8 @@ type HpcACClient interface {
|
|||
GetInstanceLog(ctx context.Context, in *GetInstanceLogReq, opts ...grpc.CallOption) (*GetInstanceLogResp, error)
|
||||
// 曙光文件接口
|
||||
GetFileList(ctx context.Context, in *GetFileListReq, opts ...grpc.CallOption) (*GetFileListResp, error)
|
||||
GetFile(ctx context.Context, in *GetFileReq, opts ...grpc.CallOption) (*GetFileResp, error)
|
||||
UploadFile(ctx context.Context, in *UploadFileReq, opts ...grpc.CallOption) (*UploadFileResp, error)
|
||||
// 用户资源
|
||||
GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
|
||||
GetMemberJobs(ctx context.Context, in *GetMemberJobsReq, opts ...grpc.CallOption) (*GetMemberJobsResp, error)
|
||||
|
@ -392,6 +396,24 @@ func (c *hpcACClient) GetFileList(ctx context.Context, in *GetFileListReq, opts
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hpcACClient) GetFile(ctx context.Context, in *GetFileReq, opts ...grpc.CallOption) (*GetFileResp, error) {
|
||||
out := new(GetFileResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetFile_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hpcACClient) UploadFile(ctx context.Context, in *UploadFileReq, opts ...grpc.CallOption) (*UploadFileResp, error) {
|
||||
out := new(UploadFileResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_UploadFile_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hpcACClient) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) {
|
||||
out := new(GetUserInfoResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetUserInfo_FullMethodName, in, out, opts...)
|
||||
|
@ -472,6 +494,8 @@ type HpcACServer interface {
|
|||
GetInstanceLog(context.Context, *GetInstanceLogReq) (*GetInstanceLogResp, error)
|
||||
// 曙光文件接口
|
||||
GetFileList(context.Context, *GetFileListReq) (*GetFileListResp, error)
|
||||
GetFile(context.Context, *GetFileReq) (*GetFileResp, error)
|
||||
UploadFile(context.Context, *UploadFileReq) (*UploadFileResp, error)
|
||||
// 用户资源
|
||||
GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
|
||||
GetMemberJobs(context.Context, *GetMemberJobsReq) (*GetMemberJobsResp, error)
|
||||
|
@ -574,6 +598,12 @@ func (UnimplementedHpcACServer) GetInstanceLog(context.Context, *GetInstanceLogR
|
|||
func (UnimplementedHpcACServer) GetFileList(context.Context, *GetFileListReq) (*GetFileListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetFileList not implemented")
|
||||
}
|
||||
func (UnimplementedHpcACServer) GetFile(context.Context, *GetFileReq) (*GetFileResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetFile not implemented")
|
||||
}
|
||||
func (UnimplementedHpcACServer) UploadFile(context.Context, *UploadFileReq) (*UploadFileResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UploadFile not implemented")
|
||||
}
|
||||
func (UnimplementedHpcACServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented")
|
||||
}
|
||||
|
@ -1136,6 +1166,42 @@ func _HpcAC_GetFileList_Handler(srv interface{}, ctx context.Context, dec func(i
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HpcAC_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetFileReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HpcACServer).GetFile(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetFile_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetFile(ctx, req.(*GetFileReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HpcAC_UploadFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UploadFileReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HpcACServer).UploadFile(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_UploadFile_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).UploadFile(ctx, req.(*UploadFileReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HpcAC_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUserInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -1317,6 +1383,14 @@ var HpcAC_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "GetFileList",
|
||||
Handler: _HpcAC_GetFileList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetFile",
|
||||
Handler: _HpcAC_GetFile_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UploadFile",
|
||||
Handler: _HpcAC_UploadFile_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUserInfo",
|
||||
Handler: _HpcAC_GetUserInfo_Handler,
|
||||
|
|
|
@ -37,6 +37,8 @@ type (
|
|||
FileListData = hpcAC.FileListData
|
||||
GetFileListReq = hpcAC.GetFileListReq
|
||||
GetFileListResp = hpcAC.GetFileListResp
|
||||
GetFileReq = hpcAC.GetFileReq
|
||||
GetFileResp = hpcAC.GetFileResp
|
||||
GetImageAiByIdReq = hpcAC.GetImageAiByIdReq
|
||||
GetImageAiByIdResp = hpcAC.GetImageAiByIdResp
|
||||
GetImageListAiReq = hpcAC.GetImageListAiReq
|
||||
|
@ -108,6 +110,9 @@ type (
|
|||
SubmitTensorflowTaskParams = hpcAC.SubmitTensorflowTaskParams
|
||||
SubmitTensorflowTaskReq = hpcAC.SubmitTensorflowTaskReq
|
||||
TokenResp = hpcAC.TokenResp
|
||||
UploadFileData = hpcAC.UploadFileData
|
||||
UploadFileReq = hpcAC.UploadFileReq
|
||||
UploadFileResp = hpcAC.UploadFileResp
|
||||
UserQuotasLimitData = hpcAC.UserQuotasLimitData
|
||||
UserQuotasLimitResp = hpcAC.UserQuotasLimitResp
|
||||
WallTimeReq = hpcAC.WallTimeReq
|
||||
|
@ -163,6 +168,8 @@ type (
|
|||
GetInstanceLog(ctx context.Context, in *GetInstanceLogReq, opts ...grpc.CallOption) (*GetInstanceLogResp, error)
|
||||
// 曙光文件接口
|
||||
GetFileList(ctx context.Context, in *GetFileListReq, opts ...grpc.CallOption) (*GetFileListResp, error)
|
||||
GetFile(ctx context.Context, in *GetFileReq, opts ...grpc.CallOption) (*GetFileResp, error)
|
||||
UploadFile(ctx context.Context, in *UploadFileReq, opts ...grpc.CallOption) (*UploadFileResp, error)
|
||||
// 用户资源
|
||||
GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
|
||||
GetMemberJobs(ctx context.Context, in *GetMemberJobsReq, opts ...grpc.CallOption) (*GetMemberJobsResp, error)
|
||||
|
@ -350,6 +357,16 @@ func (m *defaultHpcAC) GetFileList(ctx context.Context, in *GetFileListReq, opts
|
|||
return client.GetFileList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultHpcAC) GetFile(ctx context.Context, in *GetFileReq, opts ...grpc.CallOption) (*GetFileResp, error) {
|
||||
client := hpcAC.NewHpcACClient(m.cli.Conn())
|
||||
return client.GetFile(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultHpcAC) UploadFile(ctx context.Context, in *UploadFileReq, opts ...grpc.CallOption) (*UploadFileResp, error) {
|
||||
client := hpcAC.NewHpcACClient(m.cli.Conn())
|
||||
return client.UploadFile(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 用户资源
|
||||
func (m *defaultHpcAC) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) {
|
||||
client := hpcAC.NewHpcACClient(m.cli.Conn())
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/hpcAC"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetFileLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewGetFileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetFileLogic {
|
||||
return &GetFileLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetFileLogic) GetFile(in *hpcAC.GetFileReq) (*hpcAC.GetFileResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &hpcAC.GetFileResp{}, nil
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/hpcAC"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type UploadFileLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewUploadFileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UploadFileLogic {
|
||||
return &UploadFileLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *UploadFileLogic) UploadFile(in *hpcAC.UploadFileReq) (*hpcAC.UploadFileResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &hpcAC.UploadFileResp{}, nil
|
||||
}
|
|
@ -191,6 +191,16 @@ func (s *HpcACServer) GetFileList(ctx context.Context, in *hpcAC.GetFileListReq)
|
|||
return l.GetFileList(in)
|
||||
}
|
||||
|
||||
func (s *HpcACServer) GetFile(ctx context.Context, in *hpcAC.GetFileReq) (*hpcAC.GetFileResp, error) {
|
||||
l := logic.NewGetFileLogic(ctx, s.svcCtx)
|
||||
return l.GetFile(in)
|
||||
}
|
||||
|
||||
func (s *HpcACServer) UploadFile(ctx context.Context, in *hpcAC.UploadFileReq) (*hpcAC.UploadFileResp, error) {
|
||||
l := logic.NewUploadFileLogic(ctx, s.svcCtx)
|
||||
return l.UploadFile(in)
|
||||
}
|
||||
|
||||
// 用户资源
|
||||
func (s *HpcACServer) GetUserInfo(ctx context.Context, in *hpcAC.GetUserInfoReq) (*hpcAC.GetUserInfoResp, error) {
|
||||
l := logic.NewGetUserInfoLogic(ctx, s.svcCtx)
|
||||
|
|
Loading…
Reference in New Issue