#674 #673 #672

Merged
liwei03 merged 2 commits from openioctopus/octopus:release-v4.2.6 into release-v4.2.6 1 year ago
  1. +4
    -0
      deploy/charts/octopus/templates/nvidia-device-plugin.yaml
  2. +1
    -0
      server/base-server/api/v1/trainJob.proto
  3. +1
    -0
      server/base-server/internal/data/dao/model/train_job.go
  4. +6
    -0
      server/base-server/internal/service/trainjob/train_job.go
  5. +1
    -0
      server/openai-server/api/v1/trainJob.proto
  6. +0
    -1
      server/platform-server/api/v1/swagger.json
  7. +0
    -1951
      server/platform-server/api/v1/trainJob.pb.go
  8. +0
    -1658
      server/platform-server/api/v1/trainJob.pb.validate.go
  9. +0
    -638
      server/platform-server/api/v1/trainJob.swagger.json
  10. +0
    -294
      server/platform-server/api/v1/trainJob_grpc.pb.go
  11. +0
    -199
      server/platform-server/api/v1/trainJob_http.pb.go
  12. +0
    -674
      server/platform-server/internal/conf/conf.pb.go
  13. +0
    -579
      server/platform-server/internal/conf/conf.pb.validate.go

+ 4
- 0
deploy/charts/octopus/templates/nvidia-device-plugin.yaml View File

@@ -52,10 +52,14 @@ spec:
- image: nvcr.io/nvidia/k8s-device-plugin:v0.9.0
name: nvidia-device-plugin-ctr
args: ["--fail-on-init-error=false","--mig-strategy=mixed"]
env:
- name: NVIDIA_MIG_MONITOR_DEVICES
value: all
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
add: ["SYS_ADMIN"]
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/device-plugins


+ 1
- 0
server/base-server/api/v1/trainJob.proto View File

@@ -92,6 +92,7 @@ message Config {
double resourceSpecPrice = 10;
repeated ReplicaState replicaStates = 11;
string subTaskState = 12;
map<string, string> envs = 13;
}

message ReplicaState {


+ 1
- 0
server/base-server/internal/data/dao/model/train_job.go View File

@@ -69,6 +69,7 @@ type Config struct {
ResourceSpecPrice float64 `json:"resourceSpecPrice"`
IsMainRole bool `json:"isMainRole"`
ShareMemory *resource.Quantity `json:"shareMemory"`
Envs map[string]string `json:"envs"`
}

type ResourceSpecPrice struct {


+ 6
- 0
server/base-server/internal/service/trainjob/train_job.go View File

@@ -581,6 +581,11 @@ func (s *trainJobService) submitJob(ctx context.Context, job *model.TrainJob, st
},
})
}

envs := make([]v1.EnvVar, 0)
for k, v := range i.Envs {
envs = append(envs, v1.EnvVar{Name: k, Value: v})
}
//pod template
task := typeJob.TaskSpec{
CompletionPolicy: typeJob.CompletionPolicy{
@@ -606,6 +611,7 @@ func (s *trainJobService) submitJob(ctx context.Context, job *model.TrainJob, st
},
VolumeMounts: volumeMounts,
Command: s.buildCmd(job, i),
Env: envs,
},
},
NodeSelector: startJobInfo.specs[i.ResourceSpecId].nodeSelectors,


+ 1
- 0
server/openai-server/api/v1/trainJob.proto View File

@@ -139,6 +139,7 @@ message Config {
repeated ReplicaState replicaStates = 11;
//子任务状态
string subTaskState = 12;
map<string, string> envs = 13;
}

message ReplicaState {


+ 0
- 1
server/platform-server/api/v1/swagger.json
File diff suppressed because it is too large
View File


+ 0
- 1951
server/platform-server/api/v1/trainJob.pb.go View File

@@ -1,1951 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.8
// source: server/platform-server/api/v1/trainJob.proto

package v1

import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)

const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type TrainJobRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//训练任务名称,必填,长度1-30
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
//训练任务描述,非必填
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc"`
//镜像信息
Image *Image `protobuf:"bytes,3,opt,name=image,proto3" json:"image"`
//输出路径信息
Output *Output `protobuf:"bytes,4,opt,name=output,proto3" json:"output"`
//数据集信息
Datasets []*Dataset `protobuf:"bytes,5,rep,name=datasets,proto3" json:"datasets"`
//子任务信息
Tasks []*Task `protobuf:"bytes,6,rep,name=tasks,proto3" json:"tasks"`
}

func (x *TrainJobRequest) Reset() {
*x = TrainJobRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *TrainJobRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*TrainJobRequest) ProtoMessage() {}

func (x *TrainJobRequest) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[0]
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 TrainJobRequest.ProtoReflect.Descriptor instead.
func (*TrainJobRequest) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{0}
}

func (x *TrainJobRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}

func (x *TrainJobRequest) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}

func (x *TrainJobRequest) GetImage() *Image {
if x != nil {
return x.Image
}
return nil
}

func (x *TrainJobRequest) GetOutput() *Output {
if x != nil {
return x.Output
}
return nil
}

func (x *TrainJobRequest) GetDatasets() []*Dataset {
if x != nil {
return x.Datasets
}
return nil
}

func (x *TrainJobRequest) GetTasks() []*Task {
if x != nil {
return x.Tasks
}
return nil
}

type Image struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version"`
}

func (x *Image) Reset() {
*x = Image{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Image) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Image) ProtoMessage() {}

func (x *Image) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[1]
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 Image.ProtoReflect.Descriptor instead.
func (*Image) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{1}
}

func (x *Image) GetName() string {
if x != nil {
return x.Name
}
return ""
}

func (x *Image) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}

type Dataset struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//存储配置名称,必填
StorageConfigName string `protobuf:"bytes,1,opt,name=storageConfigName,proto3" json:"storageConfigName"`
//数据集子目录
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr"`
//数据集名称,必填
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
//数据集容器内路径
Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path"`
}

func (x *Dataset) Reset() {
*x = Dataset{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Dataset) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Dataset) ProtoMessage() {}

func (x *Dataset) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[2]
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 Dataset.ProtoReflect.Descriptor instead.
func (*Dataset) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{2}
}

func (x *Dataset) GetStorageConfigName() string {
if x != nil {
return x.StorageConfigName
}
return ""
}

func (x *Dataset) GetAddr() string {
if x != nil {
return x.Addr
}
return ""
}

func (x *Dataset) GetName() string {
if x != nil {
return x.Name
}
return ""
}

func (x *Dataset) GetPath() string {
if x != nil {
return x.Path
}
return ""
}

type Output struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//存储配置名称,必填
StorageConfigName string `protobuf:"bytes,1,opt,name=storageConfigName,proto3" json:"storageConfigName"`
//存储子目录
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr"`
//容器内输出路径
Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path"`
}

func (x *Output) Reset() {
*x = Output{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Output) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Output) ProtoMessage() {}

func (x *Output) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[3]
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 Output.ProtoReflect.Descriptor instead.
func (*Output) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{3}
}

func (x *Output) GetStorageConfigName() string {
if x != nil {
return x.StorageConfigName
}
return ""
}

func (x *Output) GetAddr() string {
if x != nil {
return x.Addr
}
return ""
}

func (x *Output) GetPath() string {
if x != nil {
return x.Path
}
return ""
}

type Task struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//子任务名称,非必填,校验规则"^[0-9a-zA-Z_]*$",最大长度30个字符
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
//子任务执行命令
Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command"`
//command执行命令参数,key-value,数组
Parameters []*Parameter `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters"`
//资源
Resources []*Resource `protobuf:"bytes,4,rep,name=resources,proto3" json:"resources"`
//副本个数,非必填
TaskNumber int64 `protobuf:"varint,5,opt,name=taskNumber,proto3" json:"taskNumber"`
//子任务最小失败数,非必填
MinFailedTaskCount int64 `protobuf:"varint,6,opt,name=minFailedTaskCount,proto3" json:"minFailedTaskCount"`
//子任务最小成功数,非必填
MinSucceededTaskCount int64 `protobuf:"varint,7,opt,name=minSucceededTaskCount,proto3" json:"minSucceededTaskCount"`
//是否主任务,非必填
IsMainRole bool `protobuf:"varint,8,opt,name=isMainRole,proto3" json:"isMainRole"`
}

func (x *Task) Reset() {
*x = Task{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Task) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Task) ProtoMessage() {}

func (x *Task) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[4]
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 Task.ProtoReflect.Descriptor instead.
func (*Task) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{4}
}

func (x *Task) GetName() string {
if x != nil {
return x.Name
}
return ""
}

func (x *Task) GetCommand() string {
if x != nil {
return x.Command
}
return ""
}

func (x *Task) GetParameters() []*Parameter {
if x != nil {
return x.Parameters
}
return nil
}

func (x *Task) GetResources() []*Resource {
if x != nil {
return x.Resources
}
return nil
}

func (x *Task) GetTaskNumber() int64 {
if x != nil {
return x.TaskNumber
}
return 0
}

func (x *Task) GetMinFailedTaskCount() int64 {
if x != nil {
return x.MinFailedTaskCount
}
return 0
}

func (x *Task) GetMinSucceededTaskCount() int64 {
if x != nil {
return x.MinSucceededTaskCount
}
return 0
}

func (x *Task) GetIsMainRole() bool {
if x != nil {
return x.IsMainRole
}
return false
}

type Parameter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//命令参数key,非必填
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key"`
//命令参数value,非必填
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value"`
}

func (x *Parameter) Reset() {
*x = Parameter{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Parameter) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Parameter) ProtoMessage() {}

func (x *Parameter) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[5]
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 Parameter.ProtoReflect.Descriptor instead.
func (*Parameter) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{5}
}

func (x *Parameter) GetKey() string {
if x != nil {
return x.Key
}
return ""
}

func (x *Parameter) GetValue() string {
if x != nil {
return x.Value
}
return ""
}

type Resource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//命令参数key,必填
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
//命令参数value,必填
Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size"`
}

func (x *Resource) Reset() {
*x = Resource{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Resource) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Resource) ProtoMessage() {}

func (x *Resource) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[6]
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 Resource.ProtoReflect.Descriptor instead.
func (*Resource) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{6}
}

func (x *Resource) GetName() string {
if x != nil {
return x.Name
}
return ""
}

func (x *Resource) GetSize() string {
if x != nil {
return x.Size
}
return ""
}

type TrainJobReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//训练任务ID,必填
JobId string `protobuf:"bytes,1,opt,name=jobId,proto3" json:"jobId"`
}

func (x *TrainJobReply) Reset() {
*x = TrainJobReply{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *TrainJobReply) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*TrainJobReply) ProtoMessage() {}

func (x *TrainJobReply) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[7]
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 TrainJobReply.ProtoReflect.Descriptor instead.
func (*TrainJobReply) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{7}
}

func (x *TrainJobReply) GetJobId() string {
if x != nil {
return x.JobId
}
return ""
}

type StopJobRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//任务ID
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
}

func (x *StopJobRequest) Reset() {
*x = StopJobRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *StopJobRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*StopJobRequest) ProtoMessage() {}

func (x *StopJobRequest) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[8]
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 StopJobRequest.ProtoReflect.Descriptor instead.
func (*StopJobRequest) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{8}
}

func (x *StopJobRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}

type StopJobReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//停止时间
StoppedAt int64 `protobuf:"varint,1,opt,name=stoppedAt,proto3" json:"stoppedAt"`
}

func (x *StopJobReply) Reset() {
*x = StopJobReply{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *StopJobReply) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*StopJobReply) ProtoMessage() {}

func (x *StopJobReply) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[9]
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 StopJobReply.ProtoReflect.Descriptor instead.
func (*StopJobReply) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{9}
}

func (x *StopJobReply) GetStoppedAt() int64 {
if x != nil {
return x.StoppedAt
}
return 0
}

type TrainJobListRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

// 页码,从1开始,必填
PageIndex int64 `protobuf:"varint,1,opt,name=pageIndex,proto3" json:"pageIndex"`
// 页大小,最小1条,最大100条,必填
PageSize int64 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize"`
// 分组依据,非必填
SortBy string `protobuf:"bytes,3,opt,name=sortBy,proto3" json:"sortBy"`
//升序、降序,非必填
OrderBy string `protobuf:"bytes,4,opt,name=orderBy,proto3" json:"orderBy"`
//大于某个时间创建,非必填
CreatedAtGte int64 `protobuf:"varint,5,opt,name=createdAtGte,proto3" json:"createdAtGte"`
//小于某个时间创建,非必填
CreatedAtLt int64 `protobuf:"varint,6,opt,name=createdAtLt,proto3" json:"createdAtLt"`
//状态查询,非必填
Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status"`
//模糊查找字段,可用于name等模糊查找,非必填
SearchKey string `protobuf:"bytes,8,opt,name=searchKey,proto3" json:"searchKey"`
}

func (x *TrainJobListRequest) Reset() {
*x = TrainJobListRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *TrainJobListRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*TrainJobListRequest) ProtoMessage() {}

func (x *TrainJobListRequest) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[10]
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 TrainJobListRequest.ProtoReflect.Descriptor instead.
func (*TrainJobListRequest) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{10}
}

func (x *TrainJobListRequest) GetPageIndex() int64 {
if x != nil {
return x.PageIndex
}
return 0
}

func (x *TrainJobListRequest) GetPageSize() int64 {
if x != nil {
return x.PageSize
}
return 0
}

func (x *TrainJobListRequest) GetSortBy() string {
if x != nil {
return x.SortBy
}
return ""
}

func (x *TrainJobListRequest) GetOrderBy() string {
if x != nil {
return x.OrderBy
}
return ""
}

func (x *TrainJobListRequest) GetCreatedAtGte() int64 {
if x != nil {
return x.CreatedAtGte
}
return 0
}

func (x *TrainJobListRequest) GetCreatedAtLt() int64 {
if x != nil {
return x.CreatedAtLt
}
return 0
}

func (x *TrainJobListRequest) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}

func (x *TrainJobListRequest) GetSearchKey() string {
if x != nil {
return x.SearchKey
}
return ""
}

type TrainJobListReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//查询结果总数
TotalSize int64 `protobuf:"varint,1,opt,name=totalSize,proto3" json:"totalSize"`
//任务
TrainJobs []*TrainJob `protobuf:"bytes,2,rep,name=trainJobs,proto3" json:"trainJobs"`
}

func (x *TrainJobListReply) Reset() {
*x = TrainJobListReply{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *TrainJobListReply) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*TrainJobListReply) ProtoMessage() {}

func (x *TrainJobListReply) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[11]
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 TrainJobListReply.ProtoReflect.Descriptor instead.
func (*TrainJobListReply) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{11}
}

func (x *TrainJobListReply) GetTotalSize() int64 {
if x != nil {
return x.TotalSize
}
return 0
}

func (x *TrainJobListReply) GetTrainJobs() []*TrainJob {
if x != nil {
return x.TrainJobs
}
return nil
}

type TrainJob struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//任务ID
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
//job名称
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
//job描述
Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc"`
//数据集
Datasets []*Dataset `protobuf:"bytes,4,rep,name=datasets,proto3" json:"datasets"`
//镜像
Image *Image `protobuf:"bytes,5,opt,name=image,proto3" json:"image"`
//子任务配置信息
Tasks []*Task `protobuf:"bytes,6,rep,name=tasks,proto3" json:"tasks"`
//创建时间
CreatedAt int64 `protobuf:"varint,7,opt,name=createdAt,proto3" json:"createdAt"`
//更新时间
UpdatedAt int64 `protobuf:"varint,8,opt,name=updatedAt,proto3" json:"updatedAt"`
//任务状态
Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status"`
//job完成时间
CompletedAt int64 `protobuf:"varint,10,opt,name=completedAt,proto3" json:"completedAt"`
//运行时
RunSec int64 `protobuf:"varint,11,opt,name=runSec,proto3" json:"runSec"`
//启动时间
StartedAt int64 `protobuf:"varint,12,opt,name=startedAt,proto3" json:"startedAt"`
}

func (x *TrainJob) Reset() {
*x = TrainJob{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *TrainJob) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*TrainJob) ProtoMessage() {}

func (x *TrainJob) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[12]
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 TrainJob.ProtoReflect.Descriptor instead.
func (*TrainJob) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{12}
}

func (x *TrainJob) GetId() string {
if x != nil {
return x.Id
}
return ""
}

func (x *TrainJob) GetName() string {
if x != nil {
return x.Name
}
return ""
}

func (x *TrainJob) GetDesc() string {
if x != nil {
return x.Desc
}
return ""
}

func (x *TrainJob) GetDatasets() []*Dataset {
if x != nil {
return x.Datasets
}
return nil
}

func (x *TrainJob) GetImage() *Image {
if x != nil {
return x.Image
}
return nil
}

func (x *TrainJob) GetTasks() []*Task {
if x != nil {
return x.Tasks
}
return nil
}

func (x *TrainJob) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}

func (x *TrainJob) GetUpdatedAt() int64 {
if x != nil {
return x.UpdatedAt
}
return 0
}

func (x *TrainJob) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}

func (x *TrainJob) GetCompletedAt() int64 {
if x != nil {
return x.CompletedAt
}
return 0
}

func (x *TrainJob) GetRunSec() int64 {
if x != nil {
return x.RunSec
}
return 0
}

func (x *TrainJob) GetStartedAt() int64 {
if x != nil {
return x.StartedAt
}
return 0
}

type TrainJobInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//任务ID
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
}

func (x *TrainJobInfoRequest) Reset() {
*x = TrainJobInfoRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *TrainJobInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*TrainJobInfoRequest) ProtoMessage() {}

func (x *TrainJobInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[13]
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 TrainJobInfoRequest.ProtoReflect.Descriptor instead.
func (*TrainJobInfoRequest) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{13}
}

func (x *TrainJobInfoRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}

type TrainJobInfoReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//训练任务
TrainJob *TrainJob `protobuf:"bytes,1,opt,name=trainJob,proto3" json:"trainJob"`
}

func (x *TrainJobInfoReply) Reset() {
*x = TrainJobInfoReply{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *TrainJobInfoReply) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*TrainJobInfoReply) ProtoMessage() {}

func (x *TrainJobInfoReply) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[14]
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 TrainJobInfoReply.ProtoReflect.Descriptor instead.
func (*TrainJobInfoReply) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{14}
}

func (x *TrainJobInfoReply) GetTrainJob() *TrainJob {
if x != nil {
return x.TrainJob
}
return nil
}

type TrainJobStasticsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//大于某个时间创建,非必填
CreatedAtGte int64 `protobuf:"varint,1,opt,name=createdAtGte,proto3" json:"createdAtGte"`
//小于某个时间创建,非必填
CreatedAtLt int64 `protobuf:"varint,2,opt,name=createdAtLt,proto3" json:"createdAtLt"`
}

func (x *TrainJobStasticsRequest) Reset() {
*x = TrainJobStasticsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *TrainJobStasticsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*TrainJobStasticsRequest) ProtoMessage() {}

func (x *TrainJobStasticsRequest) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[15]
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 TrainJobStasticsRequest.ProtoReflect.Descriptor instead.
func (*TrainJobStasticsRequest) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{15}
}

func (x *TrainJobStasticsRequest) GetCreatedAtGte() int64 {
if x != nil {
return x.CreatedAtGte
}
return 0
}

func (x *TrainJobStasticsRequest) GetCreatedAtLt() int64 {
if x != nil {
return x.CreatedAtLt
}
return 0
}

type TrainJobStasticsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

//任务数量
TotalSize int64 `protobuf:"varint,1,opt,name=totalSize,proto3" json:"totalSize"`
//成功数量
SucceededSize int64 `protobuf:"varint,2,opt,name=succeededSize,proto3" json:"succeededSize"`
//失败数量
FailedSize int64 `protobuf:"varint,3,opt,name=failedSize,proto3" json:"failedSize"`
//停止数量
StoppedSize int64 `protobuf:"varint,4,opt,name=stoppedSize,proto3" json:"stoppedSize"`
//正在运行数量
RunningSize int64 `protobuf:"varint,5,opt,name=runningSize,proto3" json:"runningSize"`
//等待数量
WaitingSize int64 `protobuf:"varint,6,opt,name=waitingSize,proto3" json:"waitingSize"`
}

func (x *TrainJobStasticsReply) Reset() {
*x = TrainJobStasticsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *TrainJobStasticsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*TrainJobStasticsReply) ProtoMessage() {}

func (x *TrainJobStasticsReply) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[16]
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 TrainJobStasticsReply.ProtoReflect.Descriptor instead.
func (*TrainJobStasticsReply) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{16}
}

func (x *TrainJobStasticsReply) GetTotalSize() int64 {
if x != nil {
return x.TotalSize
}
return 0
}

func (x *TrainJobStasticsReply) GetSucceededSize() int64 {
if x != nil {
return x.SucceededSize
}
return 0
}

func (x *TrainJobStasticsReply) GetFailedSize() int64 {
if x != nil {
return x.FailedSize
}
return 0
}

func (x *TrainJobStasticsReply) GetStoppedSize() int64 {
if x != nil {
return x.StoppedSize
}
return 0
}

func (x *TrainJobStasticsReply) GetRunningSize() int64 {
if x != nil {
return x.RunningSize
}
return 0
}

func (x *TrainJobStasticsReply) GetWaitingSize() int64 {
if x != nil {
return x.WaitingSize
}
return 0
}

type Node struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

NodeName string `protobuf:"bytes,1,opt,name=nodeName,proto3" json:"nodeName"`
Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip"`
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status"`
Capacity map[string]string `protobuf:"bytes,4,rep,name=capacity,proto3" json:"capacity" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Allocated map[string]string `protobuf:"bytes,5,rep,name=allocated,proto3" json:"allocated" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

func (x *Node) Reset() {
*x = Node{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Node) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Node) ProtoMessage() {}

func (x *Node) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[17]
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 Node.ProtoReflect.Descriptor instead.
func (*Node) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{17}
}

func (x *Node) GetNodeName() string {
if x != nil {
return x.NodeName
}
return ""
}

func (x *Node) GetIp() string {
if x != nil {
return x.Ip
}
return ""
}

func (x *Node) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}

func (x *Node) GetCapacity() map[string]string {
if x != nil {
return x.Capacity
}
return nil
}

func (x *Node) GetAllocated() map[string]string {
if x != nil {
return x.Allocated
}
return nil
}

type PlatformResourcesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Resources []*Node `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources"`
}

func (x *PlatformResourcesReply) Reset() {
*x = PlatformResourcesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *PlatformResourcesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*PlatformResourcesReply) ProtoMessage() {}

func (x *PlatformResourcesReply) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_api_v1_trainJob_proto_msgTypes[18]
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 PlatformResourcesReply.ProtoReflect.Descriptor instead.
func (*PlatformResourcesReply) Descriptor() ([]byte, []int) {
return file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP(), []int{18}
}

func (x *PlatformResourcesReply) GetResources() []*Node {
if x != nil {
return x.Resources
}
return nil
}

var File_server_platform_server_api_v1_trainJob_proto protoreflect.FileDescriptor

var file_server_platform_server_api_v1_trainJob_proto_rawDesc = []byte{
0x0a, 0x2c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
0x6d, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f,
0x74, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15,
0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d,
0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x02, 0x0a, 0x0f, 0x54, 0x72,
0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06,
0x72, 0x04, 0x10, 0x01, 0x18, 0x1e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x04,
0x64, 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72,
0x03, 0x18, 0xac, 0x02, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6d,
0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x35,
0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d,
0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f,
0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x3a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74,
0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74,
0x73, 0x12, 0x31, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74,
0x61, 0x73, 0x6b, 0x73, 0x22, 0x4c, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07,
0x72, 0x05, 0x10, 0x01, 0x18, 0xac, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09,
0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x01, 0x18, 0x1e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x22, 0x9a, 0x01, 0x0a, 0x07, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x35,
0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02,
0x18, 0x1e, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x18, 0xac, 0x02, 0x52, 0x04, 0x61,
0x64, 0x64, 0x72, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x18, 0xac, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x1c, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42,
0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x18, 0xac, 0x02, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22,
0x7b, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x35, 0x0a, 0x11, 0x73, 0x74, 0x6f,
0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x18, 0x1e, 0x52, 0x11, 0x73,
0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x1c, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08,
0xfa, 0x42, 0x05, 0x72, 0x03, 0x18, 0xac, 0x02, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1c,
0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42,
0x05, 0x72, 0x03, 0x18, 0xac, 0x02, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x8d, 0x03, 0x0a,
0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x01, 0x18, 0x1e, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x00, 0x18, 0xac,
0x02, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x70, 0x61,
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20,
0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x09,
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x1f, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0a, 0x74,
0x61, 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42,
0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x28, 0x01, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x75,
0x6d, 0x62, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65,
0x64, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x28, 0x01, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x46, 0x61,
0x69, 0x6c, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a,
0x15, 0x6d, 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x54, 0x61, 0x73,
0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42,
0x04, 0x22, 0x02, 0x28, 0x01, 0x52, 0x15, 0x6d, 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65,
0x64, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a,
0x69, 0x73, 0x4d, 0x61, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0a, 0x69, 0x73, 0x4d, 0x61, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x33, 0x0a, 0x09,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x22, 0x32, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x25, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f,
0x62, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0e,
0x53, 0x74, 0x6f, 0x70, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x4a,
0x6f, 0x62, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x6f, 0x70, 0x70,
0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x6f, 0x70,
0x70, 0x65, 0x64, 0x41, 0x74, 0x22, 0xa5, 0x02, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a,
0x6f, 0x62, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a,
0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x28, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49,
0x6e, 0x64, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x10, 0x64, 0x28,
0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73,
0x6f, 0x72, 0x74, 0x42, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72,
0x74, 0x42, 0x79, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, 0x0f, 0x72, 0x0d, 0x52, 0x00, 0x52, 0x03, 0x61,
0x73, 0x63, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42,
0x79, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x47, 0x74,
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x41, 0x74, 0x47, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x41, 0x74, 0x4c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x4c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
0x1c, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x22, 0x70, 0x0a,
0x11, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70,
0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65,
0x12, 0x3d, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69,
0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x09, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x22,
0x91, 0x03, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x64, 0x65, 0x73, 0x63, 0x12, 0x3a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73,
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44,
0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73,
0x12, 0x32, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69,
0x6d, 0x61, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b,
0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63,
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a,
0x06, 0x72, 0x75, 0x6e, 0x53, 0x65, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72,
0x75, 0x6e, 0x53, 0x65, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64,
0x41, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65,
0x64, 0x41, 0x74, 0x22, 0x2e, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52,
0x02, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3b, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x69,
0x6e, 0x4a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x61,
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x08, 0x74, 0x72, 0x61,
0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x22, 0x5f, 0x0a, 0x17, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f,
0x62, 0x53, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x22, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x47, 0x74, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
0x74, 0x47, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
0x74, 0x4c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x4c, 0x74, 0x22, 0xe1, 0x01, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x69, 0x6e,
0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x24,
0x0a, 0x0d, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64,
0x53, 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x69,
0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64,
0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x53,
0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x70,
0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e,
0x67, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x75, 0x6e,
0x6e, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x77, 0x61, 0x69, 0x74,
0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x77,
0x61, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xd6, 0x02, 0x0a, 0x04, 0x4e,
0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12,
0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x45, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63,
0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x48,
0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x41,
0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61,
0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x61, 0x70, 0x61,
0x63, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74,
0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x22, 0x53, 0x0a, 0x16, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52,
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x39, 0x0a,
0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x72,
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x32, 0xb4, 0x06, 0x0a, 0x0f, 0x54, 0x72, 0x61,
0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7a, 0x0a, 0x08,
0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x12, 0x26, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66,
0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x24, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f,
0x62, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15,
0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x74, 0x72, 0x61,
0x69, 0x6e, 0x6a, 0x6f, 0x62, 0x3a, 0x01, 0x2a, 0x12, 0x81, 0x01, 0x0a, 0x07, 0x53, 0x74, 0x6f,
0x70, 0x4a, 0x6f, 0x62, 0x12, 0x25, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f,
0x70, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x6c,
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c,
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x6a, 0x6f, 0x62, 0x2f,
0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x3a, 0x01, 0x2a, 0x12, 0x86, 0x01, 0x0a,
0x0a, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x2e, 0x70, 0x6c,
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x70,
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x6a, 0x6f, 0x62,
0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x83, 0x01, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a,
0x6f, 0x62, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2a, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54,
0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e,
0x4a, 0x6f, 0x62, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x2f, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x6a, 0x6f, 0x62, 0x12, 0x96, 0x01, 0x0a, 0x10,
0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x73,
0x12, 0x2e, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f,
0x62, 0x53, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x2c, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x4a, 0x6f,
0x62, 0x53, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x24,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x76, 0x65, 0x72,
0x61, 0x6c, 0x6c, 0x2f, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x6a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x73,
0x74, 0x69, 0x63, 0x73, 0x12, 0x79, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x1a, 0x2d, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6c,
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42,
0x22, 0x5a, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31,
0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
file_server_platform_server_api_v1_trainJob_proto_rawDescOnce sync.Once
file_server_platform_server_api_v1_trainJob_proto_rawDescData = file_server_platform_server_api_v1_trainJob_proto_rawDesc
)

func file_server_platform_server_api_v1_trainJob_proto_rawDescGZIP() []byte {
file_server_platform_server_api_v1_trainJob_proto_rawDescOnce.Do(func() {
file_server_platform_server_api_v1_trainJob_proto_rawDescData = protoimpl.X.CompressGZIP(file_server_platform_server_api_v1_trainJob_proto_rawDescData)
})
return file_server_platform_server_api_v1_trainJob_proto_rawDescData
}

var file_server_platform_server_api_v1_trainJob_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
var file_server_platform_server_api_v1_trainJob_proto_goTypes = []interface{}{
(*TrainJobRequest)(nil), // 0: platformserver.api.v1.TrainJobRequest
(*Image)(nil), // 1: platformserver.api.v1.Image
(*Dataset)(nil), // 2: platformserver.api.v1.Dataset
(*Output)(nil), // 3: platformserver.api.v1.Output
(*Task)(nil), // 4: platformserver.api.v1.Task
(*Parameter)(nil), // 5: platformserver.api.v1.Parameter
(*Resource)(nil), // 6: platformserver.api.v1.Resource
(*TrainJobReply)(nil), // 7: platformserver.api.v1.TrainJobReply
(*StopJobRequest)(nil), // 8: platformserver.api.v1.StopJobRequest
(*StopJobReply)(nil), // 9: platformserver.api.v1.StopJobReply
(*TrainJobListRequest)(nil), // 10: platformserver.api.v1.TrainJobListRequest
(*TrainJobListReply)(nil), // 11: platformserver.api.v1.TrainJobListReply
(*TrainJob)(nil), // 12: platformserver.api.v1.TrainJob
(*TrainJobInfoRequest)(nil), // 13: platformserver.api.v1.TrainJobInfoRequest
(*TrainJobInfoReply)(nil), // 14: platformserver.api.v1.TrainJobInfoReply
(*TrainJobStasticsRequest)(nil), // 15: platformserver.api.v1.TrainJobStasticsRequest
(*TrainJobStasticsReply)(nil), // 16: platformserver.api.v1.TrainJobStasticsReply
(*Node)(nil), // 17: platformserver.api.v1.Node
(*PlatformResourcesReply)(nil), // 18: platformserver.api.v1.PlatformResourcesReply
nil, // 19: platformserver.api.v1.Node.CapacityEntry
nil, // 20: platformserver.api.v1.Node.AllocatedEntry
(*emptypb.Empty)(nil), // 21: google.protobuf.Empty
}
var file_server_platform_server_api_v1_trainJob_proto_depIdxs = []int32{
1, // 0: platformserver.api.v1.TrainJobRequest.image:type_name -> platformserver.api.v1.Image
3, // 1: platformserver.api.v1.TrainJobRequest.output:type_name -> platformserver.api.v1.Output
2, // 2: platformserver.api.v1.TrainJobRequest.datasets:type_name -> platformserver.api.v1.Dataset
4, // 3: platformserver.api.v1.TrainJobRequest.tasks:type_name -> platformserver.api.v1.Task
5, // 4: platformserver.api.v1.Task.parameters:type_name -> platformserver.api.v1.Parameter
6, // 5: platformserver.api.v1.Task.resources:type_name -> platformserver.api.v1.Resource
12, // 6: platformserver.api.v1.TrainJobListReply.trainJobs:type_name -> platformserver.api.v1.TrainJob
2, // 7: platformserver.api.v1.TrainJob.datasets:type_name -> platformserver.api.v1.Dataset
1, // 8: platformserver.api.v1.TrainJob.image:type_name -> platformserver.api.v1.Image
4, // 9: platformserver.api.v1.TrainJob.tasks:type_name -> platformserver.api.v1.Task
12, // 10: platformserver.api.v1.TrainJobInfoReply.trainJob:type_name -> platformserver.api.v1.TrainJob
19, // 11: platformserver.api.v1.Node.capacity:type_name -> platformserver.api.v1.Node.CapacityEntry
20, // 12: platformserver.api.v1.Node.allocated:type_name -> platformserver.api.v1.Node.AllocatedEntry
17, // 13: platformserver.api.v1.PlatformResourcesReply.resources:type_name -> platformserver.api.v1.Node
0, // 14: platformserver.api.v1.TrainJobService.TrainJob:input_type -> platformserver.api.v1.TrainJobRequest
8, // 15: platformserver.api.v1.TrainJobService.StopJob:input_type -> platformserver.api.v1.StopJobRequest
13, // 16: platformserver.api.v1.TrainJobService.GetJobInfo:input_type -> platformserver.api.v1.TrainJobInfoRequest
10, // 17: platformserver.api.v1.TrainJobService.TrainJobList:input_type -> platformserver.api.v1.TrainJobListRequest
15, // 18: platformserver.api.v1.TrainJobService.TrainJobStastics:input_type -> platformserver.api.v1.TrainJobStasticsRequest
21, // 19: platformserver.api.v1.TrainJobService.PlatformResources:input_type -> google.protobuf.Empty
7, // 20: platformserver.api.v1.TrainJobService.TrainJob:output_type -> platformserver.api.v1.TrainJobReply
9, // 21: platformserver.api.v1.TrainJobService.StopJob:output_type -> platformserver.api.v1.StopJobReply
14, // 22: platformserver.api.v1.TrainJobService.GetJobInfo:output_type -> platformserver.api.v1.TrainJobInfoReply
11, // 23: platformserver.api.v1.TrainJobService.TrainJobList:output_type -> platformserver.api.v1.TrainJobListReply
16, // 24: platformserver.api.v1.TrainJobService.TrainJobStastics:output_type -> platformserver.api.v1.TrainJobStasticsReply
18, // 25: platformserver.api.v1.TrainJobService.PlatformResources:output_type -> platformserver.api.v1.PlatformResourcesReply
20, // [20:26] is the sub-list for method output_type
14, // [14:20] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}

func init() { file_server_platform_server_api_v1_trainJob_proto_init() }
func file_server_platform_server_api_v1_trainJob_proto_init() {
if File_server_platform_server_api_v1_trainJob_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_server_platform_server_api_v1_trainJob_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrainJobRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Image); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Dataset); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Output); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Task); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Parameter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Resource); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrainJobReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StopJobRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StopJobReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrainJobListRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrainJobListReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrainJob); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrainJobInfoRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrainJobInfoReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrainJobStasticsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrainJobStasticsReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Node); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_api_v1_trainJob_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PlatformResourcesReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_server_platform_server_api_v1_trainJob_proto_rawDesc,
NumEnums: 0,
NumMessages: 21,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_server_platform_server_api_v1_trainJob_proto_goTypes,
DependencyIndexes: file_server_platform_server_api_v1_trainJob_proto_depIdxs,
MessageInfos: file_server_platform_server_api_v1_trainJob_proto_msgTypes,
}.Build()
File_server_platform_server_api_v1_trainJob_proto = out.File
file_server_platform_server_api_v1_trainJob_proto_rawDesc = nil
file_server_platform_server_api_v1_trainJob_proto_goTypes = nil
file_server_platform_server_api_v1_trainJob_proto_depIdxs = nil
}

+ 0
- 1658
server/platform-server/api/v1/trainJob.pb.validate.go View File

@@ -1,1658 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: server/platform-server/api/v1/trainJob.proto

package v1

import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"

"github.com/golang/protobuf/ptypes"
)

// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = ptypes.DynamicAny{}
)

// Validate checks the field values on TrainJobRequest with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *TrainJobRequest) Validate() error {
if m == nil {
return nil
}

if l := utf8.RuneCountInString(m.GetName()); l < 1 || l > 30 {
return TrainJobRequestValidationError{
field: "Name",
reason: "value length must be between 1 and 30 runes, inclusive",
}
}

if utf8.RuneCountInString(m.GetDesc()) > 300 {
return TrainJobRequestValidationError{
field: "Desc",
reason: "value length must be at most 300 runes",
}
}

if v, ok := interface{}(m.GetImage()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TrainJobRequestValidationError{
field: "Image",
reason: "embedded message failed validation",
cause: err,
}
}
}

if v, ok := interface{}(m.GetOutput()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TrainJobRequestValidationError{
field: "Output",
reason: "embedded message failed validation",
cause: err,
}
}
}

for idx, item := range m.GetDatasets() {
_, _ = idx, item

if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TrainJobRequestValidationError{
field: fmt.Sprintf("Datasets[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}

}

for idx, item := range m.GetTasks() {
_, _ = idx, item

if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TrainJobRequestValidationError{
field: fmt.Sprintf("Tasks[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}

}

return nil
}

// TrainJobRequestValidationError is the validation error returned by
// TrainJobRequest.Validate if the designated constraints aren't met.
type TrainJobRequestValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TrainJobRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TrainJobRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TrainJobRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TrainJobRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TrainJobRequestValidationError) ErrorName() string { return "TrainJobRequestValidationError" }

// Error satisfies the builtin error interface
func (e TrainJobRequestValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTrainJobRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TrainJobRequestValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TrainJobRequestValidationError{}

// Validate checks the field values on Image with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Image) Validate() error {
if m == nil {
return nil
}

if l := utf8.RuneCountInString(m.GetName()); l < 1 || l > 300 {
return ImageValidationError{
field: "Name",
reason: "value length must be between 1 and 300 runes, inclusive",
}
}

if l := utf8.RuneCountInString(m.GetVersion()); l < 1 || l > 30 {
return ImageValidationError{
field: "Version",
reason: "value length must be between 1 and 30 runes, inclusive",
}
}

return nil
}

// ImageValidationError is the validation error returned by Image.Validate if
// the designated constraints aren't met.
type ImageValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e ImageValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImageValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImageValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImageValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImageValidationError) ErrorName() string { return "ImageValidationError" }

// Error satisfies the builtin error interface
func (e ImageValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sImage.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = ImageValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ImageValidationError{}

// Validate checks the field values on Dataset with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Dataset) Validate() error {
if m == nil {
return nil
}

if utf8.RuneCountInString(m.GetStorageConfigName()) > 30 {
return DatasetValidationError{
field: "StorageConfigName",
reason: "value length must be at most 30 runes",
}
}

if utf8.RuneCountInString(m.GetAddr()) > 300 {
return DatasetValidationError{
field: "Addr",
reason: "value length must be at most 300 runes",
}
}

if utf8.RuneCountInString(m.GetName()) > 300 {
return DatasetValidationError{
field: "Name",
reason: "value length must be at most 300 runes",
}
}

if utf8.RuneCountInString(m.GetPath()) > 300 {
return DatasetValidationError{
field: "Path",
reason: "value length must be at most 300 runes",
}
}

return nil
}

// DatasetValidationError is the validation error returned by Dataset.Validate
// if the designated constraints aren't met.
type DatasetValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e DatasetValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DatasetValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DatasetValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DatasetValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DatasetValidationError) ErrorName() string { return "DatasetValidationError" }

// Error satisfies the builtin error interface
func (e DatasetValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sDataset.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = DatasetValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = DatasetValidationError{}

// Validate checks the field values on Output with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Output) Validate() error {
if m == nil {
return nil
}

if utf8.RuneCountInString(m.GetStorageConfigName()) > 30 {
return OutputValidationError{
field: "StorageConfigName",
reason: "value length must be at most 30 runes",
}
}

if utf8.RuneCountInString(m.GetAddr()) > 300 {
return OutputValidationError{
field: "Addr",
reason: "value length must be at most 300 runes",
}
}

if utf8.RuneCountInString(m.GetPath()) > 300 {
return OutputValidationError{
field: "Path",
reason: "value length must be at most 300 runes",
}
}

return nil
}

// OutputValidationError is the validation error returned by Output.Validate if
// the designated constraints aren't met.
type OutputValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e OutputValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e OutputValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e OutputValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e OutputValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e OutputValidationError) ErrorName() string { return "OutputValidationError" }

// Error satisfies the builtin error interface
func (e OutputValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sOutput.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = OutputValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = OutputValidationError{}

// Validate checks the field values on Task with the rules defined in the proto
// definition for this message. If any rules are violated, an error is returned.
func (m *Task) Validate() error {
if m == nil {
return nil
}

if l := utf8.RuneCountInString(m.GetName()); l < 1 || l > 30 {
return TaskValidationError{
field: "Name",
reason: "value length must be between 1 and 30 runes, inclusive",
}
}

if l := utf8.RuneCountInString(m.GetCommand()); l < 0 || l > 300 {
return TaskValidationError{
field: "Command",
reason: "value length must be between 0 and 300 runes, inclusive",
}
}

for idx, item := range m.GetParameters() {
_, _ = idx, item

if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TaskValidationError{
field: fmt.Sprintf("Parameters[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}

}

for idx, item := range m.GetResources() {
_, _ = idx, item

if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TaskValidationError{
field: fmt.Sprintf("Resources[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}

}

if m.GetTaskNumber() < 1 {
return TaskValidationError{
field: "TaskNumber",
reason: "value must be greater than or equal to 1",
}
}

if m.GetMinFailedTaskCount() < 1 {
return TaskValidationError{
field: "MinFailedTaskCount",
reason: "value must be greater than or equal to 1",
}
}

if m.GetMinSucceededTaskCount() < 1 {
return TaskValidationError{
field: "MinSucceededTaskCount",
reason: "value must be greater than or equal to 1",
}
}

// no validation rules for IsMainRole

return nil
}

// TaskValidationError is the validation error returned by Task.Validate if the
// designated constraints aren't met.
type TaskValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TaskValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TaskValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TaskValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TaskValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TaskValidationError) ErrorName() string { return "TaskValidationError" }

// Error satisfies the builtin error interface
func (e TaskValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTask.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TaskValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TaskValidationError{}

// Validate checks the field values on Parameter with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Parameter) Validate() error {
if m == nil {
return nil
}

// no validation rules for Key

// no validation rules for Value

return nil
}

// ParameterValidationError is the validation error returned by
// Parameter.Validate if the designated constraints aren't met.
type ParameterValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e ParameterValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ParameterValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ParameterValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ParameterValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ParameterValidationError) ErrorName() string { return "ParameterValidationError" }

// Error satisfies the builtin error interface
func (e ParameterValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sParameter.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = ParameterValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ParameterValidationError{}

// Validate checks the field values on Resource with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Resource) Validate() error {
if m == nil {
return nil
}

// no validation rules for Name

// no validation rules for Size

return nil
}

// ResourceValidationError is the validation error returned by
// Resource.Validate if the designated constraints aren't met.
type ResourceValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e ResourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ResourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ResourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ResourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ResourceValidationError) ErrorName() string { return "ResourceValidationError" }

// Error satisfies the builtin error interface
func (e ResourceValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sResource.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = ResourceValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ResourceValidationError{}

// Validate checks the field values on TrainJobReply with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *TrainJobReply) Validate() error {
if m == nil {
return nil
}

// no validation rules for JobId

return nil
}

// TrainJobReplyValidationError is the validation error returned by
// TrainJobReply.Validate if the designated constraints aren't met.
type TrainJobReplyValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TrainJobReplyValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TrainJobReplyValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TrainJobReplyValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TrainJobReplyValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TrainJobReplyValidationError) ErrorName() string { return "TrainJobReplyValidationError" }

// Error satisfies the builtin error interface
func (e TrainJobReplyValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTrainJobReply.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TrainJobReplyValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TrainJobReplyValidationError{}

// Validate checks the field values on StopJobRequest with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *StopJobRequest) Validate() error {
if m == nil {
return nil
}

if utf8.RuneCountInString(m.GetId()) < 1 {
return StopJobRequestValidationError{
field: "Id",
reason: "value length must be at least 1 runes",
}
}

return nil
}

// StopJobRequestValidationError is the validation error returned by
// StopJobRequest.Validate if the designated constraints aren't met.
type StopJobRequestValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e StopJobRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e StopJobRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e StopJobRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e StopJobRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e StopJobRequestValidationError) ErrorName() string { return "StopJobRequestValidationError" }

// Error satisfies the builtin error interface
func (e StopJobRequestValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sStopJobRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = StopJobRequestValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = StopJobRequestValidationError{}

// Validate checks the field values on StopJobReply with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *StopJobReply) Validate() error {
if m == nil {
return nil
}

// no validation rules for StoppedAt

return nil
}

// StopJobReplyValidationError is the validation error returned by
// StopJobReply.Validate if the designated constraints aren't met.
type StopJobReplyValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e StopJobReplyValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e StopJobReplyValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e StopJobReplyValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e StopJobReplyValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e StopJobReplyValidationError) ErrorName() string { return "StopJobReplyValidationError" }

// Error satisfies the builtin error interface
func (e StopJobReplyValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sStopJobReply.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = StopJobReplyValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = StopJobReplyValidationError{}

// Validate checks the field values on TrainJobListRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *TrainJobListRequest) Validate() error {
if m == nil {
return nil
}

if m.GetPageIndex() < 1 {
return TrainJobListRequestValidationError{
field: "PageIndex",
reason: "value must be greater than or equal to 1",
}
}

if val := m.GetPageSize(); val < 1 || val >= 100 {
return TrainJobListRequestValidationError{
field: "PageSize",
reason: "value must be inside range [1, 100)",
}
}

// no validation rules for SortBy

if _, ok := _TrainJobListRequest_OrderBy_InLookup[m.GetOrderBy()]; !ok {
return TrainJobListRequestValidationError{
field: "OrderBy",
reason: "value must be in list [ asc desc]",
}
}

// no validation rules for CreatedAtGte

// no validation rules for CreatedAtLt

// no validation rules for Status

// no validation rules for SearchKey

return nil
}

// TrainJobListRequestValidationError is the validation error returned by
// TrainJobListRequest.Validate if the designated constraints aren't met.
type TrainJobListRequestValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TrainJobListRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TrainJobListRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TrainJobListRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TrainJobListRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TrainJobListRequestValidationError) ErrorName() string {
return "TrainJobListRequestValidationError"
}

// Error satisfies the builtin error interface
func (e TrainJobListRequestValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTrainJobListRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TrainJobListRequestValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TrainJobListRequestValidationError{}

var _TrainJobListRequest_OrderBy_InLookup = map[string]struct{}{
"": {},
"asc": {},
"desc": {},
}

// Validate checks the field values on TrainJobListReply with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *TrainJobListReply) Validate() error {
if m == nil {
return nil
}

// no validation rules for TotalSize

for idx, item := range m.GetTrainJobs() {
_, _ = idx, item

if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TrainJobListReplyValidationError{
field: fmt.Sprintf("TrainJobs[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}

}

return nil
}

// TrainJobListReplyValidationError is the validation error returned by
// TrainJobListReply.Validate if the designated constraints aren't met.
type TrainJobListReplyValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TrainJobListReplyValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TrainJobListReplyValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TrainJobListReplyValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TrainJobListReplyValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TrainJobListReplyValidationError) ErrorName() string {
return "TrainJobListReplyValidationError"
}

// Error satisfies the builtin error interface
func (e TrainJobListReplyValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTrainJobListReply.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TrainJobListReplyValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TrainJobListReplyValidationError{}

// Validate checks the field values on TrainJob with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *TrainJob) Validate() error {
if m == nil {
return nil
}

// no validation rules for Id

// no validation rules for Name

// no validation rules for Desc

for idx, item := range m.GetDatasets() {
_, _ = idx, item

if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TrainJobValidationError{
field: fmt.Sprintf("Datasets[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}

}

if v, ok := interface{}(m.GetImage()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TrainJobValidationError{
field: "Image",
reason: "embedded message failed validation",
cause: err,
}
}
}

for idx, item := range m.GetTasks() {
_, _ = idx, item

if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TrainJobValidationError{
field: fmt.Sprintf("Tasks[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}

}

// no validation rules for CreatedAt

// no validation rules for UpdatedAt

// no validation rules for Status

// no validation rules for CompletedAt

// no validation rules for RunSec

// no validation rules for StartedAt

return nil
}

// TrainJobValidationError is the validation error returned by
// TrainJob.Validate if the designated constraints aren't met.
type TrainJobValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TrainJobValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TrainJobValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TrainJobValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TrainJobValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TrainJobValidationError) ErrorName() string { return "TrainJobValidationError" }

// Error satisfies the builtin error interface
func (e TrainJobValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTrainJob.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TrainJobValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TrainJobValidationError{}

// Validate checks the field values on TrainJobInfoRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *TrainJobInfoRequest) Validate() error {
if m == nil {
return nil
}

if utf8.RuneCountInString(m.GetId()) < 1 {
return TrainJobInfoRequestValidationError{
field: "Id",
reason: "value length must be at least 1 runes",
}
}

return nil
}

// TrainJobInfoRequestValidationError is the validation error returned by
// TrainJobInfoRequest.Validate if the designated constraints aren't met.
type TrainJobInfoRequestValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TrainJobInfoRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TrainJobInfoRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TrainJobInfoRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TrainJobInfoRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TrainJobInfoRequestValidationError) ErrorName() string {
return "TrainJobInfoRequestValidationError"
}

// Error satisfies the builtin error interface
func (e TrainJobInfoRequestValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTrainJobInfoRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TrainJobInfoRequestValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TrainJobInfoRequestValidationError{}

// Validate checks the field values on TrainJobInfoReply with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *TrainJobInfoReply) Validate() error {
if m == nil {
return nil
}

if v, ok := interface{}(m.GetTrainJob()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return TrainJobInfoReplyValidationError{
field: "TrainJob",
reason: "embedded message failed validation",
cause: err,
}
}
}

return nil
}

// TrainJobInfoReplyValidationError is the validation error returned by
// TrainJobInfoReply.Validate if the designated constraints aren't met.
type TrainJobInfoReplyValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TrainJobInfoReplyValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TrainJobInfoReplyValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TrainJobInfoReplyValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TrainJobInfoReplyValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TrainJobInfoReplyValidationError) ErrorName() string {
return "TrainJobInfoReplyValidationError"
}

// Error satisfies the builtin error interface
func (e TrainJobInfoReplyValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTrainJobInfoReply.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TrainJobInfoReplyValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TrainJobInfoReplyValidationError{}

// Validate checks the field values on TrainJobStasticsRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *TrainJobStasticsRequest) Validate() error {
if m == nil {
return nil
}

// no validation rules for CreatedAtGte

// no validation rules for CreatedAtLt

return nil
}

// TrainJobStasticsRequestValidationError is the validation error returned by
// TrainJobStasticsRequest.Validate if the designated constraints aren't met.
type TrainJobStasticsRequestValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TrainJobStasticsRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TrainJobStasticsRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TrainJobStasticsRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TrainJobStasticsRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TrainJobStasticsRequestValidationError) ErrorName() string {
return "TrainJobStasticsRequestValidationError"
}

// Error satisfies the builtin error interface
func (e TrainJobStasticsRequestValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTrainJobStasticsRequest.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TrainJobStasticsRequestValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TrainJobStasticsRequestValidationError{}

// Validate checks the field values on TrainJobStasticsReply with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *TrainJobStasticsReply) Validate() error {
if m == nil {
return nil
}

// no validation rules for TotalSize

// no validation rules for SucceededSize

// no validation rules for FailedSize

// no validation rules for StoppedSize

// no validation rules for RunningSize

// no validation rules for WaitingSize

return nil
}

// TrainJobStasticsReplyValidationError is the validation error returned by
// TrainJobStasticsReply.Validate if the designated constraints aren't met.
type TrainJobStasticsReplyValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e TrainJobStasticsReplyValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TrainJobStasticsReplyValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TrainJobStasticsReplyValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TrainJobStasticsReplyValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TrainJobStasticsReplyValidationError) ErrorName() string {
return "TrainJobStasticsReplyValidationError"
}

// Error satisfies the builtin error interface
func (e TrainJobStasticsReplyValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sTrainJobStasticsReply.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = TrainJobStasticsReplyValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = TrainJobStasticsReplyValidationError{}

// Validate checks the field values on Node with the rules defined in the proto
// definition for this message. If any rules are violated, an error is returned.
func (m *Node) Validate() error {
if m == nil {
return nil
}

// no validation rules for NodeName

// no validation rules for Ip

// no validation rules for Status

// no validation rules for Capacity

// no validation rules for Allocated

return nil
}

// NodeValidationError is the validation error returned by Node.Validate if the
// designated constraints aren't met.
type NodeValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e NodeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e NodeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e NodeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e NodeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e NodeValidationError) ErrorName() string { return "NodeValidationError" }

// Error satisfies the builtin error interface
func (e NodeValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sNode.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = NodeValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = NodeValidationError{}

// Validate checks the field values on PlatformResourcesReply with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *PlatformResourcesReply) Validate() error {
if m == nil {
return nil
}

for idx, item := range m.GetResources() {
_, _ = idx, item

if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return PlatformResourcesReplyValidationError{
field: fmt.Sprintf("Resources[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}

}

return nil
}

// PlatformResourcesReplyValidationError is the validation error returned by
// PlatformResourcesReply.Validate if the designated constraints aren't met.
type PlatformResourcesReplyValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e PlatformResourcesReplyValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PlatformResourcesReplyValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PlatformResourcesReplyValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PlatformResourcesReplyValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PlatformResourcesReplyValidationError) ErrorName() string {
return "PlatformResourcesReplyValidationError"
}

// Error satisfies the builtin error interface
func (e PlatformResourcesReplyValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sPlatformResourcesReply.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = PlatformResourcesReplyValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = PlatformResourcesReplyValidationError{}

+ 0
- 638
server/platform-server/api/v1/trainJob.swagger.json View File

@@ -1,638 +0,0 @@
{
"swagger": "2.0",
"info": {
"title": "server/platform-server/api/v1/trainJob.proto",
"version": "version not set"
},
"tags": [
{
"name": "TrainJobService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/overall/trainjobStastics": {
"get": {
"summary": "获取训练任务统计信息",
"operationId": "TrainJobService_TrainJobStastics",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1TrainJobStasticsReply"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "createdAtGte",
"description": "大于某个时间创建,非必填.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "createdAtLt",
"description": "小于某个时间创建,非必填.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
}
],
"tags": [
"TrainJobService"
]
}
},
"/v1/platform/resource": {
"get": {
"summary": "获取集群资源信息",
"operationId": "TrainJobService_PlatformResources",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1PlatformResourcesReply"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"tags": [
"TrainJobService"
]
}
},
"/v1/platform/trainjob": {
"get": {
"summary": "获取训练任务列表",
"operationId": "TrainJobService_TrainJobList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1TrainJobListReply"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "pageIndex",
"description": "页码,从1开始,必填.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "pageSize",
"description": "页大小,最小1条,最大100条,必填.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "sortBy",
"description": "分组依据,非必填.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "orderBy",
"description": "升序、降序,非必填.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "createdAtGte",
"description": "大于某个时间创建,非必填.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "createdAtLt",
"description": "小于某个时间创建,非必填.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "status",
"description": "状态查询,非必填.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "searchKey",
"description": "模糊查找字段,可用于name等模糊查找,非必填.",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"TrainJobService"
]
},
"post": {
"summary": "创建训练任务",
"operationId": "TrainJobService_TrainJob",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1TrainJobReply"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1TrainJobRequest"
}
}
],
"tags": [
"TrainJobService"
]
}
},
"/v1/platform/trainjob/{id}": {
"get": {
"summary": "获取训练任务详情",
"operationId": "TrainJobService_GetJobInfo",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1TrainJobInfoReply"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"description": "任务ID",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"TrainJobService"
]
}
},
"/v1/platform/trainjob/{id}/stop": {
"post": {
"summary": "停止训练任务",
"operationId": "TrainJobService_StopJob",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1StopJobReply"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"description": "任务ID",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object"
}
}
],
"tags": [
"TrainJobService"
]
}
}
},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v1Dataset": {
"type": "object",
"properties": {
"storageConfigName": {
"type": "string",
"title": "存储配置名称,必填"
},
"addr": {
"type": "string",
"title": "数据集子目录"
},
"name": {
"type": "string",
"title": "数据集名称,必填"
},
"path": {
"type": "string",
"title": "数据集容器内路径"
}
}
},
"v1Image": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"v1Node": {
"type": "object",
"properties": {
"nodeName": {
"type": "string"
},
"ip": {
"type": "string"
},
"status": {
"type": "string"
},
"capacity": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"allocated": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"v1Output": {
"type": "object",
"properties": {
"storageConfigName": {
"type": "string",
"title": "存储配置名称,必填"
},
"addr": {
"type": "string",
"title": "存储子目录"
},
"path": {
"type": "string",
"title": "容器内输出路径"
}
}
},
"v1Parameter": {
"type": "object",
"properties": {
"key": {
"type": "string",
"title": "命令参数key,非必填"
},
"value": {
"type": "string",
"title": "命令参数value,非必填"
}
}
},
"v1PlatformResourcesReply": {
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Node"
}
}
}
},
"v1Resource": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "命令参数key,必填"
},
"size": {
"type": "string",
"title": "命令参数value,必填"
}
}
},
"v1StopJobReply": {
"type": "object",
"properties": {
"stoppedAt": {
"type": "string",
"format": "int64",
"title": "停止时间"
}
}
},
"v1Task": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "子任务名称,非必填,校验规则\"^[0-9a-zA-Z_]*$\",最大长度30个字符"
},
"command": {
"type": "string",
"title": "子任务执行命令"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Parameter"
},
"title": "command执行命令参数,key-value,数组"
},
"resources": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Resource"
},
"title": "资源"
},
"taskNumber": {
"type": "string",
"format": "int64",
"title": "副本个数,非必填"
},
"minFailedTaskCount": {
"type": "string",
"format": "int64",
"title": "子任务最小失败数,非必填"
},
"minSucceededTaskCount": {
"type": "string",
"format": "int64",
"title": "子任务最小成功数,非必填"
},
"isMainRole": {
"type": "boolean",
"title": "是否主任务,非必填"
}
}
},
"v1TrainJob": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "任务ID"
},
"name": {
"type": "string",
"title": "job名称"
},
"desc": {
"type": "string",
"title": "job描述"
},
"datasets": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Dataset"
},
"title": "数据集"
},
"image": {
"$ref": "#/definitions/v1Image",
"title": "镜像"
},
"tasks": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Task"
},
"title": "子任务配置信息"
},
"createdAt": {
"type": "string",
"format": "int64",
"title": "创建时间"
},
"updatedAt": {
"type": "string",
"format": "int64",
"title": "更新时间"
},
"status": {
"type": "string",
"title": "任务状态"
},
"completedAt": {
"type": "string",
"format": "int64",
"title": "job完成时间"
},
"runSec": {
"type": "string",
"format": "int64",
"title": "运行时"
},
"startedAt": {
"type": "string",
"format": "int64",
"title": "启动时间"
}
}
},
"v1TrainJobInfoReply": {
"type": "object",
"properties": {
"trainJob": {
"$ref": "#/definitions/v1TrainJob",
"title": "训练任务"
}
}
},
"v1TrainJobListReply": {
"type": "object",
"properties": {
"totalSize": {
"type": "string",
"format": "int64",
"title": "查询结果总数"
},
"trainJobs": {
"type": "array",
"items": {
"$ref": "#/definitions/v1TrainJob"
},
"title": "任务"
}
}
},
"v1TrainJobReply": {
"type": "object",
"properties": {
"jobId": {
"type": "string",
"title": "训练任务ID,必填"
}
}
},
"v1TrainJobRequest": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "训练任务名称,必填,长度1-30"
},
"desc": {
"type": "string",
"title": "训练任务描述,非必填"
},
"image": {
"$ref": "#/definitions/v1Image",
"title": "镜像信息"
},
"output": {
"$ref": "#/definitions/v1Output",
"title": "输出路径信息"
},
"datasets": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Dataset"
},
"title": "数据集信息"
},
"tasks": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Task"
},
"title": "子任务信息"
}
}
},
"v1TrainJobStasticsReply": {
"type": "object",
"properties": {
"totalSize": {
"type": "string",
"format": "int64",
"title": "任务数量"
},
"succeededSize": {
"type": "string",
"format": "int64",
"title": "成功数量"
},
"failedSize": {
"type": "string",
"format": "int64",
"title": "失败数量"
},
"stoppedSize": {
"type": "string",
"format": "int64",
"title": "停止数量"
},
"runningSize": {
"type": "string",
"format": "int64",
"title": "正在运行数量"
},
"waitingSize": {
"type": "string",
"format": "int64",
"title": "等待数量"
}
}
}
}
}

+ 0
- 294
server/platform-server/api/v1/trainJob_grpc.pb.go View File

@@ -1,294 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package v1

import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// TrainJobServiceClient is the client API for TrainJobService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type TrainJobServiceClient interface {
// 创建训练任务
TrainJob(ctx context.Context, in *TrainJobRequest, opts ...grpc.CallOption) (*TrainJobReply, error)
//停止训练任务
StopJob(ctx context.Context, in *StopJobRequest, opts ...grpc.CallOption) (*StopJobReply, error)
// 获取训练任务详情
GetJobInfo(ctx context.Context, in *TrainJobInfoRequest, opts ...grpc.CallOption) (*TrainJobInfoReply, error)
//获取训练任务列表
TrainJobList(ctx context.Context, in *TrainJobListRequest, opts ...grpc.CallOption) (*TrainJobListReply, error)
//获取训练任务统计信息
TrainJobStastics(ctx context.Context, in *TrainJobStasticsRequest, opts ...grpc.CallOption) (*TrainJobStasticsReply, error)
//获取集群资源信息
PlatformResources(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PlatformResourcesReply, error)
}

type trainJobServiceClient struct {
cc grpc.ClientConnInterface
}

func NewTrainJobServiceClient(cc grpc.ClientConnInterface) TrainJobServiceClient {
return &trainJobServiceClient{cc}
}

func (c *trainJobServiceClient) TrainJob(ctx context.Context, in *TrainJobRequest, opts ...grpc.CallOption) (*TrainJobReply, error) {
out := new(TrainJobReply)
err := c.cc.Invoke(ctx, "/platformserver.api.v1.TrainJobService/TrainJob", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

func (c *trainJobServiceClient) StopJob(ctx context.Context, in *StopJobRequest, opts ...grpc.CallOption) (*StopJobReply, error) {
out := new(StopJobReply)
err := c.cc.Invoke(ctx, "/platformserver.api.v1.TrainJobService/StopJob", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

func (c *trainJobServiceClient) GetJobInfo(ctx context.Context, in *TrainJobInfoRequest, opts ...grpc.CallOption) (*TrainJobInfoReply, error) {
out := new(TrainJobInfoReply)
err := c.cc.Invoke(ctx, "/platformserver.api.v1.TrainJobService/GetJobInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

func (c *trainJobServiceClient) TrainJobList(ctx context.Context, in *TrainJobListRequest, opts ...grpc.CallOption) (*TrainJobListReply, error) {
out := new(TrainJobListReply)
err := c.cc.Invoke(ctx, "/platformserver.api.v1.TrainJobService/TrainJobList", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

func (c *trainJobServiceClient) TrainJobStastics(ctx context.Context, in *TrainJobStasticsRequest, opts ...grpc.CallOption) (*TrainJobStasticsReply, error) {
out := new(TrainJobStasticsReply)
err := c.cc.Invoke(ctx, "/platformserver.api.v1.TrainJobService/TrainJobStastics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

func (c *trainJobServiceClient) PlatformResources(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PlatformResourcesReply, error) {
out := new(PlatformResourcesReply)
err := c.cc.Invoke(ctx, "/platformserver.api.v1.TrainJobService/PlatformResources", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

// TrainJobServiceServer is the server API for TrainJobService service.
// All implementations must embed UnimplementedTrainJobServiceServer
// for forward compatibility
type TrainJobServiceServer interface {
// 创建训练任务
TrainJob(context.Context, *TrainJobRequest) (*TrainJobReply, error)
//停止训练任务
StopJob(context.Context, *StopJobRequest) (*StopJobReply, error)
// 获取训练任务详情
GetJobInfo(context.Context, *TrainJobInfoRequest) (*TrainJobInfoReply, error)
//获取训练任务列表
TrainJobList(context.Context, *TrainJobListRequest) (*TrainJobListReply, error)
//获取训练任务统计信息
TrainJobStastics(context.Context, *TrainJobStasticsRequest) (*TrainJobStasticsReply, error)
//获取集群资源信息
PlatformResources(context.Context, *emptypb.Empty) (*PlatformResourcesReply, error)
mustEmbedUnimplementedTrainJobServiceServer()
}

// UnimplementedTrainJobServiceServer must be embedded to have forward compatible implementations.
type UnimplementedTrainJobServiceServer struct {
}

func (UnimplementedTrainJobServiceServer) TrainJob(context.Context, *TrainJobRequest) (*TrainJobReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method TrainJob not implemented")
}
func (UnimplementedTrainJobServiceServer) StopJob(context.Context, *StopJobRequest) (*StopJobReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method StopJob not implemented")
}
func (UnimplementedTrainJobServiceServer) GetJobInfo(context.Context, *TrainJobInfoRequest) (*TrainJobInfoReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetJobInfo not implemented")
}
func (UnimplementedTrainJobServiceServer) TrainJobList(context.Context, *TrainJobListRequest) (*TrainJobListReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method TrainJobList not implemented")
}
func (UnimplementedTrainJobServiceServer) TrainJobStastics(context.Context, *TrainJobStasticsRequest) (*TrainJobStasticsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method TrainJobStastics not implemented")
}
func (UnimplementedTrainJobServiceServer) PlatformResources(context.Context, *emptypb.Empty) (*PlatformResourcesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method PlatformResources not implemented")
}
func (UnimplementedTrainJobServiceServer) mustEmbedUnimplementedTrainJobServiceServer() {}

// UnsafeTrainJobServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TrainJobServiceServer will
// result in compilation errors.
type UnsafeTrainJobServiceServer interface {
mustEmbedUnimplementedTrainJobServiceServer()
}

func RegisterTrainJobServiceServer(s grpc.ServiceRegistrar, srv TrainJobServiceServer) {
s.RegisterService(&TrainJobService_ServiceDesc, srv)
}

func _TrainJobService_TrainJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TrainJobRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrainJobServiceServer).TrainJob(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/platformserver.api.v1.TrainJobService/TrainJob",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrainJobServiceServer).TrainJob(ctx, req.(*TrainJobRequest))
}
return interceptor(ctx, in, info, handler)
}

func _TrainJobService_StopJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StopJobRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrainJobServiceServer).StopJob(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/platformserver.api.v1.TrainJobService/StopJob",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrainJobServiceServer).StopJob(ctx, req.(*StopJobRequest))
}
return interceptor(ctx, in, info, handler)
}

func _TrainJobService_GetJobInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TrainJobInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrainJobServiceServer).GetJobInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/platformserver.api.v1.TrainJobService/GetJobInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrainJobServiceServer).GetJobInfo(ctx, req.(*TrainJobInfoRequest))
}
return interceptor(ctx, in, info, handler)
}

func _TrainJobService_TrainJobList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TrainJobListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrainJobServiceServer).TrainJobList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/platformserver.api.v1.TrainJobService/TrainJobList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrainJobServiceServer).TrainJobList(ctx, req.(*TrainJobListRequest))
}
return interceptor(ctx, in, info, handler)
}

func _TrainJobService_TrainJobStastics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TrainJobStasticsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrainJobServiceServer).TrainJobStastics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/platformserver.api.v1.TrainJobService/TrainJobStastics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrainJobServiceServer).TrainJobStastics(ctx, req.(*TrainJobStasticsRequest))
}
return interceptor(ctx, in, info, handler)
}

func _TrainJobService_PlatformResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrainJobServiceServer).PlatformResources(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/platformserver.api.v1.TrainJobService/PlatformResources",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrainJobServiceServer).PlatformResources(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}

// TrainJobService_ServiceDesc is the grpc.ServiceDesc for TrainJobService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TrainJobService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "platformserver.api.v1.TrainJobService",
HandlerType: (*TrainJobServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "TrainJob",
Handler: _TrainJobService_TrainJob_Handler,
},
{
MethodName: "StopJob",
Handler: _TrainJobService_StopJob_Handler,
},
{
MethodName: "GetJobInfo",
Handler: _TrainJobService_GetJobInfo_Handler,
},
{
MethodName: "TrainJobList",
Handler: _TrainJobService_TrainJobList_Handler,
},
{
MethodName: "TrainJobStastics",
Handler: _TrainJobService_TrainJobStastics_Handler,
},
{
MethodName: "PlatformResources",
Handler: _TrainJobService_PlatformResources_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "server/platform-server/api/v1/trainJob.proto",
}

+ 0
- 199
server/platform-server/api/v1/trainJob_http.pb.go View File

@@ -1,199 +0,0 @@
// Code generated by protoc-gen-go-http. DO NOT EDIT.

package v1

import (
context "context"
http1 "github.com/go-kratos/kratos/v2/transport/http"
binding "github.com/go-kratos/kratos/v2/transport/http/binding"
mux "github.com/gorilla/mux"
emptypb "google.golang.org/protobuf/types/known/emptypb"
http "net/http"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the kratos package it is being compiled against.
var _ = new(http.Request)
var _ = new(context.Context)
var _ = binding.MapProto
var _ = mux.NewRouter

const _ = http1.SupportPackageIsVersion1

type TrainJobServiceHandler interface {
GetJobInfo(context.Context, *TrainJobInfoRequest) (*TrainJobInfoReply, error)

PlatformResources(context.Context, *emptypb.Empty) (*PlatformResourcesReply, error)

StopJob(context.Context, *StopJobRequest) (*StopJobReply, error)

TrainJob(context.Context, *TrainJobRequest) (*TrainJobReply, error)

TrainJobList(context.Context, *TrainJobListRequest) (*TrainJobListReply, error)

TrainJobStastics(context.Context, *TrainJobStasticsRequest) (*TrainJobStasticsReply, error)
}

func NewTrainJobServiceHandler(srv TrainJobServiceHandler, opts ...http1.HandleOption) http.Handler {
h := http1.DefaultHandleOptions()
for _, o := range opts {
o(&h)
}
r := mux.NewRouter()

r.HandleFunc("/v1/platform/trainjob", func(w http.ResponseWriter, r *http.Request) {
var in TrainJobRequest
if err := h.Decode(r, &in); err != nil {
h.Error(w, r, err)
return
}

next := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.TrainJob(ctx, req.(*TrainJobRequest))
}
if h.Middleware != nil {
next = h.Middleware(next)
}
out, err := next(r.Context(), &in)
if err != nil {
h.Error(w, r, err)
return
}
reply := out.(*TrainJobReply)
if err := h.Encode(w, r, reply); err != nil {
h.Error(w, r, err)
}
}).Methods("POST")

r.HandleFunc("/v1/platform/trainjob/{id}/stop", func(w http.ResponseWriter, r *http.Request) {
var in StopJobRequest
if err := h.Decode(r, &in); err != nil {
h.Error(w, r, err)
return
}

if err := binding.MapProto(&in, mux.Vars(r)); err != nil {
h.Error(w, r, err)
return
}

next := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.StopJob(ctx, req.(*StopJobRequest))
}
if h.Middleware != nil {
next = h.Middleware(next)
}
out, err := next(r.Context(), &in)
if err != nil {
h.Error(w, r, err)
return
}
reply := out.(*StopJobReply)
if err := h.Encode(w, r, reply); err != nil {
h.Error(w, r, err)
}
}).Methods("POST")

r.HandleFunc("/v1/platform/trainjob/{id}", func(w http.ResponseWriter, r *http.Request) {
var in TrainJobInfoRequest
if err := h.Decode(r, &in); err != nil {
h.Error(w, r, err)
return
}

if err := binding.MapProto(&in, mux.Vars(r)); err != nil {
h.Error(w, r, err)
return
}

next := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.GetJobInfo(ctx, req.(*TrainJobInfoRequest))
}
if h.Middleware != nil {
next = h.Middleware(next)
}
out, err := next(r.Context(), &in)
if err != nil {
h.Error(w, r, err)
return
}
reply := out.(*TrainJobInfoReply)
if err := h.Encode(w, r, reply); err != nil {
h.Error(w, r, err)
}
}).Methods("GET")

r.HandleFunc("/v1/platform/trainjob", func(w http.ResponseWriter, r *http.Request) {
var in TrainJobListRequest
if err := h.Decode(r, &in); err != nil {
h.Error(w, r, err)
return
}

next := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.TrainJobList(ctx, req.(*TrainJobListRequest))
}
if h.Middleware != nil {
next = h.Middleware(next)
}
out, err := next(r.Context(), &in)
if err != nil {
h.Error(w, r, err)
return
}
reply := out.(*TrainJobListReply)
if err := h.Encode(w, r, reply); err != nil {
h.Error(w, r, err)
}
}).Methods("GET")

r.HandleFunc("/v1/overall/trainjobStastics", func(w http.ResponseWriter, r *http.Request) {
var in TrainJobStasticsRequest
if err := h.Decode(r, &in); err != nil {
h.Error(w, r, err)
return
}

next := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.TrainJobStastics(ctx, req.(*TrainJobStasticsRequest))
}
if h.Middleware != nil {
next = h.Middleware(next)
}
out, err := next(r.Context(), &in)
if err != nil {
h.Error(w, r, err)
return
}
reply := out.(*TrainJobStasticsReply)
if err := h.Encode(w, r, reply); err != nil {
h.Error(w, r, err)
}
}).Methods("GET")

r.HandleFunc("/v1/platform/resource", func(w http.ResponseWriter, r *http.Request) {
var in emptypb.Empty
if err := h.Decode(r, &in); err != nil {
h.Error(w, r, err)
return
}

next := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.PlatformResources(ctx, req.(*emptypb.Empty))
}
if h.Middleware != nil {
next = h.Middleware(next)
}
out, err := next(r.Context(), &in)
if err != nil {
h.Error(w, r, err)
return
}
reply := out.(*PlatformResourcesReply)
if err := h.Encode(w, r, reply); err != nil {
h.Error(w, r, err)
}
}).Methods("GET")

return r
}

+ 0
- 674
server/platform-server/internal/conf/conf.pb.go View File

@@ -1,674 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.8
// source: server/platform-server/internal/conf/conf.proto

package conf

import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
reflect "reflect"
sync "sync"
)

const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type Bootstrap struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

App *App `protobuf:"bytes,1,opt,name=app,proto3" json:"app"`
Server *Server `protobuf:"bytes,2,opt,name=server,proto3" json:"server"`
Data *Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data"`
Service *Service `protobuf:"bytes,4,opt,name=service,proto3" json:"service"`
}

func (x *Bootstrap) Reset() {
*x = Bootstrap{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Bootstrap) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Bootstrap) ProtoMessage() {}

func (x *Bootstrap) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[0]
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 Bootstrap.ProtoReflect.Descriptor instead.
func (*Bootstrap) Descriptor() ([]byte, []int) {
return file_server_platform_server_internal_conf_conf_proto_rawDescGZIP(), []int{0}
}

func (x *Bootstrap) GetApp() *App {
if x != nil {
return x.App
}
return nil
}

func (x *Bootstrap) GetServer() *Server {
if x != nil {
return x.Server
}
return nil
}

func (x *Bootstrap) GetData() *Data {
if x != nil {
return x.Data
}
return nil
}

func (x *Bootstrap) GetService() *Service {
if x != nil {
return x.Service
}
return nil
}

type App struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version"`
IsDev bool `protobuf:"varint,3,opt,name=isDev,proto3" json:"isDev"`
LogLevel string `protobuf:"bytes,4,opt,name=logLevel,proto3" json:"logLevel"`
}

func (x *App) Reset() {
*x = App{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *App) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*App) ProtoMessage() {}

func (x *App) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[1]
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 App.ProtoReflect.Descriptor instead.
func (*App) Descriptor() ([]byte, []int) {
return file_server_platform_server_internal_conf_conf_proto_rawDescGZIP(), []int{1}
}

func (x *App) GetName() string {
if x != nil {
return x.Name
}
return ""
}

func (x *App) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}

func (x *App) GetIsDev() bool {
if x != nil {
return x.IsDev
}
return false
}

func (x *App) GetLogLevel() string {
if x != nil {
return x.LogLevel
}
return ""
}

type Server struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Http *Server_HTTP `protobuf:"bytes,1,opt,name=http,proto3" json:"http"`
}

func (x *Server) Reset() {
*x = Server{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Server) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Server) ProtoMessage() {}

func (x *Server) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[2]
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 Server.ProtoReflect.Descriptor instead.
func (*Server) Descriptor() ([]byte, []int) {
return file_server_platform_server_internal_conf_conf_proto_rawDescGZIP(), []int{2}
}

func (x *Server) GetHttp() *Server_HTTP {
if x != nil {
return x.Http
}
return nil
}

type Data struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

BaseServerAddr string `protobuf:"bytes,1,opt,name=baseServerAddr,proto3" json:"baseServerAddr"`
Redis *Data_Redis `protobuf:"bytes,2,opt,name=redis,proto3" json:"redis"`
BaseServerRequestTimeout string `protobuf:"bytes,3,opt,name=baseServerRequestTimeout,proto3" json:"baseServerRequestTimeout"`
}

func (x *Data) Reset() {
*x = Data{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Data) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Data) ProtoMessage() {}

func (x *Data) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[3]
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 Data.ProtoReflect.Descriptor instead.
func (*Data) Descriptor() ([]byte, []int) {
return file_server_platform_server_internal_conf_conf_proto_rawDescGZIP(), []int{3}
}

func (x *Data) GetBaseServerAddr() string {
if x != nil {
return x.BaseServerAddr
}
return ""
}

func (x *Data) GetRedis() *Data_Redis {
if x != nil {
return x.Redis
}
return nil
}

func (x *Data) GetBaseServerRequestTimeout() string {
if x != nil {
return x.BaseServerRequestTimeout
}
return ""
}

type Service struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

TokenExpirationSec int64 `protobuf:"varint,1,opt,name=tokenExpirationSec,proto3" json:"tokenExpirationSec"`
}

func (x *Service) Reset() {
*x = Service{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Service) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Service) ProtoMessage() {}

func (x *Service) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[4]
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 Service.ProtoReflect.Descriptor instead.
func (*Service) Descriptor() ([]byte, []int) {
return file_server_platform_server_internal_conf_conf_proto_rawDescGZIP(), []int{4}
}

func (x *Service) GetTokenExpirationSec() int64 {
if x != nil {
return x.TokenExpirationSec
}
return 0
}

type Server_HTTP struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr"`
Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout"`
JwtSecrect string `protobuf:"bytes,4,opt,name=jwtSecrect,proto3" json:"jwtSecrect"`
}

func (x *Server_HTTP) Reset() {
*x = Server_HTTP{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Server_HTTP) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Server_HTTP) ProtoMessage() {}

func (x *Server_HTTP) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[5]
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 Server_HTTP.ProtoReflect.Descriptor instead.
func (*Server_HTTP) Descriptor() ([]byte, []int) {
return file_server_platform_server_internal_conf_conf_proto_rawDescGZIP(), []int{2, 0}
}

func (x *Server_HTTP) GetNetwork() string {
if x != nil {
return x.Network
}
return ""
}

func (x *Server_HTTP) GetAddr() string {
if x != nil {
return x.Addr
}
return ""
}

func (x *Server_HTTP) GetTimeout() *durationpb.Duration {
if x != nil {
return x.Timeout
}
return nil
}

func (x *Server_HTTP) GetJwtSecrect() string {
if x != nil {
return x.JwtSecrect
}
return ""
}

type Data_Redis struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields

Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username"`
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password"`
}

func (x *Data_Redis) Reset() {
*x = Data_Redis{}
if protoimpl.UnsafeEnabled {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}

func (x *Data_Redis) String() string {
return protoimpl.X.MessageStringOf(x)
}

func (*Data_Redis) ProtoMessage() {}

func (x *Data_Redis) ProtoReflect() protoreflect.Message {
mi := &file_server_platform_server_internal_conf_conf_proto_msgTypes[6]
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 Data_Redis.ProtoReflect.Descriptor instead.
func (*Data_Redis) Descriptor() ([]byte, []int) {
return file_server_platform_server_internal_conf_conf_proto_rawDescGZIP(), []int{3, 0}
}

func (x *Data_Redis) GetAddr() string {
if x != nil {
return x.Addr
}
return ""
}

func (x *Data_Redis) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}

func (x *Data_Redis) GetPassword() string {
if x != nil {
return x.Password
}
return ""
}

var File_server_platform_server_internal_conf_conf_proto protoreflect.FileDescriptor

var file_server_platform_server_internal_conf_conf_proto_rawDesc = []byte{
0x0a, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
0x6d, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x1c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x1a,
0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xf7, 0x01, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x33, 0x0a,
0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6c, 0x61,
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x69, 0x6e, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x03, 0x61,
0x70, 0x70, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e,
0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x12, 0x36, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61,
0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x65, 0x0a, 0x03, 0x41, 0x70, 0x70,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14,
0x0a, 0x05, 0x69, 0x73, 0x44, 0x65, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69,
0x73, 0x44, 0x65, 0x76, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c,
0x22, 0xd3, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x68,
0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
0x48, 0x54, 0x54, 0x50, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x1a, 0x89, 0x01, 0x0a, 0x04, 0x48,
0x54, 0x54, 0x50, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a,
0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64,
0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74,
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6a, 0x77, 0x74, 0x53, 0x65, 0x63,
0x72, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6a, 0x77, 0x74, 0x53,
0x65, 0x63, 0x72, 0x65, 0x63, 0x74, 0x22, 0xff, 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12,
0x26, 0x0a, 0x0e, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x3e, 0x0a, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
0x6d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73,
0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x12, 0x3a, 0x0a, 0x18, 0x62, 0x61, 0x73, 0x65, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65,
0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x62, 0x61, 0x73, 0x65, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65,
0x6f, 0x75, 0x74, 0x1a, 0x53, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x12, 0x0a, 0x04,
0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72,
0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x39, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x12, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x53, 0x65, 0x63, 0x42, 0x14, 0x5a, 0x12, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f,
0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}

var (
file_server_platform_server_internal_conf_conf_proto_rawDescOnce sync.Once
file_server_platform_server_internal_conf_conf_proto_rawDescData = file_server_platform_server_internal_conf_conf_proto_rawDesc
)

func file_server_platform_server_internal_conf_conf_proto_rawDescGZIP() []byte {
file_server_platform_server_internal_conf_conf_proto_rawDescOnce.Do(func() {
file_server_platform_server_internal_conf_conf_proto_rawDescData = protoimpl.X.CompressGZIP(file_server_platform_server_internal_conf_conf_proto_rawDescData)
})
return file_server_platform_server_internal_conf_conf_proto_rawDescData
}

var file_server_platform_server_internal_conf_conf_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_server_platform_server_internal_conf_conf_proto_goTypes = []interface{}{
(*Bootstrap)(nil), // 0: platformserver.internal.conf.Bootstrap
(*App)(nil), // 1: platformserver.internal.conf.App
(*Server)(nil), // 2: platformserver.internal.conf.Server
(*Data)(nil), // 3: platformserver.internal.conf.Data
(*Service)(nil), // 4: platformserver.internal.conf.Service
(*Server_HTTP)(nil), // 5: platformserver.internal.conf.Server.HTTP
(*Data_Redis)(nil), // 6: platformserver.internal.conf.Data.Redis
(*durationpb.Duration)(nil), // 7: google.protobuf.Duration
}
var file_server_platform_server_internal_conf_conf_proto_depIdxs = []int32{
1, // 0: platformserver.internal.conf.Bootstrap.app:type_name -> platformserver.internal.conf.App
2, // 1: platformserver.internal.conf.Bootstrap.server:type_name -> platformserver.internal.conf.Server
3, // 2: platformserver.internal.conf.Bootstrap.data:type_name -> platformserver.internal.conf.Data
4, // 3: platformserver.internal.conf.Bootstrap.service:type_name -> platformserver.internal.conf.Service
5, // 4: platformserver.internal.conf.Server.http:type_name -> platformserver.internal.conf.Server.HTTP
6, // 5: platformserver.internal.conf.Data.redis:type_name -> platformserver.internal.conf.Data.Redis
7, // 6: platformserver.internal.conf.Server.HTTP.timeout:type_name -> google.protobuf.Duration
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}

func init() { file_server_platform_server_internal_conf_conf_proto_init() }
func file_server_platform_server_internal_conf_conf_proto_init() {
if File_server_platform_server_internal_conf_conf_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_server_platform_server_internal_conf_conf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Bootstrap); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_internal_conf_conf_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*App); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_internal_conf_conf_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Server); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_internal_conf_conf_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Data); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_internal_conf_conf_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Service); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_internal_conf_conf_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Server_HTTP); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_server_platform_server_internal_conf_conf_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Data_Redis); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_server_platform_server_internal_conf_conf_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_server_platform_server_internal_conf_conf_proto_goTypes,
DependencyIndexes: file_server_platform_server_internal_conf_conf_proto_depIdxs,
MessageInfos: file_server_platform_server_internal_conf_conf_proto_msgTypes,
}.Build()
File_server_platform_server_internal_conf_conf_proto = out.File
file_server_platform_server_internal_conf_conf_proto_rawDesc = nil
file_server_platform_server_internal_conf_conf_proto_goTypes = nil
file_server_platform_server_internal_conf_conf_proto_depIdxs = nil
}

+ 0
- 579
server/platform-server/internal/conf/conf.pb.validate.go View File

@@ -1,579 +0,0 @@
// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: server/platform-server/internal/conf/conf.proto

package conf

import (
"bytes"
"errors"
"fmt"
"net"
"net/mail"
"net/url"
"regexp"
"strings"
"time"
"unicode/utf8"

"github.com/golang/protobuf/ptypes"
)

// ensure the imports are used
var (
_ = bytes.MinRead
_ = errors.New("")
_ = fmt.Print
_ = utf8.UTFMax
_ = (*regexp.Regexp)(nil)
_ = (*strings.Reader)(nil)
_ = net.IPv4len
_ = time.Duration(0)
_ = (*url.URL)(nil)
_ = (*mail.Address)(nil)
_ = ptypes.DynamicAny{}
)

// Validate checks the field values on Bootstrap with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Bootstrap) Validate() error {
if m == nil {
return nil
}

if v, ok := interface{}(m.GetApp()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return BootstrapValidationError{
field: "App",
reason: "embedded message failed validation",
cause: err,
}
}
}

if v, ok := interface{}(m.GetServer()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return BootstrapValidationError{
field: "Server",
reason: "embedded message failed validation",
cause: err,
}
}
}

if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return BootstrapValidationError{
field: "Data",
reason: "embedded message failed validation",
cause: err,
}
}
}

if v, ok := interface{}(m.GetService()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return BootstrapValidationError{
field: "Service",
reason: "embedded message failed validation",
cause: err,
}
}
}

return nil
}

// BootstrapValidationError is the validation error returned by
// Bootstrap.Validate if the designated constraints aren't met.
type BootstrapValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e BootstrapValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BootstrapValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BootstrapValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BootstrapValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BootstrapValidationError) ErrorName() string { return "BootstrapValidationError" }

// Error satisfies the builtin error interface
func (e BootstrapValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sBootstrap.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = BootstrapValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = BootstrapValidationError{}

// Validate checks the field values on App with the rules defined in the proto
// definition for this message. If any rules are violated, an error is returned.
func (m *App) Validate() error {
if m == nil {
return nil
}

// no validation rules for Name

// no validation rules for Version

// no validation rules for IsDev

// no validation rules for LogLevel

return nil
}

// AppValidationError is the validation error returned by App.Validate if the
// designated constraints aren't met.
type AppValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e AppValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AppValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AppValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AppValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AppValidationError) ErrorName() string { return "AppValidationError" }

// Error satisfies the builtin error interface
func (e AppValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sApp.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = AppValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = AppValidationError{}

// Validate checks the field values on Server with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Server) Validate() error {
if m == nil {
return nil
}

if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return ServerValidationError{
field: "Http",
reason: "embedded message failed validation",
cause: err,
}
}
}

return nil
}

// ServerValidationError is the validation error returned by Server.Validate if
// the designated constraints aren't met.
type ServerValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e ServerValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ServerValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ServerValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ServerValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ServerValidationError) ErrorName() string { return "ServerValidationError" }

// Error satisfies the builtin error interface
func (e ServerValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sServer.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = ServerValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ServerValidationError{}

// Validate checks the field values on Data with the rules defined in the proto
// definition for this message. If any rules are violated, an error is returned.
func (m *Data) Validate() error {
if m == nil {
return nil
}

// no validation rules for BaseServerAddr

if v, ok := interface{}(m.GetRedis()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return DataValidationError{
field: "Redis",
reason: "embedded message failed validation",
cause: err,
}
}
}

// no validation rules for BaseServerRequestTimeout

return nil
}

// DataValidationError is the validation error returned by Data.Validate if the
// designated constraints aren't met.
type DataValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e DataValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataValidationError) ErrorName() string { return "DataValidationError" }

// Error satisfies the builtin error interface
func (e DataValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sData.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = DataValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = DataValidationError{}

// Validate checks the field values on Service with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Service) Validate() error {
if m == nil {
return nil
}

// no validation rules for TokenExpirationSec

return nil
}

// ServiceValidationError is the validation error returned by Service.Validate
// if the designated constraints aren't met.
type ServiceValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e ServiceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ServiceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ServiceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ServiceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ServiceValidationError) ErrorName() string { return "ServiceValidationError" }

// Error satisfies the builtin error interface
func (e ServiceValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sService.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = ServiceValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = ServiceValidationError{}

// Validate checks the field values on Server_HTTP with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *Server_HTTP) Validate() error {
if m == nil {
return nil
}

// no validation rules for Network

// no validation rules for Addr

if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return Server_HTTPValidationError{
field: "Timeout",
reason: "embedded message failed validation",
cause: err,
}
}
}

// no validation rules for JwtSecrect

return nil
}

// Server_HTTPValidationError is the validation error returned by
// Server_HTTP.Validate if the designated constraints aren't met.
type Server_HTTPValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e Server_HTTPValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e Server_HTTPValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e Server_HTTPValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e Server_HTTPValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e Server_HTTPValidationError) ErrorName() string { return "Server_HTTPValidationError" }

// Error satisfies the builtin error interface
func (e Server_HTTPValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sServer_HTTP.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = Server_HTTPValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Server_HTTPValidationError{}

// Validate checks the field values on Data_Redis with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Data_Redis) Validate() error {
if m == nil {
return nil
}

// no validation rules for Addr

// no validation rules for Username

// no validation rules for Password

return nil
}

// Data_RedisValidationError is the validation error returned by
// Data_Redis.Validate if the designated constraints aren't met.
type Data_RedisValidationError struct {
field string
reason string
cause error
key bool
}

// Field function returns field value.
func (e Data_RedisValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e Data_RedisValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e Data_RedisValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e Data_RedisValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e Data_RedisValidationError) ErrorName() string { return "Data_RedisValidationError" }

// Error satisfies the builtin error interface
func (e Data_RedisValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}

key := ""
if e.key {
key = "key for "
}

return fmt.Sprintf(
"invalid %sData_Redis.%s: %s%s",
key,
e.field,
e.reason,
cause)
}

var _ error = Data_RedisValidationError{}

var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = Data_RedisValidationError{}

Loading…
Cancel
Save