octopus 添加我的算法列表接口,notebook列表接口
This commit is contained in:
parent
711454c41c
commit
3cdbbf1239
|
@ -45,11 +45,5 @@ func getConfig() Config {
|
||||||
// 注册到nacos
|
// 注册到nacos
|
||||||
nacosConfig.Discovery(&c.RpcServerConf)
|
nacosConfig.Discovery(&c.RpcServerConf)
|
||||||
|
|
||||||
//OctopusUrls = map[string]string{
|
|
||||||
// common.Hanwuji: c.OctopusConfig.HanwujiUrl,
|
|
||||||
// common.Suiyuan: c.OctopusConfig.SuiyuanUrl,
|
|
||||||
// common.Sailingsi: c.OctopusConfig.SailingsiUrl,
|
|
||||||
//}
|
|
||||||
|
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,5 +14,7 @@ type OctopusConfig struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type OctopusApi struct {
|
type OctopusApi struct {
|
||||||
GetUserImageList string
|
GetUserImageList string
|
||||||
|
GetMyAlgorithmList string
|
||||||
|
GetNotebookList string
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
package logic
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common"
|
||||||
|
"PCM/common/tool"
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc"
|
||||||
|
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetMyAlgorithmListLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGetMyAlgorithmListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetMyAlgorithmListLogic {
|
||||||
|
return &GetMyAlgorithmListLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Algorithm
|
||||||
|
func (l *GetMyAlgorithmListLogic) GetMyAlgorithmList(in *octopus.GetMyAlgorithmListReq) (*octopus.GetMyAlgorithmListResp, error) {
|
||||||
|
resp := &octopus.GetMyAlgorithmListResp{}
|
||||||
|
|
||||||
|
var url_prefix = common.OctopusUrls[in.Platform]
|
||||||
|
var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetMyAlgorithmList
|
||||||
|
|
||||||
|
token := common.GetToken(in.Platform)
|
||||||
|
|
||||||
|
req := tool.GetACHttpRequest()
|
||||||
|
_, err := req.
|
||||||
|
SetHeader("Authorization", "Bearer "+token).
|
||||||
|
SetQueryString("pageIndex=" + strconv.Itoa(int(in.PageIndex))).
|
||||||
|
SetQueryString("pageSize=" + strconv.Itoa(int(in.PageSize))).
|
||||||
|
SetResult(&resp).
|
||||||
|
Get(reqUrl)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
package logic
|
||||||
|
|
||||||
|
import (
|
||||||
|
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common"
|
||||||
|
"PCM/common/tool"
|
||||||
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc"
|
||||||
|
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
|
)
|
||||||
|
|
||||||
|
type GetNotebookListLogic struct {
|
||||||
|
ctx context.Context
|
||||||
|
svcCtx *svc.ServiceContext
|
||||||
|
logx.Logger
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGetNotebookListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetNotebookListLogic {
|
||||||
|
return &GetNotebookListLogic{
|
||||||
|
ctx: ctx,
|
||||||
|
svcCtx: svcCtx,
|
||||||
|
Logger: logx.WithContext(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ModelDeployService
|
||||||
|
func (l *GetNotebookListLogic) GetNotebookList(in *octopus.GetNotebookListReq) (*octopus.GetNotebookListResp, error) {
|
||||||
|
resp := &octopus.GetNotebookListResp{}
|
||||||
|
|
||||||
|
var url_prefix = common.OctopusUrls[in.Platform]
|
||||||
|
var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.GetNotebookList
|
||||||
|
|
||||||
|
token := common.GetToken(in.Platform)
|
||||||
|
|
||||||
|
req := tool.GetACHttpRequest()
|
||||||
|
_, err := req.
|
||||||
|
SetHeader("Authorization", "Bearer "+token).
|
||||||
|
SetQueryString("pageIndex=" + strconv.Itoa(int(in.PageIndex))).
|
||||||
|
SetQueryString("pageSize=" + strconv.Itoa(int(in.PageSize))).
|
||||||
|
SetResult(&resp).
|
||||||
|
Get(reqUrl)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &octopus.GetNotebookListResp{}, nil
|
||||||
|
}
|
|
@ -35,7 +35,7 @@ func (l *GetUserImageListLogic) GetUserImageList(in *octopus.GetUserImageListReq
|
||||||
token := common.GetToken(in.Platform)
|
token := common.GetToken(in.Platform)
|
||||||
|
|
||||||
req := tool.GetACHttpRequest()
|
req := tool.GetACHttpRequest()
|
||||||
_, err := /*req.SetHeader(tool.ContentType, tool.ApplicationJson).*/ req.
|
_, err := req.
|
||||||
SetHeader("Authorization", "Bearer "+token).
|
SetHeader("Authorization", "Bearer "+token).
|
||||||
SetQueryString("pageIndex=" + strconv.Itoa(int(in.PageIndex))).
|
SetQueryString("pageIndex=" + strconv.Itoa(int(in.PageIndex))).
|
||||||
SetQueryString("pageSize=" + strconv.Itoa(int(in.PageSize))).
|
SetQueryString("pageSize=" + strconv.Itoa(int(in.PageSize))).
|
||||||
|
|
|
@ -37,6 +37,18 @@ func (s *OctopusServer) CreateDataSet(ctx context.Context, in *octopus.CreateDat
|
||||||
return l.CreateDataSet(in)
|
return l.CreateDataSet(in)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Algorithm
|
||||||
|
func (s *OctopusServer) GetMyAlgorithmList(ctx context.Context, in *octopus.GetMyAlgorithmListReq) (*octopus.GetMyAlgorithmListResp, error) {
|
||||||
|
l := logic.NewGetMyAlgorithmListLogic(ctx, s.svcCtx)
|
||||||
|
return l.GetMyAlgorithmList(in)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ModelDeployService
|
||||||
|
func (s *OctopusServer) GetNotebookList(ctx context.Context, in *octopus.GetNotebookListReq) (*octopus.GetNotebookListResp, error) {
|
||||||
|
l := logic.NewGetNotebookListLogic(ctx, s.svcCtx)
|
||||||
|
return l.GetNotebookList(in)
|
||||||
|
}
|
||||||
|
|
||||||
// ImageService
|
// ImageService
|
||||||
func (s *OctopusServer) GetUserImageList(ctx context.Context, in *octopus.GetUserImageListReq) (*octopus.GetUserImageListResp, error) {
|
func (s *OctopusServer) GetUserImageList(ctx context.Context, in *octopus.GetUserImageListReq) (*octopus.GetUserImageListResp, error) {
|
||||||
l := logic.NewGetUserImageListLogic(ctx, s.svcCtx)
|
l := logic.NewGetUserImageListLogic(ctx, s.svcCtx)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -25,6 +25,11 @@ type OctopusClient interface {
|
||||||
GetComputingPower(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*CpResp, error)
|
GetComputingPower(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*CpResp, error)
|
||||||
GetGeneralInfo(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*GiResp, error)
|
GetGeneralInfo(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*GiResp, error)
|
||||||
CreateDataSet(ctx context.Context, in *CreateDataSetReq, opts ...grpc.CallOption) (*CreateDataSetResq, error)
|
CreateDataSet(ctx context.Context, in *CreateDataSetReq, opts ...grpc.CallOption) (*CreateDataSetResq, error)
|
||||||
|
// Algorithm
|
||||||
|
GetMyAlgorithmList(ctx context.Context, in *GetMyAlgorithmListReq, opts ...grpc.CallOption) (*GetMyAlgorithmListResp, error)
|
||||||
|
// ModelDeployService
|
||||||
|
// Develop
|
||||||
|
GetNotebookList(ctx context.Context, in *GetNotebookListReq, opts ...grpc.CallOption) (*GetNotebookListResp, error)
|
||||||
// ImageService
|
// ImageService
|
||||||
GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error)
|
GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error)
|
||||||
}
|
}
|
||||||
|
@ -64,6 +69,24 @@ func (c *octopusClient) CreateDataSet(ctx context.Context, in *CreateDataSetReq,
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *octopusClient) GetMyAlgorithmList(ctx context.Context, in *GetMyAlgorithmListReq, opts ...grpc.CallOption) (*GetMyAlgorithmListResp, error) {
|
||||||
|
out := new(GetMyAlgorithmListResp)
|
||||||
|
err := c.cc.Invoke(ctx, "/octopus.Octopus/GetMyAlgorithmList", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *octopusClient) GetNotebookList(ctx context.Context, in *GetNotebookListReq, opts ...grpc.CallOption) (*GetNotebookListResp, error) {
|
||||||
|
out := new(GetNotebookListResp)
|
||||||
|
err := c.cc.Invoke(ctx, "/octopus.Octopus/GetNotebookList", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *octopusClient) GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error) {
|
func (c *octopusClient) GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error) {
|
||||||
out := new(GetUserImageListResp)
|
out := new(GetUserImageListResp)
|
||||||
err := c.cc.Invoke(ctx, "/octopus.Octopus/GetUserImageList", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/octopus.Octopus/GetUserImageList", in, out, opts...)
|
||||||
|
@ -80,6 +103,11 @@ type OctopusServer interface {
|
||||||
GetComputingPower(context.Context, *ResourceReq) (*CpResp, error)
|
GetComputingPower(context.Context, *ResourceReq) (*CpResp, error)
|
||||||
GetGeneralInfo(context.Context, *ResourceReq) (*GiResp, error)
|
GetGeneralInfo(context.Context, *ResourceReq) (*GiResp, error)
|
||||||
CreateDataSet(context.Context, *CreateDataSetReq) (*CreateDataSetResq, error)
|
CreateDataSet(context.Context, *CreateDataSetReq) (*CreateDataSetResq, error)
|
||||||
|
// Algorithm
|
||||||
|
GetMyAlgorithmList(context.Context, *GetMyAlgorithmListReq) (*GetMyAlgorithmListResp, error)
|
||||||
|
// ModelDeployService
|
||||||
|
// Develop
|
||||||
|
GetNotebookList(context.Context, *GetNotebookListReq) (*GetNotebookListResp, error)
|
||||||
// ImageService
|
// ImageService
|
||||||
GetUserImageList(context.Context, *GetUserImageListReq) (*GetUserImageListResp, error)
|
GetUserImageList(context.Context, *GetUserImageListReq) (*GetUserImageListResp, error)
|
||||||
mustEmbedUnimplementedOctopusServer()
|
mustEmbedUnimplementedOctopusServer()
|
||||||
|
@ -98,6 +126,12 @@ func (UnimplementedOctopusServer) GetGeneralInfo(context.Context, *ResourceReq)
|
||||||
func (UnimplementedOctopusServer) CreateDataSet(context.Context, *CreateDataSetReq) (*CreateDataSetResq, error) {
|
func (UnimplementedOctopusServer) CreateDataSet(context.Context, *CreateDataSetReq) (*CreateDataSetResq, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CreateDataSet not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CreateDataSet not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedOctopusServer) GetMyAlgorithmList(context.Context, *GetMyAlgorithmListReq) (*GetMyAlgorithmListResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetMyAlgorithmList not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedOctopusServer) GetNotebookList(context.Context, *GetNotebookListReq) (*GetNotebookListResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetNotebookList not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedOctopusServer) GetUserImageList(context.Context, *GetUserImageListReq) (*GetUserImageListResp, error) {
|
func (UnimplementedOctopusServer) GetUserImageList(context.Context, *GetUserImageListReq) (*GetUserImageListResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetUserImageList not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetUserImageList not implemented")
|
||||||
}
|
}
|
||||||
|
@ -168,6 +202,42 @@ func _Octopus_CreateDataSet_Handler(srv interface{}, ctx context.Context, dec fu
|
||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Octopus_GetMyAlgorithmList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetMyAlgorithmListReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OctopusServer).GetMyAlgorithmList(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/octopus.Octopus/GetMyAlgorithmList",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OctopusServer).GetMyAlgorithmList(ctx, req.(*GetMyAlgorithmListReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Octopus_GetNotebookList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetNotebookListReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(OctopusServer).GetNotebookList(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/octopus.Octopus/GetNotebookList",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(OctopusServer).GetNotebookList(ctx, req.(*GetNotebookListReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Octopus_GetUserImageList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Octopus_GetUserImageList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(GetUserImageListReq)
|
in := new(GetUserImageListReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
|
@ -205,6 +275,14 @@ var Octopus_ServiceDesc = grpc.ServiceDesc{
|
||||||
MethodName: "CreateDataSet",
|
MethodName: "CreateDataSet",
|
||||||
Handler: _Octopus_CreateDataSet_Handler,
|
Handler: _Octopus_CreateDataSet_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetMyAlgorithmList",
|
||||||
|
Handler: _Octopus_GetMyAlgorithmList_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetNotebookList",
|
||||||
|
Handler: _Octopus_GetNotebookList_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "GetUserImageList",
|
MethodName: "GetUserImageList",
|
||||||
Handler: _Octopus_GetUserImageList_Handler,
|
Handler: _Octopus_GetUserImageList_Handler,
|
||||||
|
|
|
@ -13,22 +13,35 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
CpResp = octopus.CpResp
|
Algorithms = octopus.Algorithms
|
||||||
CreateDataSetReq = octopus.CreateDataSetReq
|
CpResp = octopus.CpResp
|
||||||
CreateDataSetResq = octopus.CreateDataSetResq
|
CreateDataSetReq = octopus.CreateDataSetReq
|
||||||
Error = octopus.Error
|
CreateDataSetResq = octopus.CreateDataSetResq
|
||||||
GetUserImageListReq = octopus.GetUserImageListReq
|
Error = octopus.Error
|
||||||
GetUserImageListResp = octopus.GetUserImageListResp
|
GetMyAlgorithmListReq = octopus.GetMyAlgorithmListReq
|
||||||
GiResp = octopus.GiResp
|
GetMyAlgorithmListResp = octopus.GetMyAlgorithmListResp
|
||||||
Image = octopus.Image
|
GetNotebookListReq = octopus.GetNotebookListReq
|
||||||
Images = octopus.Images
|
GetNotebookListResp = octopus.GetNotebookListResp
|
||||||
Payload = octopus.Payload
|
GetUserImageListReq = octopus.GetUserImageListReq
|
||||||
ResourceReq = octopus.ResourceReq
|
GetUserImageListResp = octopus.GetUserImageListResp
|
||||||
|
GiResp = octopus.GiResp
|
||||||
|
Image = octopus.Image
|
||||||
|
Images = octopus.Images
|
||||||
|
Notebooks = octopus.Notebooks
|
||||||
|
PayloadMyAlgorithmList = octopus.PayloadMyAlgorithmList
|
||||||
|
PayloadNotebookList = octopus.PayloadNotebookList
|
||||||
|
PayloadUserImageList = octopus.PayloadUserImageList
|
||||||
|
ResourceReq = octopus.ResourceReq
|
||||||
|
Tasks = octopus.Tasks
|
||||||
|
|
||||||
Octopus interface {
|
Octopus interface {
|
||||||
GetComputingPower(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*CpResp, error)
|
GetComputingPower(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*CpResp, error)
|
||||||
GetGeneralInfo(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*GiResp, error)
|
GetGeneralInfo(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*GiResp, error)
|
||||||
CreateDataSet(ctx context.Context, in *CreateDataSetReq, opts ...grpc.CallOption) (*CreateDataSetResq, error)
|
CreateDataSet(ctx context.Context, in *CreateDataSetReq, opts ...grpc.CallOption) (*CreateDataSetResq, error)
|
||||||
|
// Algorithm
|
||||||
|
GetMyAlgorithmList(ctx context.Context, in *GetMyAlgorithmListReq, opts ...grpc.CallOption) (*GetMyAlgorithmListResp, error)
|
||||||
|
// ModelDeployService
|
||||||
|
GetNotebookList(ctx context.Context, in *GetNotebookListReq, opts ...grpc.CallOption) (*GetNotebookListResp, error)
|
||||||
// ImageService
|
// ImageService
|
||||||
GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error)
|
GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error)
|
||||||
}
|
}
|
||||||
|
@ -59,6 +72,18 @@ func (m *defaultOctopus) CreateDataSet(ctx context.Context, in *CreateDataSetReq
|
||||||
return client.CreateDataSet(ctx, in, opts...)
|
return client.CreateDataSet(ctx, in, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Algorithm
|
||||||
|
func (m *defaultOctopus) GetMyAlgorithmList(ctx context.Context, in *GetMyAlgorithmListReq, opts ...grpc.CallOption) (*GetMyAlgorithmListResp, error) {
|
||||||
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
||||||
|
return client.GetMyAlgorithmList(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ModelDeployService
|
||||||
|
func (m *defaultOctopus) GetNotebookList(ctx context.Context, in *GetNotebookListReq, opts ...grpc.CallOption) (*GetNotebookListResp, error) {
|
||||||
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
||||||
|
return client.GetNotebookList(ctx, in, opts...)
|
||||||
|
}
|
||||||
|
|
||||||
// ImageService
|
// ImageService
|
||||||
func (m *defaultOctopus) GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error) {
|
func (m *defaultOctopus) GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error) {
|
||||||
client := octopus.NewOctopusClient(m.cli.Conn())
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
||||||
|
|
|
@ -31,6 +31,43 @@ message CreateDataSetResq{
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************Algorithm Start*************************/
|
/******************Algorithm Start*************************/
|
||||||
|
message GetMyAlgorithmListReq{
|
||||||
|
string platform =1;
|
||||||
|
int32 pageIndex =2;
|
||||||
|
int32 pageSize =3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetMyAlgorithmListResp{
|
||||||
|
bool success =1;
|
||||||
|
PayloadMyAlgorithmList payload =2;
|
||||||
|
Error error = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PayloadMyAlgorithmList{
|
||||||
|
int32 totalSize =1;
|
||||||
|
repeated Algorithms algorithms = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Algorithms{
|
||||||
|
string algorithmId =1;
|
||||||
|
string algorithmVersion = 2;
|
||||||
|
string spaceId = 3;
|
||||||
|
string spaceName = 4;
|
||||||
|
string userId = 5;
|
||||||
|
string userName=6;
|
||||||
|
string algorithmName=7;
|
||||||
|
string modelName=8;
|
||||||
|
int32 fileStatus=9;
|
||||||
|
int32 latestCompressed=10;
|
||||||
|
string algorithmDescript=11;
|
||||||
|
string path=12;
|
||||||
|
bool isPrefab=13;
|
||||||
|
int64 createdAt=14;
|
||||||
|
string applyId=15;
|
||||||
|
string applyName=16;
|
||||||
|
string frameworkId=17;
|
||||||
|
string frameworkName=18;
|
||||||
|
}
|
||||||
/******************Algorithm End*************************/
|
/******************Algorithm End*************************/
|
||||||
|
|
||||||
/******************DatasetService Start*************************/
|
/******************DatasetService Start*************************/
|
||||||
|
@ -40,6 +77,53 @@ message CreateDataSetResq{
|
||||||
/******************ModelDeployService End*************************/
|
/******************ModelDeployService End*************************/
|
||||||
|
|
||||||
/******************Develop Start*************************/
|
/******************Develop Start*************************/
|
||||||
|
message GetNotebookListReq{
|
||||||
|
string platform =1;
|
||||||
|
int32 pageIndex =2;
|
||||||
|
int32 pageSize =3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetNotebookListResp{
|
||||||
|
bool success =1;
|
||||||
|
PayloadNotebookList payload =2;
|
||||||
|
Error error = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PayloadNotebookList{
|
||||||
|
int32 totalSize =1;
|
||||||
|
repeated Notebooks notebooks = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Notebooks{
|
||||||
|
int64 createdAt =1;
|
||||||
|
int64 updatedAt =2;
|
||||||
|
string id = 3;
|
||||||
|
string userId =4;
|
||||||
|
string workspaceId=5;
|
||||||
|
string name=6;
|
||||||
|
string desc=7;
|
||||||
|
string imageId=8;
|
||||||
|
string imageName=9;
|
||||||
|
string algorithmId=10;
|
||||||
|
string algorithmVersion=11;
|
||||||
|
string algorithmName=12;
|
||||||
|
string resourceSpecId=13;
|
||||||
|
string resourceSpecName=14;
|
||||||
|
string status=15;
|
||||||
|
string datasetId=16;
|
||||||
|
string datasetVersion=17;
|
||||||
|
string datasetName=18;
|
||||||
|
int32 resourceSpecPrice=19;
|
||||||
|
string notebookJobId=20;
|
||||||
|
string imageVersion=21;
|
||||||
|
repeated Tasks tasks=22;
|
||||||
|
string imageUrl=23;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Tasks{
|
||||||
|
string url =1;
|
||||||
|
string name= 2;
|
||||||
|
}
|
||||||
/******************Develop End*************************/
|
/******************Develop End*************************/
|
||||||
|
|
||||||
/******************ImageService Start*************************/
|
/******************ImageService Start*************************/
|
||||||
|
@ -51,18 +135,11 @@ message GetUserImageListReq{
|
||||||
|
|
||||||
message GetUserImageListResp{
|
message GetUserImageListResp{
|
||||||
bool success =1;
|
bool success =1;
|
||||||
Payload payload =2;
|
PayloadUserImageList payload =2;
|
||||||
Error error = 3;
|
Error error = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Error{
|
message PayloadUserImageList{
|
||||||
int32 code =1;
|
|
||||||
int32 subcode =2;
|
|
||||||
string message =3;
|
|
||||||
string subMessage =4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message Payload{
|
|
||||||
int32 totalSize =1;
|
int32 totalSize =1;
|
||||||
repeated Images images =2;
|
repeated Images images =2;
|
||||||
}
|
}
|
||||||
|
@ -96,6 +173,13 @@ message Image{
|
||||||
/******************TrainJobService Start*************************/
|
/******************TrainJobService Start*************************/
|
||||||
/******************TrainJobService End*************************/
|
/******************TrainJobService End*************************/
|
||||||
|
|
||||||
|
message Error{
|
||||||
|
int32 code =1;
|
||||||
|
int32 subcode =2;
|
||||||
|
string message =3;
|
||||||
|
string subMessage =4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
service Octopus {
|
service Octopus {
|
||||||
|
|
||||||
|
@ -106,11 +190,13 @@ service Octopus {
|
||||||
rpc CreateDataSet(CreateDataSetReq) returns (CreateDataSetResq);
|
rpc CreateDataSet(CreateDataSetReq) returns (CreateDataSetResq);
|
||||||
|
|
||||||
//Algorithm
|
//Algorithm
|
||||||
|
rpc GetMyAlgorithmList(GetMyAlgorithmListReq) returns (GetMyAlgorithmListResp);
|
||||||
|
|
||||||
//DatasetService
|
//DatasetService
|
||||||
|
|
||||||
//ModelDeployService
|
//ModelDeployService
|
||||||
//Develop
|
//Develop
|
||||||
|
rpc GetNotebookList(GetNotebookListReq) returns (GetNotebookListResp);
|
||||||
|
|
||||||
//ImageService
|
//ImageService
|
||||||
rpc GetUserImageList(GetUserImageListReq) returns (GetUserImageListResp);
|
rpc GetUserImageList(GetUserImageListReq) returns (GetUserImageListResp);
|
||||||
|
|
Loading…
Reference in New Issue