124 lines
5.1 KiB
Go
124 lines
5.1 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// Source: octopus.proto
|
|
|
|
package octopusclient
|
|
|
|
import (
|
|
"context"
|
|
|
|
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
Algorithms = octopus.Algorithms
|
|
Applies = octopus.Applies
|
|
CpResp = octopus.CpResp
|
|
CreateDataSetReq = octopus.CreateDataSetReq
|
|
CreateDataSetResq = octopus.CreateDataSetResq
|
|
CreateImage = octopus.CreateImage
|
|
CreateImageReq = octopus.CreateImageReq
|
|
CreateImageResp = octopus.CreateImageResp
|
|
Datasets = octopus.Datasets
|
|
DeleteImageReq = octopus.DeleteImageReq
|
|
DeleteImageResp = octopus.DeleteImageResp
|
|
Error = octopus.Error
|
|
GetMyAlgorithmListReq = octopus.GetMyAlgorithmListReq
|
|
GetMyAlgorithmListResp = octopus.GetMyAlgorithmListResp
|
|
GetMyDatasetListReq = octopus.GetMyDatasetListReq
|
|
GetMyDatasetListResp = octopus.GetMyDatasetListResp
|
|
GetNotebookListReq = octopus.GetNotebookListReq
|
|
GetNotebookListResp = octopus.GetNotebookListResp
|
|
GetUserImageListReq = octopus.GetUserImageListReq
|
|
GetUserImageListResp = octopus.GetUserImageListResp
|
|
GiResp = octopus.GiResp
|
|
Image = octopus.Image
|
|
Images = octopus.Images
|
|
Notebooks = octopus.Notebooks
|
|
PayloadCreateImage = octopus.PayloadCreateImage
|
|
PayloadDeleteImage = octopus.PayloadDeleteImage
|
|
PayloadMyAlgorithmList = octopus.PayloadMyAlgorithmList
|
|
PayloadMyDatasetList = octopus.PayloadMyDatasetList
|
|
PayloadNotebookList = octopus.PayloadNotebookList
|
|
PayloadUserImageList = octopus.PayloadUserImageList
|
|
ResourceReq = octopus.ResourceReq
|
|
Tasks = octopus.Tasks
|
|
|
|
Octopus interface {
|
|
GetComputingPower(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*CpResp, error)
|
|
GetGeneralInfo(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*GiResp, error)
|
|
// Algorithm
|
|
GetMyAlgorithmList(ctx context.Context, in *GetMyAlgorithmListReq, opts ...grpc.CallOption) (*GetMyAlgorithmListResp, error)
|
|
// DatasetService
|
|
GetMyDatasetList(ctx context.Context, in *GetMyDatasetListReq, opts ...grpc.CallOption) (*GetMyDatasetListResp, error)
|
|
CreateDataSet(ctx context.Context, in *CreateDataSetReq, opts ...grpc.CallOption) (*CreateDataSetResq, error)
|
|
// ModelDeployService
|
|
GetNotebookList(ctx context.Context, in *GetNotebookListReq, opts ...grpc.CallOption) (*GetNotebookListResp, error)
|
|
// ImageService
|
|
GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error)
|
|
CreateImage(ctx context.Context, in *CreateImageReq, opts ...grpc.CallOption) (*CreateImageResp, error)
|
|
DeleteImage(ctx context.Context, in *DeleteImageReq, opts ...grpc.CallOption) (*DeleteImageResp, error)
|
|
}
|
|
|
|
defaultOctopus struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewOctopus(cli zrpc.Client) Octopus {
|
|
return &defaultOctopus{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
func (m *defaultOctopus) GetComputingPower(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*CpResp, error) {
|
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
|
return client.GetComputingPower(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOctopus) GetGeneralInfo(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*GiResp, error) {
|
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
|
return client.GetGeneralInfo(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...)
|
|
}
|
|
|
|
// DatasetService
|
|
func (m *defaultOctopus) GetMyDatasetList(ctx context.Context, in *GetMyDatasetListReq, opts ...grpc.CallOption) (*GetMyDatasetListResp, error) {
|
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
|
return client.GetMyDatasetList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOctopus) CreateDataSet(ctx context.Context, in *CreateDataSetReq, opts ...grpc.CallOption) (*CreateDataSetResq, error) {
|
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
|
return client.CreateDataSet(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
|
|
func (m *defaultOctopus) GetUserImageList(ctx context.Context, in *GetUserImageListReq, opts ...grpc.CallOption) (*GetUserImageListResp, error) {
|
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
|
return client.GetUserImageList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOctopus) CreateImage(ctx context.Context, in *CreateImageReq, opts ...grpc.CallOption) (*CreateImageResp, error) {
|
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
|
return client.CreateImage(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultOctopus) DeleteImage(ctx context.Context, in *DeleteImageReq, opts ...grpc.CallOption) (*DeleteImageResp, error) {
|
|
client := octopus.NewOctopusClient(m.cli.Conn())
|
|
return client.DeleteImage(ctx, in, opts...)
|
|
}
|