modelarts notebook接口调整
Former-commit-id: 024d983ce69d9e5ba53c981675485d1011c9a58a
This commit is contained in:
parent
b1ed4cb501
commit
8b68433d14
|
@ -7,7 +7,6 @@ import (
|
|||
"PCM/common/tool"
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
|
@ -31,19 +30,25 @@ func (l *CreateNotebookLogic) CreateNotebook(in *modelarts.CreateNotebookReq) (*
|
|||
|
||||
token := common.GetToken()
|
||||
|
||||
var createResp modelarts.NotebookResp
|
||||
|
||||
req := tool.GetACHttpRequest()
|
||||
res, err := req.
|
||||
SetHeader("x-auth-token", token).
|
||||
SetPathParam("project_id", in.ProjectId).
|
||||
SetBody(in.Param).
|
||||
SetResult(resp.NotebookResp).
|
||||
SetResult(&createResp).
|
||||
Post(createUrl)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if res.StatusCode() != 200 || res.StatusCode() != 201 {
|
||||
if res.StatusCode() == 200 || res.StatusCode() == 201 {
|
||||
resp.NotebookResp = &createResp
|
||||
resp.Code = int32(res.StatusCode())
|
||||
resp.Msg = "Success"
|
||||
} else {
|
||||
resp.Code = int32(res.StatusCode())
|
||||
resp.Msg = "Failure"
|
||||
|
||||
|
@ -53,9 +58,6 @@ func (l *CreateNotebookLogic) CreateNotebook(in *modelarts.CreateNotebookReq) (*
|
|||
errMsg.ErrorMsg = ""
|
||||
}
|
||||
resp.ErrorMsg = errMsg.ErrorMsg
|
||||
} else {
|
||||
resp.Code = int32(res.StatusCode())
|
||||
resp.Msg = "Success"
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,6 +13,7 @@ import (
|
|||
)
|
||||
|
||||
type (
|
||||
ActionProgress = modelarts.ActionProgress
|
||||
AdvancedConfigAl = modelarts.AdvancedConfigAl
|
||||
AlgoConfigs = modelarts.AlgoConfigs
|
||||
Algorithm = modelarts.Algorithm
|
||||
|
@ -35,6 +36,7 @@ type (
|
|||
ConstraintAlRq = modelarts.ConstraintAlRq
|
||||
ConstraintCreateTraining = modelarts.ConstraintCreateTraining
|
||||
ContainerHooks = modelarts.ContainerHooks
|
||||
ContainerHooksResp = modelarts.ContainerHooksResp
|
||||
Cpu = modelarts.Cpu
|
||||
CreateAlgorithmReq = modelarts.CreateAlgorithmReq
|
||||
CreateAlgorithmResp = modelarts.CreateAlgorithmResp
|
||||
|
@ -113,6 +115,7 @@ type (
|
|||
GetVisualizationJobResp = modelarts.GetVisualizationJobResp
|
||||
Gpu = modelarts.Gpu
|
||||
GuideDoc = modelarts.GuideDoc
|
||||
Hooks = modelarts.Hooks
|
||||
I18NDescription = modelarts.I18NDescription
|
||||
Identity = modelarts.Identity
|
||||
Image = modelarts.Image
|
||||
|
@ -191,6 +194,8 @@ type (
|
|||
Policies = modelarts.Policies
|
||||
PoliciesCreateTraining = modelarts.PoliciesCreateTraining
|
||||
Pool = modelarts.Pool
|
||||
PostStart = modelarts.PostStart
|
||||
PreStart = modelarts.PreStart
|
||||
ProcessorDataSource = modelarts.ProcessorDataSource
|
||||
Project = modelarts.Project
|
||||
QueryServiceConfig = modelarts.QueryServiceConfig
|
||||
|
@ -237,6 +242,8 @@ type (
|
|||
TokenReq = modelarts.TokenReq
|
||||
TokenResp = modelarts.TokenResp
|
||||
User = modelarts.User
|
||||
UserNotebookDomain = modelarts.UserNotebookDomain
|
||||
UserNotebookResp = modelarts.UserNotebookResp
|
||||
VolumeReq = modelarts.VolumeReq
|
||||
VolumeRes = modelarts.VolumeRes
|
||||
Volumes = modelarts.Volumes
|
||||
|
|
|
@ -1779,7 +1779,7 @@ message DataVolumesRes{
|
|||
}
|
||||
|
||||
message NotebookResp{
|
||||
repeated JobProgress action_progress = 1; // @gotags: copier:"ActionProgress"
|
||||
repeated ActionProgress action_progress = 1; // @gotags: copier:"ActionProgress"
|
||||
string description = 2; // @gotags: copier:"Description"
|
||||
repeated EndpointsRes endpoints = 3; // @gotags: copier:"Endpoints"
|
||||
string fail_reason = 4; // @gotags: copier:"FailReason"
|
||||
|
@ -1795,7 +1795,53 @@ message NotebookResp{
|
|||
VolumeRes volume = 14; // @gotags: copier:"Volume"
|
||||
string workspace_id = 15; // @gotags: copier:"WorkspaceId"
|
||||
string feature = 16; // @gotags: copier:"Feature"
|
||||
int64 create_at = 17; // @gotags: copier:"CreateAt" *
|
||||
Hooks hooks = 18; // @gotags: copier:"Hooks" *
|
||||
repeated string tags = 19; // @gotags: copier:"Tags" *
|
||||
int64 update_at = 20; // @gotags: copier:"UpdateAt" *
|
||||
UserNotebookResp user = 21; // @gotags: copier:"UserNotebookResp" *
|
||||
string user_id = 22; // @gotags: copier:"UserId" *
|
||||
repeated string billing_items = 23; // @gotags: copier:"BillingItems" *
|
||||
}
|
||||
|
||||
message UserNotebookResp{
|
||||
UserNotebookDomain domain = 1; // @gotags: copier:"UserNotebookDomain" *
|
||||
string id = 2; // @gotags: copier:"Id" *
|
||||
string name = 3; // @gotags: copier:"Name" *
|
||||
}
|
||||
|
||||
message UserNotebookDomain{
|
||||
string id = 1; // @gotags: copier:"Id" *
|
||||
string name = 2; // @gotags: copier:"Name" *
|
||||
}
|
||||
|
||||
message Hooks {
|
||||
ContainerHooksResp containerHooks =1; // @gotags: copier:"ContainerHooksResp" *
|
||||
}
|
||||
|
||||
message ContainerHooksResp{
|
||||
PostStart postStart=1; // @gotags: copier:"PostStart" *
|
||||
PreStart preStart=2; // @gotags: copier:"PreStart" *
|
||||
}
|
||||
|
||||
message PostStart{
|
||||
string mode=1; // @gotags: copier:"Mode" *
|
||||
string script=2; // @gotags: copier:"Script" *
|
||||
string type=3; // @gotags: copier:"Type" *
|
||||
}
|
||||
|
||||
message PreStart{
|
||||
string mode=1; // @gotags: copier:"Mode" *
|
||||
string script=2; // @gotags: copier:"Script" *
|
||||
string type=3; // @gotags: copier:"Type" *
|
||||
}
|
||||
|
||||
message ActionProgress{
|
||||
int32 step = 1; // @gotags: copier:"Step" *
|
||||
string status = 2; // @gotags: copier:"Status" *
|
||||
string description = 3; // @gotags: copier:"Description" *
|
||||
}
|
||||
|
||||
message JobProgress{
|
||||
string notebook_id = 1; // @gotags: copier:"NotebookId"
|
||||
string status = 2; // @gotags: copier:"Status"
|
||||
|
|
|
@ -1089,7 +1089,7 @@ type (
|
|||
PoolId string `json:"pool_id,optional" copier:"PoolId"`
|
||||
Volume VolumeReq `json:"volume" copier:"Volume"`
|
||||
WorkspaceId string `json:"workspace_id,optional" copier:"WorkspaceId"`
|
||||
Hooks CustomHooks `json:"hooks,optional" copier:"Hooks"`
|
||||
Hooks CustomHooks `json:"hooks" copier:"Hooks"`
|
||||
Lease LeaseReq `json:"lease,optional" copier:"Lease"`
|
||||
}
|
||||
|
||||
|
@ -1158,73 +1158,118 @@ type (
|
|||
Uri string `json:"uri" copier:"Uri"`
|
||||
}
|
||||
NotebookResp {
|
||||
ActionProgress []JobProgress `json:"action_progress" copier:"ActionProgress"`
|
||||
Description string `json:"description" copier:"Description"`
|
||||
Endpoints []EndpointsRes `json:"endpoints" copier:"Endpoints"`
|
||||
FailReason string `json:"fail_reason" copier:"FailReason"`
|
||||
Flavor string `json:"flavor" copier:"Flavor"`
|
||||
Id string `json:"id" copier:"Id"`
|
||||
Image Image `json:"image" copier:"Image"`
|
||||
Lease Lease `json:"lease" copier:"Lease"`
|
||||
Name string `json:"name" copier:"Name"`
|
||||
Pool Pool `json:"pool" copier:"Pool"`
|
||||
Status string `json:"status" copier:"Status"`
|
||||
Token string `json:"token" copier:"Token"`
|
||||
Url string `json:"url" copier:"Url"`
|
||||
Volume VolumeRes `json:"volume" copier:"Volume"`
|
||||
WorkspaceId string `json:"workspace_id" copier:"WorkspaceId"`
|
||||
Feature string `json:"feature" copier:"Feature"`
|
||||
ActionProgress []ActionProgress `json:"action_progress,omitempty" copier:"ActionProgress"`
|
||||
Description string `json:"description,omitempty" copier:"Description"`
|
||||
Endpoints []EndpointsRes `json:"endpoints,omitempty" copier:"Endpoints"`
|
||||
FailReason string `json:"fail_reason,omitempty" copier:"FailReason"`
|
||||
Flavor string `json:"flavor,omitempty" copier:"Flavor"`
|
||||
Id string `json:"id,omitempty" copier:"Id"`
|
||||
Image Image `json:"image,omitempty" copier:"Image"`
|
||||
Lease Lease `json:"lease,omitempty" copier:"Lease"`
|
||||
Name string `json:"name,omitempty" copier:"Name"`
|
||||
Pool Pool `json:"pool,omitempty" copier:"Pool"`
|
||||
Status string `json:"status,omitempty" copier:"Status"`
|
||||
Token string `json:"token,omitempty" copier:"Token"`
|
||||
Url string `json:"url,omitempty" copier:"Url"`
|
||||
Volume VolumeRes `json:"volume,omitempty" copier:"Volume"`
|
||||
WorkspaceId string `json:"workspace_id,omitempty" copier:"WorkspaceId"`
|
||||
Feature string `json:"feature,omitempty" copier:"Feature"`
|
||||
CreateAt int64 `json:"create_at,omitempty" copier:"CreateAt"` // *
|
||||
Hooks Hooks `json:"hooks,omitempty" copier:"Hooks"` // *
|
||||
Tags []string `json:"tags,omitempty" copier:"Tags"` // *
|
||||
UpdateAt int64 `json:"update_at,omitempty" copier:"UpdateAt"` // *
|
||||
UserNotebookResp UserNotebookResp `json:"user,omitempty" copier:"UserNotebookResp"` // *
|
||||
UserId string `json:"user_id,omitempty" copier:"UserId"` // *
|
||||
BillingItems []string `json:"billing_items,omitempty" copier:"BillingItems"` // *
|
||||
}
|
||||
|
||||
UserNotebookResp{
|
||||
UserNotebookDomain UserNotebookDomain `json:"domain,omitempty" copier:"UserNotebookDomain"` // *
|
||||
Id string `json:"id,omitempty" copier:"Id"` // *
|
||||
Name string `json:"name,omitempty" copier:"Name"` // *
|
||||
}
|
||||
|
||||
UserNotebookDomain{
|
||||
Id string `json:"id,omitempty" copier:"Id"` // *
|
||||
Name string `json:"name,omitempty" copier:"Name"` // *
|
||||
}
|
||||
|
||||
Hooks{
|
||||
ContainerHooksResp ContainerHooksResp `json:"containerHooks,omitempty" copier:"ContainerHooksResp"` // *
|
||||
}
|
||||
|
||||
ContainerHooksResp{
|
||||
PostStart PostStart `json:"postStart,omitempty" copier:"PostStart"` // *
|
||||
PreStart PreStart `json:"preStart,omitempty" copier:"PreStart"` // *
|
||||
}
|
||||
|
||||
PostStart{
|
||||
Mode string `json:"mode,omitempty" copier:"Mode"` // *
|
||||
Script string `json:"script,omitempty" copier:"Script"` // *
|
||||
Type string `json:"type,omitempty" copier:"Type"` // *
|
||||
}
|
||||
|
||||
PreStart{
|
||||
Mode string `json:"mode,omitempty" copier:"Mode"` // *
|
||||
Script string `json:"script,omitempty" copier:"Script"` // *
|
||||
Type string `json:"type,omitempty" copier:"Type"` // *
|
||||
}
|
||||
|
||||
ActionProgress{
|
||||
Step int32 `json:"step,omitempty" copier:"Step"` // *
|
||||
Status string `json:"status,omitempty" copier:"Status"` // *
|
||||
Description string `json:"description,omitempty" copier:"Description"` // *
|
||||
}
|
||||
JobProgress {
|
||||
NotebookId string `json:"notebook_id" copier:"NotebookId"`
|
||||
Status string `json:"status" copier:"Status"`
|
||||
Step int32 `json:"step" copier:"Step"`
|
||||
StepDescription string `json:"step_description" copier:"StepDescription"`
|
||||
Status string `json:"status,omitempty" copier:"Status"`
|
||||
Step int32 `json:"step,omitempty" copier:"Step"`
|
||||
StepDescription string `json:"step_description,omitempty" copier:"StepDescription"`
|
||||
}
|
||||
EndpointsRes {
|
||||
AllowedAccessIps []string `json:"allowed_access_ips" copier:"AllowedAccessIps"`
|
||||
DevService string `json:"dev_service" copier:"DevService"`
|
||||
SshKeys []string `json:"ssh_keys" copier:"SshKeys"`
|
||||
AllowedAccessIps []string `json:"allowed_access_ips,omitempty" copier:"AllowedAccessIps"`
|
||||
DevService string `json:"dev_service,omitempty" copier:"DevService"`
|
||||
SshKeys []string `json:"ssh_keys,omitempty" copier:"SshKeys"`
|
||||
}
|
||||
Image {
|
||||
Arch string `json:"arch" copier:"Arch"`
|
||||
CreateAt int64 `json:"create_at" copier:"CreateAt"`
|
||||
Description string `json:"description" copier:"Description"`
|
||||
DevServices []string `json:"dev_services" copier:"DevServices"`
|
||||
Id string `json:"id" copier:"Id"`
|
||||
Name string `json:"name" copier:"Name"`
|
||||
Namespace string `json:"namespace" copier:"Namespace"`
|
||||
Origin string `json:"origin" copier:"Origin"`
|
||||
ResourceCategories []string `json:"resource_categories" copier:"ResourceCategories"`
|
||||
ServiceType string `json:"service_type" copier:"ServiceType"`
|
||||
Size int64 `json:"size" copier:"Size"`
|
||||
Status string `json:"status" copier:"Status"`
|
||||
StatusMessage string `json:"status_message" copier:"StatusMessage"`
|
||||
SupportResCategories []string `json:"support_res_categories" copier:"SupportResCategories"`
|
||||
SwrPath string `json:"swr_path" copier:"SwrPath"`
|
||||
Tag string `json:"tag" copier:"Tag"`
|
||||
TypeImage string `json:"type" copier:"TypeImage"`
|
||||
UpdateAt int64 `json:"update_at" copier:"UpdateAt"`
|
||||
Visibility string `json:"visibility" copier:"Visibility"`
|
||||
WorkspaceId string `json:"workspace_id" copier:"WorkspaceId"`
|
||||
Arch string `json:"arch,omitempty" copier:"Arch"`
|
||||
CreateAt int64 `json:"create_at,omitempty" copier:"CreateAt"`
|
||||
Description string `json:"description,omitempty" copier:"Description"`
|
||||
DevServices []string `json:"dev_services,omitempty" copier:"DevServices"`
|
||||
Id string `json:"id,omitempty" copier:"Id"`
|
||||
Name string `json:"name,omitempty" copier:"Name"`
|
||||
Namespace string `json:"namespace,omitempty" copier:"Namespace"`
|
||||
Origin string `json:"origin,omitempty" copier:"Origin"`
|
||||
ResourceCategories []string `json:"resource_categories,omitempty" copier:"ResourceCategories"`
|
||||
ServiceType string `json:"service_type,omitempty" copier:"ServiceType"`
|
||||
Size int64 `json:"size,omitempty" copier:"Size"`
|
||||
Status string `json:"status,omitempty" copier:"Status"`
|
||||
StatusMessage string `json:"status_message,omitempty" copier:"StatusMessage"`
|
||||
SupportResCategories []string `json:"support_res_categories,omitempty" copier:"SupportResCategories"`
|
||||
SwrPath string `json:"swr_path,omitempty" copier:"SwrPath"`
|
||||
Tag string `json:"tag,omitempty" copier:"Tag"`
|
||||
TypeImage string `json:"type,omitempty" copier:"TypeImage"`
|
||||
UpdateAt int64 `json:"update_at,omitempty" copier:"UpdateAt"`
|
||||
Visibility string `json:"visibility,omitempty" copier:"Visibility"`
|
||||
WorkspaceId string `json:"workspace_id,omitempty" copier:"WorkspaceId"`
|
||||
}
|
||||
Lease {
|
||||
CreateAt int64 `json:"create_at" copier:"CreateAt"`
|
||||
Duration int64 `json:"duration" copier:"Duration"`
|
||||
Enable bool `json:"enable" copier:"Enable"`
|
||||
TypeLease string `json:"type" copier:"TypeLease"`
|
||||
UpdateAt int64 `json:"update_at" copier:"UpdateAt"`
|
||||
CreateAt int64 `json:"create_at,omitempty" copier:"CreateAt"`
|
||||
Duration int64 `json:"duration,omitempty" copier:"Duration"`
|
||||
Enable bool `json:"enable,omitempty" copier:"Enable"`
|
||||
TypeLease string `json:"type,omitempty" copier:"TypeLease"`
|
||||
UpdateAt int64 `json:"update_at,omitempty" copier:"UpdateAt"`
|
||||
}
|
||||
Pool {
|
||||
Id string `json:"id" copier:"Id"`
|
||||
Name string `json:"name" copier:"Name"`
|
||||
Id string `json:"id,omitempty" copier:"Id"`
|
||||
Name string `json:"name,omitempty" copier:"Name"`
|
||||
}
|
||||
VolumeRes {
|
||||
Capacity int64 `json:"capacity" copier:"Capacity"`
|
||||
Category string `json:"category" copier:"Category"`
|
||||
MountPath string `json:"mount_path" copier:"MountPath"`
|
||||
Ownership string `json:"ownership" copier:"Ownership"`
|
||||
Status string `json:"status" copier:"Status"`
|
||||
Capacity int64 `json:"capacity,omitempty" copier:"Capacity"`
|
||||
Category string `json:"category,omitempty" copier:"Category"`
|
||||
MountPath string `json:"mount_path,omitempty" copier:"MountPath"`
|
||||
Ownership string `json:"ownership,omitempty" copier:"Ownership"`
|
||||
Status string `json:"status,omitempty" copier:"Status"`
|
||||
}
|
||||
EndpointsReq {
|
||||
AllowedAccessIps []string `json:"allowed_access_ips" copier:"AllowedAccessIps"`
|
||||
|
@ -1249,8 +1294,8 @@ type (
|
|||
TypeConfig string `json:"type" copier:"TypeConfig"`
|
||||
}
|
||||
LeaseReq {
|
||||
Duration int64 `json:"duration" copier:"Duration"`
|
||||
TypeLeaseReq string `json:"type" copier:"TypeLeaseReq"`
|
||||
Duration int64 `json:"duration,omitempty" copier:"Duration"`
|
||||
TypeLeaseReq string `json:"type,omitempty" copier:"TypeLeaseReq"`
|
||||
}
|
||||
)
|
||||
/******************Notebook Type end*************************/
|
||||
|
|
|
@ -37,7 +37,7 @@ func (l *CreateNotebookLogic) CreateNotebook(req *types.CreateNotebookReq) (resp
|
|||
return nil, errors.Wrapf(xerr.NewErrMsg("Failed to create notebook"), "Failed to create notebook err : %v ,req:%+v", err, req)
|
||||
}
|
||||
resp = &types.CreateNotebookResp{}
|
||||
err = copier.CopyWithOption(resp, createNotebookResp, copier.Option{Converters: tool.Converters})
|
||||
err = copier.CopyWithOption(resp, createNotebookResp, copier.Option{IgnoreEmpty: true, DeepCopy: true, Converters: tool.Converters})
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
|
|
@ -1478,7 +1478,7 @@ type CreateNotebookParam struct {
|
|||
PoolId string `json:"pool_id,optional" copier:"PoolId"`
|
||||
Volume VolumeReq `json:"volume" copier:"Volume"`
|
||||
WorkspaceId string `json:"workspace_id,optional" copier:"WorkspaceId"`
|
||||
Hooks CustomHooks `json:"hooks,optional" copier:"Hooks"`
|
||||
Hooks CustomHooks `json:"hooks" copier:"Hooks"`
|
||||
Lease LeaseReq `json:"lease,optional" copier:"Lease"`
|
||||
}
|
||||
|
||||
|
@ -1554,79 +1554,124 @@ type DataVolumesRes struct {
|
|||
}
|
||||
|
||||
type NotebookResp struct {
|
||||
ActionProgress []JobProgress `json:"action_progress" copier:"ActionProgress"`
|
||||
Description string `json:"description" copier:"Description"`
|
||||
Endpoints []EndpointsRes `json:"endpoints" copier:"Endpoints"`
|
||||
FailReason string `json:"fail_reason" copier:"FailReason"`
|
||||
Flavor string `json:"flavor" copier:"Flavor"`
|
||||
Id string `json:"id" copier:"Id"`
|
||||
Image Image `json:"image" copier:"Image"`
|
||||
Lease Lease `json:"lease" copier:"Lease"`
|
||||
Name string `json:"name" copier:"Name"`
|
||||
Pool Pool `json:"pool" copier:"Pool"`
|
||||
Status string `json:"status" copier:"Status"`
|
||||
Token string `json:"token" copier:"Token"`
|
||||
Url string `json:"url" copier:"Url"`
|
||||
Volume VolumeRes `json:"volume" copier:"Volume"`
|
||||
WorkspaceId string `json:"workspace_id" copier:"WorkspaceId"`
|
||||
Feature string `json:"feature" copier:"Feature"`
|
||||
ActionProgress []ActionProgress `json:"action_progress,omitempty" copier:"ActionProgress"`
|
||||
Description string `json:"description,omitempty" copier:"Description"`
|
||||
Endpoints []EndpointsRes `json:"endpoints,omitempty" copier:"Endpoints"`
|
||||
FailReason string `json:"fail_reason,omitempty" copier:"FailReason"`
|
||||
Flavor string `json:"flavor,omitempty" copier:"Flavor"`
|
||||
Id string `json:"id,omitempty" copier:"Id"`
|
||||
Image Image `json:"image,omitempty" copier:"Image"`
|
||||
Lease Lease `json:"lease,omitempty" copier:"Lease"`
|
||||
Name string `json:"name,omitempty" copier:"Name"`
|
||||
Pool Pool `json:"pool,omitempty" copier:"Pool"`
|
||||
Status string `json:"status,omitempty" copier:"Status"`
|
||||
Token string `json:"token,omitempty" copier:"Token"`
|
||||
Url string `json:"url,omitempty" copier:"Url"`
|
||||
Volume VolumeRes `json:"volume,omitempty" copier:"Volume"`
|
||||
WorkspaceId string `json:"workspace_id,omitempty" copier:"WorkspaceId"`
|
||||
Feature string `json:"feature,omitempty" copier:"Feature"`
|
||||
CreateAt int64 `json:"create_at,omitempty" copier:"CreateAt"` // *
|
||||
Hooks Hooks `json:"hooks,omitempty" copier:"Hooks"`
|
||||
Tags []string `json:"tags,omitempty" copier:"Tags"` // *
|
||||
UpdateAt int64 `json:"update_at,omitempty" copier:"UpdateAt"` // *
|
||||
UserNotebookResp UserNotebookResp `json:"user,omitempty" copier:"UserNotebookResp"` // *
|
||||
UserId string `json:"user_id,omitempty" copier:"UserId"` // *
|
||||
BillingItems []string `json:"billing_items,omitempty" copier:"BillingItems"` // *
|
||||
}
|
||||
|
||||
type UserNotebookResp struct {
|
||||
UserNotebookDomain UserNotebookDomain `json:"domain,omitempty" copier:"UserNotebookDomain"` // *
|
||||
Id string `json:"id,omitempty" copier:"Id"` // *
|
||||
Name string `json:"name,omitempty" copier:"Name"` // *
|
||||
}
|
||||
|
||||
type UserNotebookDomain struct {
|
||||
Id string `json:"id,omitempty" copier:"Id"` // *
|
||||
Name string `json:"name,omitempty" copier:"Name"` // *
|
||||
}
|
||||
|
||||
type Hooks struct {
|
||||
ContainerHooksResp ContainerHooksResp `json:"containerHooks,omitempty" copier:"ContainerHooksResp"` // *
|
||||
}
|
||||
|
||||
type ContainerHooksResp struct {
|
||||
PostStart PostStart `json:"postStart,omitempty" copier:"PostStart"` // *
|
||||
PreStart PreStart `json:"preStart,omitempty" copier:"PreStart"` // *
|
||||
}
|
||||
|
||||
type PostStart struct {
|
||||
Mode string `json:"mode,omitempty" copier:"Mode"` // *
|
||||
Script string `json:"script,omitempty" copier:"Script"` // *
|
||||
Type string `json:"type,omitempty" copier:"Type"` // *
|
||||
}
|
||||
|
||||
type PreStart struct {
|
||||
Mode string `json:"mode,omitempty" copier:"Mode"` // *
|
||||
Script string `json:"script,omitempty" copier:"Script"` // *
|
||||
Type string `json:"type,omitempty" copier:"Type"` // *
|
||||
}
|
||||
|
||||
type ActionProgress struct {
|
||||
Step int32 `json:"step,omitempty" copier:"Step"` // *
|
||||
Status string `json:"status,omitempty" copier:"Status"` // *
|
||||
Description string `json:"description,omitempty" copier:"Description"` // *
|
||||
}
|
||||
|
||||
type JobProgress struct {
|
||||
NotebookId string `json:"notebook_id" copier:"NotebookId"`
|
||||
Status string `json:"status" copier:"Status"`
|
||||
Step int32 `json:"step" copier:"Step"`
|
||||
StepDescription string `json:"step_description" copier:"StepDescription"`
|
||||
Status string `json:"status,omitempty" copier:"Status"`
|
||||
Step int32 `json:"step,omitempty" copier:"Step"`
|
||||
StepDescription string `json:"step_description,omitempty" copier:"StepDescription"`
|
||||
}
|
||||
|
||||
type EndpointsRes struct {
|
||||
AllowedAccessIps []string `json:"allowed_access_ips" copier:"AllowedAccessIps"`
|
||||
DevService string `json:"dev_service" copier:"DevService"`
|
||||
SshKeys []string `json:"ssh_keys" copier:"SshKeys"`
|
||||
AllowedAccessIps []string `json:"allowed_access_ips,omitempty" copier:"AllowedAccessIps"`
|
||||
DevService string `json:"dev_service,omitempty" copier:"DevService"`
|
||||
SshKeys []string `json:"ssh_keys,omitempty" copier:"SshKeys"`
|
||||
}
|
||||
|
||||
type Image struct {
|
||||
Arch string `json:"arch" copier:"Arch"`
|
||||
CreateAt int64 `json:"create_at" copier:"CreateAt"`
|
||||
Description string `json:"description" copier:"Description"`
|
||||
DevServices []string `json:"dev_services" copier:"DevServices"`
|
||||
Id string `json:"id" copier:"Id"`
|
||||
Name string `json:"name" copier:"Name"`
|
||||
Namespace string `json:"namespace" copier:"Namespace"`
|
||||
Origin string `json:"origin" copier:"Origin"`
|
||||
ResourceCategories []string `json:"resource_categories" copier:"ResourceCategories"`
|
||||
ServiceType string `json:"service_type" copier:"ServiceType"`
|
||||
Size int64 `json:"size" copier:"Size"`
|
||||
Status string `json:"status" copier:"Status"`
|
||||
StatusMessage string `json:"status_message" copier:"StatusMessage"`
|
||||
SupportResCategories []string `json:"support_res_categories" copier:"SupportResCategories"`
|
||||
SwrPath string `json:"swr_path" copier:"SwrPath"`
|
||||
Tag string `json:"tag" copier:"Tag"`
|
||||
TypeImage string `json:"type" copier:"TypeImage"`
|
||||
UpdateAt int64 `json:"update_at" copier:"UpdateAt"`
|
||||
Visibility string `json:"visibility" copier:"Visibility"`
|
||||
WorkspaceId string `json:"workspace_id" copier:"WorkspaceId"`
|
||||
Arch string `json:"arch,omitempty" copier:"Arch"`
|
||||
CreateAt int64 `json:"create_at,omitempty" copier:"CreateAt"`
|
||||
Description string `json:"description,omitempty" copier:"Description"`
|
||||
DevServices []string `json:"dev_services,omitempty" copier:"DevServices"`
|
||||
Id string `json:"id,omitempty" copier:"Id"`
|
||||
Name string `json:"name,omitempty" copier:"Name"`
|
||||
Namespace string `json:"namespace,omitempty" copier:"Namespace"`
|
||||
Origin string `json:"origin,omitempty" copier:"Origin"`
|
||||
ResourceCategories []string `json:"resource_categories,omitempty" copier:"ResourceCategories"`
|
||||
ServiceType string `json:"service_type,omitempty" copier:"ServiceType"`
|
||||
Size int64 `json:"size,omitempty" copier:"Size"`
|
||||
Status string `json:"status,omitempty" copier:"Status"`
|
||||
StatusMessage string `json:"status_message,omitempty" copier:"StatusMessage"`
|
||||
SupportResCategories []string `json:"support_res_categories,omitempty" copier:"SupportResCategories"`
|
||||
SwrPath string `json:"swr_path,omitempty" copier:"SwrPath"`
|
||||
Tag string `json:"tag,omitempty" copier:"Tag"`
|
||||
TypeImage string `json:"type,omitempty" copier:"TypeImage"`
|
||||
UpdateAt int64 `json:"update_at,omitempty" copier:"UpdateAt"`
|
||||
Visibility string `json:"visibility,omitempty" copier:"Visibility"`
|
||||
WorkspaceId string `json:"workspace_id,omitempty" copier:"WorkspaceId"`
|
||||
}
|
||||
|
||||
type Lease struct {
|
||||
CreateAt int64 `json:"create_at" copier:"CreateAt"`
|
||||
Duration int64 `json:"duration" copier:"Duration"`
|
||||
Enable bool `json:"enable" copier:"Enable"`
|
||||
TypeLease string `json:"type" copier:"TypeLease"`
|
||||
UpdateAt int64 `json:"update_at" copier:"UpdateAt"`
|
||||
CreateAt int64 `json:"create_at,omitempty" copier:"CreateAt"`
|
||||
Duration int64 `json:"duration,omitempty" copier:"Duration"`
|
||||
Enable bool `json:"enable,omitempty" copier:"Enable"`
|
||||
TypeLease string `json:"type,omitempty" copier:"TypeLease"`
|
||||
UpdateAt int64 `json:"update_at,omitempty" copier:"UpdateAt"`
|
||||
}
|
||||
|
||||
type Pool struct {
|
||||
Id string `json:"id" copier:"Id"`
|
||||
Name string `json:"name" copier:"Name"`
|
||||
Id string `json:"id,omitempty" copier:"Id"`
|
||||
Name string `json:"name,omitempty" copier:"Name"`
|
||||
}
|
||||
|
||||
type VolumeRes struct {
|
||||
Capacity int64 `json:"capacity" copier:"Capacity"`
|
||||
Category string `json:"category" copier:"Category"`
|
||||
MountPath string `json:"mount_path" copier:"MountPath"`
|
||||
Ownership string `json:"ownership" copier:"Ownership"`
|
||||
Status string `json:"status" copier:"Status"`
|
||||
Capacity int64 `json:"capacity,omitempty" copier:"Capacity"`
|
||||
Category string `json:"category,omitempty" copier:"Category"`
|
||||
MountPath string `json:"mount_path,omitempty" copier:"MountPath"`
|
||||
Ownership string `json:"ownership,omitempty" copier:"Ownership"`
|
||||
Status string `json:"status,omitempty" copier:"Status"`
|
||||
}
|
||||
|
||||
type EndpointsReq struct {
|
||||
|
@ -1657,8 +1702,8 @@ type Config struct {
|
|||
}
|
||||
|
||||
type LeaseReq struct {
|
||||
Duration int64 `json:"duration" copier:"Duration"`
|
||||
TypeLeaseReq string `json:"type" copier:"TypeLeaseReq"`
|
||||
Duration int64 `json:"duration,omitempty" copier:"Duration"`
|
||||
TypeLeaseReq string `json:"type,omitempty" copier:"TypeLeaseReq"`
|
||||
}
|
||||
|
||||
type GetVisualizationJobReq struct {
|
||||
|
|
Loading…
Reference in New Issue