octopus 添加创建image,删除image接口

This commit is contained in:
tzwang 2023-05-11 10:55:13 +08:00
parent 74d5942ae3
commit c1fc814736
8 changed files with 886 additions and 71 deletions

View File

@ -18,4 +18,6 @@ type OctopusApi struct {
GetMyAlgorithmList string
GetNotebookList string
GetMydatasetList string
CreateImage string
DeleteImage string
}

View File

@ -0,0 +1,46 @@
package logic
import (
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common"
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/svc"
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/octopus"
"PCM/common/tool"
"context"
"github.com/zeromicro/go-zero/core/logx"
)
type CreateImageLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewCreateImageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateImageLogic {
return &CreateImageLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *CreateImageLogic) CreateImage(in *octopus.CreateImageReq) (*octopus.CreateImageResp, error) {
resp := &octopus.CreateImageResp{}
var url_prefix = common.OctopusUrls[in.Platform]
var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.CreateImage
token := common.GetToken(in.Platform)
req := tool.GetACHttpRequest()
_, err := req.
SetHeader("Authorization", "Bearer "+token).
SetBody(in.CreateImage).
SetResult(&resp).
Post(reqUrl)
if err != nil {
return nil, err
}
return resp, nil
}

View File

@ -0,0 +1,47 @@
package logic
import (
"PCM/adaptor/PCM-AI/PCM-OCTOPUS/rpc/internal/common"
"PCM/common/tool"
"context"
"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 DeleteImageLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewDeleteImageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteImageLogic {
return &DeleteImageLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *DeleteImageLogic) DeleteImage(in *octopus.DeleteImageReq) (*octopus.DeleteImageResp, error) {
resp := &octopus.DeleteImageResp{}
var url_prefix = common.OctopusUrls[in.Platform]
var reqUrl = url_prefix + l.svcCtx.Config.OctopusApi.DeleteImage
token := common.GetToken(in.Platform)
req := tool.GetACHttpRequest()
_, err := req.
SetHeader("Authorization", "Bearer "+token).
SetPathParam("imageId", in.ImageId).
SetResult(&resp).
Delete(reqUrl)
if err != nil {
return nil, err
}
return resp, nil
}

View File

@ -60,3 +60,13 @@ func (s *OctopusServer) GetUserImageList(ctx context.Context, in *octopus.GetUse
l := logic.NewGetUserImageListLogic(ctx, s.svcCtx)
return l.GetUserImageList(in)
}
func (s *OctopusServer) CreateImage(ctx context.Context, in *octopus.CreateImageReq) (*octopus.CreateImageResp, error) {
l := logic.NewCreateImageLogic(ctx, s.svcCtx)
return l.CreateImage(in)
}
func (s *OctopusServer) DeleteImage(ctx context.Context, in *octopus.DeleteImageReq) (*octopus.DeleteImageResp, error) {
l := logic.NewDeleteImageLogic(ctx, s.svcCtx)
return l.DeleteImage(in)
}

View File

@ -1855,6 +1855,423 @@ func (x *Image) GetImageFullAddr() string {
return ""
}
type DeleteImageReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"`
ImageId string `protobuf:"bytes,2,opt,name=imageId,proto3" json:"imageId,omitempty"`
}
func (x *DeleteImageReq) Reset() {
*x = DeleteImageReq{}
if protoimpl.UnsafeEnabled {
mi := &file_octopus_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteImageReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteImageReq) ProtoMessage() {}
func (x *DeleteImageReq) ProtoReflect() protoreflect.Message {
mi := &file_octopus_proto_msgTypes[24]
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 DeleteImageReq.ProtoReflect.Descriptor instead.
func (*DeleteImageReq) Descriptor() ([]byte, []int) {
return file_octopus_proto_rawDescGZIP(), []int{24}
}
func (x *DeleteImageReq) GetPlatform() string {
if x != nil {
return x.Platform
}
return ""
}
func (x *DeleteImageReq) GetImageId() string {
if x != nil {
return x.ImageId
}
return ""
}
type DeleteImageResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Payload *PayloadDeleteImage `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
Error *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *DeleteImageResp) Reset() {
*x = DeleteImageResp{}
if protoimpl.UnsafeEnabled {
mi := &file_octopus_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteImageResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteImageResp) ProtoMessage() {}
func (x *DeleteImageResp) ProtoReflect() protoreflect.Message {
mi := &file_octopus_proto_msgTypes[25]
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 DeleteImageResp.ProtoReflect.Descriptor instead.
func (*DeleteImageResp) Descriptor() ([]byte, []int) {
return file_octopus_proto_rawDescGZIP(), []int{25}
}
func (x *DeleteImageResp) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
func (x *DeleteImageResp) GetPayload() *PayloadDeleteImage {
if x != nil {
return x.Payload
}
return nil
}
func (x *DeleteImageResp) GetError() *Error {
if x != nil {
return x.Error
}
return nil
}
type PayloadDeleteImage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DeletedAt int64 `protobuf:"varint,1,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"`
}
func (x *PayloadDeleteImage) Reset() {
*x = PayloadDeleteImage{}
if protoimpl.UnsafeEnabled {
mi := &file_octopus_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PayloadDeleteImage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PayloadDeleteImage) ProtoMessage() {}
func (x *PayloadDeleteImage) ProtoReflect() protoreflect.Message {
mi := &file_octopus_proto_msgTypes[26]
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 PayloadDeleteImage.ProtoReflect.Descriptor instead.
func (*PayloadDeleteImage) Descriptor() ([]byte, []int) {
return file_octopus_proto_rawDescGZIP(), []int{26}
}
func (x *PayloadDeleteImage) GetDeletedAt() int64 {
if x != nil {
return x.DeletedAt
}
return 0
}
type CreateImageReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"`
CreateImage *CreateImage `protobuf:"bytes,2,opt,name=createImage,proto3" json:"createImage,omitempty"`
}
func (x *CreateImageReq) Reset() {
*x = CreateImageReq{}
if protoimpl.UnsafeEnabled {
mi := &file_octopus_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateImageReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateImageReq) ProtoMessage() {}
func (x *CreateImageReq) ProtoReflect() protoreflect.Message {
mi := &file_octopus_proto_msgTypes[27]
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 CreateImageReq.ProtoReflect.Descriptor instead.
func (*CreateImageReq) Descriptor() ([]byte, []int) {
return file_octopus_proto_rawDescGZIP(), []int{27}
}
func (x *CreateImageReq) GetPlatform() string {
if x != nil {
return x.Platform
}
return ""
}
func (x *CreateImageReq) GetCreateImage() *CreateImage {
if x != nil {
return x.CreateImage
}
return nil
}
type CreateImage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ImageAddr string `protobuf:"bytes,2,opt,name=imageAddr,proto3" json:"imageAddr,omitempty"`
ImageDesc string `protobuf:"bytes,3,opt,name=imageDesc,proto3" json:"imageDesc,omitempty"`
ImageName string `protobuf:"bytes,4,opt,name=imageName,proto3" json:"imageName,omitempty"`
ImageVersion string `protobuf:"bytes,5,opt,name=imageVersion,proto3" json:"imageVersion,omitempty"`
SourceType int32 `protobuf:"varint,6,opt,name=sourceType,proto3" json:"sourceType,omitempty"` //1 = 上传, 2 = 远程
}
func (x *CreateImage) Reset() {
*x = CreateImage{}
if protoimpl.UnsafeEnabled {
mi := &file_octopus_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateImage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateImage) ProtoMessage() {}
func (x *CreateImage) ProtoReflect() protoreflect.Message {
mi := &file_octopus_proto_msgTypes[28]
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 CreateImage.ProtoReflect.Descriptor instead.
func (*CreateImage) Descriptor() ([]byte, []int) {
return file_octopus_proto_rawDescGZIP(), []int{28}
}
func (x *CreateImage) GetImageAddr() string {
if x != nil {
return x.ImageAddr
}
return ""
}
func (x *CreateImage) GetImageDesc() string {
if x != nil {
return x.ImageDesc
}
return ""
}
func (x *CreateImage) GetImageName() string {
if x != nil {
return x.ImageName
}
return ""
}
func (x *CreateImage) GetImageVersion() string {
if x != nil {
return x.ImageVersion
}
return ""
}
func (x *CreateImage) GetSourceType() int32 {
if x != nil {
return x.SourceType
}
return 0
}
type CreateImageResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Payload *PayloadCreateImage `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
Error *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *CreateImageResp) Reset() {
*x = CreateImageResp{}
if protoimpl.UnsafeEnabled {
mi := &file_octopus_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateImageResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateImageResp) ProtoMessage() {}
func (x *CreateImageResp) ProtoReflect() protoreflect.Message {
mi := &file_octopus_proto_msgTypes[29]
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 CreateImageResp.ProtoReflect.Descriptor instead.
func (*CreateImageResp) Descriptor() ([]byte, []int) {
return file_octopus_proto_rawDescGZIP(), []int{29}
}
func (x *CreateImageResp) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
func (x *CreateImageResp) GetPayload() *PayloadCreateImage {
if x != nil {
return x.Payload
}
return nil
}
func (x *CreateImageResp) GetError() *Error {
if x != nil {
return x.Error
}
return nil
}
type PayloadCreateImage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ImageId string `protobuf:"bytes,1,opt,name=imageId,proto3" json:"imageId,omitempty"`
CreatedAt int64 `protobuf:"varint,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
}
func (x *PayloadCreateImage) Reset() {
*x = PayloadCreateImage{}
if protoimpl.UnsafeEnabled {
mi := &file_octopus_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PayloadCreateImage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PayloadCreateImage) ProtoMessage() {}
func (x *PayloadCreateImage) ProtoReflect() protoreflect.Message {
mi := &file_octopus_proto_msgTypes[30]
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 PayloadCreateImage.ProtoReflect.Descriptor instead.
func (*PayloadCreateImage) Descriptor() ([]byte, []int) {
return file_octopus_proto_rawDescGZIP(), []int{30}
}
func (x *PayloadCreateImage) GetImageId() string {
if x != nil {
return x.ImageId
}
return ""
}
func (x *PayloadCreateImage) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
type Error struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -1869,7 +2286,7 @@ type Error struct {
func (x *Error) Reset() {
*x = Error{}
if protoimpl.UnsafeEnabled {
mi := &file_octopus_proto_msgTypes[24]
mi := &file_octopus_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1882,7 +2299,7 @@ func (x *Error) String() string {
func (*Error) ProtoMessage() {}
func (x *Error) ProtoReflect() protoreflect.Message {
mi := &file_octopus_proto_msgTypes[24]
mi := &file_octopus_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1895,7 +2312,7 @@ func (x *Error) ProtoReflect() protoreflect.Message {
// Deprecated: Use Error.ProtoReflect.Descriptor instead.
func (*Error) Descriptor() ([]byte, []int) {
return file_octopus_proto_rawDescGZIP(), []int{24}
return file_octopus_proto_rawDescGZIP(), []int{31}
}
func (x *Error) GetCode() int32 {
@ -2179,48 +2596,104 @@ var file_octopus_proto_rawDesc = []byte{
0x09, 0x52, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x24, 0x0a, 0x0d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x41, 0x64, 0x64, 0x72,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x75, 0x6c,
0x6c, 0x41, 0x64, 0x64, 0x72, 0x22, 0x6f, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12,
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f,
0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x8d, 0x04, 0x0a, 0x07, 0x4f, 0x63, 0x74, 0x6f, 0x70,
0x75, 0x73, 0x12, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x69,
0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75,
0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e,
0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x37,
0x0a, 0x0e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x14, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73,
0x2e, 0x67, 0x69, 0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x79,
0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e,
0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x41, 0x6c, 0x67,
0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e,
0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x41, 0x6c, 0x67,
0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f,
0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4c, 0x69,
0x73, 0x74, 0x12, 0x1c, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74,
0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
0x1a, 0x1d, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79,
0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
0x46, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74,
0x12, 0x19, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6f, 0x63,
0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61,
0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x71, 0x12, 0x4c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f,
0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x6f, 0x63, 0x74,
0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75,
0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x6f, 0x63, 0x74, 0x6f,
0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75,
0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x69,
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x6f, 0x63, 0x74, 0x6f, 0x70,
0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6c, 0x41, 0x64, 0x64, 0x72, 0x22, 0x46, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66,
0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66,
0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x22, 0x88, 0x01,
0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73,
0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x70,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f,
0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f,
0x61, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x32, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x6c,
0x6f, 0x61, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1c,
0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x64, 0x0a, 0x0e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x36, 0x0a, 0x0b, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61,
0x67, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61,
0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x41, 0x64, 0x64, 0x72, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x41, 0x64, 0x64, 0x72,
0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x73, 0x63, 0x12, 0x1c,
0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c,
0x69, 0x6d, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
0x22, 0x88, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65,
0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x35,
0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1b, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x07, 0x70, 0x61,
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x45,
0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x4c, 0x0a, 0x12, 0x50,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63,
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x6f, 0x0a, 0x05, 0x45, 0x72, 0x72,
0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x64, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75,
0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x73, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x91, 0x05, 0x0a, 0x07, 0x4f,
0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x12, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d,
0x70, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x6f, 0x63,
0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,
0x71, 0x1a, 0x0f, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x63, 0x70, 0x52, 0x65,
0x73, 0x70, 0x12, 0x37, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x72,
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x6f, 0x63, 0x74,
0x6f, 0x70, 0x75, 0x73, 0x2e, 0x67, 0x69, 0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, 0x12, 0x47,
0x65, 0x74, 0x4d, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73,
0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d,
0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d,
0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x4f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x73,
0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73,
0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47,
0x65, 0x74, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74,
0x61, 0x53, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a,
0x1a, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x71, 0x12, 0x4c, 0x0a, 0x0f, 0x47,
0x65, 0x74, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b,
0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x65,
0x62, 0x6f, 0x6f, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6f, 0x63,
0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f,
0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x10, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e,
0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x63,
0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6d, 0x61,
0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0b, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x17, 0x2e, 0x6f, 0x63, 0x74, 0x6f,
0x70, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52,
0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0b,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x17, 0x2e, 0x6f, 0x63,
0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67,
0x65, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x2e, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0a,
0x5a, 0x08, 0x2f, 0x6f, 0x63, 0x74, 0x6f, 0x70, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@ -2235,7 +2708,7 @@ func file_octopus_proto_rawDescGZIP() []byte {
return file_octopus_proto_rawDescData
}
var file_octopus_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
var file_octopus_proto_msgTypes = make([]protoimpl.MessageInfo, 32)
var file_octopus_proto_goTypes = []interface{}{
(*ResourceReq)(nil), // 0: octopus.resourceReq
(*CpResp)(nil), // 1: octopus.cpResp
@ -2261,43 +2734,59 @@ var file_octopus_proto_goTypes = []interface{}{
(*PayloadUserImageList)(nil), // 21: octopus.PayloadUserImageList
(*Images)(nil), // 22: octopus.Images
(*Image)(nil), // 23: octopus.Image
(*Error)(nil), // 24: octopus.Error
(*DeleteImageReq)(nil), // 24: octopus.DeleteImageReq
(*DeleteImageResp)(nil), // 25: octopus.DeleteImageResp
(*PayloadDeleteImage)(nil), // 26: octopus.PayloadDeleteImage
(*CreateImageReq)(nil), // 27: octopus.CreateImageReq
(*CreateImage)(nil), // 28: octopus.CreateImage
(*CreateImageResp)(nil), // 29: octopus.CreateImageResp
(*PayloadCreateImage)(nil), // 30: octopus.PayloadCreateImage
(*Error)(nil), // 31: octopus.Error
}
var file_octopus_proto_depIdxs = []int32{
7, // 0: octopus.GetMyAlgorithmListResp.payload:type_name -> octopus.PayloadMyAlgorithmList
24, // 1: octopus.GetMyAlgorithmListResp.error:type_name -> octopus.Error
31, // 1: octopus.GetMyAlgorithmListResp.error:type_name -> octopus.Error
8, // 2: octopus.PayloadMyAlgorithmList.algorithms:type_name -> octopus.Algorithms
11, // 3: octopus.GetMyDatasetListResp.payload:type_name -> octopus.PayloadMyDatasetList
24, // 4: octopus.GetMyDatasetListResp.error:type_name -> octopus.Error
31, // 4: octopus.GetMyDatasetListResp.error:type_name -> octopus.Error
12, // 5: octopus.PayloadMyDatasetList.datasets:type_name -> octopus.Datasets
13, // 6: octopus.Datasets.applies:type_name -> octopus.Applies
16, // 7: octopus.GetNotebookListResp.payload:type_name -> octopus.PayloadNotebookList
24, // 8: octopus.GetNotebookListResp.error:type_name -> octopus.Error
31, // 8: octopus.GetNotebookListResp.error:type_name -> octopus.Error
17, // 9: octopus.PayloadNotebookList.notebooks:type_name -> octopus.Notebooks
18, // 10: octopus.Notebooks.tasks:type_name -> octopus.Tasks
21, // 11: octopus.GetUserImageListResp.payload:type_name -> octopus.PayloadUserImageList
24, // 12: octopus.GetUserImageListResp.error:type_name -> octopus.Error
31, // 12: octopus.GetUserImageListResp.error:type_name -> octopus.Error
22, // 13: octopus.PayloadUserImageList.images:type_name -> octopus.Images
23, // 14: octopus.Images.image:type_name -> octopus.Image
0, // 15: octopus.Octopus.GetComputingPower:input_type -> octopus.resourceReq
0, // 16: octopus.Octopus.GetGeneralInfo:input_type -> octopus.resourceReq
5, // 17: octopus.Octopus.GetMyAlgorithmList:input_type -> octopus.GetMyAlgorithmListReq
9, // 18: octopus.Octopus.GetMyDatasetList:input_type -> octopus.GetMyDatasetListReq
3, // 19: octopus.Octopus.CreateDataSet:input_type -> octopus.CreateDataSetReq
14, // 20: octopus.Octopus.GetNotebookList:input_type -> octopus.GetNotebookListReq
19, // 21: octopus.Octopus.GetUserImageList:input_type -> octopus.GetUserImageListReq
1, // 22: octopus.Octopus.GetComputingPower:output_type -> octopus.cpResp
2, // 23: octopus.Octopus.GetGeneralInfo:output_type -> octopus.giResp
6, // 24: octopus.Octopus.GetMyAlgorithmList:output_type -> octopus.GetMyAlgorithmListResp
10, // 25: octopus.Octopus.GetMyDatasetList:output_type -> octopus.GetMyDatasetListResp
4, // 26: octopus.Octopus.CreateDataSet:output_type -> octopus.CreateDataSetResq
15, // 27: octopus.Octopus.GetNotebookList:output_type -> octopus.GetNotebookListResp
20, // 28: octopus.Octopus.GetUserImageList:output_type -> octopus.GetUserImageListResp
22, // [22:29] is the sub-list for method output_type
15, // [15:22] is the sub-list for method input_type
15, // [15:15] is the sub-list for extension type_name
15, // [15:15] is the sub-list for extension extendee
0, // [0:15] is the sub-list for field type_name
26, // 15: octopus.DeleteImageResp.payload:type_name -> octopus.PayloadDeleteImage
31, // 16: octopus.DeleteImageResp.error:type_name -> octopus.Error
28, // 17: octopus.CreateImageReq.createImage:type_name -> octopus.CreateImage
30, // 18: octopus.CreateImageResp.payload:type_name -> octopus.PayloadCreateImage
31, // 19: octopus.CreateImageResp.error:type_name -> octopus.Error
0, // 20: octopus.Octopus.GetComputingPower:input_type -> octopus.resourceReq
0, // 21: octopus.Octopus.GetGeneralInfo:input_type -> octopus.resourceReq
5, // 22: octopus.Octopus.GetMyAlgorithmList:input_type -> octopus.GetMyAlgorithmListReq
9, // 23: octopus.Octopus.GetMyDatasetList:input_type -> octopus.GetMyDatasetListReq
3, // 24: octopus.Octopus.CreateDataSet:input_type -> octopus.CreateDataSetReq
14, // 25: octopus.Octopus.GetNotebookList:input_type -> octopus.GetNotebookListReq
19, // 26: octopus.Octopus.GetUserImageList:input_type -> octopus.GetUserImageListReq
27, // 27: octopus.Octopus.CreateImage:input_type -> octopus.CreateImageReq
24, // 28: octopus.Octopus.DeleteImage:input_type -> octopus.DeleteImageReq
1, // 29: octopus.Octopus.GetComputingPower:output_type -> octopus.cpResp
2, // 30: octopus.Octopus.GetGeneralInfo:output_type -> octopus.giResp
6, // 31: octopus.Octopus.GetMyAlgorithmList:output_type -> octopus.GetMyAlgorithmListResp
10, // 32: octopus.Octopus.GetMyDatasetList:output_type -> octopus.GetMyDatasetListResp
4, // 33: octopus.Octopus.CreateDataSet:output_type -> octopus.CreateDataSetResq
15, // 34: octopus.Octopus.GetNotebookList:output_type -> octopus.GetNotebookListResp
20, // 35: octopus.Octopus.GetUserImageList:output_type -> octopus.GetUserImageListResp
29, // 36: octopus.Octopus.CreateImage:output_type -> octopus.CreateImageResp
25, // 37: octopus.Octopus.DeleteImage:output_type -> octopus.DeleteImageResp
29, // [29:38] is the sub-list for method output_type
20, // [20:29] 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_octopus_proto_init() }
@ -2595,6 +3084,90 @@ func file_octopus_proto_init() {
}
}
file_octopus_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteImageReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_octopus_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteImageResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_octopus_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PayloadDeleteImage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_octopus_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateImageReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_octopus_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateImage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_octopus_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateImageResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_octopus_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PayloadCreateImage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_octopus_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Error); i {
case 0:
return &v.state
@ -2613,7 +3186,7 @@ func file_octopus_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_octopus_proto_rawDesc,
NumEnums: 0,
NumMessages: 25,
NumMessages: 32,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -34,6 +34,8 @@ type OctopusClient interface {
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)
}
type octopusClient struct {
@ -107,6 +109,24 @@ func (c *octopusClient) GetUserImageList(ctx context.Context, in *GetUserImageLi
return out, nil
}
func (c *octopusClient) CreateImage(ctx context.Context, in *CreateImageReq, opts ...grpc.CallOption) (*CreateImageResp, error) {
out := new(CreateImageResp)
err := c.cc.Invoke(ctx, "/octopus.Octopus/CreateImage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *octopusClient) DeleteImage(ctx context.Context, in *DeleteImageReq, opts ...grpc.CallOption) (*DeleteImageResp, error) {
out := new(DeleteImageResp)
err := c.cc.Invoke(ctx, "/octopus.Octopus/DeleteImage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OctopusServer is the server API for Octopus service.
// All implementations must embed UnimplementedOctopusServer
// for forward compatibility
@ -123,6 +143,8 @@ type OctopusServer interface {
GetNotebookList(context.Context, *GetNotebookListReq) (*GetNotebookListResp, error)
// ImageService
GetUserImageList(context.Context, *GetUserImageListReq) (*GetUserImageListResp, error)
CreateImage(context.Context, *CreateImageReq) (*CreateImageResp, error)
DeleteImage(context.Context, *DeleteImageReq) (*DeleteImageResp, error)
mustEmbedUnimplementedOctopusServer()
}
@ -151,6 +173,12 @@ func (UnimplementedOctopusServer) GetNotebookList(context.Context, *GetNotebookL
func (UnimplementedOctopusServer) GetUserImageList(context.Context, *GetUserImageListReq) (*GetUserImageListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUserImageList not implemented")
}
func (UnimplementedOctopusServer) CreateImage(context.Context, *CreateImageReq) (*CreateImageResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateImage not implemented")
}
func (UnimplementedOctopusServer) DeleteImage(context.Context, *DeleteImageReq) (*DeleteImageResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteImage not implemented")
}
func (UnimplementedOctopusServer) mustEmbedUnimplementedOctopusServer() {}
// UnsafeOctopusServer may be embedded to opt out of forward compatibility for this service.
@ -290,6 +318,42 @@ func _Octopus_GetUserImageList_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _Octopus_CreateImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateImageReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OctopusServer).CreateImage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/octopus.Octopus/CreateImage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OctopusServer).CreateImage(ctx, req.(*CreateImageReq))
}
return interceptor(ctx, in, info, handler)
}
func _Octopus_DeleteImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteImageReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OctopusServer).DeleteImage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/octopus.Octopus/DeleteImage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OctopusServer).DeleteImage(ctx, req.(*DeleteImageReq))
}
return interceptor(ctx, in, info, handler)
}
// Octopus_ServiceDesc is the grpc.ServiceDesc for Octopus service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -325,6 +389,14 @@ var Octopus_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetUserImageList",
Handler: _Octopus_GetUserImageList_Handler,
},
{
MethodName: "CreateImage",
Handler: _Octopus_CreateImage_Handler,
},
{
MethodName: "DeleteImage",
Handler: _Octopus_DeleteImage_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "octopus.proto",

View File

@ -18,7 +18,12 @@ type (
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
@ -32,6 +37,8 @@ type (
Image = octopus.Image
Images = octopus.Images
Notebooks = octopus.Notebooks
PayloadCreateImage = octopus.PayloadCreateImage
PayloadDeleteImage = octopus.PayloadDeleteImage
PayloadMyAlgorithmList = octopus.PayloadMyAlgorithmList
PayloadMyDatasetList = octopus.PayloadMyDatasetList
PayloadNotebookList = octopus.PayloadNotebookList
@ -51,6 +58,8 @@ type (
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 {
@ -102,3 +111,13 @@ func (m *defaultOctopus) GetUserImageList(ctx context.Context, in *GetUserImageL
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...)
}

View File

@ -199,6 +199,45 @@ message Image{
string imageFullAddr = 13;
}
message DeleteImageReq{
string platform =1;
string imageId=2;
}
message DeleteImageResp{
bool success =1;
PayloadDeleteImage payload =2;
Error error = 3;
}
message PayloadDeleteImage{
int64 deletedAt=1;
}
message CreateImageReq{
string platform =1;
CreateImage createImage =2;
}
message CreateImage{
string imageAddr=2;
string imageDesc=3;
string imageName=4;
string imageVersion=5;
int32 sourceType=6; //1 = 2 =
}
message CreateImageResp{
bool success =1;
PayloadCreateImage payload =2;
Error error = 3;
}
message PayloadCreateImage{
string imageId = 1;
int64 createdAt=2;
}
/******************ImageService End*************************/
/******************Model Start*************************/
@ -237,6 +276,13 @@ service Octopus {
//ImageService
rpc GetUserImageList(GetUserImageListReq) returns (GetUserImageListResp);
rpc CreateImage(CreateImageReq) returns (CreateImageResp);
rpc DeleteImage(DeleteImageReq) returns (DeleteImageResp);
//Model
//TrainJobService