forked from JointCloud/pcm-coordinator
feat:grpc-gateway refactor
Signed-off-by: devad <cossjie@gmail.com>
This commit is contained in:
parent
7242b4fa74
commit
7764bd3099
|
@ -1,2 +1,8 @@
|
|||
# PCM
|
||||
|
||||
## protobuf 编译流程
|
||||
```shell
|
||||
sh gen.sh
|
||||
```
|
||||
|
||||
protobuf生成的文件在lan_trans下
|
24
buf.gen.yaml
24
buf.gen.yaml
|
@ -1,24 +0,0 @@
|
|||
version: v1
|
||||
plugins:
|
||||
- name: go
|
||||
out: lan_trans
|
||||
opt:
|
||||
- paths=source_relative
|
||||
# - name: java
|
||||
# out: lan_trans
|
||||
# opt:
|
||||
# - paths=source_relative
|
||||
- name: go-grpc
|
||||
out: lan_trans
|
||||
opt:
|
||||
- paths=source_relative
|
||||
# - name: java-grpc
|
||||
# out: gen
|
||||
# opt:
|
||||
# - paths=source_relative
|
||||
- name: grpc-gateway
|
||||
out: lan_trans
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- name: openapiv2
|
||||
out: lan_trans/openapiv2
|
|
@ -0,0 +1,34 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/global"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/model"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/spf13/viper"
|
||||
"log"
|
||||
)
|
||||
|
||||
func InitConfig() {
|
||||
// 实例化viper
|
||||
v := viper.New()
|
||||
//文件的路径如何设置
|
||||
v.SetConfigFile("./config-test.yaml")
|
||||
err := v.ReadInConfig()
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
serverConfig := model.ServerConfig{}
|
||||
//给serverConfig初始值
|
||||
err = v.Unmarshal(&serverConfig)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
// 传递给全局变量
|
||||
global.S = serverConfig
|
||||
|
||||
//热重载配置
|
||||
v.OnConfigChange(func(e fsnotify.Event) {
|
||||
log.Printf("config file:%s Op:%s\n", e.Name, e.Op)
|
||||
})
|
||||
v.WatchConfig()
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package global
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/model"
|
||||
)
|
||||
|
||||
// S 全局变量
|
||||
var (
|
||||
S model.ServerConfig
|
||||
)
|
|
@ -0,0 +1,87 @@
|
|||
package model
|
||||
|
||||
type ServerConfig struct {
|
||||
Name string `mapstructure:"name"`
|
||||
GormInfo GormConfig `mapstructure:"gorm"`
|
||||
RedisInfo RedisConfig `mapstructure:"redis"`
|
||||
GatewayInfo GatewayConfig `mapstructure:"gateway"`
|
||||
SlurmInfo SlurmConfig `mapstructure:"slurm"`
|
||||
PodInfo PodConfig `mapstructure:"pod"`
|
||||
VmInfo VmConfig `mapstructure:"vm"`
|
||||
AliInfo AliConfig `mapstructure:"ali"`
|
||||
TencentInfo TencentConfig `mapstructure:"tencent"`
|
||||
HuaweiInfo HuaweiConfig `mapstructure:"huawei"`
|
||||
K8sInfo K8sPConfig `mapstructure:"k8s"`
|
||||
HarvesterInfo HarvesterConfig `mapstructure:"harvester"`
|
||||
}
|
||||
|
||||
type GormConfig struct {
|
||||
Host string `mapstructure:"host"`
|
||||
Port int `mapstructure:"port"`
|
||||
Name string `mapstructure:"name"`
|
||||
Password string `mapstructure:"password"`
|
||||
DBName string `mapstructure:"dbName"`
|
||||
}
|
||||
|
||||
type RedisConfig struct {
|
||||
Host string `mapstructure:"host"`
|
||||
Port int `mapstructure:"port"`
|
||||
Password string `mapstructure:"password"`
|
||||
DB int `mapstructure:"db"`
|
||||
}
|
||||
|
||||
type GatewayConfig struct {
|
||||
Address string `mapstructure:"addr"`
|
||||
}
|
||||
|
||||
type SlurmConfig struct {
|
||||
Address string `mapstructure:"addr"`
|
||||
}
|
||||
|
||||
type PodConfig struct {
|
||||
Address string `mapstructure:"addr"`
|
||||
}
|
||||
|
||||
type VmConfig struct {
|
||||
Address string `mapstructure:"addr"`
|
||||
}
|
||||
|
||||
type WebSocketConfig struct {
|
||||
Address string `mapstructure:"addr"`
|
||||
Username string `mapstructure:"name"`
|
||||
}
|
||||
|
||||
type AliConfig struct {
|
||||
provider string `mapstructure:"provider"`
|
||||
name string `mapstructure:"name"`
|
||||
accessid string `mapstructure:"accessid"`
|
||||
accesssecret string `mapstructure:"accesssecret"`
|
||||
}
|
||||
|
||||
type TencentConfig struct {
|
||||
provider string `mapstructure:"provider"`
|
||||
name string `mapstructure:"name"`
|
||||
accessid string `mapstructure:"accessid"`
|
||||
accesssecret string `mapstructure:"accesssecret"`
|
||||
}
|
||||
|
||||
type HuaweiConfig struct {
|
||||
provider string `mapstructure:"provider"`
|
||||
name string `mapstructure:"name"`
|
||||
accessid string `mapstructure:"accessid"`
|
||||
accesssecret string `mapstructure:"accesssecret"`
|
||||
}
|
||||
|
||||
type K8sPConfig struct {
|
||||
provider string `mapstructure:"provider"`
|
||||
name string `mapstructure:"name"`
|
||||
url string `mapstructure:"url"`
|
||||
token string `mapstructure:"token"`
|
||||
}
|
||||
|
||||
type HarvesterConfig struct {
|
||||
provider string `mapstructure:"provider"`
|
||||
name string `mapstructure:"name"`
|
||||
url string `mapstructure:"url"`
|
||||
token string `mapstructure:"token"`
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
// GRPCConfig 定义一个gRPC服务
|
||||
type GRPCConfig struct {
|
||||
Name string
|
||||
Addr string
|
||||
AuthPublicKeyFile string
|
||||
RegisterFunc func(*grpc.Server)
|
||||
Logger *zap.Logger
|
||||
}
|
||||
|
||||
// RunGRPCServer 运行一个gRPC服务
|
||||
func RunGRPCServer(c *GRPCConfig) error {
|
||||
nameField := zap.String("name", c.Name)
|
||||
lis, err := net.Listen("tcp", c.Addr)
|
||||
if err != nil {
|
||||
c.Logger.Fatal("cannot listen", nameField, zap.Error(err))
|
||||
}
|
||||
|
||||
var opts []grpc.ServerOption
|
||||
|
||||
s := grpc.NewServer(opts...)
|
||||
c.RegisterFunc(s)
|
||||
|
||||
c.Logger.Info("server started", nameField, zap.String("addr", c.Addr))
|
||||
return s.Serve(lis)
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/demo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbecs"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"context"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
// 使用unsafe可以强制让编译器检查是否实现了相关方法
|
||||
demo.UnsafeDemoServiceServer
|
||||
pbecs.UnsafeEcsServiceServer
|
||||
pbpod.UnsafePodServiceServer
|
||||
}
|
||||
|
||||
func (s *Server) Echo(ctx context.Context, req *demo.StringMessage) (*demo.StringMessage, error) {
|
||||
return &demo.StringMessage{
|
||||
Value: "Welcome to JCCE PCM",
|
||||
}, nil
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package tenanter
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package tenanter
|
||||
|
||||
import (
|
||||
pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl"
|
||||
"strings"
|
||||
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package tenanter
|
||||
|
||||
import (
|
||||
pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl"
|
||||
"testing"
|
||||
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
)
|
||||
|
||||
func TestGetAllRegionIds(t *testing.T) {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package tenanter
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"github.com/golang/glog"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
|
@ -42,7 +41,7 @@ func LoadCloudConfigs(configFile string) error {
|
|||
}
|
||||
|
||||
func LoadCloudConfigsFromFile(configFile string) error {
|
||||
b, err := ioutil.ReadFile(configFile)
|
||||
b, err := os.ReadFile(configFile)
|
||||
if err != nil {
|
||||
return ErrLoadTenanterFileEmpty
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
# settings-dev.yaml
|
||||
name: "PCM"
|
||||
|
||||
gorm:
|
||||
name: "root"
|
||||
host: "localhost"
|
||||
port: 3306
|
||||
password: "123456"
|
||||
dbName: "space"
|
||||
|
||||
redis:
|
||||
host: "localhost"
|
||||
port: 6379
|
||||
password: ""
|
||||
DB: 10
|
||||
|
||||
mongodb:
|
||||
host: "localhost"
|
||||
port: 27017
|
||||
dbName: "space"
|
||||
|
||||
gateway:
|
||||
addr: ":8880"
|
||||
|
||||
slurm:
|
||||
addr: "localhost:8881"
|
||||
|
||||
pod:
|
||||
addr: "localhost:8882"
|
||||
|
||||
vm:
|
||||
addr: "localhost:8883"
|
||||
|
||||
ali:
|
||||
provider: 0
|
||||
name : ali-PCM
|
||||
accessid:
|
||||
accesssecret:
|
||||
|
||||
tencent:
|
||||
provider: 1
|
||||
name: "tencent-PCM"
|
||||
accessid: ""
|
||||
accesssecret: ""
|
||||
|
||||
huawei:
|
||||
provider: 2
|
||||
name: "huawei-PCM"
|
||||
accessid: ""
|
||||
accesssecret: ""
|
||||
|
||||
k8s:
|
||||
provider: 3
|
||||
name: "K8S-PCM"
|
||||
url: ""
|
||||
token: ""
|
||||
|
||||
harvester:
|
||||
provider: 4
|
||||
name: "harvester-PCM"
|
||||
url: ""
|
||||
token: ""
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
pcm_pod_ali "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/ali"
|
||||
pcm_pod_ali "code.gitlink.org.cn/JCCE/PCM.git/pod/server/ali"
|
||||
)
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
corev1 "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/api/core/v1"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes"
|
||||
corev1 "code.gitlink.org.cn/JCCE/PCM.git/pod/server/kubernetes/api/core/v1"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/pod/server/kubernetes/client-go/kubernetes"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/pkg/errors"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
pcm_pod_tencent "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/tencent"
|
||||
pcm_pod_tencent "code.gitlink.org.cn/JCCE/PCM.git/pod/server/tencent"
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
|
|
@ -1,35 +1,37 @@
|
|||
package main
|
||||
|
||||
|
||||
import "slurm/submitjob"
|
||||
import "slurm"
|
||||
import (
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/submitjob"
|
||||
"slurm"
|
||||
)
|
||||
import "os/user"
|
||||
import "os"
|
||||
import "strconv"
|
||||
import "fmt"
|
||||
func main(){
|
||||
job_desc := submit_job.Job_descriptor{}
|
||||
|
||||
func main() {
|
||||
job_desc := submit_job.Job_descriptor{}
|
||||
job_desc.Script = "#! /bin/bash\n hostname \n env | grep SLURM "
|
||||
dir, _ := os.Getwd()
|
||||
|
||||
user, _:= user.Current()
|
||||
userid , _ := strconv.Atoi(user.Uid)
|
||||
job_desc.User_id= uint32(userid)
|
||||
groupid , _ := strconv.Atoi(user.Gid)
|
||||
user, _ := user.Current()
|
||||
userid, _ := strconv.Atoi(user.Uid)
|
||||
job_desc.User_id = uint32(userid)
|
||||
groupid, _ := strconv.Atoi(user.Gid)
|
||||
|
||||
job_desc.Group_id= uint32(groupid)
|
||||
job_desc.Group_id = uint32(groupid)
|
||||
job_desc.Name = "test_job"
|
||||
job_desc.Partition="long"
|
||||
job_desc.Partition = "long"
|
||||
job_desc.Time_limit = uint32(2)
|
||||
job_desc.Min_nodes =uint32(1)
|
||||
job_desc.Min_nodes = uint32(1)
|
||||
job_desc.Std_out = ("./out-%j.txt")
|
||||
job_desc.Std_err = ("./err-%j.txt")
|
||||
job_desc.Work_dir = dir
|
||||
job_desc.Environment = []string{"SLURM_GO_JOB=TRUE", "SLURM_CONTAINER_JOB=FALSE"}
|
||||
job_desc.Environment = []string{"SLURM_GO_JOB=TRUE", "SLURM_CONTAINER_JOB=FALSE"}
|
||||
answer := submit_job.Submit_job(&job_desc)
|
||||
if(answer.Error_code != 0) {
|
||||
if answer.Error_code != 0 {
|
||||
msg := slurm.GetErrorString(answer.Error_code)
|
||||
fmt.Printf("Error: %s\n" ,msg)
|
||||
fmt.Printf("Error: %s\n", msg)
|
||||
return
|
||||
}
|
||||
fmt.Printf("Submitted Job %d\n", answer.Job_id)
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/config"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/global"
|
||||
podpb "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
slurmpb "code.gitlink.org.cn/JCCE/PCM.git/slurm/gen/idl"
|
||||
ecspb "code.gitlink.org.cn/JCCE/PCM.git/vm/gen/idl"
|
||||
"context"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// 初始化日志以及配置
|
||||
lg, err := zap.NewDevelopment()
|
||||
config.InitConfig()
|
||||
if err != nil {
|
||||
log.Fatalf("cannot create zap logger: %v", err)
|
||||
}
|
||||
|
||||
c := context.Background()
|
||||
c, cancel := context.WithCancel(c)
|
||||
defer cancel()
|
||||
|
||||
mux := runtime.NewServeMux()
|
||||
|
||||
serverConfig := []struct {
|
||||
name string
|
||||
addr string
|
||||
registerFunc func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
|
||||
}{
|
||||
{
|
||||
name: "vm",
|
||||
addr: global.S.VmInfo.Address,
|
||||
registerFunc: ecspb.RegisterEcsServiceHandlerFromEndpoint,
|
||||
},
|
||||
{
|
||||
name: "pod",
|
||||
addr: global.S.PodInfo.Address,
|
||||
registerFunc: podpb.RegisterPodServiceHandlerFromEndpoint,
|
||||
},
|
||||
{
|
||||
name: "slurm",
|
||||
addr: global.S.SlurmInfo.Address,
|
||||
registerFunc: slurmpb.RegisterSlurmServiceHandlerFromEndpoint,
|
||||
},
|
||||
}
|
||||
|
||||
for _, s := range serverConfig {
|
||||
err := s.registerFunc(
|
||||
c, mux, s.addr,
|
||||
[]grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())},
|
||||
)
|
||||
if err != nil {
|
||||
lg.Sugar().Fatalf("cannot register service %s: %v", s.name, err)
|
||||
}
|
||||
}
|
||||
lg.Sugar().Infof("grpc gateway started at %s", global.S.GatewayInfo.Address)
|
||||
lg.Sugar().Fatal(http.ListenAndServe(global.S.GatewayInfo.Address, mux))
|
||||
}
|
18
gen.sh
18
gen.sh
|
@ -1,5 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
rm -rf lan_trans/idl/*
|
||||
cd pod/
|
||||
rm -rf gen/
|
||||
buf mod update
|
||||
buf generate
|
||||
|
||||
cd ../vm/
|
||||
rm -rf gen/
|
||||
buf mod update
|
||||
buf generate
|
||||
|
||||
cd ../slurm/
|
||||
rm -rf gen/
|
||||
buf mod update
|
||||
buf generate
|
||||
|
||||
cd ../tenant/
|
||||
rm -rf gen/
|
||||
buf mod update
|
||||
buf generate
|
14
go.mod
14
go.mod
|
@ -11,6 +11,7 @@ require (
|
|||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1530
|
||||
github.com/bitly/go-simplejson v0.5.0
|
||||
github.com/docker/docker v20.10.6+incompatible
|
||||
github.com/fsnotify/fsnotify v1.5.1
|
||||
github.com/go-yaml/yaml v2.1.0+incompatible
|
||||
github.com/golang/glog v1.0.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.0
|
||||
|
@ -21,11 +22,13 @@ require (
|
|||
github.com/rancher/cli v2.2.0+incompatible
|
||||
github.com/rancher/norman v0.0.0-20211201154850-abe17976423e
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/spf13/viper v1.9.0
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.377
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.377
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.377
|
||||
github.com/urfave/cli v1.22.2
|
||||
github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea
|
||||
go.uber.org/zap v1.19.0
|
||||
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e
|
||||
google.golang.org/grpc v1.45.0
|
||||
google.golang.org/protobuf v1.28.0
|
||||
|
@ -50,7 +53,6 @@ require (
|
|||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/emicklei/go-restful v2.10.0+incompatible // indirect
|
||||
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.1 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-logr/logr v0.4.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
|
@ -68,6 +70,7 @@ require (
|
|||
github.com/gorilla/handlers v1.4.2 // indirect
|
||||
github.com/gorilla/websocket v1.4.2 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/imdario/mergo v0.3.12 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
|
@ -75,12 +78,15 @@ require (
|
|||
github.com/k8snetworkplumbingwg/network-attachment-definition-client v0.0.0-20200331171230-d50e42f2b669 // indirect
|
||||
github.com/kubernetes-csi/external-snapshotter/v2 v2.1.3 // indirect
|
||||
github.com/longhorn/go-iscsi-helper v0.0.0-20201111045018-ee87992ec536 // indirect
|
||||
github.com/magiconair/properties v1.8.5 // indirect
|
||||
github.com/mailru/easyjson v0.7.6 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/mitchellh/mapstructure v1.4.2 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.1 // indirect
|
||||
github.com/openshift/custom-resource-status v0.0.0-20200602122900-c002fd1547ca // indirect
|
||||
github.com/pborman/uuid v1.2.0 // indirect
|
||||
github.com/pelletier/go-toml v1.9.4 // indirect
|
||||
github.com/prometheus/client_golang v1.11.0 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.0 // indirect
|
||||
|
@ -92,8 +98,14 @@ require (
|
|||
github.com/russross/blackfriday/v2 v2.0.1 // indirect
|
||||
github.com/satori/go.uuid v1.2.0 // indirect
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||
github.com/spf13/afero v1.6.0 // indirect
|
||||
github.com/spf13/cast v1.4.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.2.0 // indirect
|
||||
github.com/tjfoc/gmsm v1.3.2 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
syntax = "proto3";
|
||||
package demo;
|
||||
|
||||
option go_package = "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/gen/idl/demo";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
enum OurTeam {
|
||||
// github: devad
|
||||
devad = 0;
|
||||
}
|
||||
|
||||
message StringMessage {string value = 1;}
|
||||
|
||||
// 样例服务
|
||||
service DemoService {
|
||||
|
||||
// Echo 样例接口
|
||||
rpc Echo(StringMessage) returns (StringMessage) {
|
||||
option (google.api.http) = {
|
||||
post : "/apis/demo"
|
||||
body : "*"
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
deprecated : true // For testing purposes.
|
||||
external_docs : {
|
||||
url : "https://github.com/grpc-ecosystem/grpc-gateway"
|
||||
description : "Find out more about the interface"
|
||||
}
|
||||
security : {}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -1,213 +0,0 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc (unknown)
|
||||
// source: idl/demo/demo.proto
|
||||
|
||||
package demo
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
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 OurTeam int32
|
||||
|
||||
const (
|
||||
// github: devad
|
||||
OurTeam_devad OurTeam = 0
|
||||
)
|
||||
|
||||
// Enum value maps for OurTeam.
|
||||
var (
|
||||
OurTeam_name = map[int32]string{
|
||||
0: "devad",
|
||||
}
|
||||
OurTeam_value = map[string]int32{
|
||||
"devad": 0,
|
||||
}
|
||||
)
|
||||
|
||||
func (x OurTeam) Enum() *OurTeam {
|
||||
p := new(OurTeam)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x OurTeam) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (OurTeam) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_idl_demo_demo_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (OurTeam) Type() protoreflect.EnumType {
|
||||
return &file_idl_demo_demo_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x OurTeam) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use OurTeam.Descriptor instead.
|
||||
func (OurTeam) EnumDescriptor() ([]byte, []int) {
|
||||
return file_idl_demo_demo_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type StringMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (x *StringMessage) Reset() {
|
||||
*x = StringMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_idl_demo_demo_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StringMessage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*StringMessage) ProtoMessage() {}
|
||||
|
||||
func (x *StringMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_idl_demo_demo_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 StringMessage.ProtoReflect.Descriptor instead.
|
||||
func (*StringMessage) Descriptor() ([]byte, []int) {
|
||||
return file_idl_demo_demo_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *StringMessage) GetValue() string {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_idl_demo_demo_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_idl_demo_demo_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x69, 0x64, 0x6c, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x64, 0x65, 0x6d, 0x6f, 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, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f,
|
||||
0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x25, 0x0a, 0x0d, 0x53, 0x74, 0x72,
|
||||
0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x2a, 0x14, 0x0a, 0x07, 0x4f, 0x75, 0x72, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x09, 0x0a, 0x05, 0x64,
|
||||
0x65, 0x76, 0x61, 0x64, 0x10, 0x00, 0x32, 0xb3, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6d, 0x6f, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12,
|
||||
0x13, 0x2e, 0x64, 0x65, 0x6d, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x1a, 0x13, 0x2e, 0x64, 0x65, 0x6d, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x69,
|
||||
0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x71, 0x92, 0x41, 0x59, 0x22, 0x53,
|
||||
0x0a, 0x21, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20,
|
||||
0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66,
|
||||
0x61, 0x63, 0x65, 0x12, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65,
|
||||
0x77, 0x61, 0x79, 0x58, 0x01, 0x62, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0a, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x3a, 0x01, 0x2a, 0x42, 0x31, 0x5a, 0x2f,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2d,
|
||||
0x6e, 0x75, 0x64, 0x74, 0x2f, 0x50, 0x43, 0x4d, 0x2f, 0x6c, 0x61, 0x6e, 0x5f, 0x74, 0x72, 0x61,
|
||||
0x6e, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_idl_demo_demo_proto_rawDescOnce sync.Once
|
||||
file_idl_demo_demo_proto_rawDescData = file_idl_demo_demo_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_idl_demo_demo_proto_rawDescGZIP() []byte {
|
||||
file_idl_demo_demo_proto_rawDescOnce.Do(func() {
|
||||
file_idl_demo_demo_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_demo_demo_proto_rawDescData)
|
||||
})
|
||||
return file_idl_demo_demo_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_idl_demo_demo_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_idl_demo_demo_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_idl_demo_demo_proto_goTypes = []interface{}{
|
||||
(OurTeam)(0), // 0: demo.OurTeam
|
||||
(*StringMessage)(nil), // 1: demo.StringMessage
|
||||
}
|
||||
var file_idl_demo_demo_proto_depIdxs = []int32{
|
||||
1, // 0: demo.DemoService.Echo:input_type -> demo.StringMessage
|
||||
1, // 1: demo.DemoService.Echo:output_type -> demo.StringMessage
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_idl_demo_demo_proto_init() }
|
||||
func file_idl_demo_demo_proto_init() {
|
||||
if File_idl_demo_demo_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_idl_demo_demo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StringMessage); 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_idl_demo_demo_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_idl_demo_demo_proto_goTypes,
|
||||
DependencyIndexes: file_idl_demo_demo_proto_depIdxs,
|
||||
EnumInfos: file_idl_demo_demo_proto_enumTypes,
|
||||
MessageInfos: file_idl_demo_demo_proto_msgTypes,
|
||||
}.Build()
|
||||
File_idl_demo_demo_proto = out.File
|
||||
file_idl_demo_demo_proto_rawDesc = nil
|
||||
file_idl_demo_demo_proto_goTypes = nil
|
||||
file_idl_demo_demo_proto_depIdxs = nil
|
||||
}
|
|
@ -1,169 +0,0 @@
|
|||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: idl/demo/demo.proto
|
||||
|
||||
/*
|
||||
Package demo is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package demo
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_DemoService_Echo_0(ctx context.Context, marshaler runtime.Marshaler, client DemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq StringMessage
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.Echo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_DemoService_Echo_0(ctx context.Context, marshaler runtime.Marshaler, server DemoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq StringMessage
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.Echo(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterDemoServiceHandlerServer registers the http handlers for service DemoService to "mux".
|
||||
// UnaryRPC :call DemoServiceServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDemoServiceHandlerFromEndpoint instead.
|
||||
func RegisterDemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DemoServiceServer) error {
|
||||
|
||||
mux.Handle("POST", pattern_DemoService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_DemoService_Echo_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_DemoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterDemoServiceHandlerFromEndpoint is same as RegisterDemoServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterDemoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
return RegisterDemoServiceHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterDemoServiceHandler registers the http handlers for service DemoService to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterDemoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterDemoServiceHandlerClient(ctx, mux, NewDemoServiceClient(conn))
|
||||
}
|
||||
|
||||
// RegisterDemoServiceHandlerClient registers the http handlers for service DemoService
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DemoServiceClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DemoServiceClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "DemoServiceClient" to call the correct interceptors.
|
||||
func RegisterDemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DemoServiceClient) error {
|
||||
|
||||
mux.Handle("POST", pattern_DemoService_Echo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/demo.DemoService/Echo", runtime.WithHTTPPathPattern("/apis/demo"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_DemoService_Echo_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_DemoService_Echo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_DemoService_Echo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"apis", "demo"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_DemoService_Echo_0 = runtime.ForwardResponseMessage
|
||||
)
|
|
@ -1,107 +0,0 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: idl/demo/demo.proto
|
||||
|
||||
package demo
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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
|
||||
|
||||
// DemoServiceClient is the client API for DemoService 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 DemoServiceClient interface {
|
||||
// Echo 样例接口
|
||||
Echo(ctx context.Context, in *StringMessage, opts ...grpc.CallOption) (*StringMessage, error)
|
||||
}
|
||||
|
||||
type demoServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDemoServiceClient(cc grpc.ClientConnInterface) DemoServiceClient {
|
||||
return &demoServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *demoServiceClient) Echo(ctx context.Context, in *StringMessage, opts ...grpc.CallOption) (*StringMessage, error) {
|
||||
out := new(StringMessage)
|
||||
err := c.cc.Invoke(ctx, "/demo.DemoService/Echo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DemoServiceServer is the server API for DemoService service.
|
||||
// All implementations must embed UnimplementedDemoServiceServer
|
||||
// for forward compatibility
|
||||
type DemoServiceServer interface {
|
||||
// Echo 样例接口
|
||||
Echo(context.Context, *StringMessage) (*StringMessage, error)
|
||||
mustEmbedUnimplementedDemoServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedDemoServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedDemoServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedDemoServiceServer) Echo(context.Context, *StringMessage) (*StringMessage, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented")
|
||||
}
|
||||
func (UnimplementedDemoServiceServer) mustEmbedUnimplementedDemoServiceServer() {}
|
||||
|
||||
// UnsafeDemoServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DemoServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDemoServiceServer interface {
|
||||
mustEmbedUnimplementedDemoServiceServer()
|
||||
}
|
||||
|
||||
func RegisterDemoServiceServer(s grpc.ServiceRegistrar, srv DemoServiceServer) {
|
||||
s.RegisterService(&DemoService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _DemoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(StringMessage)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DemoServiceServer).Echo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/demo.DemoService/Echo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DemoServiceServer).Echo(ctx, req.(*StringMessage))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// DemoService_ServiceDesc is the grpc.ServiceDesc for DemoService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var DemoService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "demo.DemoService",
|
||||
HandlerType: (*DemoServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Echo",
|
||||
Handler: _DemoService_Echo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "idl/demo/demo.proto",
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "idl/demo/demo.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "DemoService"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/apis/demo": {
|
||||
"post": {
|
||||
"summary": "Echo 样例接口",
|
||||
"operationId": "DemoService_Echo",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/demoStringMessage"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/demoStringMessage"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"DemoService"
|
||||
],
|
||||
"deprecated": true,
|
||||
"security": [],
|
||||
"externalDocs": {
|
||||
"description": "Find out more about the interface",
|
||||
"url": "https://github.com/grpc-ecosystem/grpc-gateway"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"demoStringMessage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,741 +0,0 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "idl/pbpod/pod.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "PodService"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/apis/pod": {
|
||||
"get": {
|
||||
"summary": "查询Pod全量 - 根据云类型",
|
||||
"operationId": "PodService_ListPod",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodListPodResp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "provider",
|
||||
"description": "cloud name\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ali",
|
||||
"tencent",
|
||||
"huawei",
|
||||
"k8s",
|
||||
"harvester"
|
||||
],
|
||||
"default": "ali"
|
||||
},
|
||||
{
|
||||
"name": "namespace",
|
||||
"description": "命名空间",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "requestSource",
|
||||
"description": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"PodService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/pod/all": {
|
||||
"get": {
|
||||
"summary": "查询所有云的Pod",
|
||||
"operationId": "PodService_ListPodAll",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodListPodResp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"PodService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/pod/create": {
|
||||
"post": {
|
||||
"summary": "创建Pod",
|
||||
"operationId": "PodService_CreatePod",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodCreatePodResp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodCreatePodReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"PodService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/pod/createMulti": {
|
||||
"post": {
|
||||
"summary": "创建Pods",
|
||||
"operationId": "PodService_CreatePods",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodCreatePodsResp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodCreatePodsReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"PodService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/pod/delete": {
|
||||
"post": {
|
||||
"summary": "删除Pod",
|
||||
"operationId": "PodService_DeletePod",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodDeletePodResp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodDeletePodReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"PodService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/pod/detail": {
|
||||
"get": {
|
||||
"summary": "查询Pod明细",
|
||||
"operationId": "PodService_ListPodDetail",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodListPodDetailResp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "provider",
|
||||
"description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ali",
|
||||
"tencent",
|
||||
"huawei",
|
||||
"k8s",
|
||||
"harvester"
|
||||
],
|
||||
"default": "ali"
|
||||
},
|
||||
{
|
||||
"name": "accountName",
|
||||
"description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "regionId",
|
||||
"description": "区域Id,参考 tenant.proto 中的各个云的区域",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
{
|
||||
"name": "regionName",
|
||||
"description": "区域名称,各云厂商自定义的region name",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
{
|
||||
"name": "podId",
|
||||
"description": "podID",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
{
|
||||
"name": "pageNumber",
|
||||
"description": "分页相关参数,页码",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
{
|
||||
"name": "pageSize",
|
||||
"description": "分页相关参数,每页数量",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
{
|
||||
"name": "nextToken",
|
||||
"description": "分页相关参数,下一页的token",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "namespace",
|
||||
"description": "namespace",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"PodService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/pod/update": {
|
||||
"put": {
|
||||
"summary": "更新Pod",
|
||||
"operationId": "PodService_UpdatePod",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodUpdatePodResp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/pbpodUpdatePodReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"PodService"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"pbpodCreatePodReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/pbtenantCloudProvider",
|
||||
"title": "云类型"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
"title": "账号名称"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "实例id"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "实例名称"
|
||||
},
|
||||
"regionId": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "地域,数据中心"
|
||||
},
|
||||
"containerImage": {
|
||||
"type": "string",
|
||||
"title": "镜像"
|
||||
},
|
||||
"containerName": {
|
||||
"type": "string",
|
||||
"title": "容器名称"
|
||||
},
|
||||
"cpuPod": {
|
||||
"type": "string",
|
||||
"title": "v cpu数"
|
||||
},
|
||||
"memoryPod": {
|
||||
"type": "string",
|
||||
"title": "内存MB"
|
||||
},
|
||||
"securityGroupId": {
|
||||
"type": "string",
|
||||
"title": "安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)"
|
||||
},
|
||||
"subnetId": {
|
||||
"type": "string",
|
||||
"title": "子网ID 对应腾讯 SubnetId(腾讯必需)"
|
||||
},
|
||||
"vpcId": {
|
||||
"type": "string",
|
||||
"title": "VPC ID 对应腾讯 VpcId(腾讯必需)"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"title": "名空间"
|
||||
},
|
||||
"requestSource": {
|
||||
"type": "string",
|
||||
"title": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodCreatePodResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string",
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "podId"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "podName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodCreatePodsReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"createPodReq": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/pbpodCreatePodReq"
|
||||
},
|
||||
"title": "创建请求集合"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodCreatePodsResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodDeletePodReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/pbtenantCloudProvider",
|
||||
"title": "云类型"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
"title": "账号名称"
|
||||
},
|
||||
"pcmId": {
|
||||
"type": "string",
|
||||
"title": "pcm id"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "podId"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "podName"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"title": "namespace"
|
||||
},
|
||||
"regionId": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "地域,数据中心"
|
||||
},
|
||||
"requestSource": {
|
||||
"type": "string",
|
||||
"title": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodDeletePodResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "删除是否完成"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string",
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "podId"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "podName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodListPodDetailResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pods": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/pbpodPodInstance"
|
||||
},
|
||||
"title": "Pod集合"
|
||||
},
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询"
|
||||
},
|
||||
"pageNumber": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "分页相关参数,页码"
|
||||
},
|
||||
"pageSize": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "分页相关参数,每页数量"
|
||||
},
|
||||
"nextToken": {
|
||||
"type": "string",
|
||||
"title": "分页相关参数,下一页的token"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string",
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodListPodResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pods": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/pbpodPodInstance"
|
||||
},
|
||||
"title": "pod list"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodPodInstance": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/pbtenantCloudProvider",
|
||||
"title": "云类型"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
"title": "账号名称"
|
||||
},
|
||||
"pcmId": {
|
||||
"type": "string",
|
||||
"title": "pcm id"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "实例id"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "实例名称"
|
||||
},
|
||||
"regionId": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "地域ID"
|
||||
},
|
||||
"regionName": {
|
||||
"type": "string",
|
||||
"title": "地域Name"
|
||||
},
|
||||
"containerImage": {
|
||||
"type": "string",
|
||||
"title": "镜像"
|
||||
},
|
||||
"containerName": {
|
||||
"type": "string",
|
||||
"title": "容器名称"
|
||||
},
|
||||
"cpuPod": {
|
||||
"type": "string",
|
||||
"title": "vcpu数"
|
||||
},
|
||||
"memoryPod": {
|
||||
"type": "string",
|
||||
"title": "内存MB"
|
||||
},
|
||||
"securityGroupId": {
|
||||
"type": "string",
|
||||
"title": "安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)"
|
||||
},
|
||||
"subnetId": {
|
||||
"type": "string",
|
||||
"title": "子网ID 对应腾讯 SubnetId(腾讯必需)"
|
||||
},
|
||||
"vpcId": {
|
||||
"type": "string",
|
||||
"title": "VPC ID 对应腾讯 VpcId(腾讯必需)"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"title": "名空间"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"title": "实例状态"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodUpdatePodReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/pbtenantCloudProvider",
|
||||
"title": "云类型"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
"title": "账号名称"
|
||||
},
|
||||
"pcmId": {
|
||||
"type": "string",
|
||||
"title": "pcm ID"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "podId"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "podName"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"title": "namespace"
|
||||
},
|
||||
"regionId": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "地域,数据中心"
|
||||
},
|
||||
"containerImage": {
|
||||
"type": "string",
|
||||
"title": "镜像"
|
||||
},
|
||||
"containerName": {
|
||||
"type": "string",
|
||||
"title": "容器名称"
|
||||
},
|
||||
"cpuPod": {
|
||||
"type": "string",
|
||||
"title": "v cpu数"
|
||||
},
|
||||
"memoryPod": {
|
||||
"type": "string",
|
||||
"title": "内存MB"
|
||||
},
|
||||
"restartPolicy": {
|
||||
"type": "string",
|
||||
"title": "重启策略"
|
||||
},
|
||||
"labels": {
|
||||
"type": "string",
|
||||
"title": "labels"
|
||||
},
|
||||
"requestSource": {
|
||||
"type": "string",
|
||||
"title": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbpodUpdatePodResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "更新是否完成"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string",
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "podId"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "podName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pbtenantCloudProvider": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ali",
|
||||
"tencent",
|
||||
"huawei",
|
||||
"k8s",
|
||||
"harvester"
|
||||
],
|
||||
"default": "ali",
|
||||
"description": "- ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester",
|
||||
"title": "云提供商"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
version: v1
|
||||
plugins:
|
||||
- name: go
|
||||
out: gen
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- name: go-grpc
|
||||
out: gen
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- name: grpc-gateway
|
||||
out: gen
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- grpc_api_configuration=idl/pod.yaml
|
||||
- name: openapiv2
|
||||
out: gen/openapiv2
|
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,12 @@
|
|||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: idl/pbpod/pod.proto
|
||||
// source: idl/pod.proto
|
||||
|
||||
/*
|
||||
Package pbpod is a reverse proxy.
|
||||
Package podpb is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package pbpod
|
||||
package podpb
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -269,13 +269,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
|||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/CreatePods")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_PodService_CreatePods_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_PodService_CreatePods_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
|
@ -293,13 +292,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
|||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/CreatePod")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_PodService_CreatePod_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_PodService_CreatePod_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
|
@ -317,13 +315,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
|||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/DeletePod")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_PodService_DeletePod_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_PodService_DeletePod_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
|
@ -341,13 +338,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
|||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/UpdatePod")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_PodService_UpdatePod_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_PodService_UpdatePod_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
|
@ -365,13 +361,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
|||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/ListPodDetail")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_PodService_ListPodDetail_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_PodService_ListPodDetail_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
|
@ -389,13 +384,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
|||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/ListPod")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_PodService_ListPod_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_PodService_ListPod_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
|
@ -413,13 +407,12 @@ func RegisterPodServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
|||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all"))
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/pod.PodService/ListPodAll")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_PodService_ListPodAll_0(ctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_PodService_ListPodAll_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
|
@ -476,13 +469,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
|||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePods", runtime.WithHTTPPathPattern("/apis/pod/createMulti"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/CreatePods")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_PodService_CreatePods_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_PodService_CreatePods_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
|
@ -497,13 +489,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
|||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/CreatePod", runtime.WithHTTPPathPattern("/apis/pod/create"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/CreatePod")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_PodService_CreatePod_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_PodService_CreatePod_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
|
@ -518,13 +509,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
|||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/DeletePod", runtime.WithHTTPPathPattern("/apis/pod/delete"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/DeletePod")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_PodService_DeletePod_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_PodService_DeletePod_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
|
@ -539,13 +529,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
|||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/UpdatePod", runtime.WithHTTPPathPattern("/apis/pod/update"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/UpdatePod")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_PodService_UpdatePod_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_PodService_UpdatePod_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
|
@ -560,13 +549,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
|||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodDetail", runtime.WithHTTPPathPattern("/apis/pod/detail"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/ListPodDetail")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_PodService_ListPodDetail_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_PodService_ListPodDetail_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
|
@ -581,13 +569,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
|||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPod", runtime.WithHTTPPathPattern("/apis/pod"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/ListPod")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_PodService_ListPod_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_PodService_ListPod_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
|
@ -602,13 +589,12 @@ func RegisterPodServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
|||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
ctx, err = runtime.AnnotateContext(ctx, mux, req, "/pbpod.PodService/ListPodAll", runtime.WithHTTPPathPattern("/apis/pod/all"))
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/pod.PodService/ListPodAll")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_PodService_ListPodAll_0(ctx, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_PodService_ListPodAll_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
|
@ -629,7 +615,7 @@ var (
|
|||
|
||||
pattern_PodService_DeletePod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "delete"}, ""))
|
||||
|
||||
pattern_PodService_UpdatePod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "update"}, ""))
|
||||
pattern_PodService_UpdatePod_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "delete"}, ""))
|
||||
|
||||
pattern_PodService_ListPodDetail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "pod", "detail"}, ""))
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: idl/pbpod/pod.proto
|
||||
// source: idl/pod.proto
|
||||
|
||||
package pbpod
|
||||
package podpb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
@ -48,7 +48,7 @@ func NewPodServiceClient(cc grpc.ClientConnInterface) PodServiceClient {
|
|||
|
||||
func (c *podServiceClient) CreatePods(ctx context.Context, in *CreatePodsReq, opts ...grpc.CallOption) (*CreatePodsResp, error) {
|
||||
out := new(CreatePodsResp)
|
||||
err := c.cc.Invoke(ctx, "/pbpod.PodService/CreatePods", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/pod.PodService/CreatePods", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ func (c *podServiceClient) CreatePods(ctx context.Context, in *CreatePodsReq, op
|
|||
|
||||
func (c *podServiceClient) CreatePod(ctx context.Context, in *CreatePodReq, opts ...grpc.CallOption) (*CreatePodResp, error) {
|
||||
out := new(CreatePodResp)
|
||||
err := c.cc.Invoke(ctx, "/pbpod.PodService/CreatePod", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/pod.PodService/CreatePod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ func (c *podServiceClient) CreatePod(ctx context.Context, in *CreatePodReq, opts
|
|||
|
||||
func (c *podServiceClient) DeletePod(ctx context.Context, in *DeletePodReq, opts ...grpc.CallOption) (*DeletePodResp, error) {
|
||||
out := new(DeletePodResp)
|
||||
err := c.cc.Invoke(ctx, "/pbpod.PodService/DeletePod", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/pod.PodService/DeletePod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ func (c *podServiceClient) DeletePod(ctx context.Context, in *DeletePodReq, opts
|
|||
|
||||
func (c *podServiceClient) UpdatePod(ctx context.Context, in *UpdatePodReq, opts ...grpc.CallOption) (*UpdatePodResp, error) {
|
||||
out := new(UpdatePodResp)
|
||||
err := c.cc.Invoke(ctx, "/pbpod.PodService/UpdatePod", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/pod.PodService/UpdatePod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ func (c *podServiceClient) UpdatePod(ctx context.Context, in *UpdatePodReq, opts
|
|||
|
||||
func (c *podServiceClient) ListPodDetail(ctx context.Context, in *ListPodDetailReq, opts ...grpc.CallOption) (*ListPodDetailResp, error) {
|
||||
out := new(ListPodDetailResp)
|
||||
err := c.cc.Invoke(ctx, "/pbpod.PodService/ListPodDetail", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/pod.PodService/ListPodDetail", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ func (c *podServiceClient) ListPodDetail(ctx context.Context, in *ListPodDetailR
|
|||
|
||||
func (c *podServiceClient) ListPod(ctx context.Context, in *ListPodReq, opts ...grpc.CallOption) (*ListPodResp, error) {
|
||||
out := new(ListPodResp)
|
||||
err := c.cc.Invoke(ctx, "/pbpod.PodService/ListPod", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/pod.PodService/ListPod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ func (c *podServiceClient) ListPod(ctx context.Context, in *ListPodReq, opts ...
|
|||
|
||||
func (c *podServiceClient) ListPodAll(ctx context.Context, in *ListPodAllReq, opts ...grpc.CallOption) (*ListPodResp, error) {
|
||||
out := new(ListPodResp)
|
||||
err := c.cc.Invoke(ctx, "/pbpod.PodService/ListPodAll", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/pod.PodService/ListPodAll", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ func _PodService_CreatePods_Handler(srv interface{}, ctx context.Context, dec fu
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbpod.PodService/CreatePods",
|
||||
FullMethod: "/pod.PodService/CreatePods",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PodServiceServer).CreatePods(ctx, req.(*CreatePodsReq))
|
||||
|
@ -196,7 +196,7 @@ func _PodService_CreatePod_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbpod.PodService/CreatePod",
|
||||
FullMethod: "/pod.PodService/CreatePod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PodServiceServer).CreatePod(ctx, req.(*CreatePodReq))
|
||||
|
@ -214,7 +214,7 @@ func _PodService_DeletePod_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbpod.PodService/DeletePod",
|
||||
FullMethod: "/pod.PodService/DeletePod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PodServiceServer).DeletePod(ctx, req.(*DeletePodReq))
|
||||
|
@ -232,7 +232,7 @@ func _PodService_UpdatePod_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbpod.PodService/UpdatePod",
|
||||
FullMethod: "/pod.PodService/UpdatePod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PodServiceServer).UpdatePod(ctx, req.(*UpdatePodReq))
|
||||
|
@ -250,7 +250,7 @@ func _PodService_ListPodDetail_Handler(srv interface{}, ctx context.Context, dec
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbpod.PodService/ListPodDetail",
|
||||
FullMethod: "/pod.PodService/ListPodDetail",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PodServiceServer).ListPodDetail(ctx, req.(*ListPodDetailReq))
|
||||
|
@ -268,7 +268,7 @@ func _PodService_ListPod_Handler(srv interface{}, ctx context.Context, dec func(
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbpod.PodService/ListPod",
|
||||
FullMethod: "/pod.PodService/ListPod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PodServiceServer).ListPod(ctx, req.(*ListPodReq))
|
||||
|
@ -286,7 +286,7 @@ func _PodService_ListPodAll_Handler(srv interface{}, ctx context.Context, dec fu
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbpod.PodService/ListPodAll",
|
||||
FullMethod: "/pod.PodService/ListPodAll",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PodServiceServer).ListPodAll(ctx, req.(*ListPodAllReq))
|
||||
|
@ -298,7 +298,7 @@ func _PodService_ListPodAll_Handler(srv interface{}, ctx context.Context, dec fu
|
|||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PodService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pbpod.PodService",
|
||||
ServiceName: "pod.PodService",
|
||||
HandlerType: (*PodServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
|
@ -331,5 +331,5 @@ var PodService_ServiceDesc = grpc.ServiceDesc{
|
|||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "idl/pbpod/pod.proto",
|
||||
Metadata: "idl/pod.proto",
|
||||
}
|
|
@ -0,0 +1,321 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "idl/pod.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "PodService"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"podCloudProvider": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ali",
|
||||
"tencent",
|
||||
"huawei",
|
||||
"k8s",
|
||||
"harvester"
|
||||
],
|
||||
"default": "ali",
|
||||
"description": "- ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester",
|
||||
"title": "云提供商"
|
||||
},
|
||||
"podCreatePodReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/podCloudProvider",
|
||||
"title": "云类型"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
"title": "账号名称"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "实例id"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "实例名称"
|
||||
},
|
||||
"regionId": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "地域,数据中心"
|
||||
},
|
||||
"containerImage": {
|
||||
"type": "string",
|
||||
"title": "镜像"
|
||||
},
|
||||
"containerName": {
|
||||
"type": "string",
|
||||
"title": "容器名称"
|
||||
},
|
||||
"cpuPod": {
|
||||
"type": "string",
|
||||
"title": "v cpu数"
|
||||
},
|
||||
"memoryPod": {
|
||||
"type": "string",
|
||||
"title": "内存MB"
|
||||
},
|
||||
"securityGroupId": {
|
||||
"type": "string",
|
||||
"title": "安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)"
|
||||
},
|
||||
"subnetId": {
|
||||
"type": "string",
|
||||
"title": "子网ID 对应腾讯 SubnetId(腾讯必需)"
|
||||
},
|
||||
"vpcId": {
|
||||
"type": "string",
|
||||
"title": "VPC ID 对应腾讯 VpcId(腾讯必需)"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"title": "名空间"
|
||||
},
|
||||
"requestSource": {
|
||||
"type": "string",
|
||||
"title": "请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体"
|
||||
}
|
||||
}
|
||||
},
|
||||
"podCreatePodResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string",
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "podId"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "podName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"podCreatePodsResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
}
|
||||
}
|
||||
},
|
||||
"podDeletePodResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "删除是否完成"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string",
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "podId"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "podName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"podListPodDetailResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pods": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/podPodInstance"
|
||||
},
|
||||
"title": "Pod集合"
|
||||
},
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询"
|
||||
},
|
||||
"pageNumber": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "分页相关参数,页码"
|
||||
},
|
||||
"pageSize": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "分页相关参数,每页数量"
|
||||
},
|
||||
"nextToken": {
|
||||
"type": "string",
|
||||
"title": "分页相关参数,下一页的token"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string",
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
}
|
||||
}
|
||||
},
|
||||
"podListPodResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pods": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/podPodInstance"
|
||||
},
|
||||
"title": "pod list"
|
||||
}
|
||||
}
|
||||
},
|
||||
"podPodInstance": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"$ref": "#/definitions/podCloudProvider",
|
||||
"title": "云类型"
|
||||
},
|
||||
"accountName": {
|
||||
"type": "string",
|
||||
"title": "账号名称"
|
||||
},
|
||||
"pcmId": {
|
||||
"type": "string",
|
||||
"title": "pcm id"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "实例id"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "实例名称"
|
||||
},
|
||||
"regionId": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "地域ID"
|
||||
},
|
||||
"regionName": {
|
||||
"type": "string",
|
||||
"title": "地域Name"
|
||||
},
|
||||
"containerImage": {
|
||||
"type": "string",
|
||||
"title": "镜像"
|
||||
},
|
||||
"containerName": {
|
||||
"type": "string",
|
||||
"title": "容器名称"
|
||||
},
|
||||
"cpuPod": {
|
||||
"type": "string",
|
||||
"title": "vcpu数"
|
||||
},
|
||||
"memoryPod": {
|
||||
"type": "string",
|
||||
"title": "内存MB"
|
||||
},
|
||||
"securityGroupId": {
|
||||
"type": "string",
|
||||
"title": "安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)"
|
||||
},
|
||||
"subnetId": {
|
||||
"type": "string",
|
||||
"title": "子网ID 对应腾讯 SubnetId(腾讯必需)"
|
||||
},
|
||||
"vpcId": {
|
||||
"type": "string",
|
||||
"title": "VPC ID 对应腾讯 VpcId(腾讯必需)"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string",
|
||||
"title": "名空间"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"title": "实例状态"
|
||||
}
|
||||
}
|
||||
},
|
||||
"podUpdatePodResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"finished": {
|
||||
"type": "boolean",
|
||||
"title": "更新是否完成"
|
||||
},
|
||||
"requestId": {
|
||||
"type": "string",
|
||||
"title": "请求id,出现问题后提供给云厂商,排查问题"
|
||||
},
|
||||
"podId": {
|
||||
"type": "string",
|
||||
"title": "podId"
|
||||
},
|
||||
"podName": {
|
||||
"type": "string",
|
||||
"title": "podName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typeUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +1,34 @@
|
|||
syntax = "proto3";
|
||||
package pbpod;
|
||||
package pod;
|
||||
|
||||
option go_package = "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod";
|
||||
option go_package = "PCM/pod/idl/gen;podpb";
|
||||
|
||||
import "idl/pbtenant/tenant.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
// 云提供商
|
||||
enum CloudProvider {
|
||||
// 0 - 阿里云
|
||||
ali = 0;
|
||||
// 1 - 腾讯云
|
||||
tencent = 1;
|
||||
// 2 - 华为云
|
||||
huawei = 2;
|
||||
// 3 - K8S
|
||||
k8s = 3;
|
||||
// 3 - Harvester
|
||||
harvester = 4;
|
||||
}
|
||||
|
||||
message Region {
|
||||
//id
|
||||
int32 id = 1;
|
||||
//name
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message PodInstance {
|
||||
// 云类型
|
||||
pbtenant.CloudProvider provider = 1;
|
||||
CloudProvider provider = 1;
|
||||
// 账号名称
|
||||
string account_name = 2;
|
||||
//pcm id
|
||||
|
@ -56,7 +76,7 @@ message CreatePodsResp {
|
|||
|
||||
message CreatePodReq {
|
||||
// 云类型
|
||||
pbtenant.CloudProvider provider = 1;
|
||||
CloudProvider provider = 1;
|
||||
// 账号名称
|
||||
string account_name = 2;
|
||||
// 实例id
|
||||
|
@ -98,7 +118,7 @@ message CreatePodResp {
|
|||
|
||||
message DeletePodReq {
|
||||
// 云类型
|
||||
pbtenant.CloudProvider provider = 1;
|
||||
CloudProvider provider = 1;
|
||||
// 账号名称
|
||||
string account_name = 2;
|
||||
// pcm id
|
||||
|
@ -128,7 +148,7 @@ message DeletePodResp {
|
|||
|
||||
message UpdatePodReq {
|
||||
// 云类型
|
||||
pbtenant.CloudProvider provider = 1;
|
||||
CloudProvider provider = 1;
|
||||
// 账号名称
|
||||
string account_name = 2;
|
||||
// pcm ID
|
||||
|
@ -170,7 +190,7 @@ message UpdatePodResp {
|
|||
|
||||
message ListPodDetailReq {
|
||||
// 云名称
|
||||
pbtenant.CloudProvider provider = 1;
|
||||
CloudProvider provider = 1;
|
||||
// 账户名称,根据config.yaml中的配置,默认为第一个配置的账户
|
||||
string account_name = 2;
|
||||
// 区域Id,参考 tenant.proto 中的各个云的区域
|
||||
|
@ -207,7 +227,7 @@ message ListPodDetailResp {
|
|||
|
||||
message ListPodReq {
|
||||
// cloud name
|
||||
pbtenant.CloudProvider provider = 1;
|
||||
CloudProvider provider = 1;
|
||||
//命名空间
|
||||
string namespace =2;
|
||||
//请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体
|
||||
|
@ -221,13 +241,13 @@ message ListPodResp {
|
|||
|
||||
message GetPodRegionReq {
|
||||
// cloud name
|
||||
pbtenant.CloudProvider provider = 1;
|
||||
CloudProvider provider = 1;
|
||||
|
||||
}
|
||||
|
||||
message GetPodRegionResp {
|
||||
// region list
|
||||
repeated pbtenant.Region regions = 1;
|
||||
repeated Region regions = 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -241,55 +261,23 @@ message ListPodAllReq{}
|
|||
service PodService {
|
||||
|
||||
// 创建Pods
|
||||
rpc CreatePods(CreatePodsReq) returns (CreatePodsResp) {
|
||||
option (google.api.http) = {
|
||||
post : "/apis/pod/createMulti"
|
||||
body : "*"
|
||||
};
|
||||
}
|
||||
rpc CreatePods(CreatePodsReq) returns (CreatePodsResp);
|
||||
|
||||
// 创建Pod
|
||||
rpc CreatePod(CreatePodReq) returns (CreatePodResp) {
|
||||
option (google.api.http) = {
|
||||
post : "/apis/pod/create"
|
||||
body : "*"
|
||||
};
|
||||
}
|
||||
rpc CreatePod(CreatePodReq) returns (CreatePodResp);
|
||||
|
||||
// 删除Pod
|
||||
rpc DeletePod(DeletePodReq) returns (DeletePodResp) {
|
||||
option (google.api.http) = {
|
||||
post : "/apis/pod/delete"
|
||||
body : "*"
|
||||
};
|
||||
}
|
||||
rpc DeletePod(DeletePodReq) returns (DeletePodResp);
|
||||
|
||||
// 更新Pod
|
||||
rpc UpdatePod(UpdatePodReq) returns (UpdatePodResp) {
|
||||
option (google.api.http) = {
|
||||
put : "/apis/pod/update"
|
||||
body : "*"
|
||||
};
|
||||
}
|
||||
rpc UpdatePod(UpdatePodReq) returns (UpdatePodResp);
|
||||
|
||||
// 查询Pod明细
|
||||
rpc ListPodDetail(ListPodDetailReq) returns (ListPodDetailResp) {
|
||||
option (google.api.http) = {
|
||||
get : "/apis/pod/detail"
|
||||
};
|
||||
}
|
||||
rpc ListPodDetail(ListPodDetailReq) returns (ListPodDetailResp);
|
||||
|
||||
// 查询Pod全量 - 根据云类型
|
||||
rpc ListPod(ListPodReq) returns (ListPodResp) {
|
||||
option (google.api.http) = {
|
||||
get : "/apis/pod"
|
||||
};
|
||||
}
|
||||
rpc ListPod(ListPodReq) returns (ListPodResp);
|
||||
|
||||
// 查询所有云的Pod
|
||||
rpc ListPodAll(ListPodAllReq) returns (ListPodResp) {
|
||||
option (google.api.http) = {
|
||||
get : "/apis/pod/all"
|
||||
};
|
||||
}
|
||||
rpc ListPodAll(ListPodAllReq) returns (ListPodResp);
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
type: google.api.Service
|
||||
config_version: 3
|
||||
|
||||
http:
|
||||
rules:
|
||||
- selector: pod.PodService.CreatePods
|
||||
post: "/apis/pod/createMulti"
|
||||
body: "*"
|
||||
- selector: pod.PodService.CreatePod
|
||||
post: "/apis/pod/create"
|
||||
body: "*"
|
||||
- selector: pod.PodService.DeletePod
|
||||
post: "/apis/pod/delete"
|
||||
body: "*"
|
||||
- selector: pod.PodService.UpdatePod
|
||||
put: "/apis/pod/delete"
|
||||
body: "*"
|
||||
- selector: pod.PodService.ListPodDetail
|
||||
get: "/apis/pod/detail"
|
||||
- selector: pod.PodService.ListPod
|
||||
get: "/apis/pod"
|
||||
- selector: pod.PodService.ListPodAll
|
||||
get: "/apis/pod/all"
|
|
@ -0,0 +1,57 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/config"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/global"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/server"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
podpb "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
podserver "code.gitlink.org.cn/JCCE/PCM.git/pod/server"
|
||||
"flag"
|
||||
"github.com/golang/glog"
|
||||
"github.com/pkg/errors"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
"log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var configFile string
|
||||
flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml")
|
||||
flag.Parse()
|
||||
defer glog.Flush()
|
||||
|
||||
if err := tenanter.LoadCloudConfigsFromFile(configFile); err != nil {
|
||||
if !errors.Is(err, tenanter.ErrLoadTenanterFileEmpty) {
|
||||
glog.Fatalf("LoadCloudConfigsFromFile error %+v", err)
|
||||
}
|
||||
glog.Warningf("LoadCloudConfigsFromFile empty file path %s", configFile)
|
||||
}
|
||||
|
||||
glog.Infof("load tenant from file finished")
|
||||
// 初始化配置以及数据库
|
||||
config.InitConfig()
|
||||
// 新建一个zap logger实例
|
||||
logger, err := zap.NewDevelopment()
|
||||
if err != nil {
|
||||
log.Fatalf("cannot create logger: %v", err)
|
||||
}
|
||||
if err != nil {
|
||||
logger.Fatal("cannot open private key", zap.Error(err))
|
||||
}
|
||||
if err != nil {
|
||||
logger.Fatal("cannot read private key", zap.Error(err))
|
||||
}
|
||||
if err != nil {
|
||||
logger.Fatal("cannot parse private key", zap.Error(err))
|
||||
}
|
||||
// logger.Sugar().Fatal 直接可以少几行判错的代码
|
||||
logger.Sugar().Fatal(server.RunGRPCServer(&server.GRPCConfig{
|
||||
Name: "pod",
|
||||
Addr: global.S.PodInfo.Address,
|
||||
RegisterFunc: func(g *grpc.Server) {
|
||||
podpb.RegisterPodServiceServer(g, &podserver.Server{})
|
||||
},
|
||||
Logger: logger,
|
||||
}))
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package ali
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/pod/server"
|
||||
pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl"
|
||||
"errors"
|
||||
"flag"
|
||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
||||
|
@ -17,7 +17,7 @@ import (
|
|||
// api document: https://help.aliyun.com/api/eci/createcontainergroup.html
|
||||
func CreateContainerGroup(request *CreateContainerGroupRequest) (response *CreateContainerGroupResponse, err error) {
|
||||
|
||||
provider := pbtenant.CloudProvider(request.ProviderId)
|
||||
provider := pbpod.CloudProvider(request.ProviderId)
|
||||
var configFile string
|
||||
flag.StringVar(&configFile, "confAli", "configs/config.yaml", "config.yaml")
|
||||
flag.Parse()
|
||||
|
@ -31,7 +31,7 @@ func CreateContainerGroup(request *CreateContainerGroupRequest) (response *Creat
|
|||
}
|
||||
|
||||
glog.Infof("load tenant from file finished")
|
||||
tenanters, err := tenanter.GetTenanters(provider)
|
||||
tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(provider))
|
||||
var regionId int32
|
||||
var cpuPod string
|
||||
var memoryPod string
|
||||
|
@ -62,7 +62,7 @@ func CreateContainerGroup(request *CreateContainerGroupRequest) (response *Creat
|
|||
|
||||
requestPCM := &pbpod.CreatePodReq{
|
||||
RequestSource: "ali",
|
||||
Provider: provider,
|
||||
Provider: pbpod.CloudProvider(provider),
|
||||
AccountName: tenanters[0].AccountName(),
|
||||
PodName: request.ContainerGroupName,
|
||||
RegionId: regionId,
|
|
@ -16,10 +16,9 @@
|
|||
package ali
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/pod/server"
|
||||
"errors"
|
||||
"flag"
|
||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
||||
|
@ -31,7 +30,7 @@ import (
|
|||
// api document: https://help.aliyun.com/api/eci/deletecontainergroup.html
|
||||
func DeleteContainerGroup(request *DeleteContainerGroupRequest) (response *DeleteContainerGroupResponse, err error) {
|
||||
|
||||
provider := pbtenant.CloudProvider(request.ProviderId)
|
||||
provider := pbpod.CloudProvider(request.ProviderId)
|
||||
var configFile string
|
||||
flag.StringVar(&configFile, "confAli", "configs/config.yaml", "config.yaml")
|
||||
flag.Parse()
|
||||
|
@ -63,7 +62,7 @@ func DeleteContainerGroup(request *DeleteContainerGroupRequest) (response *Delet
|
|||
|
||||
requestPCM := &pbpod.DeletePodReq{
|
||||
RequestSource: "ali",
|
||||
Provider: provider,
|
||||
Provider: pbpod.CloudProvider(provider),
|
||||
AccountName: request.AccountName,
|
||||
PcmId: pcmId,
|
||||
Namespace: request.Namespace,
|
|
@ -1,9 +1,8 @@
|
|||
package ali
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/pod/server"
|
||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
||||
)
|
||||
|
@ -12,7 +11,7 @@ import (
|
|||
// api document: https://help.aliyun.com/api/eci/describecontainergroups.html
|
||||
func DescribeContainerGroups(request *DescribeContainerGroupsRequest) (response *DescribeContainerGroupsResponse, err error) {
|
||||
|
||||
provider := pbtenant.CloudProvider(request.ProviderId)
|
||||
provider := pbpod.CloudProvider(request.ProviderId)
|
||||
containerGroups := make([]DescribeContainerGroupsContainerGroup0, 0)
|
||||
//trans Ali request to PCM request
|
||||
requestPCM := &pbpod.ListPodReq{
|
|
@ -16,10 +16,9 @@
|
|||
package ali
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/pod/server"
|
||||
"errors"
|
||||
"flag"
|
||||
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
||||
|
@ -31,7 +30,7 @@ import (
|
|||
// api document: https://help.aliyun.com/api/eci/updatecontainergroup.html
|
||||
func UpdateContainerGroup(request *UpdateContainerGroupRequest) (response *UpdateContainerGroupResponse, err error) {
|
||||
|
||||
provider := pbtenant.CloudProvider(request.ProviderId)
|
||||
provider := pbpod.CloudProvider(request.ProviderId)
|
||||
var configFile string
|
||||
flag.StringVar(&configFile, "confAli", "configs/config.yaml", "config.yaml")
|
||||
flag.Parse()
|
||||
|
@ -60,7 +59,7 @@ func UpdateContainerGroup(request *UpdateContainerGroupRequest) (response *Updat
|
|||
|
||||
requestPCM := &pbpod.UpdatePodReq{
|
||||
RequestSource: "ali",
|
||||
Provider: provider,
|
||||
Provider: pbpod.CloudProvider(provider),
|
||||
AccountName: request.AccountName,
|
||||
PcmId: request.PcmId,
|
||||
PodId: request.ContainerGroupId,
|
|
@ -17,10 +17,11 @@ limitations under the License.
|
|||
// Package v1 contains API types that are common to all versions.
|
||||
//
|
||||
// The package contains two categories of types:
|
||||
// - external (serialized) types that lack their own version (e.g TypeMeta)
|
||||
// - internal (never-serialized) types that are needed by several different
|
||||
// api groups, and so live here, to avoid duplication and/or import loops
|
||||
// (e.g. LabelSelector).
|
||||
// - external (serialized) types that lack their own version (e.g TypeMeta)
|
||||
// - internal (never-serialized) types that are needed by several different
|
||||
// api groups, and so live here, to avoid duplication and/or import loops
|
||||
// (e.g. LabelSelector).
|
||||
//
|
||||
// In the future, we will probably move these categories of objects into
|
||||
// separate packages.
|
||||
package v1
|
||||
|
@ -1376,17 +1377,18 @@ type PartialObjectMetadataList struct {
|
|||
// Condition contains details for one aspect of the current state of this API Resource.
|
||||
// ---
|
||||
// This struct is intended for direct use as an array at the field path .status.conditions. For example,
|
||||
// type FooStatus struct{
|
||||
// // Represents the observations of a foo's current state.
|
||||
// // Known .status.conditions.type are: "Available", "Progressing", and "Degraded"
|
||||
// // +patchMergeKey=type
|
||||
// // +patchStrategy=merge
|
||||
// // +listType=map
|
||||
// // +listMapKey=type
|
||||
// Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
||||
//
|
||||
// // other fields
|
||||
// }
|
||||
// type FooStatus struct{
|
||||
// // Represents the observations of a foo's current state.
|
||||
// // Known .status.conditions.type are: "Available", "Progressing", and "Degraded"
|
||||
// // +patchMergeKey=type
|
||||
// // +patchStrategy=merge
|
||||
// // +listType=map
|
||||
// // +listMapKey=type
|
||||
// Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
||||
//
|
||||
// // other fields
|
||||
// }
|
||||
type Condition struct {
|
||||
// type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
// ---
|
|
@ -21,7 +21,7 @@ package kubernetes
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
corev1 "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/client-go/kubernetes/typed/core/v1"
|
||||
corev1 "code.gitlink.org.cn/JCCE/PCM.git/pod/server/kubernetes/client-go/kubernetes/typed/core/v1"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
admissionregistrationv1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1"
|
||||
admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1"
|
|
@ -1,12 +1,12 @@
|
|||
package v1
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/pod/server"
|
||||
pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl"
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
|
@ -15,12 +15,12 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
v1 "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server/kubernetes/api/core/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
v1 "code.gitlink.org.cn/JCCE/PCM.git/pod/server/kubernetes/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
"k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// PodsGetter has a method to return a PodInterface.
|
||||
|
@ -85,7 +85,7 @@ func (c *pods) List(ctx context.Context, pod *v1.Pod, opts metav1.ListOptions) (
|
|||
|
||||
requestPCM := &pbpod.ListPodReq{
|
||||
RequestSource: "huawei",
|
||||
Provider: provider,
|
||||
Provider: pbpod.CloudProvider(provider),
|
||||
Namespace: "pcm",
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ func (c *pods) Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOption
|
|||
|
||||
requestPCM := &pbpod.CreatePodReq{
|
||||
RequestSource: "huawei",
|
||||
Provider: provider,
|
||||
Provider: pbpod.CloudProvider(provider),
|
||||
AccountName: tenanters[0].AccountName(),
|
||||
PodName: pod.Name,
|
||||
RegionId: regionId,
|
||||
|
@ -280,7 +280,7 @@ func (c *pods) Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOption
|
|||
|
||||
requestPCM := &pbpod.UpdatePodReq{
|
||||
RequestSource: "huawei",
|
||||
Provider: provider,
|
||||
Provider: pbpod.CloudProvider(provider),
|
||||
PcmId: string(pod.ObjectMeta.UID),
|
||||
PodId: string(pod.ObjectMeta.UID),
|
||||
AccountName: tenanters[0].AccountName(),
|
||||
|
@ -404,7 +404,7 @@ func (c *pods) Delete(ctx context.Context, namespace string, providerId int32, r
|
|||
|
||||
requestPCM := &pbpod.DeletePodReq{
|
||||
RequestSource: "huawei",
|
||||
Provider: provider,
|
||||
Provider: pbpod.CloudProvider(provider),
|
||||
AccountName: accountName,
|
||||
PcmId: pcmId,
|
||||
Namespace: namespace,
|
|
@ -1,19 +1,21 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"context"
|
||||
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
pbpod.UnimplementedPodServiceServer
|
||||
}
|
||||
|
||||
// GetProdRegions get available region for product
|
||||
func (s *Server) GetProdRegions(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) {
|
||||
resp, err := server.GetPodRegion(ctx, req)
|
||||
resp, err := GetPodRegion(ctx, req)
|
||||
if err != nil {
|
||||
glog.Errorf("CreatePods error %+v", err)
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
|
@ -23,7 +25,7 @@ func (s *Server) GetProdRegions(ctx context.Context, req *pbpod.GetPodRegionReq)
|
|||
|
||||
// CreatePods create multiple pod on multiple clouds
|
||||
func (s *Server) CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbpod.CreatePodsResp, error) {
|
||||
resp, err := server.CreatePods(ctx, req)
|
||||
resp, err := CreatePods(ctx, req)
|
||||
if err != nil {
|
||||
glog.Errorf("CreatePods error %+v", err)
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
|
@ -33,7 +35,7 @@ func (s *Server) CreatePods(ctx context.Context, req *pbpod.CreatePodsReq) (*pbp
|
|||
|
||||
// CreatePod create pod on one cloud
|
||||
func (s *Server) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodResp, error) {
|
||||
resp, err := server.CreatePod(ctx, req)
|
||||
resp, err := CreatePod(ctx, req)
|
||||
if err != nil {
|
||||
glog.Errorf("CreatePod error %+v", err)
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
|
@ -43,7 +45,7 @@ func (s *Server) CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod
|
|||
|
||||
// DeletePod delete specified pod
|
||||
func (s *Server) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodResp, error) {
|
||||
resp, err := server.DeletePod(ctx, req)
|
||||
resp, err := DeletePod(ctx, req)
|
||||
if err != nil {
|
||||
glog.Errorf("DeletePod error %+v", err)
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
|
@ -53,7 +55,7 @@ func (s *Server) DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod
|
|||
|
||||
// UpdatePod update specified pod
|
||||
func (s *Server) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodResp, error) {
|
||||
resp, err := server.UpdatePod(ctx, req)
|
||||
resp, err := UpdatePod(ctx, req)
|
||||
if err != nil {
|
||||
glog.Errorf("UpdatePod error %+v", err)
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
|
@ -62,7 +64,7 @@ func (s *Server) UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod
|
|||
}
|
||||
|
||||
func (s *Server) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.ListPodDetailResp, error) {
|
||||
resp, err := server.ListPodDetail(ctx, req)
|
||||
resp, err := ListPodDetail(ctx, req)
|
||||
if err != nil {
|
||||
glog.Errorf("ListPodDetail error %+v", err)
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
|
@ -71,7 +73,7 @@ func (s *Server) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq)
|
|||
}
|
||||
|
||||
func (s *Server) ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, error) {
|
||||
resp, err := server.ListPod(ctx, req)
|
||||
resp, err := ListPod(ctx, req)
|
||||
if err != nil {
|
||||
glog.Errorf("ListPod error %+v", err)
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
|
@ -80,7 +82,7 @@ func (s *Server) ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.Lis
|
|||
}
|
||||
|
||||
func (s *Server) ListPodAll(ctx context.Context, req *pbpod.ListPodAllReq) (*pbpod.ListPodResp, error) {
|
||||
resp, err := server.ListPodAll(ctx)
|
||||
resp, err := ListPodAll(ctx)
|
||||
if err != nil {
|
||||
glog.Errorf("ListPodAll error %+v", err)
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
|
@ -1,15 +1,15 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
pbtenant "code.gitlink.org.cn/JCCE/PCM.git/tenant/gen/idl"
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/service"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/pod/service"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/pkg/errors"
|
||||
|
@ -19,18 +19,18 @@ import (
|
|||
func GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (resp *pbpod.GetPodRegionResp, err error) {
|
||||
var (
|
||||
regionInit tenanter.Region
|
||||
regions []*pbtenant.Region
|
||||
regions []*pbpod.Region
|
||||
)
|
||||
|
||||
switch req.GetProvider() {
|
||||
case pbtenant.CloudProvider_ali:
|
||||
regionInit, _ = tenanter.NewRegion(req.GetProvider(), 2)
|
||||
case pbtenant.CloudProvider_tencent:
|
||||
regionInit, _ = tenanter.NewRegion(req.GetProvider(), 5)
|
||||
case pbtenant.CloudProvider_huawei:
|
||||
regionInit, _ = tenanter.NewRegion(req.GetProvider(), 5)
|
||||
case pbpod.CloudProvider_ali:
|
||||
regionInit, _ = tenanter.NewRegion(pbtenant.CloudProvider(req.GetProvider()), 2)
|
||||
case pbpod.CloudProvider_tencent:
|
||||
regionInit, _ = tenanter.NewRegion(pbtenant.CloudProvider(req.GetProvider()), 5)
|
||||
case pbpod.CloudProvider_huawei:
|
||||
regionInit, _ = tenanter.NewRegion(pbtenant.CloudProvider(req.GetProvider()), 5)
|
||||
}
|
||||
tenanters, err := tenanter.GetTenanters(req.GetProvider())
|
||||
tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.GetProvider()))
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "getTenanters error")
|
||||
}
|
||||
|
@ -100,12 +100,12 @@ func CreatePod(ctx context.Context, req *pbpod.CreatePodReq) (*pbpod.CreatePodRe
|
|||
pod poder.Poder
|
||||
)
|
||||
|
||||
tenanters, err := tenanter.GetTenanters(req.Provider)
|
||||
tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider))
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "getTenanters error")
|
||||
}
|
||||
|
||||
region, err := tenanter.NewRegion(req.Provider, req.RegionId)
|
||||
region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId)
|
||||
}
|
||||
|
@ -142,14 +142,14 @@ func DeletePod(ctx context.Context, req *pbpod.DeletePodReq) (*pbpod.DeletePodRe
|
|||
|
||||
glog.Infof("load tenant from file finished")
|
||||
}
|
||||
tenanters, err := tenanter.GetTenanters(req.Provider)
|
||||
tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider))
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "getTenanters error")
|
||||
}
|
||||
|
||||
region, err := tenanter.NewRegion(req.Provider, req.RegionId)
|
||||
region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId)
|
||||
return nil, errors.WithMessagef(err, "provider %v regionId %v", pbtenant.CloudProvider(req.Provider), req.RegionId)
|
||||
}
|
||||
|
||||
for _, tenant := range tenanters {
|
||||
|
@ -184,12 +184,12 @@ func UpdatePod(ctx context.Context, req *pbpod.UpdatePodReq) (*pbpod.UpdatePodRe
|
|||
|
||||
glog.Infof("load tenant from file finished")
|
||||
}
|
||||
tenanters, err := tenanter.GetTenanters(req.Provider)
|
||||
tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider))
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "getTenanters error")
|
||||
}
|
||||
|
||||
region, err := tenanter.NewRegion(req.Provider, req.RegionId)
|
||||
region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId)
|
||||
}
|
||||
|
@ -211,12 +211,12 @@ func ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq) (*pbpod.Lis
|
|||
pod poder.Poder
|
||||
)
|
||||
|
||||
tenanters, err := tenanter.GetTenanters(req.Provider)
|
||||
tenanters, err := tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider))
|
||||
if err != nil {
|
||||
return nil, errors.WithMessage(err, "getTenanters error")
|
||||
}
|
||||
|
||||
region, err := tenanter.NewRegion(req.Provider, req.RegionId)
|
||||
region, err := tenanter.NewRegion(pbtenant.CloudProvider(req.Provider), req.RegionId)
|
||||
if err != nil {
|
||||
return nil, errors.WithMessagef(err, "provider %v regionId %v", req.Provider, req.RegionId)
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ func ListPod(ctx context.Context, req *pbpod.ListPodReq) (*pbpod.ListPodResp, er
|
|||
glog.Infof("load tenant from file finished")
|
||||
}
|
||||
|
||||
tenanters, _ = tenanter.GetTenanters(req.Provider)
|
||||
tenanters, _ = tenanter.GetTenanters(pbtenant.CloudProvider(req.Provider))
|
||||
|
||||
//get the available region for product
|
||||
reqPodRegion := &pbpod.GetPodRegionReq{Provider: req.GetProvider()}
|
||||
|
@ -316,14 +316,14 @@ func ListPodAll(ctx context.Context) (*pbpod.ListPodResp, error) {
|
|||
pods []*pbpod.PodInstance
|
||||
)
|
||||
|
||||
wg.Add(len(pbtenant.CloudProvider_name))
|
||||
for k := range pbtenant.CloudProvider_name {
|
||||
wg.Add(len(pbpod.CloudProvider_name))
|
||||
for k := range pbpod.CloudProvider_name {
|
||||
go func(provider int32) {
|
||||
defer wg.Done()
|
||||
|
||||
//针对私有K8S集群,调用listAll时默认只查询ListPodDetailReq namespace下的pod
|
||||
if provider == 3 {
|
||||
resp, err := ListPod(ctx, &pbpod.ListPodReq{Provider: pbtenant.CloudProvider(provider), Namespace: "pcm"})
|
||||
resp, err := ListPod(ctx, &pbpod.ListPodReq{Provider: pbpod.CloudProvider(provider), Namespace: "pcm"})
|
||||
if err != nil {
|
||||
glog.Errorf("List error %v", err)
|
||||
return
|
||||
|
@ -332,7 +332,7 @@ func ListPodAll(ctx context.Context) (*pbpod.ListPodResp, error) {
|
|||
pods = append(pods, resp.Pods...)
|
||||
mutex.Unlock()
|
||||
} else {
|
||||
resp, err := ListPod(ctx, &pbpod.ListPodReq{Provider: pbtenant.CloudProvider(provider)})
|
||||
resp, err := ListPod(ctx, &pbpod.ListPodReq{Provider: pbpod.CloudProvider(provider)})
|
||||
if err != nil {
|
||||
glog.Errorf("List error %v", err)
|
||||
return
|
|
@ -15,10 +15,9 @@
|
|||
package v20180525
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_pod/server"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/pod/server"
|
||||
"context"
|
||||
"errors"
|
||||
"flag"
|
||||
|
@ -1278,7 +1277,7 @@ func NewCreateEKSContainerInstancesResponse() (response *CreateEKSContainerInsta
|
|||
// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal"
|
||||
// INVALIDPARAMETER = "InvalidParameter"
|
||||
func CreateEKSContainerInstances(request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) {
|
||||
provider := pbtenant.CloudProvider(request.ProviderId)
|
||||
provider := pbpod.CloudProvider(request.ProviderId)
|
||||
|
||||
var configFile string
|
||||
flag.StringVar(&configFile, "conf", "configs/config.yaml", "config.yaml")
|
||||
|
@ -2265,7 +2264,7 @@ func NewDeleteEKSContainerInstancesResponse() (response *DeleteEKSContainerInsta
|
|||
// RESOURCENOTFOUND = "ResourceNotFound"
|
||||
// UNSUPPORTEDOPERATION = "UnsupportedOperation"
|
||||
func DeleteEKSContainerInstances(request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) {
|
||||
provider := pbtenant.CloudProvider(request.ProviderId)
|
||||
provider := pbpod.CloudProvider(request.ProviderId)
|
||||
var configFile string
|
||||
flag.StringVar(&configFile, "conf-tencent", "configs/config.yaml", "config.yaml")
|
||||
flag.Parse()
|
||||
|
@ -4017,7 +4016,7 @@ func NewDescribeEKSContainerInstancesResponse() (response *DescribeEKSContainerI
|
|||
// INVALIDPARAMETER = "InvalidParameter"
|
||||
// RESOURCENOTFOUND = "ResourceNotFound"
|
||||
func DescribeEKSContainerInstances(request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) {
|
||||
provider := pbtenant.CloudProvider(request.ProviderId)
|
||||
provider := pbpod.CloudProvider(request.ProviderId)
|
||||
EksCis := make([]*EksCi, 0)
|
||||
//trans Tencent request to PCM request
|
||||
requestPCM := &pbpod.ListPodReq{
|
||||
|
@ -6987,7 +6986,7 @@ func NewUpdateEKSContainerInstanceResponse() (response *UpdateEKSContainerInstan
|
|||
// INVALIDPARAMETER_PARAM = "InvalidParameter.Param"
|
||||
// UNSUPPORTEDOPERATION = "UnsupportedOperation"
|
||||
func UpdateEKSContainerInstance(request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) {
|
||||
provider := pbtenant.CloudProvider(request.ProviderId)
|
||||
provider := pbpod.CloudProvider(request.ProviderId)
|
||||
var configFile string
|
||||
flag.StringVar(&configFile, "conf-tencent", "configs/config.yaml", "config.yaml")
|
||||
flag.Parse()
|
|
@ -10,8 +10,7 @@ import (
|
|||
"sync"
|
||||
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
@ -25,7 +24,7 @@ type AliEci struct {
|
|||
|
||||
func (eci *AliEci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) {
|
||||
|
||||
regions := make([]*pbtenant.Region, 0)
|
||||
regions := make([]*pbpod.Region, 0)
|
||||
|
||||
requestRegion := requests.NewCommonRequest()
|
||||
requestRegion.Method = "POST"
|
||||
|
@ -49,7 +48,7 @@ func (eci *AliEci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq)
|
|||
regionsJson := respRegion.Get("Regions").GetIndex(i)
|
||||
regionName, _ := regionsJson.Get("RegionId").String()
|
||||
regionId, _ := tenanter.GetAliRegionId(regionName)
|
||||
regionPod := &pbtenant.Region{
|
||||
regionPod := &pbpod.Region{
|
||||
Id: regionId,
|
||||
Name: regionName,
|
||||
}
|
||||
|
@ -182,7 +181,7 @@ func (eci *AliEci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailRe
|
|||
var ecies = make([]*pbpod.PodInstance, len(resp.ContainerGroups))
|
||||
for k, v := range resp.ContainerGroups {
|
||||
ecies[k] = &pbpod.PodInstance{
|
||||
Provider: pbtenant.CloudProvider_ali,
|
||||
Provider: pbpod.CloudProvider_ali,
|
||||
AccountName: eci.tenanter.AccountName(),
|
||||
PcmId: v.ContainerGroupId,
|
||||
PodId: v.ContainerGroupId,
|
|
@ -12,9 +12,7 @@ import (
|
|||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
huaweicci "k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
|
@ -35,10 +33,10 @@ type HuaweiCci struct {
|
|||
func (cci *HuaweiCci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) {
|
||||
//todo
|
||||
var (
|
||||
regions []*pbtenant.Region
|
||||
regions []*pbpod.Region
|
||||
)
|
||||
huaweiRegionName, _ := tenanter.GetHuaweiRegionName(5)
|
||||
region := &pbtenant.Region{
|
||||
region := &pbpod.Region{
|
||||
Id: 5,
|
||||
Name: huaweiRegionName,
|
||||
}
|
||||
|
@ -50,7 +48,7 @@ func (cci *HuaweiCci) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionR
|
|||
return resp, nil
|
||||
}
|
||||
|
||||
//CCI auth through iam
|
||||
// CCI auth through iam
|
||||
const (
|
||||
apiVersion = "client.authentication.k8s.io/v1beta1"
|
||||
iamEndpoint = "https://iam.myhuaweicloud.com"
|
||||
|
@ -215,7 +213,7 @@ func (cci *HuaweiCci) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetai
|
|||
var pods = make([]*pbpod.PodInstance, len(resp.Items))
|
||||
for k, v := range resp.Items {
|
||||
pods[k] = &pbpod.PodInstance{
|
||||
Provider: pbtenant.CloudProvider_huawei,
|
||||
Provider: pbpod.CloudProvider_huawei,
|
||||
AccountName: cci.tenanter.AccountName(),
|
||||
PcmId: v.Name,
|
||||
PodId: string(v.GetUID()),
|
|
@ -2,8 +2,7 @@ package poder
|
|||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
|
@ -33,10 +32,10 @@ type K8SPoder struct {
|
|||
func (k K8SPoder) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) {
|
||||
//todo
|
||||
var (
|
||||
regions []*pbtenant.Region
|
||||
regions []*pbpod.Region
|
||||
)
|
||||
huaweiRegionName, _ := tenanter.GetK8SRegionName(0)
|
||||
region := &pbtenant.Region{
|
||||
region := &pbpod.Region{
|
||||
Id: 0,
|
||||
Name: huaweiRegionName,
|
||||
}
|
||||
|
@ -201,7 +200,7 @@ func (k K8SPoder) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetailReq
|
|||
var pods = make([]*pbpod.PodInstance, len(resp.Items))
|
||||
for k, v := range resp.Items {
|
||||
pods[k] = &pbpod.PodInstance{
|
||||
Provider: pbtenant.CloudProvider_k8s,
|
||||
Provider: pbpod.CloudProvider_k8s,
|
||||
AccountName: req.AccountName,
|
||||
PcmId: v.Name,
|
||||
PodId: string(v.GetUID()),
|
|
@ -2,8 +2,7 @@ package poder
|
|||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"context"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
@ -23,7 +22,7 @@ type Poder interface {
|
|||
GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error)
|
||||
}
|
||||
|
||||
func NewPodClient(provider pbtenant.CloudProvider, region tenanter.Region, tenant tenanter.Tenanter) (poder Poder, err error) {
|
||||
func NewPodClient(provider pbpod.CloudProvider, region tenanter.Region, tenant tenanter.Tenanter) (poder Poder, err error) {
|
||||
// 部分sdk会在内部panic
|
||||
defer func() {
|
||||
if err1 := recover(); err1 != nil {
|
||||
|
@ -33,13 +32,13 @@ func NewPodClient(provider pbtenant.CloudProvider, region tenanter.Region, tenan
|
|||
}()
|
||||
|
||||
switch provider {
|
||||
case pbtenant.CloudProvider_ali:
|
||||
case pbpod.CloudProvider_ali:
|
||||
return newAliEciClient(region, tenant)
|
||||
case pbtenant.CloudProvider_tencent:
|
||||
case pbpod.CloudProvider_tencent:
|
||||
return newTencentEksClient(region, tenant)
|
||||
case pbtenant.CloudProvider_huawei:
|
||||
case pbpod.CloudProvider_huawei:
|
||||
return newHuaweiCciClient(region, tenant)
|
||||
case pbtenant.CloudProvider_k8s:
|
||||
case pbpod.CloudProvider_k8s:
|
||||
return newK8SClient(tenant)
|
||||
//TODO aws
|
||||
//case pbtenant.CloudProvider_aws:
|
|
@ -7,10 +7,8 @@ import (
|
|||
|
||||
"github.com/golang/glog"
|
||||
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbtenant"
|
||||
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/common/tenanter"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/lan_trans/idl/pbpod"
|
||||
pbpod "code.gitlink.org.cn/JCCE/PCM.git/pod/gen/idl"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
|
||||
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
|
||||
|
@ -27,7 +25,7 @@ type TencentEks struct {
|
|||
|
||||
func (eks TencentEks) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionReq) (*pbpod.GetPodRegionResp, error) {
|
||||
|
||||
regions := make([]*pbtenant.Region, 0)
|
||||
regions := make([]*pbpod.Region, 0)
|
||||
|
||||
request := tencenteks.NewDescribeEKSContainerInstanceRegionsRequest()
|
||||
resp, err := eks.cli.DescribeEKSContainerInstanceRegions(request)
|
||||
|
@ -37,7 +35,7 @@ func (eks TencentEks) GetPodRegion(ctx context.Context, req *pbpod.GetPodRegionR
|
|||
for _, eksRegion := range resp.Response.Regions {
|
||||
|
||||
regionId, _ := tenanter.GetTencentRegionId(*eksRegion.RegionName)
|
||||
regionPod := &pbtenant.Region{
|
||||
regionPod := &pbpod.Region{
|
||||
Id: regionId,
|
||||
Name: *eksRegion.RegionName,
|
||||
}
|
||||
|
@ -187,7 +185,7 @@ func (eks TencentEks) ListPodDetail(ctx context.Context, req *pbpod.ListPodDetai
|
|||
var ekspods = make([]*pbpod.PodInstance, len(resp.Response.EksCis))
|
||||
for k, v := range resp.Response.EksCis {
|
||||
ekspods[k] = &pbpod.PodInstance{
|
||||
Provider: pbtenant.CloudProvider_tencent,
|
||||
Provider: pbpod.CloudProvider_tencent,
|
||||
AccountName: eks.tenanter.AccountName(),
|
||||
PcmId: *v.EksCiId,
|
||||
PodId: *v.EksCiId,
|
|
@ -0,0 +1,17 @@
|
|||
version: v1
|
||||
plugins:
|
||||
- name: go
|
||||
out: gen
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- name: go-grpc
|
||||
out: gen
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- name: grpc-gateway
|
||||
out: gen
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- grpc_api_configuration=idl/slurm.yaml
|
||||
- name: openapiv2
|
||||
out: gen/openapiv2
|
|
@ -0,0 +1,13 @@
|
|||
version: v1
|
||||
name: buf.build/JCCE/PCM
|
||||
breaking:
|
||||
use:
|
||||
- FILE
|
||||
lint:
|
||||
use:
|
||||
- DEFAULT
|
||||
# ignore:
|
||||
# - google/type/datetime.proto
|
||||
deps:
|
||||
- buf.build/googleapis/googleapis
|
||||
- buf.build/grpc-ecosystem/grpc-gateway
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/jobinfo"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
node_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/nodeinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/nodeinfo"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/jobinfo"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
node_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/nodeinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/nodeinfo"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
partition_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/partitioninfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/partitioninfo"
|
||||
"fmt"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/jobinfo"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/submitjob"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/submitjob"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/user"
|
|
@ -1,9 +1,9 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/submitjob"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/jobinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/submitjob"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
|
@ -1,8 +1,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm"
|
||||
submit_job "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/submitjob"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/submitjob"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
|
@ -10,7 +10,6 @@ import (
|
|||
"os/exec"
|
||||
"path/filepath"
|
||||
"slurm"
|
||||
"slurm/jobinfo"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
|
@ -74,7 +74,7 @@ void free_submit_response_msg(struct submit_response_msg *msg)
|
|||
import "C"
|
||||
|
||||
import (
|
||||
job_info "code.gitlink.org.cn/JCCE/PCM.git/adaptor/pcm_slurm/cgo/src/slurm/jobinfo"
|
||||
"code.gitlink.org.cn/JCCE/PCM.git/slurm/cgo/src/slurm/jobinfo"
|
||||
"fmt"
|
||||
"unsafe"
|
||||
)
|
|
@ -0,0 +1,256 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc (unknown)
|
||||
// source: idl/slurm.proto
|
||||
|
||||
package slurmpb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
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 GetNodesReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *GetNodesReq) Reset() {
|
||||
*x = GetNodesReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_idl_slurm_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetNodesReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetNodesReq) ProtoMessage() {}
|
||||
|
||||
func (x *GetNodesReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_idl_slurm_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 GetNodesReq.ProtoReflect.Descriptor instead.
|
||||
func (*GetNodesReq) Descriptor() ([]byte, []int) {
|
||||
return file_idl_slurm_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type GetNodesResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Boards int32 `protobuf:"varint,1,opt,name=boards,proto3" json:"boards,omitempty"`
|
||||
Cpus int32 `protobuf:"varint,2,opt,name=cpus,proto3" json:"cpus,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
RealMemory int32 `protobuf:"varint,4,opt,name=realMemory,proto3" json:"realMemory,omitempty"`
|
||||
Sockets int32 `protobuf:"varint,5,opt,name=sockets,proto3" json:"sockets,omitempty"`
|
||||
Threads int32 `protobuf:"varint,6,opt,name=threads,proto3" json:"threads,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetNodesResp) Reset() {
|
||||
*x = GetNodesResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_idl_slurm_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetNodesResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetNodesResp) ProtoMessage() {}
|
||||
|
||||
func (x *GetNodesResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_idl_slurm_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 GetNodesResp.ProtoReflect.Descriptor instead.
|
||||
func (*GetNodesResp) Descriptor() ([]byte, []int) {
|
||||
return file_idl_slurm_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetNodesResp) GetBoards() int32 {
|
||||
if x != nil {
|
||||
return x.Boards
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetNodesResp) GetCpus() int32 {
|
||||
if x != nil {
|
||||
return x.Cpus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetNodesResp) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetNodesResp) GetRealMemory() int32 {
|
||||
if x != nil {
|
||||
return x.RealMemory
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetNodesResp) GetSockets() int32 {
|
||||
if x != nil {
|
||||
return x.Sockets
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetNodesResp) GetThreads() int32 {
|
||||
if x != nil {
|
||||
return x.Threads
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_idl_slurm_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_idl_slurm_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x05, 0x73, 0x6c, 0x75, 0x72, 0x6d, 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, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67,
|
||||
0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0d, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x73, 0x52, 0x65, 0x71, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x63, 0x70, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x70,
|
||||
0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x6c, 0x4d, 0x65,
|
||||
0x6d, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x6c,
|
||||
0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x32, 0x43, 0x0a, 0x0c, 0x53, 0x6c,
|
||||
0x75, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x47, 0x65,
|
||||
0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x73, 0x6c, 0x75,
|
||||
0x72, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42,
|
||||
0x19, 0x5a, 0x17, 0x50, 0x43, 0x4d, 0x2f, 0x70, 0x6f, 0x64, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x67,
|
||||
0x65, 0x6e, 0x3b, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_idl_slurm_proto_rawDescOnce sync.Once
|
||||
file_idl_slurm_proto_rawDescData = file_idl_slurm_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_idl_slurm_proto_rawDescGZIP() []byte {
|
||||
file_idl_slurm_proto_rawDescOnce.Do(func() {
|
||||
file_idl_slurm_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_slurm_proto_rawDescData)
|
||||
})
|
||||
return file_idl_slurm_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_idl_slurm_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_idl_slurm_proto_goTypes = []interface{}{
|
||||
(*GetNodesReq)(nil), // 0: slurm.GetNodesReq
|
||||
(*GetNodesResp)(nil), // 1: slurm.GetNodesResp
|
||||
}
|
||||
var file_idl_slurm_proto_depIdxs = []int32{
|
||||
0, // 0: slurm.SlurmService.GetNodes:input_type -> slurm.GetNodesReq
|
||||
1, // 1: slurm.SlurmService.GetNodes:output_type -> slurm.GetNodesResp
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_idl_slurm_proto_init() }
|
||||
func file_idl_slurm_proto_init() {
|
||||
if File_idl_slurm_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_idl_slurm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetNodesReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_idl_slurm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetNodesResp); 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_idl_slurm_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_idl_slurm_proto_goTypes,
|
||||
DependencyIndexes: file_idl_slurm_proto_depIdxs,
|
||||
MessageInfos: file_idl_slurm_proto_msgTypes,
|
||||
}.Build()
|
||||
File_idl_slurm_proto = out.File
|
||||
file_idl_slurm_proto_rawDesc = nil
|
||||
file_idl_slurm_proto_goTypes = nil
|
||||
file_idl_slurm_proto_depIdxs = nil
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: idl/slurm.proto
|
||||
|
||||
/*
|
||||
Package slurmpb is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package slurmpb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_SlurmService_GetNodes_0(ctx context.Context, marshaler runtime.Marshaler, client SlurmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetNodesReq
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.GetNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_SlurmService_GetNodes_0(ctx context.Context, marshaler runtime.Marshaler, server SlurmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetNodesReq
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.GetNodes(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterSlurmServiceHandlerServer registers the http handlers for service SlurmService to "mux".
|
||||
// UnaryRPC :call SlurmServiceServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSlurmServiceHandlerFromEndpoint instead.
|
||||
func RegisterSlurmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SlurmServiceServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_SlurmService_GetNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/slurm.SlurmService/GetNodes")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_SlurmService_GetNodes_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_SlurmService_GetNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterSlurmServiceHandlerFromEndpoint is same as RegisterSlurmServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterSlurmServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
return RegisterSlurmServiceHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterSlurmServiceHandler registers the http handlers for service SlurmService to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterSlurmServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterSlurmServiceHandlerClient(ctx, mux, NewSlurmServiceClient(conn))
|
||||
}
|
||||
|
||||
// RegisterSlurmServiceHandlerClient registers the http handlers for service SlurmService
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SlurmServiceClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SlurmServiceClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "SlurmServiceClient" to call the correct interceptors.
|
||||
func RegisterSlurmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SlurmServiceClient) error {
|
||||
|
||||
mux.Handle("GET", pattern_SlurmService_GetNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/slurm.SlurmService/GetNodes")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_SlurmService_GetNodes_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_SlurmService_GetNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_SlurmService_GetNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"apis", "slurm"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_SlurmService_GetNodes_0 = runtime.ForwardResponseMessage
|
||||
)
|
|
@ -0,0 +1,107 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: idl/slurm.proto
|
||||
|
||||
package slurmpb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// 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
|
||||
|
||||
// SlurmServiceClient is the client API for SlurmService 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 SlurmServiceClient interface {
|
||||
// Echo 样例接口
|
||||
GetNodes(ctx context.Context, in *GetNodesReq, opts ...grpc.CallOption) (*GetNodesResp, error)
|
||||
}
|
||||
|
||||
type slurmServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSlurmServiceClient(cc grpc.ClientConnInterface) SlurmServiceClient {
|
||||
return &slurmServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *slurmServiceClient) GetNodes(ctx context.Context, in *GetNodesReq, opts ...grpc.CallOption) (*GetNodesResp, error) {
|
||||
out := new(GetNodesResp)
|
||||
err := c.cc.Invoke(ctx, "/slurm.SlurmService/GetNodes", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SlurmServiceServer is the server API for SlurmService service.
|
||||
// All implementations must embed UnimplementedSlurmServiceServer
|
||||
// for forward compatibility
|
||||
type SlurmServiceServer interface {
|
||||
// Echo 样例接口
|
||||
GetNodes(context.Context, *GetNodesReq) (*GetNodesResp, error)
|
||||
mustEmbedUnimplementedSlurmServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedSlurmServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedSlurmServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedSlurmServiceServer) GetNodes(context.Context, *GetNodesReq) (*GetNodesResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetNodes not implemented")
|
||||
}
|
||||
func (UnimplementedSlurmServiceServer) mustEmbedUnimplementedSlurmServiceServer() {}
|
||||
|
||||
// UnsafeSlurmServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SlurmServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSlurmServiceServer interface {
|
||||
mustEmbedUnimplementedSlurmServiceServer()
|
||||
}
|
||||
|
||||
func RegisterSlurmServiceServer(s grpc.ServiceRegistrar, srv SlurmServiceServer) {
|
||||
s.RegisterService(&SlurmService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _SlurmService_GetNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetNodesReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SlurmServiceServer).GetNodes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/slurm.SlurmService/GetNodes",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SlurmServiceServer).GetNodes(ctx, req.(*GetNodesReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// SlurmService_ServiceDesc is the grpc.ServiceDesc for SlurmService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var SlurmService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "slurm.SlurmService",
|
||||
HandlerType: (*SlurmServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetNodes",
|
||||
Handler: _SlurmService_GetNodes_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "idl/slurm.proto",
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "idl/slurm.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "SlurmService"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typeUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"slurmGetNodesResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"boards": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"cpus": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"realMemory": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"sockets": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"threads": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
syntax = "proto3";
|
||||
package demo;
|
||||
package slurm;
|
||||
|
||||
option go_package = "code.gitlink.org.cn/JCCE/PCM.git/lan_trans/gen/idl/slurm";
|
||||
option go_package = "PCM/pod/idl/gen;slurmpb";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
@ -22,10 +22,5 @@ message GetNodesResp {
|
|||
service SlurmService {
|
||||
|
||||
// Echo 样例接口
|
||||
rpc GetNodes(GetNodesReq) returns (GetNodesResp) {
|
||||
option (google.api.http) = {
|
||||
post : "/apis/ecs/createMultiple"
|
||||
body : "*"
|
||||
};
|
||||
}
|
||||
rpc GetNodes(GetNodesReq) returns (GetNodesResp);
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
type: google.api.Service
|
||||
config_version: 3
|
||||
|
||||
http:
|
||||
rules:
|
||||
- selector: slurm.SlurmService.GetNodes
|
||||
get: "/apis/slurm"
|
|
@ -0,0 +1,16 @@
|
|||
version: v1
|
||||
plugins:
|
||||
- name: go
|
||||
out: gen
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- name: go-grpc
|
||||
out: gen
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- name: grpc-gateway
|
||||
out: gen
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- name: openapiv2
|
||||
out: gen/openapiv2
|
|
@ -0,0 +1,13 @@
|
|||
version: v1
|
||||
name: buf.build/JCCE/PCM
|
||||
breaking:
|
||||
use:
|
||||
- FILE
|
||||
lint:
|
||||
use:
|
||||
- DEFAULT
|
||||
# ignore:
|
||||
# - google/type/datetime.proto
|
||||
deps:
|
||||
- buf.build/googleapis/googleapis
|
||||
- buf.build/grpc-ecosystem/grpc-gateway
|
|
@ -2,9 +2,9 @@
|
|||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc (unknown)
|
||||
// source: idl/pbtenant/tenant.proto
|
||||
// source: idl/tenant.proto
|
||||
|
||||
package pbtenant
|
||||
package tenantpb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
|
@ -67,11 +67,11 @@ func (x CloudProvider) String() string {
|
|||
}
|
||||
|
||||
func (CloudProvider) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_idl_pbtenant_tenant_proto_enumTypes[0].Descriptor()
|
||||
return file_idl_tenant_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (CloudProvider) Type() protoreflect.EnumType {
|
||||
return &file_idl_pbtenant_tenant_proto_enumTypes[0]
|
||||
return &file_idl_tenant_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x CloudProvider) Number() protoreflect.EnumNumber {
|
||||
|
@ -80,7 +80,7 @@ func (x CloudProvider) Number() protoreflect.EnumNumber {
|
|||
|
||||
// Deprecated: Use CloudProvider.Descriptor instead.
|
||||
func (CloudProvider) EnumDescriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{0}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// 云产品
|
||||
|
@ -132,11 +132,11 @@ func (x CloudProduct) String() string {
|
|||
}
|
||||
|
||||
func (CloudProduct) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_idl_pbtenant_tenant_proto_enumTypes[1].Descriptor()
|
||||
return file_idl_tenant_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (CloudProduct) Type() protoreflect.EnumType {
|
||||
return &file_idl_pbtenant_tenant_proto_enumTypes[1]
|
||||
return &file_idl_tenant_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x CloudProduct) Number() protoreflect.EnumNumber {
|
||||
|
@ -145,7 +145,7 @@ func (x CloudProduct) Number() protoreflect.EnumNumber {
|
|||
|
||||
// Deprecated: Use CloudProduct.Descriptor instead.
|
||||
func (CloudProduct) EnumDescriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{1}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
// 阿里云区域,需要将对应的 _ 转化为 -
|
||||
|
@ -242,11 +242,11 @@ func (x AliRegionId) String() string {
|
|||
}
|
||||
|
||||
func (AliRegionId) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_idl_pbtenant_tenant_proto_enumTypes[2].Descriptor()
|
||||
return file_idl_tenant_proto_enumTypes[2].Descriptor()
|
||||
}
|
||||
|
||||
func (AliRegionId) Type() protoreflect.EnumType {
|
||||
return &file_idl_pbtenant_tenant_proto_enumTypes[2]
|
||||
return &file_idl_tenant_proto_enumTypes[2]
|
||||
}
|
||||
|
||||
func (x AliRegionId) Number() protoreflect.EnumNumber {
|
||||
|
@ -255,7 +255,7 @@ func (x AliRegionId) Number() protoreflect.EnumNumber {
|
|||
|
||||
// Deprecated: Use AliRegionId.Descriptor instead.
|
||||
func (AliRegionId) EnumDescriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{2}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
// 腾讯云区域,需要将对应的 _ 转化为 -
|
||||
|
@ -349,11 +349,11 @@ func (x TencentRegionId) String() string {
|
|||
}
|
||||
|
||||
func (TencentRegionId) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_idl_pbtenant_tenant_proto_enumTypes[3].Descriptor()
|
||||
return file_idl_tenant_proto_enumTypes[3].Descriptor()
|
||||
}
|
||||
|
||||
func (TencentRegionId) Type() protoreflect.EnumType {
|
||||
return &file_idl_pbtenant_tenant_proto_enumTypes[3]
|
||||
return &file_idl_tenant_proto_enumTypes[3]
|
||||
}
|
||||
|
||||
func (x TencentRegionId) Number() protoreflect.EnumNumber {
|
||||
|
@ -362,7 +362,7 @@ func (x TencentRegionId) Number() protoreflect.EnumNumber {
|
|||
|
||||
// Deprecated: Use TencentRegionId.Descriptor instead.
|
||||
func (TencentRegionId) EnumDescriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{3}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
// 华为云区域,需要将对应的 _ 转化为 -
|
||||
|
@ -426,11 +426,11 @@ func (x HuaweiRegionId) String() string {
|
|||
}
|
||||
|
||||
func (HuaweiRegionId) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_idl_pbtenant_tenant_proto_enumTypes[4].Descriptor()
|
||||
return file_idl_tenant_proto_enumTypes[4].Descriptor()
|
||||
}
|
||||
|
||||
func (HuaweiRegionId) Type() protoreflect.EnumType {
|
||||
return &file_idl_pbtenant_tenant_proto_enumTypes[4]
|
||||
return &file_idl_tenant_proto_enumTypes[4]
|
||||
}
|
||||
|
||||
func (x HuaweiRegionId) Number() protoreflect.EnumNumber {
|
||||
|
@ -439,7 +439,7 @@ func (x HuaweiRegionId) Number() protoreflect.EnumNumber {
|
|||
|
||||
// Deprecated: Use HuaweiRegionId.Descriptor instead.
|
||||
func (HuaweiRegionId) EnumDescriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{4}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
// 私有云区域 预留
|
||||
|
@ -470,11 +470,11 @@ func (x K8SRegionId) String() string {
|
|||
}
|
||||
|
||||
func (K8SRegionId) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_idl_pbtenant_tenant_proto_enumTypes[5].Descriptor()
|
||||
return file_idl_tenant_proto_enumTypes[5].Descriptor()
|
||||
}
|
||||
|
||||
func (K8SRegionId) Type() protoreflect.EnumType {
|
||||
return &file_idl_pbtenant_tenant_proto_enumTypes[5]
|
||||
return &file_idl_tenant_proto_enumTypes[5]
|
||||
}
|
||||
|
||||
func (x K8SRegionId) Number() protoreflect.EnumNumber {
|
||||
|
@ -483,7 +483,7 @@ func (x K8SRegionId) Number() protoreflect.EnumNumber {
|
|||
|
||||
// Deprecated: Use K8SRegionId.Descriptor instead.
|
||||
func (K8SRegionId) EnumDescriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{5}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
// 亚马逊云区域,需要将对应的 _ 转化为 -
|
||||
|
@ -577,11 +577,11 @@ func (x AwsRegionId) String() string {
|
|||
}
|
||||
|
||||
func (AwsRegionId) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_idl_pbtenant_tenant_proto_enumTypes[6].Descriptor()
|
||||
return file_idl_tenant_proto_enumTypes[6].Descriptor()
|
||||
}
|
||||
|
||||
func (AwsRegionId) Type() protoreflect.EnumType {
|
||||
return &file_idl_pbtenant_tenant_proto_enumTypes[6]
|
||||
return &file_idl_tenant_proto_enumTypes[6]
|
||||
}
|
||||
|
||||
func (x AwsRegionId) Number() protoreflect.EnumNumber {
|
||||
|
@ -590,7 +590,7 @@ func (x AwsRegionId) Number() protoreflect.EnumNumber {
|
|||
|
||||
// Deprecated: Use AwsRegionId.Descriptor instead.
|
||||
func (AwsRegionId) EnumDescriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{6}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
// 云配置信息
|
||||
|
@ -606,7 +606,7 @@ type CloudConfigs struct {
|
|||
func (x *CloudConfigs) Reset() {
|
||||
*x = CloudConfigs{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_idl_pbtenant_tenant_proto_msgTypes[0]
|
||||
mi := &file_idl_tenant_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ func (x *CloudConfigs) String() string {
|
|||
func (*CloudConfigs) ProtoMessage() {}
|
||||
|
||||
func (x *CloudConfigs) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_idl_pbtenant_tenant_proto_msgTypes[0]
|
||||
mi := &file_idl_tenant_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -632,7 +632,7 @@ func (x *CloudConfigs) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use CloudConfigs.ProtoReflect.Descriptor instead.
|
||||
func (*CloudConfigs) Descriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{0}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CloudConfigs) GetConfigs() []*CloudConfig {
|
||||
|
@ -648,7 +648,7 @@ type CloudConfig struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 云服务提供商,具体参考 CloudProvider 的定义
|
||||
Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=pbtenant.CloudProvider" json:"provider,omitempty"`
|
||||
Provider CloudProvider `protobuf:"varint,1,opt,name=provider,proto3,enum=tenant.CloudProvider" json:"provider,omitempty"`
|
||||
// 账户名称,由用户自定义,必须全局唯一,方便多个系统之间的维护
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// 认证方式1:与 access_secret 结合使用,两者均非空时生效
|
||||
|
@ -664,7 +664,7 @@ type CloudConfig struct {
|
|||
func (x *CloudConfig) Reset() {
|
||||
*x = CloudConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_idl_pbtenant_tenant_proto_msgTypes[1]
|
||||
mi := &file_idl_tenant_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -677,7 +677,7 @@ func (x *CloudConfig) String() string {
|
|||
func (*CloudConfig) ProtoMessage() {}
|
||||
|
||||
func (x *CloudConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_idl_pbtenant_tenant_proto_msgTypes[1]
|
||||
mi := &file_idl_tenant_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -690,7 +690,7 @@ func (x *CloudConfig) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use CloudConfig.ProtoReflect.Descriptor instead.
|
||||
func (*CloudConfig) Descriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{1}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CloudConfig) GetProvider() CloudProvider {
|
||||
|
@ -749,7 +749,7 @@ type Region struct {
|
|||
func (x *Region) Reset() {
|
||||
*x = Region{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_idl_pbtenant_tenant_proto_msgTypes[2]
|
||||
mi := &file_idl_tenant_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -762,7 +762,7 @@ func (x *Region) String() string {
|
|||
func (*Region) ProtoMessage() {}
|
||||
|
||||
func (x *Region) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_idl_pbtenant_tenant_proto_msgTypes[2]
|
||||
mi := &file_idl_tenant_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -775,7 +775,7 @@ func (x *Region) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use Region.ProtoReflect.Descriptor instead.
|
||||
func (*Region) Descriptor() ([]byte, []int) {
|
||||
return file_idl_pbtenant_tenant_proto_rawDescGZIP(), []int{2}
|
||||
return file_idl_tenant_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Region) GetId() int32 {
|
||||
|
@ -792,196 +792,194 @@ func (x *Region) GetName() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
var File_idl_pbtenant_tenant_proto protoreflect.FileDescriptor
|
||||
var File_idl_tenant_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_idl_pbtenant_tenant_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2f, 0x74,
|
||||
0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x62, 0x74,
|
||||
0x65, 0x6e, 0x61, 0x6e, 0x74, 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, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d,
|
||||
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x73, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e,
|
||||
0x43, 0x6c, 0x6f, 0x75, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x63, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x74, 0x65, 0x6e, 0x61, 0x6e,
|
||||
0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52,
|
||||
0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a,
|
||||
0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72,
|
||||
0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x49, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x6c, 0x69, 0x10, 0x00, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x6b, 0x38, 0x73, 0x10,
|
||||
0x03, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x61, 0x72, 0x76, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10, 0x04,
|
||||
0x2a, 0x77, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
|
||||
0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x10,
|
||||
0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x65, 0x63, 0x73,
|
||||
0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x72, 0x64,
|
||||
0x73, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x64,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75,
|
||||
0x63, 0x74, 0x5f, 0x6f, 0x73, 0x73, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64,
|
||||
0x75, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x64, 0x10, 0x05, 0x2a, 0xf3, 0x03, 0x0a, 0x0b, 0x41, 0x6c,
|
||||
0x69, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x6c, 0x69,
|
||||
0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e,
|
||||
0x5f, 0x71, 0x69, 0x6e, 0x67, 0x64, 0x61, 0x6f, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c,
|
||||
0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x62, 0x65, 0x69, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x16,
|
||||
0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x7a, 0x68, 0x61, 0x6e, 0x67, 0x6a, 0x69,
|
||||
0x61, 0x6b, 0x6f, 0x75, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e,
|
||||
0x5f, 0x68, 0x75, 0x68, 0x65, 0x68, 0x61, 0x6f, 0x74, 0x65, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11,
|
||||
0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x77, 0x75, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x61, 0x62,
|
||||
0x75, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f,
|
||||
0x63, 0x6e, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x10, 0x07, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e,
|
||||
0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x65, 0x79,
|
||||
0x75, 0x61, 0x6e, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f,
|
||||
0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x61,
|
||||
0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x0b, 0x12,
|
||||
0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x6f, 0x6e, 0x67, 0x6b, 0x6f,
|
||||
0x6e, 0x67, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73,
|
||||
0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0d, 0x12, 0x16, 0x0a, 0x12,
|
||||
0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74,
|
||||
0x5f, 0x32, 0x10, 0x0e, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73,
|
||||
0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x0f, 0x12, 0x16, 0x0a, 0x12,
|
||||
0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74,
|
||||
0x5f, 0x35, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73,
|
||||
0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f,
|
||||
0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x12,
|
||||
0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f,
|
||||
0x31, 0x10, 0x13, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61,
|
||||
0x73, 0x74, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75,
|
||||
0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x15, 0x12, 0x11, 0x0a, 0x0d,
|
||||
0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x16, 0x2a,
|
||||
0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12,
|
||||
0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x6e, 0x67, 0x6b, 0x6f, 0x6b,
|
||||
0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x65, 0x69, 0x6a,
|
||||
0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x63,
|
||||
0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61,
|
||||
0x70, 0x5f, 0x63, 0x68, 0x6f, 0x6e, 0x67, 0x71, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75,
|
||||
0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, 0x6e, 0x67,
|
||||
0x6b, 0x6f, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f,
|
||||
0x6a, 0x61, 0x6b, 0x61, 0x72, 0x74, 0x61, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f,
|
||||
0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, 0x61, 0x69, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x74,
|
||||
0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6e, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0f,
|
||||
0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, 0x6f, 0x75, 0x6c, 0x10, 0x0a, 0x12,
|
||||
0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61,
|
||||
0x69, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61,
|
||||
0x6e, 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x74,
|
||||
0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, 0x5f, 0x66, 0x73,
|
||||
0x69, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e,
|
||||
0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0e, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61,
|
||||
0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f,
|
||||
0x65, 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, 0x72, 0x74, 0x10, 0x10, 0x12, 0x10,
|
||||
0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, 0x73, 0x63, 0x6f, 0x77, 0x10, 0x11,
|
||||
0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x61, 0x73, 0x68, 0x62, 0x75, 0x72,
|
||||
0x6e, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x73, 0x69, 0x6c,
|
||||
0x69, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x10, 0x13, 0x12, 0x11, 0x0a, 0x0d,
|
||||
0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x74, 0x6f, 0x10, 0x14, 0x12,
|
||||
0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x73, 0x61, 0x5f, 0x73, 0x61, 0x6f, 0x70, 0x61, 0x75, 0x6c,
|
||||
0x6f, 0x10, 0x15, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, 0x52, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x77, 0x5f, 0x61, 0x6c, 0x6c,
|
||||
0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e, 0x6f, 0x72, 0x74,
|
||||
0x68, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e,
|
||||
0x6f, 0x72, 0x74, 0x68, 0x5f, 0x34, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63,
|
||||
0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x68,
|
||||
0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x10, 0x0a,
|
||||
0x0c, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x05, 0x12,
|
||||
0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x77, 0x65,
|
||||
0x73, 0x74, 0x5f, 0x32, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f,
|
||||
0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x07, 0x12, 0x15, 0x0a,
|
||||
0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74,
|
||||
0x5f, 0x32, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f,
|
||||
0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x68,
|
||||
0x77, 0x5f, 0x61, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x0a, 0x12, 0x11,
|
||||
0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x32, 0x10,
|
||||
0x0b, 0x2a, 0x1a, 0x0a, 0x0b, 0x4b, 0x38, 0x53, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64,
|
||||
0x12, 0x0b, 0x0a, 0x07, 0x6b, 0x38, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x2a, 0xcd, 0x03,
|
||||
0x0a, 0x0b, 0x41, 0x77, 0x73, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0b, 0x0a,
|
||||
0x07, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77,
|
||||
0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x01, 0x12, 0x11, 0x0a,
|
||||
0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x02,
|
||||
0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f,
|
||||
0x31, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65,
|
||||
0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x66,
|
||||
0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77,
|
||||
0x73, 0x5f, 0x61, 0x70, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x06, 0x12, 0x12, 0x0a,
|
||||
0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10,
|
||||
0x07, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74,
|
||||
0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73,
|
||||
0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10,
|
||||
0x09, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74,
|
||||
0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73,
|
||||
0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10,
|
||||
0x0b, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74,
|
||||
0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x77, 0x73,
|
||||
0x5f, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x0d, 0x12,
|
||||
0x14, 0x0a, 0x10, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x6c, 0x5f, 0x31, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f,
|
||||
0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f,
|
||||
0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x61,
|
||||
0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x11, 0x12,
|
||||
0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x33,
|
||||
0x10, 0x12, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x6e, 0x6f, 0x72,
|
||||
0x74, 0x68, 0x5f, 0x31, 0x10, 0x13, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x6d, 0x65,
|
||||
0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77,
|
||||
0x73, 0x5f, 0x73, 0x61, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x15, 0x32, 0x71, 0x0a,
|
||||
0x0d, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x60,
|
||||
0x92, 0x41, 0x5d, 0x12, 0x1e, 0xe6, 0x89, 0x80, 0xe6, 0x9c, 0x89, 0xe4, 0xba, 0x91, 0xe7, 0xa7,
|
||||
0x9f, 0xe6, 0x88, 0xb7, 0xe7, 0x9a, 0x84, 0xe8, 0xae, 0xa4, 0xe8, 0xaf, 0x81, 0xe6, 0x9c, 0x8d,
|
||||
0xe5, 0x8a, 0xa1, 0x1a, 0x3b, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20,
|
||||
0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x50, 0x43, 0x4d, 0x12, 0x20,
|
||||
0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2f, 0x4a, 0x43, 0x43, 0x45, 0x2d, 0x6e, 0x75, 0x64, 0x74, 0x2f, 0x50, 0x43, 0x4d,
|
||||
0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4a,
|
||||
0x43, 0x43, 0x45, 0x2d, 0x6e, 0x75, 0x64, 0x74, 0x2f, 0x50, 0x43, 0x4d, 0x2f, 0x6c, 0x61, 0x6e,
|
||||
0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x70, 0x62, 0x74, 0x65, 0x6e,
|
||||
0x61, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
var file_idl_tenant_proto_rawDesc = []byte{
|
||||
0x0a, 0x10, 0x69, 0x64, 0x6c, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 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, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
|
||||
0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75,
|
||||
0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x6e, 0x61,
|
||||
0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07,
|
||||
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x0b, 0x43, 0x6c, 0x6f, 0x75,
|
||||
0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x31, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69,
|
||||
0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x65, 0x6e, 0x61,
|
||||
0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
|
||||
0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b,
|
||||
0x0a, 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
||||
0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x49, 0x0a, 0x0d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x61, 0x6c, 0x69, 0x10, 0x00,
|
||||
0x12, 0x0b, 0x0a, 0x07, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a,
|
||||
0x06, 0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x6b, 0x38, 0x73,
|
||||
0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x68, 0x61, 0x72, 0x76, 0x65, 0x73, 0x74, 0x65, 0x72, 0x10,
|
||||
0x04, 0x2a, 0x77, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
|
||||
0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x6c,
|
||||
0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x65, 0x63,
|
||||
0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x72,
|
||||
0x64, 0x73, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f,
|
||||
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64,
|
||||
0x75, 0x63, 0x74, 0x5f, 0x6f, 0x73, 0x73, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x70, 0x72, 0x6f,
|
||||
0x64, 0x75, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x64, 0x10, 0x05, 0x2a, 0xf3, 0x03, 0x0a, 0x0b, 0x41,
|
||||
0x6c, 0x69, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x6c,
|
||||
0x69, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x63,
|
||||
0x6e, 0x5f, 0x71, 0x69, 0x6e, 0x67, 0x64, 0x61, 0x6f, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x61,
|
||||
0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x62, 0x65, 0x69, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12,
|
||||
0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x7a, 0x68, 0x61, 0x6e, 0x67, 0x6a,
|
||||
0x69, 0x61, 0x6b, 0x6f, 0x75, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x63,
|
||||
0x6e, 0x5f, 0x68, 0x75, 0x68, 0x65, 0x68, 0x61, 0x6f, 0x74, 0x65, 0x10, 0x04, 0x12, 0x15, 0x0a,
|
||||
0x11, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x77, 0x75, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x61,
|
||||
0x62, 0x75, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69,
|
||||
0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x10, 0x07, 0x12, 0x13,
|
||||
0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65,
|
||||
0x6e, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x65,
|
||||
0x79, 0x75, 0x61, 0x6e, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e,
|
||||
0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e,
|
||||
0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x0b,
|
||||
0x12, 0x13, 0x0a, 0x0f, 0x61, 0x6c, 0x69, 0x5f, 0x63, 0x6e, 0x5f, 0x68, 0x6f, 0x6e, 0x67, 0x6b,
|
||||
0x6f, 0x6e, 0x67, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f,
|
||||
0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0d, 0x12, 0x16, 0x0a,
|
||||
0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73,
|
||||
0x74, 0x5f, 0x32, 0x10, 0x0e, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f,
|
||||
0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x0f, 0x12, 0x16, 0x0a,
|
||||
0x12, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73,
|
||||
0x74, 0x5f, 0x35, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x5f, 0x61, 0x70, 0x5f,
|
||||
0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x6c, 0x69,
|
||||
0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10,
|
||||
0x12, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, 0x74,
|
||||
0x5f, 0x31, 0x10, 0x13, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x75, 0x73, 0x5f, 0x65,
|
||||
0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x65,
|
||||
0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x15, 0x12, 0x11, 0x0a,
|
||||
0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x16,
|
||||
0x2a, 0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00,
|
||||
0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x6e, 0x67, 0x6b, 0x6f,
|
||||
0x6b, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x65, 0x69,
|
||||
0x6a, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f,
|
||||
0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f,
|
||||
0x61, 0x70, 0x5f, 0x63, 0x68, 0x6f, 0x6e, 0x67, 0x71, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x13,
|
||||
0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f,
|
||||
0x75, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, 0x6e,
|
||||
0x67, 0x6b, 0x6f, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70,
|
||||
0x5f, 0x6a, 0x61, 0x6b, 0x61, 0x72, 0x74, 0x61, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63,
|
||||
0x5f, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, 0x61, 0x69, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d,
|
||||
0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6e, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12,
|
||||
0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, 0x6f, 0x75, 0x6c, 0x10, 0x0a,
|
||||
0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68,
|
||||
0x61, 0x69, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12,
|
||||
0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, 0x5f, 0x66,
|
||||
0x73, 0x69, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x69,
|
||||
0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0e, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f,
|
||||
0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63,
|
||||
0x5f, 0x65, 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, 0x72, 0x74, 0x10, 0x10, 0x12,
|
||||
0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, 0x73, 0x63, 0x6f, 0x77, 0x10,
|
||||
0x11, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x61, 0x73, 0x68, 0x62, 0x75,
|
||||
0x72, 0x6e, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x73, 0x69,
|
||||
0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x10, 0x13, 0x12, 0x11, 0x0a,
|
||||
0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x74, 0x6f, 0x10, 0x14,
|
||||
0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x73, 0x61, 0x5f, 0x73, 0x61, 0x6f, 0x70, 0x61, 0x75,
|
||||
0x6c, 0x6f, 0x10, 0x15, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, 0x52,
|
||||
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x77, 0x5f, 0x61, 0x6c,
|
||||
0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e, 0x6f, 0x72,
|
||||
0x74, 0x68, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f,
|
||||
0x6e, 0x6f, 0x72, 0x74, 0x68, 0x5f, 0x34, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f,
|
||||
0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c,
|
||||
0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x10,
|
||||
0x0a, 0x0c, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x05,
|
||||
0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x77,
|
||||
0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70,
|
||||
0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x07, 0x12, 0x15,
|
||||
0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73,
|
||||
0x74, 0x5f, 0x32, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x68, 0x77, 0x5f, 0x61, 0x70, 0x5f, 0x73,
|
||||
0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d,
|
||||
0x68, 0x77, 0x5f, 0x61, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x0a, 0x12,
|
||||
0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x32,
|
||||
0x10, 0x0b, 0x2a, 0x1a, 0x0a, 0x0b, 0x4b, 0x38, 0x53, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49,
|
||||
0x64, 0x12, 0x0b, 0x0a, 0x07, 0x6b, 0x38, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x2a, 0xcd,
|
||||
0x03, 0x0a, 0x0b, 0x41, 0x77, 0x73, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0b,
|
||||
0x0a, 0x07, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x61,
|
||||
0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x01, 0x12, 0x11,
|
||||
0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10,
|
||||
0x02, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x77, 0x65, 0x73, 0x74,
|
||||
0x5f, 0x31, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x75, 0x73, 0x5f, 0x77,
|
||||
0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61,
|
||||
0x66, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x61,
|
||||
0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x06, 0x12, 0x12,
|
||||
0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31,
|
||||
0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72,
|
||||
0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x33, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77,
|
||||
0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32,
|
||||
0x10, 0x09, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x6f, 0x72,
|
||||
0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77,
|
||||
0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x32,
|
||||
0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x6f, 0x75,
|
||||
0x74, 0x68, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x77,
|
||||
0x73, 0x5f, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x0d,
|
||||
0x12, 0x14, 0x0a, 0x10, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72,
|
||||
0x61, 0x6c, 0x5f, 0x31, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75,
|
||||
0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73,
|
||||
0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x32, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e,
|
||||
0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x11,
|
||||
0x12, 0x11, 0x0a, 0x0d, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f,
|
||||
0x33, 0x10, 0x12, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x75, 0x5f, 0x6e, 0x6f,
|
||||
0x72, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x13, 0x12, 0x12, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x6d,
|
||||
0x65, 0x5f, 0x73, 0x6f, 0x75, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x11, 0x0a, 0x0d, 0x61,
|
||||
0x77, 0x73, 0x5f, 0x73, 0x61, 0x5f, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x15, 0x32, 0x79,
|
||||
0x0a, 0x0d, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a,
|
||||
0x68, 0x92, 0x41, 0x65, 0x12, 0x1e, 0xe6, 0x89, 0x80, 0xe6, 0x9c, 0x89, 0xe4, 0xba, 0x91, 0xe7,
|
||||
0xa7, 0x9f, 0xe6, 0x88, 0xb7, 0xe7, 0x9a, 0x84, 0xe8, 0xae, 0xa4, 0xe8, 0xaf, 0x81, 0xe6, 0x9c,
|
||||
0x8d, 0xe5, 0x8a, 0xa1, 0x1a, 0x43, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74,
|
||||
0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x50, 0x43, 0x4d, 0x12,
|
||||
0x28, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x67, 0x69,
|
||||
0x74, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6e, 0x2f, 0x4a, 0x43, 0x43,
|
||||
0x45, 0x2f, 0x50, 0x43, 0x4d, 0x2e, 0x67, 0x69, 0x74, 0x42, 0x1d, 0x5a, 0x1b, 0x50, 0x43, 0x4d,
|
||||
0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2f, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x3b,
|
||||
0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_idl_pbtenant_tenant_proto_rawDescOnce sync.Once
|
||||
file_idl_pbtenant_tenant_proto_rawDescData = file_idl_pbtenant_tenant_proto_rawDesc
|
||||
file_idl_tenant_proto_rawDescOnce sync.Once
|
||||
file_idl_tenant_proto_rawDescData = file_idl_tenant_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_idl_pbtenant_tenant_proto_rawDescGZIP() []byte {
|
||||
file_idl_pbtenant_tenant_proto_rawDescOnce.Do(func() {
|
||||
file_idl_pbtenant_tenant_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_pbtenant_tenant_proto_rawDescData)
|
||||
func file_idl_tenant_proto_rawDescGZIP() []byte {
|
||||
file_idl_tenant_proto_rawDescOnce.Do(func() {
|
||||
file_idl_tenant_proto_rawDescData = protoimpl.X.CompressGZIP(file_idl_tenant_proto_rawDescData)
|
||||
})
|
||||
return file_idl_pbtenant_tenant_proto_rawDescData
|
||||
return file_idl_tenant_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_idl_pbtenant_tenant_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
|
||||
var file_idl_pbtenant_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_idl_pbtenant_tenant_proto_goTypes = []interface{}{
|
||||
(CloudProvider)(0), // 0: pbtenant.CloudProvider
|
||||
(CloudProduct)(0), // 1: pbtenant.CloudProduct
|
||||
(AliRegionId)(0), // 2: pbtenant.AliRegionId
|
||||
(TencentRegionId)(0), // 3: pbtenant.TencentRegionId
|
||||
(HuaweiRegionId)(0), // 4: pbtenant.HuaweiRegionId
|
||||
(K8SRegionId)(0), // 5: pbtenant.K8SRegionId
|
||||
(AwsRegionId)(0), // 6: pbtenant.AwsRegionId
|
||||
(*CloudConfigs)(nil), // 7: pbtenant.CloudConfigs
|
||||
(*CloudConfig)(nil), // 8: pbtenant.CloudConfig
|
||||
(*Region)(nil), // 9: pbtenant.Region
|
||||
var file_idl_tenant_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
|
||||
var file_idl_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_idl_tenant_proto_goTypes = []interface{}{
|
||||
(CloudProvider)(0), // 0: tenant.CloudProvider
|
||||
(CloudProduct)(0), // 1: tenant.CloudProduct
|
||||
(AliRegionId)(0), // 2: tenant.AliRegionId
|
||||
(TencentRegionId)(0), // 3: tenant.TencentRegionId
|
||||
(HuaweiRegionId)(0), // 4: tenant.HuaweiRegionId
|
||||
(K8SRegionId)(0), // 5: tenant.K8SRegionId
|
||||
(AwsRegionId)(0), // 6: tenant.AwsRegionId
|
||||
(*CloudConfigs)(nil), // 7: tenant.CloudConfigs
|
||||
(*CloudConfig)(nil), // 8: tenant.CloudConfig
|
||||
(*Region)(nil), // 9: tenant.Region
|
||||
}
|
||||
var file_idl_pbtenant_tenant_proto_depIdxs = []int32{
|
||||
8, // 0: pbtenant.CloudConfigs.configs:type_name -> pbtenant.CloudConfig
|
||||
0, // 1: pbtenant.CloudConfig.provider:type_name -> pbtenant.CloudProvider
|
||||
var file_idl_tenant_proto_depIdxs = []int32{
|
||||
8, // 0: tenant.CloudConfigs.configs:type_name -> tenant.CloudConfig
|
||||
0, // 1: tenant.CloudConfig.provider:type_name -> tenant.CloudProvider
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
|
@ -989,13 +987,13 @@ var file_idl_pbtenant_tenant_proto_depIdxs = []int32{
|
|||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_idl_pbtenant_tenant_proto_init() }
|
||||
func file_idl_pbtenant_tenant_proto_init() {
|
||||
if File_idl_pbtenant_tenant_proto != nil {
|
||||
func init() { file_idl_tenant_proto_init() }
|
||||
func file_idl_tenant_proto_init() {
|
||||
if File_idl_tenant_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_idl_pbtenant_tenant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_idl_tenant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CloudConfigs); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1007,7 +1005,7 @@ func file_idl_pbtenant_tenant_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_idl_pbtenant_tenant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_idl_tenant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CloudConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1019,7 +1017,7 @@ func file_idl_pbtenant_tenant_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_idl_pbtenant_tenant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_idl_tenant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Region); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1036,19 +1034,19 @@ func file_idl_pbtenant_tenant_proto_init() {
|
|||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_idl_pbtenant_tenant_proto_rawDesc,
|
||||
RawDescriptor: file_idl_tenant_proto_rawDesc,
|
||||
NumEnums: 7,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_idl_pbtenant_tenant_proto_goTypes,
|
||||
DependencyIndexes: file_idl_pbtenant_tenant_proto_depIdxs,
|
||||
EnumInfos: file_idl_pbtenant_tenant_proto_enumTypes,
|
||||
MessageInfos: file_idl_pbtenant_tenant_proto_msgTypes,
|
||||
GoTypes: file_idl_tenant_proto_goTypes,
|
||||
DependencyIndexes: file_idl_tenant_proto_depIdxs,
|
||||
EnumInfos: file_idl_tenant_proto_enumTypes,
|
||||
MessageInfos: file_idl_tenant_proto_msgTypes,
|
||||
}.Build()
|
||||
File_idl_pbtenant_tenant_proto = out.File
|
||||
file_idl_pbtenant_tenant_proto_rawDesc = nil
|
||||
file_idl_pbtenant_tenant_proto_goTypes = nil
|
||||
file_idl_pbtenant_tenant_proto_depIdxs = nil
|
||||
File_idl_tenant_proto = out.File
|
||||
file_idl_tenant_proto_rawDesc = nil
|
||||
file_idl_tenant_proto_goTypes = nil
|
||||
file_idl_tenant_proto_depIdxs = nil
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue