Compare commits
2 Commits
5b14a11978
...
98937e97a0
Author | SHA1 | Date | |
---|---|---|---|
98937e97a0 | |||
958417cfd0 |
45
cmd/compute_api/api/domain.go
Normal file
45
cmd/compute_api/api/domain.go
Normal file
@ -0,0 +1,45 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"deevirt.fr/compute/cmd/compute_api/proto"
|
||||
"deevirt.fr/compute/pkg/config"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
)
|
||||
|
||||
type Domain struct {
|
||||
Config *config.Config
|
||||
Etcd *clientv3.Client
|
||||
proto.UnimplementedDomainServer
|
||||
}
|
||||
|
||||
func (d *Domain) ListAll(ctx context.Context, in *proto.DomainListAllRequest) (*proto.DomainListAllResponse, error) {
|
||||
var domains = []*proto.DomainListResponse{}
|
||||
|
||||
ctx_etcd, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
resp, _ := d.Etcd.Get(ctx_etcd, "/cluster/"+d.Config.ClusterID+"/domain", clientv3.WithPrefix())
|
||||
cancel()
|
||||
|
||||
re := regexp.MustCompile(`domain/(?P<domainID>[a-zA-Z1-9-]+)$`)
|
||||
|
||||
for _, data := range resp.Kvs {
|
||||
key := string(data.Key[:])
|
||||
|
||||
if re.MatchString(key) {
|
||||
matches := re.FindStringSubmatch(key)
|
||||
index := re.SubexpIndex("domainID")
|
||||
|
||||
domains = append(domains, &proto.DomainListResponse{
|
||||
DomainID: matches[index],
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return &proto.DomainListAllResponse{
|
||||
All: domains,
|
||||
}, nil
|
||||
}
|
44
cmd/compute_api/api/server.go
Normal file
44
cmd/compute_api/api/server.go
Normal file
@ -0,0 +1,44 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"deevirt.fr/compute/cmd/compute_api/proto"
|
||||
"deevirt.fr/compute/pkg/config"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/reflection"
|
||||
)
|
||||
|
||||
func Server() {
|
||||
config, _ := config.NewConfig()
|
||||
|
||||
//listen on the port
|
||||
lis, err := net.Listen("tcp", ":8080")
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to start server %v", err)
|
||||
}
|
||||
|
||||
etcd, err := clientv3.New(clientv3.Config{
|
||||
Endpoints: strings.Split(config.EtcdURI, ","),
|
||||
DialTimeout: 5 * time.Second,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalf("Error connexion to etcd: %v", err)
|
||||
}
|
||||
defer etcd.Close()
|
||||
|
||||
grpcServer := grpc.NewServer()
|
||||
proto.RegisterDomainServer(grpcServer, &Domain{
|
||||
Config: config,
|
||||
Etcd: etcd,
|
||||
})
|
||||
reflection.Register(grpcServer)
|
||||
log.Printf("Server started at %v", lis.Addr())
|
||||
if err := grpcServer.Serve(lis); err != nil {
|
||||
log.Fatalf("Failed to start: %v", err)
|
||||
}
|
||||
}
|
13
cmd/compute_api/main.go
Normal file
13
cmd/compute_api/main.go
Normal file
@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
/*
|
||||
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.pro
|
||||
*/
|
||||
|
||||
import (
|
||||
"deevirt.fr/compute/cmd/compute_api/api"
|
||||
)
|
||||
|
||||
func main() {
|
||||
api.Server()
|
||||
}
|
989
cmd/compute_api/proto/domain.pb.go
Normal file
989
cmd/compute_api/proto/domain.pb.go
Normal file
@ -0,0 +1,989 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.14.0
|
||||
// source: proto/domain.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
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 DomainPower int32
|
||||
|
||||
const (
|
||||
DomainPower_UNDEFINED DomainPower = 0
|
||||
DomainPower_START DomainPower = 1
|
||||
DomainPower_REBOOT DomainPower = 2
|
||||
DomainPower_SHUTDOWN DomainPower = 3
|
||||
DomainPower_PAUSE DomainPower = 4
|
||||
DomainPower_RESUME DomainPower = 5
|
||||
DomainPower_RESET DomainPower = 6
|
||||
DomainPower_DESTROY DomainPower = 7
|
||||
)
|
||||
|
||||
// Enum value maps for DomainPower.
|
||||
var (
|
||||
DomainPower_name = map[int32]string{
|
||||
0: "UNDEFINED",
|
||||
1: "START",
|
||||
2: "REBOOT",
|
||||
3: "SHUTDOWN",
|
||||
4: "PAUSE",
|
||||
5: "RESUME",
|
||||
6: "RESET",
|
||||
7: "DESTROY",
|
||||
}
|
||||
DomainPower_value = map[string]int32{
|
||||
"UNDEFINED": 0,
|
||||
"START": 1,
|
||||
"REBOOT": 2,
|
||||
"SHUTDOWN": 3,
|
||||
"PAUSE": 4,
|
||||
"RESUME": 5,
|
||||
"RESET": 6,
|
||||
"DESTROY": 7,
|
||||
}
|
||||
)
|
||||
|
||||
func (x DomainPower) Enum() *DomainPower {
|
||||
p := new(DomainPower)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x DomainPower) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (DomainPower) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_proto_domain_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (DomainPower) Type() protoreflect.EnumType {
|
||||
return &file_proto_domain_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x DomainPower) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainPower.Descriptor instead.
|
||||
func (DomainPower) EnumDescriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type DomainListAllRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DomainListAllRequest) Reset() {
|
||||
*x = DomainListAllRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainListAllRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainListAllRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DomainListAllRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_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 DomainListAllRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DomainListAllRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type DomainListAllResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
All []*DomainListResponse `protobuf:"bytes,1,rep,name=all,proto3" json:"all,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainListAllResponse) Reset() {
|
||||
*x = DomainListAllResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainListAllResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainListAllResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DomainListAllResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_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 DomainListAllResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DomainListAllResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DomainListAllResponse) GetAll() []*DomainListResponse {
|
||||
if x != nil {
|
||||
return x.All
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DomainListResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
DomainID string `protobuf:"bytes,1,opt,name=domainID,json=domain_id,proto3" json:"domainID,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainListResponse) Reset() {
|
||||
*x = DomainListResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainListResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainListResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DomainListResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainListResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DomainListResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *DomainListResponse) GetDomainID() string {
|
||||
if x != nil {
|
||||
return x.DomainID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DomainCreateRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainCreateRequest) Reset() {
|
||||
*x = DomainCreateRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainCreateRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainCreateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DomainCreateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainCreateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DomainCreateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DomainCreateRequest) GetConfig() []byte {
|
||||
if x != nil {
|
||||
return x.Config
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DomainCreateResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Progress int64 `protobuf:"varint,1,opt,name=progress,proto3" json:"progress,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainCreateResponse) Reset() {
|
||||
*x = DomainCreateResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainCreateResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainCreateResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DomainCreateResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainCreateResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DomainCreateResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *DomainCreateResponse) GetProgress() int64 {
|
||||
if x != nil {
|
||||
return x.Progress
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DomainUpdateRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainUpdateRequest) Reset() {
|
||||
*x = DomainUpdateRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainUpdateRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainUpdateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DomainUpdateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainUpdateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DomainUpdateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *DomainUpdateRequest) GetVmId() string {
|
||||
if x != nil {
|
||||
return x.VmId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DomainUpdateResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DomainUpdateResponse) Reset() {
|
||||
*x = DomainUpdateResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainUpdateResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainUpdateResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DomainUpdateResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainUpdateResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DomainUpdateResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
type DomainDeleteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainDeleteRequest) Reset() {
|
||||
*x = DomainDeleteRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainDeleteRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainDeleteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DomainDeleteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainDeleteRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DomainDeleteRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *DomainDeleteRequest) GetVmId() string {
|
||||
if x != nil {
|
||||
return x.VmId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DomainDeleteResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DomainDeleteResponse) Reset() {
|
||||
*x = DomainDeleteResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainDeleteResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainDeleteResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DomainDeleteResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainDeleteResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DomainDeleteResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type DomainPowerRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
VmId []byte `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"`
|
||||
Action DomainPower `protobuf:"varint,2,opt,name=action,proto3,enum=domain.DomainPower" json:"action,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainPowerRequest) Reset() {
|
||||
*x = DomainPowerRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainPowerRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainPowerRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DomainPowerRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainPowerRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DomainPowerRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *DomainPowerRequest) GetVmId() []byte {
|
||||
if x != nil {
|
||||
return x.VmId
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DomainPowerRequest) GetAction() DomainPower {
|
||||
if x != nil {
|
||||
return x.Action
|
||||
}
|
||||
return DomainPower_UNDEFINED
|
||||
}
|
||||
|
||||
type DomainPowerResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DomainPowerResponse) Reset() {
|
||||
*x = DomainPowerResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainPowerResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainPowerResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DomainPowerResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainPowerResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DomainPowerResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
type DomainDevicesGraphicsConsoleRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
VmId []byte `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainDevicesGraphicsConsoleRequest) Reset() {
|
||||
*x = DomainDevicesGraphicsConsoleRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainDevicesGraphicsConsoleRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainDevicesGraphicsConsoleRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DomainDevicesGraphicsConsoleRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainDevicesGraphicsConsoleRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DomainDevicesGraphicsConsoleRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *DomainDevicesGraphicsConsoleRequest) GetVmId() []byte {
|
||||
if x != nil {
|
||||
return x.VmId
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DomainDevicesGraphicsConsoleResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainDevicesGraphicsConsoleResponse) Reset() {
|
||||
*x = DomainDevicesGraphicsConsoleResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_domain_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DomainDevicesGraphicsConsoleResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DomainDevicesGraphicsConsoleResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DomainDevicesGraphicsConsoleResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_domain_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DomainDevicesGraphicsConsoleResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DomainDevicesGraphicsConsoleResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_domain_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *DomainDevicesGraphicsConsoleResponse) GetUri() string {
|
||||
if x != nil {
|
||||
return x.Uri
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_proto_domain_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_domain_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x16, 0x0a, 0x14,
|
||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x15, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a,
|
||||
0x03, 0x61, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x6f, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x31, 0x0a, 0x12, 0x44,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x1b, 0x0a, 0x08, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x2d,
|
||||
0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x32, 0x0a,
|
||||
0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73,
|
||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73,
|
||||
0x73, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64, 0x22, 0x16, 0x0a,
|
||||
0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05,
|
||||
0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d, 0x49,
|
||||
0x64, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x0a, 0x12, 0x44, 0x6f, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04,
|
||||
0x76, 0x6d, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x23, 0x44, 0x6f, 0x6d, 0x61,
|
||||
0x69, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
||||
0x73, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04,
|
||||
0x76, 0x6d, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x24, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65,
|
||||
0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e,
|
||||
0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x2a, 0x70,
|
||||
0x0a, 0x0b, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x0d, 0x0a,
|
||||
0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
|
||||
0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x42, 0x4f, 0x4f,
|
||||
0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x55, 0x54, 0x44, 0x4f, 0x57, 0x4e, 0x10,
|
||||
0x03, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x41, 0x55, 0x53, 0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x52, 0x45, 0x53, 0x55, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x53, 0x45,
|
||||
0x54, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x10, 0x07,
|
||||
0x32, 0xed, 0x02, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x1c, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e,
|
||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12,
|
||||
0x1b, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x45,
|
||||
0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
|
||||
0x1b, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x05,
|
||||
0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x32, 0x7f, 0x0a, 0x15, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x12, 0x66, 0x0a, 0x07, 0x43, 0x6f, 0x6e,
|
||||
0x73, 0x6f, 0x6c, 0x65, 0x12, 0x2b, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68,
|
||||
0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73,
|
||||
0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_proto_domain_proto_rawDescOnce sync.Once
|
||||
file_proto_domain_proto_rawDescData = file_proto_domain_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_proto_domain_proto_rawDescGZIP() []byte {
|
||||
file_proto_domain_proto_rawDescOnce.Do(func() {
|
||||
file_proto_domain_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_domain_proto_rawDescData)
|
||||
})
|
||||
return file_proto_domain_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_proto_domain_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_proto_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_proto_domain_proto_goTypes = []interface{}{
|
||||
(DomainPower)(0), // 0: domain.DomainPower
|
||||
(*DomainListAllRequest)(nil), // 1: domain.DomainListAllRequest
|
||||
(*DomainListAllResponse)(nil), // 2: domain.DomainListAllResponse
|
||||
(*DomainListResponse)(nil), // 3: domain.DomainListResponse
|
||||
(*DomainCreateRequest)(nil), // 4: domain.DomainCreateRequest
|
||||
(*DomainCreateResponse)(nil), // 5: domain.DomainCreateResponse
|
||||
(*DomainUpdateRequest)(nil), // 6: domain.DomainUpdateRequest
|
||||
(*DomainUpdateResponse)(nil), // 7: domain.DomainUpdateResponse
|
||||
(*DomainDeleteRequest)(nil), // 8: domain.DomainDeleteRequest
|
||||
(*DomainDeleteResponse)(nil), // 9: domain.DomainDeleteResponse
|
||||
(*DomainPowerRequest)(nil), // 10: domain.DomainPowerRequest
|
||||
(*DomainPowerResponse)(nil), // 11: domain.DomainPowerResponse
|
||||
(*DomainDevicesGraphicsConsoleRequest)(nil), // 12: domain.DomainDevicesGraphicsConsoleRequest
|
||||
(*DomainDevicesGraphicsConsoleResponse)(nil), // 13: domain.DomainDevicesGraphicsConsoleResponse
|
||||
}
|
||||
var file_proto_domain_proto_depIdxs = []int32{
|
||||
3, // 0: domain.DomainListAllResponse.all:type_name -> domain.DomainListResponse
|
||||
0, // 1: domain.DomainPowerRequest.action:type_name -> domain.DomainPower
|
||||
1, // 2: domain.Domain.ListAll:input_type -> domain.DomainListAllRequest
|
||||
4, // 3: domain.Domain.Create:input_type -> domain.DomainCreateRequest
|
||||
6, // 4: domain.Domain.Update:input_type -> domain.DomainUpdateRequest
|
||||
8, // 5: domain.Domain.Delete:input_type -> domain.DomainDeleteRequest
|
||||
10, // 6: domain.Domain.Power:input_type -> domain.DomainPowerRequest
|
||||
12, // 7: domain.DomainDevicesGraphics.Console:input_type -> domain.DomainDevicesGraphicsConsoleRequest
|
||||
2, // 8: domain.Domain.ListAll:output_type -> domain.DomainListAllResponse
|
||||
5, // 9: domain.Domain.Create:output_type -> domain.DomainCreateResponse
|
||||
7, // 10: domain.Domain.Update:output_type -> domain.DomainUpdateResponse
|
||||
9, // 11: domain.Domain.Delete:output_type -> domain.DomainDeleteResponse
|
||||
11, // 12: domain.Domain.Power:output_type -> domain.DomainPowerResponse
|
||||
13, // 13: domain.DomainDevicesGraphics.Console:output_type -> domain.DomainDevicesGraphicsConsoleResponse
|
||||
8, // [8:14] is the sub-list for method output_type
|
||||
2, // [2:8] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_domain_proto_init() }
|
||||
func file_proto_domain_proto_init() {
|
||||
if File_proto_domain_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_proto_domain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainListAllRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainListAllResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainListResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainCreateRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainCreateResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainUpdateRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainUpdateResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainDeleteRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainDeleteResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainPowerRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainPowerResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainDevicesGraphicsConsoleRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_domain_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DomainDevicesGraphicsConsoleResponse); 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_proto_domain_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 13,
|
||||
NumExtensions: 0,
|
||||
NumServices: 2,
|
||||
},
|
||||
GoTypes: file_proto_domain_proto_goTypes,
|
||||
DependencyIndexes: file_proto_domain_proto_depIdxs,
|
||||
EnumInfos: file_proto_domain_proto_enumTypes,
|
||||
MessageInfos: file_proto_domain_proto_msgTypes,
|
||||
}.Build()
|
||||
File_proto_domain_proto = out.File
|
||||
file_proto_domain_proto_rawDesc = nil
|
||||
file_proto_domain_proto_goTypes = nil
|
||||
file_proto_domain_proto_depIdxs = nil
|
||||
}
|
80
cmd/compute_api/proto/domain.proto
Normal file
80
cmd/compute_api/proto/domain.proto
Normal file
@ -0,0 +1,80 @@
|
||||
syntax="proto3";
|
||||
|
||||
option go_package = "./proto";
|
||||
package domain;
|
||||
|
||||
// The greeting service definition.
|
||||
service Domain {
|
||||
rpc ListAll (DomainListAllRequest) returns (DomainListAllResponse) {}
|
||||
rpc Create (DomainCreateRequest) returns (stream DomainCreateResponse) {}
|
||||
rpc Update (DomainUpdateRequest) returns (DomainUpdateResponse) {}
|
||||
rpc Delete (DomainDeleteRequest) returns (DomainDeleteResponse) {}
|
||||
|
||||
rpc Power (DomainPowerRequest) returns (DomainPowerResponse) {}
|
||||
|
||||
}
|
||||
|
||||
message DomainListAllRequest {}
|
||||
|
||||
message DomainListAllResponse {
|
||||
repeated DomainListResponse all = 1;
|
||||
}
|
||||
|
||||
message DomainListResponse {
|
||||
string domainID = 1 [json_name="domain_id"];
|
||||
}
|
||||
|
||||
service DomainDevicesGraphics {
|
||||
rpc Console (DomainDevicesGraphicsConsoleRequest) returns (DomainDevicesGraphicsConsoleResponse) {}
|
||||
}
|
||||
|
||||
message DomainCreateRequest {
|
||||
bytes config = 2;
|
||||
}
|
||||
|
||||
message DomainCreateResponse {
|
||||
int64 progress = 1;
|
||||
}
|
||||
|
||||
message DomainUpdateRequest {
|
||||
string vm_id = 1;
|
||||
}
|
||||
|
||||
message DomainUpdateResponse {
|
||||
}
|
||||
|
||||
message DomainDeleteRequest {
|
||||
string vm_id = 1;
|
||||
}
|
||||
|
||||
message DomainDeleteResponse {
|
||||
}
|
||||
|
||||
enum DomainPower {
|
||||
UNDEFINED = 0;
|
||||
START = 1;
|
||||
REBOOT = 2;
|
||||
SHUTDOWN = 3;
|
||||
PAUSE = 4;
|
||||
RESUME = 5;
|
||||
RESET = 6;
|
||||
DESTROY = 7;
|
||||
}
|
||||
|
||||
message DomainPowerRequest {
|
||||
bytes vm_id = 1;
|
||||
DomainPower action = 2;
|
||||
}
|
||||
|
||||
message DomainPowerResponse {
|
||||
}
|
||||
|
||||
message DomainDevicesGraphicsConsoleRequest {
|
||||
bytes vm_id = 1;
|
||||
}
|
||||
|
||||
message DomainDevicesGraphicsConsoleResponse {
|
||||
string uri = 1;
|
||||
}
|
||||
|
||||
|
383
cmd/compute_api/proto/domain_grpc.pb.go
Normal file
383
cmd/compute_api/proto/domain_grpc.pb.go
Normal file
@ -0,0 +1,383 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.14.0
|
||||
// source: proto/domain.proto
|
||||
|
||||
package proto
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Domain_ListAll_FullMethodName = "/domain.Domain/ListAll"
|
||||
Domain_Create_FullMethodName = "/domain.Domain/Create"
|
||||
Domain_Update_FullMethodName = "/domain.Domain/Update"
|
||||
Domain_Delete_FullMethodName = "/domain.Domain/Delete"
|
||||
Domain_Power_FullMethodName = "/domain.Domain/Power"
|
||||
)
|
||||
|
||||
// DomainClient is the client API for Domain 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.
|
||||
//
|
||||
// The greeting service definition.
|
||||
type DomainClient interface {
|
||||
ListAll(ctx context.Context, in *DomainListAllRequest, opts ...grpc.CallOption) (*DomainListAllResponse, error)
|
||||
Create(ctx context.Context, in *DomainCreateRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DomainCreateResponse], error)
|
||||
Update(ctx context.Context, in *DomainUpdateRequest, opts ...grpc.CallOption) (*DomainUpdateResponse, error)
|
||||
Delete(ctx context.Context, in *DomainDeleteRequest, opts ...grpc.CallOption) (*DomainDeleteResponse, error)
|
||||
Power(ctx context.Context, in *DomainPowerRequest, opts ...grpc.CallOption) (*DomainPowerResponse, error)
|
||||
}
|
||||
|
||||
type domainClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDomainClient(cc grpc.ClientConnInterface) DomainClient {
|
||||
return &domainClient{cc}
|
||||
}
|
||||
|
||||
func (c *domainClient) ListAll(ctx context.Context, in *DomainListAllRequest, opts ...grpc.CallOption) (*DomainListAllResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DomainListAllResponse)
|
||||
err := c.cc.Invoke(ctx, Domain_ListAll_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *domainClient) Create(ctx context.Context, in *DomainCreateRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DomainCreateResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &Domain_ServiceDesc.Streams[0], Domain_Create_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[DomainCreateRequest, DomainCreateResponse]{ClientStream: stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Domain_CreateClient = grpc.ServerStreamingClient[DomainCreateResponse]
|
||||
|
||||
func (c *domainClient) Update(ctx context.Context, in *DomainUpdateRequest, opts ...grpc.CallOption) (*DomainUpdateResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DomainUpdateResponse)
|
||||
err := c.cc.Invoke(ctx, Domain_Update_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *domainClient) Delete(ctx context.Context, in *DomainDeleteRequest, opts ...grpc.CallOption) (*DomainDeleteResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DomainDeleteResponse)
|
||||
err := c.cc.Invoke(ctx, Domain_Delete_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *domainClient) Power(ctx context.Context, in *DomainPowerRequest, opts ...grpc.CallOption) (*DomainPowerResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DomainPowerResponse)
|
||||
err := c.cc.Invoke(ctx, Domain_Power_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DomainServer is the server API for Domain service.
|
||||
// All implementations must embed UnimplementedDomainServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// The greeting service definition.
|
||||
type DomainServer interface {
|
||||
ListAll(context.Context, *DomainListAllRequest) (*DomainListAllResponse, error)
|
||||
Create(*DomainCreateRequest, grpc.ServerStreamingServer[DomainCreateResponse]) error
|
||||
Update(context.Context, *DomainUpdateRequest) (*DomainUpdateResponse, error)
|
||||
Delete(context.Context, *DomainDeleteRequest) (*DomainDeleteResponse, error)
|
||||
Power(context.Context, *DomainPowerRequest) (*DomainPowerResponse, error)
|
||||
mustEmbedUnimplementedDomainServer()
|
||||
}
|
||||
|
||||
// UnimplementedDomainServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedDomainServer struct{}
|
||||
|
||||
func (UnimplementedDomainServer) ListAll(context.Context, *DomainListAllRequest) (*DomainListAllResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListAll not implemented")
|
||||
}
|
||||
func (UnimplementedDomainServer) Create(*DomainCreateRequest, grpc.ServerStreamingServer[DomainCreateResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedDomainServer) Update(context.Context, *DomainUpdateRequest) (*DomainUpdateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
|
||||
}
|
||||
func (UnimplementedDomainServer) Delete(context.Context, *DomainDeleteRequest) (*DomainDeleteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedDomainServer) Power(context.Context, *DomainPowerRequest) (*DomainPowerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Power not implemented")
|
||||
}
|
||||
func (UnimplementedDomainServer) mustEmbedUnimplementedDomainServer() {}
|
||||
func (UnimplementedDomainServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeDomainServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DomainServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDomainServer interface {
|
||||
mustEmbedUnimplementedDomainServer()
|
||||
}
|
||||
|
||||
func RegisterDomainServer(s grpc.ServiceRegistrar, srv DomainServer) {
|
||||
// If the following call pancis, it indicates UnimplementedDomainServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Domain_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Domain_ListAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DomainListAllRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DomainServer).ListAll(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Domain_ListAll_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainServer).ListAll(ctx, req.(*DomainListAllRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Domain_Create_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(DomainCreateRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(DomainServer).Create(m, &grpc.GenericServerStream[DomainCreateRequest, DomainCreateResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type Domain_CreateServer = grpc.ServerStreamingServer[DomainCreateResponse]
|
||||
|
||||
func _Domain_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DomainUpdateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DomainServer).Update(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Domain_Update_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainServer).Update(ctx, req.(*DomainUpdateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Domain_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DomainDeleteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DomainServer).Delete(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Domain_Delete_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainServer).Delete(ctx, req.(*DomainDeleteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Domain_Power_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DomainPowerRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DomainServer).Power(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Domain_Power_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainServer).Power(ctx, req.(*DomainPowerRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Domain_ServiceDesc is the grpc.ServiceDesc for Domain service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Domain_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "domain.Domain",
|
||||
HandlerType: (*DomainServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListAll",
|
||||
Handler: _Domain_ListAll_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Update",
|
||||
Handler: _Domain_Update_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _Domain_Delete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Power",
|
||||
Handler: _Domain_Power_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Create",
|
||||
Handler: _Domain_Create_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "proto/domain.proto",
|
||||
}
|
||||
|
||||
const (
|
||||
DomainDevicesGraphics_Console_FullMethodName = "/domain.DomainDevicesGraphics/Console"
|
||||
)
|
||||
|
||||
// DomainDevicesGraphicsClient is the client API for DomainDevicesGraphics 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 DomainDevicesGraphicsClient interface {
|
||||
Console(ctx context.Context, in *DomainDevicesGraphicsConsoleRequest, opts ...grpc.CallOption) (*DomainDevicesGraphicsConsoleResponse, error)
|
||||
}
|
||||
|
||||
type domainDevicesGraphicsClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDomainDevicesGraphicsClient(cc grpc.ClientConnInterface) DomainDevicesGraphicsClient {
|
||||
return &domainDevicesGraphicsClient{cc}
|
||||
}
|
||||
|
||||
func (c *domainDevicesGraphicsClient) Console(ctx context.Context, in *DomainDevicesGraphicsConsoleRequest, opts ...grpc.CallOption) (*DomainDevicesGraphicsConsoleResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DomainDevicesGraphicsConsoleResponse)
|
||||
err := c.cc.Invoke(ctx, DomainDevicesGraphics_Console_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DomainDevicesGraphicsServer is the server API for DomainDevicesGraphics service.
|
||||
// All implementations must embed UnimplementedDomainDevicesGraphicsServer
|
||||
// for forward compatibility.
|
||||
type DomainDevicesGraphicsServer interface {
|
||||
Console(context.Context, *DomainDevicesGraphicsConsoleRequest) (*DomainDevicesGraphicsConsoleResponse, error)
|
||||
mustEmbedUnimplementedDomainDevicesGraphicsServer()
|
||||
}
|
||||
|
||||
// UnimplementedDomainDevicesGraphicsServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedDomainDevicesGraphicsServer struct{}
|
||||
|
||||
func (UnimplementedDomainDevicesGraphicsServer) Console(context.Context, *DomainDevicesGraphicsConsoleRequest) (*DomainDevicesGraphicsConsoleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Console not implemented")
|
||||
}
|
||||
func (UnimplementedDomainDevicesGraphicsServer) mustEmbedUnimplementedDomainDevicesGraphicsServer() {}
|
||||
func (UnimplementedDomainDevicesGraphicsServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeDomainDevicesGraphicsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DomainDevicesGraphicsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDomainDevicesGraphicsServer interface {
|
||||
mustEmbedUnimplementedDomainDevicesGraphicsServer()
|
||||
}
|
||||
|
||||
func RegisterDomainDevicesGraphicsServer(s grpc.ServiceRegistrar, srv DomainDevicesGraphicsServer) {
|
||||
// If the following call pancis, it indicates UnimplementedDomainDevicesGraphicsServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&DomainDevicesGraphics_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _DomainDevicesGraphics_Console_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DomainDevicesGraphicsConsoleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DomainDevicesGraphicsServer).Console(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DomainDevicesGraphics_Console_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DomainDevicesGraphicsServer).Console(ctx, req.(*DomainDevicesGraphicsConsoleRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// DomainDevicesGraphics_ServiceDesc is the grpc.ServiceDesc for DomainDevicesGraphics service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var DomainDevicesGraphics_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "domain.DomainDevicesGraphics",
|
||||
HandlerType: (*DomainDevicesGraphicsServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Console",
|
||||
Handler: _DomainDevicesGraphics_Console_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/domain.proto",
|
||||
}
|
62
cmd/compute_api/proto/network.pb.go
Normal file
62
cmd/compute_api/proto/network.pb.go
Normal file
@ -0,0 +1,62 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.14.0
|
||||
// source: proto/network.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
var File_proto_network_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_network_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x09,
|
||||
0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var file_proto_network_proto_goTypes = []interface{}{}
|
||||
var file_proto_network_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] 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_proto_network_proto_init() }
|
||||
func file_proto_network_proto_init() {
|
||||
if File_proto_network_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_network_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_proto_network_proto_goTypes,
|
||||
DependencyIndexes: file_proto_network_proto_depIdxs,
|
||||
}.Build()
|
||||
File_proto_network_proto = out.File
|
||||
file_proto_network_proto_rawDesc = nil
|
||||
file_proto_network_proto_goTypes = nil
|
||||
file_proto_network_proto_depIdxs = nil
|
||||
}
|
4
cmd/compute_api/proto/network.proto
Normal file
4
cmd/compute_api/proto/network.proto
Normal file
@ -0,0 +1,4 @@
|
||||
syntax="proto3";
|
||||
|
||||
option go_package = "./proto";
|
||||
package network;
|
62
cmd/compute_api/proto/storage.pb.go
Normal file
62
cmd/compute_api/proto/storage.pb.go
Normal file
@ -0,0 +1,62 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.14.0
|
||||
// source: proto/storage.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
var File_proto_storage_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_storage_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x09,
|
||||
0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var file_proto_storage_proto_goTypes = []interface{}{}
|
||||
var file_proto_storage_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] 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_proto_storage_proto_init() }
|
||||
func file_proto_storage_proto_init() {
|
||||
if File_proto_storage_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_storage_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_proto_storage_proto_goTypes,
|
||||
DependencyIndexes: file_proto_storage_proto_depIdxs,
|
||||
}.Build()
|
||||
File_proto_storage_proto = out.File
|
||||
file_proto_storage_proto_rawDesc = nil
|
||||
file_proto_storage_proto_goTypes = nil
|
||||
file_proto_storage_proto_depIdxs = nil
|
||||
}
|
4
cmd/compute_api/proto/storage.proto
Normal file
4
cmd/compute_api/proto/storage.proto
Normal file
@ -0,0 +1,4 @@
|
||||
syntax="proto3";
|
||||
|
||||
option go_package = "./proto";
|
||||
package storage;
|
18
vendor/google.golang.org/grpc/reflection/README.md
generated
vendored
Normal file
18
vendor/google.golang.org/grpc/reflection/README.md
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
# Reflection
|
||||
|
||||
Package reflection implements server reflection service.
|
||||
|
||||
The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto.
|
||||
|
||||
To register server reflection on a gRPC server:
|
||||
```go
|
||||
import "google.golang.org/grpc/reflection"
|
||||
|
||||
s := grpc.NewServer()
|
||||
pb.RegisterYourOwnServer(s, &server{})
|
||||
|
||||
// Register reflection service on gRPC server.
|
||||
reflection.Register(s)
|
||||
|
||||
s.Serve(lis)
|
||||
```
|
57
vendor/google.golang.org/grpc/reflection/adapt.go
generated
vendored
Normal file
57
vendor/google.golang.org/grpc/reflection/adapt.go
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2023 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package reflection
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc/reflection/internal"
|
||||
|
||||
v1reflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1"
|
||||
v1reflectionpb "google.golang.org/grpc/reflection/grpc_reflection_v1"
|
||||
v1alphareflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
|
||||
)
|
||||
|
||||
// asV1Alpha returns an implementation of the v1alpha version of the reflection
|
||||
// interface that delegates all calls to the given v1 version.
|
||||
func asV1Alpha(svr v1reflectiongrpc.ServerReflectionServer) v1alphareflectiongrpc.ServerReflectionServer {
|
||||
return v1AlphaServerImpl{svr: svr}
|
||||
}
|
||||
|
||||
type v1AlphaServerImpl struct {
|
||||
svr v1reflectiongrpc.ServerReflectionServer
|
||||
}
|
||||
|
||||
func (s v1AlphaServerImpl) ServerReflectionInfo(stream v1alphareflectiongrpc.ServerReflection_ServerReflectionInfoServer) error {
|
||||
return s.svr.ServerReflectionInfo(v1AlphaServerStreamAdapter{stream})
|
||||
}
|
||||
|
||||
type v1AlphaServerStreamAdapter struct {
|
||||
v1alphareflectiongrpc.ServerReflection_ServerReflectionInfoServer
|
||||
}
|
||||
|
||||
func (s v1AlphaServerStreamAdapter) Send(response *v1reflectionpb.ServerReflectionResponse) error {
|
||||
return s.ServerReflection_ServerReflectionInfoServer.Send(internal.V1ToV1AlphaResponse(response))
|
||||
}
|
||||
|
||||
func (s v1AlphaServerStreamAdapter) Recv() (*v1reflectionpb.ServerReflectionRequest, error) {
|
||||
resp, err := s.ServerReflection_ServerReflectionInfoServer.Recv()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return internal.V1AlphaToV1Request(resp), nil
|
||||
}
|
839
vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection.pb.go
generated
vendored
Normal file
839
vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection.pb.go
generated
vendored
Normal file
@ -0,0 +1,839 @@
|
||||
// Copyright 2016 The gRPC Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Service exported by server reflection. A more complete description of how
|
||||
// server reflection works can be found at
|
||||
// https://github.com/grpc/grpc/blob/master/doc/server-reflection.md
|
||||
//
|
||||
// The canonical version of this proto can be found at
|
||||
// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.2
|
||||
// protoc v5.27.1
|
||||
// source: grpc/reflection/v1/reflection.proto
|
||||
|
||||
package grpc_reflection_v1
|
||||
|
||||
import (
|
||||
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)
|
||||
)
|
||||
|
||||
// The message sent by the client when calling ServerReflectionInfo method.
|
||||
type ServerReflectionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
|
||||
// To use reflection service, the client should set one of the following
|
||||
// fields in message_request. The server distinguishes requests by their
|
||||
// defined field and then handles them using corresponding methods.
|
||||
//
|
||||
// Types that are assignable to MessageRequest:
|
||||
//
|
||||
// *ServerReflectionRequest_FileByFilename
|
||||
// *ServerReflectionRequest_FileContainingSymbol
|
||||
// *ServerReflectionRequest_FileContainingExtension
|
||||
// *ServerReflectionRequest_AllExtensionNumbersOfType
|
||||
// *ServerReflectionRequest_ListServices
|
||||
MessageRequest isServerReflectionRequest_MessageRequest `protobuf_oneof:"message_request"`
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) Reset() {
|
||||
*x = ServerReflectionRequest{}
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ServerReflectionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ServerReflectionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ServerReflectionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ServerReflectionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) GetHost() string {
|
||||
if x != nil {
|
||||
return x.Host
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ServerReflectionRequest) GetMessageRequest() isServerReflectionRequest_MessageRequest {
|
||||
if m != nil {
|
||||
return m.MessageRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) GetFileByFilename() string {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_FileByFilename); ok {
|
||||
return x.FileByFilename
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) GetFileContainingSymbol() string {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_FileContainingSymbol); ok {
|
||||
return x.FileContainingSymbol
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) GetFileContainingExtension() *ExtensionRequest {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_FileContainingExtension); ok {
|
||||
return x.FileContainingExtension
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) GetAllExtensionNumbersOfType() string {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_AllExtensionNumbersOfType); ok {
|
||||
return x.AllExtensionNumbersOfType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) GetListServices() string {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_ListServices); ok {
|
||||
return x.ListServices
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type isServerReflectionRequest_MessageRequest interface {
|
||||
isServerReflectionRequest_MessageRequest()
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_FileByFilename struct {
|
||||
// Find a proto file by the file name.
|
||||
FileByFilename string `protobuf:"bytes,3,opt,name=file_by_filename,json=fileByFilename,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_FileContainingSymbol struct {
|
||||
// Find the proto file that declares the given fully-qualified symbol name.
|
||||
// This field should be a fully-qualified symbol name
|
||||
// (e.g. <package>.<service>[.<method>] or <package>.<type>).
|
||||
FileContainingSymbol string `protobuf:"bytes,4,opt,name=file_containing_symbol,json=fileContainingSymbol,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_FileContainingExtension struct {
|
||||
// Find the proto file which defines an extension extending the given
|
||||
// message type with the given field number.
|
||||
FileContainingExtension *ExtensionRequest `protobuf:"bytes,5,opt,name=file_containing_extension,json=fileContainingExtension,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_AllExtensionNumbersOfType struct {
|
||||
// Finds the tag numbers used by all known extensions of the given message
|
||||
// type, and appends them to ExtensionNumberResponse in an undefined order.
|
||||
// Its corresponding method is best-effort: it's not guaranteed that the
|
||||
// reflection service will implement this method, and it's not guaranteed
|
||||
// that this method will provide all extensions. Returns
|
||||
// StatusCode::UNIMPLEMENTED if it's not implemented.
|
||||
// This field should be a fully-qualified type name. The format is
|
||||
// <package>.<type>
|
||||
AllExtensionNumbersOfType string `protobuf:"bytes,6,opt,name=all_extension_numbers_of_type,json=allExtensionNumbersOfType,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_ListServices struct {
|
||||
// List the full names of registered services. The content will not be
|
||||
// checked.
|
||||
ListServices string `protobuf:"bytes,7,opt,name=list_services,json=listServices,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*ServerReflectionRequest_FileByFilename) isServerReflectionRequest_MessageRequest() {}
|
||||
|
||||
func (*ServerReflectionRequest_FileContainingSymbol) isServerReflectionRequest_MessageRequest() {}
|
||||
|
||||
func (*ServerReflectionRequest_FileContainingExtension) isServerReflectionRequest_MessageRequest() {}
|
||||
|
||||
func (*ServerReflectionRequest_AllExtensionNumbersOfType) isServerReflectionRequest_MessageRequest() {
|
||||
}
|
||||
|
||||
func (*ServerReflectionRequest_ListServices) isServerReflectionRequest_MessageRequest() {}
|
||||
|
||||
// The type name and extension number sent by the client when requesting
|
||||
// file_containing_extension.
|
||||
type ExtensionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Fully-qualified type name. The format should be <package>.<type>
|
||||
ContainingType string `protobuf:"bytes,1,opt,name=containing_type,json=containingType,proto3" json:"containing_type,omitempty"`
|
||||
ExtensionNumber int32 `protobuf:"varint,2,opt,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) Reset() {
|
||||
*x = ExtensionRequest{}
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExtensionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ExtensionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExtensionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ExtensionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) GetContainingType() string {
|
||||
if x != nil {
|
||||
return x.ContainingType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) GetExtensionNumber() int32 {
|
||||
if x != nil {
|
||||
return x.ExtensionNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// The message sent by the server to answer ServerReflectionInfo method.
|
||||
type ServerReflectionResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost,proto3" json:"valid_host,omitempty"`
|
||||
OriginalRequest *ServerReflectionRequest `protobuf:"bytes,2,opt,name=original_request,json=originalRequest,proto3" json:"original_request,omitempty"`
|
||||
// The server sets one of the following fields according to the message_request
|
||||
// in the request.
|
||||
//
|
||||
// Types that are assignable to MessageResponse:
|
||||
//
|
||||
// *ServerReflectionResponse_FileDescriptorResponse
|
||||
// *ServerReflectionResponse_AllExtensionNumbersResponse
|
||||
// *ServerReflectionResponse_ListServicesResponse
|
||||
// *ServerReflectionResponse_ErrorResponse
|
||||
MessageResponse isServerReflectionResponse_MessageResponse `protobuf_oneof:"message_response"`
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) Reset() {
|
||||
*x = ServerReflectionResponse{}
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ServerReflectionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ServerReflectionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ServerReflectionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ServerReflectionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) GetValidHost() string {
|
||||
if x != nil {
|
||||
return x.ValidHost
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) GetOriginalRequest() *ServerReflectionRequest {
|
||||
if x != nil {
|
||||
return x.OriginalRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServerReflectionResponse) GetMessageResponse() isServerReflectionResponse_MessageResponse {
|
||||
if m != nil {
|
||||
return m.MessageResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) GetFileDescriptorResponse() *FileDescriptorResponse {
|
||||
if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_FileDescriptorResponse); ok {
|
||||
return x.FileDescriptorResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) GetAllExtensionNumbersResponse() *ExtensionNumberResponse {
|
||||
if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_AllExtensionNumbersResponse); ok {
|
||||
return x.AllExtensionNumbersResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) GetListServicesResponse() *ListServiceResponse {
|
||||
if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_ListServicesResponse); ok {
|
||||
return x.ListServicesResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) GetErrorResponse() *ErrorResponse {
|
||||
if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_ErrorResponse); ok {
|
||||
return x.ErrorResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isServerReflectionResponse_MessageResponse interface {
|
||||
isServerReflectionResponse_MessageResponse()
|
||||
}
|
||||
|
||||
type ServerReflectionResponse_FileDescriptorResponse struct {
|
||||
// This message is used to answer file_by_filename, file_containing_symbol,
|
||||
// file_containing_extension requests with transitive dependencies.
|
||||
// As the repeated label is not allowed in oneof fields, we use a
|
||||
// FileDescriptorResponse message to encapsulate the repeated fields.
|
||||
// The reflection service is allowed to avoid sending FileDescriptorProtos
|
||||
// that were previously sent in response to earlier requests in the stream.
|
||||
FileDescriptorResponse *FileDescriptorResponse `protobuf:"bytes,4,opt,name=file_descriptor_response,json=fileDescriptorResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionResponse_AllExtensionNumbersResponse struct {
|
||||
// This message is used to answer all_extension_numbers_of_type requests.
|
||||
AllExtensionNumbersResponse *ExtensionNumberResponse `protobuf:"bytes,5,opt,name=all_extension_numbers_response,json=allExtensionNumbersResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionResponse_ListServicesResponse struct {
|
||||
// This message is used to answer list_services requests.
|
||||
ListServicesResponse *ListServiceResponse `protobuf:"bytes,6,opt,name=list_services_response,json=listServicesResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionResponse_ErrorResponse struct {
|
||||
// This message is used when an error occurs.
|
||||
ErrorResponse *ErrorResponse `protobuf:"bytes,7,opt,name=error_response,json=errorResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*ServerReflectionResponse_FileDescriptorResponse) isServerReflectionResponse_MessageResponse() {
|
||||
}
|
||||
|
||||
func (*ServerReflectionResponse_AllExtensionNumbersResponse) isServerReflectionResponse_MessageResponse() {
|
||||
}
|
||||
|
||||
func (*ServerReflectionResponse_ListServicesResponse) isServerReflectionResponse_MessageResponse() {}
|
||||
|
||||
func (*ServerReflectionResponse_ErrorResponse) isServerReflectionResponse_MessageResponse() {}
|
||||
|
||||
// Serialized FileDescriptorProto messages sent by the server answering
|
||||
// a file_by_filename, file_containing_symbol, or file_containing_extension
|
||||
// request.
|
||||
type FileDescriptorResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
// descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
// bytes instead.
|
||||
FileDescriptorProto [][]byte `protobuf:"bytes,1,rep,name=file_descriptor_proto,json=fileDescriptorProto,proto3" json:"file_descriptor_proto,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FileDescriptorResponse) Reset() {
|
||||
*x = FileDescriptorResponse{}
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *FileDescriptorResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FileDescriptorResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FileDescriptorResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FileDescriptorResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FileDescriptorResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *FileDescriptorResponse) GetFileDescriptorProto() [][]byte {
|
||||
if x != nil {
|
||||
return x.FileDescriptorProto
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// A list of extension numbers sent by the server answering
|
||||
// all_extension_numbers_of_type request.
|
||||
type ExtensionNumberResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Full name of the base type, including the package name. The format
|
||||
// is <package>.<type>
|
||||
BaseTypeName string `protobuf:"bytes,1,opt,name=base_type_name,json=baseTypeName,proto3" json:"base_type_name,omitempty"`
|
||||
ExtensionNumber []int32 `protobuf:"varint,2,rep,packed,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ExtensionNumberResponse) Reset() {
|
||||
*x = ExtensionNumberResponse{}
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExtensionNumberResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExtensionNumberResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ExtensionNumberResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExtensionNumberResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ExtensionNumberResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ExtensionNumberResponse) GetBaseTypeName() string {
|
||||
if x != nil {
|
||||
return x.BaseTypeName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExtensionNumberResponse) GetExtensionNumber() []int32 {
|
||||
if x != nil {
|
||||
return x.ExtensionNumber
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// A list of ServiceResponse sent by the server answering list_services request.
|
||||
type ListServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The information of each service may be expanded in the future, so we use
|
||||
// ServiceResponse message to encapsulate it.
|
||||
Service []*ServiceResponse `protobuf:"bytes,1,rep,name=service,proto3" json:"service,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListServiceResponse) Reset() {
|
||||
*x = ListServiceResponse{}
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListServiceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListServiceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListServiceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListServiceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListServiceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ListServiceResponse) GetService() []*ServiceResponse {
|
||||
if x != nil {
|
||||
return x.Service
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// The information of a single service used by ListServiceResponse to answer
|
||||
// list_services request.
|
||||
type ServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Full name of a registered service, including its package name. The format
|
||||
// is <package>.<service>
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ServiceResponse) Reset() {
|
||||
*x = ServiceResponse{}
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ServiceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ServiceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ServiceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ServiceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ServiceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *ServiceResponse) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The error code and error message sent by the server when an error occurs.
|
||||
type ErrorResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// This field uses the error codes defined in grpc::StatusCode.
|
||||
ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
|
||||
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ErrorResponse) Reset() {
|
||||
*x = ErrorResponse{}
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ErrorResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ErrorResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ErrorResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1_reflection_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ErrorResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1_reflection_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *ErrorResponse) GetErrorCode() int32 {
|
||||
if x != nil {
|
||||
return x.ErrorCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ErrorResponse) GetErrorMessage() string {
|
||||
if x != nil {
|
||||
return x.ErrorMessage
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_grpc_reflection_v1_reflection_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_grpc_reflection_v1_reflection_proto_rawDesc = []byte{
|
||||
0x0a, 0x23, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0xf3, 0x02, 0x0a, 0x17, 0x53, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x5f, 0x62, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x46, 0x69, 0x6c,
|
||||
0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x62, 0x0a,
|
||||
0x19, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67,
|
||||
0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x42, 0x0a, 0x1d, 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x79,
|
||||
0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x45,
|
||||
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x4f,
|
||||
0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c,
|
||||
0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x42, 0x11, 0x0a, 0x0f,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
|
||||
0x66, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e,
|
||||
0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10,
|
||||
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xae, 0x04, 0x0a, 0x18, 0x53, 0x65, 0x72, 0x76,
|
||||
0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x6f,
|
||||
0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x12, 0x56, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f,
|
||||
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e,
|
||||
0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67,
|
||||
0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x18, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x72,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
|
||||
0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
|
||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x16, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x1e, 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1b, 0x61, 0x6c, 0x6c, 0x45,
|
||||
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x5f,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72,
|
||||
0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x48, 0x00, 0x52, 0x14, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f,
|
||||
0x72, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x21, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f,
|
||||
0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x46, 0x69, 0x6c, 0x65,
|
||||
0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0c, 0x52, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
|
||||
0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x17, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62,
|
||||
0x65, 0x72, 0x22, 0x54, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52,
|
||||
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,
|
||||
0x53, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x32, 0x89, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52,
|
||||
0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x75, 0x0a, 0x14, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x12, 0x2b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c,
|
||||
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01,
|
||||
0x42, 0x66, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x50, 0x01, 0x5a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e,
|
||||
0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x6c, 0x65,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_grpc_reflection_v1_reflection_proto_rawDescOnce sync.Once
|
||||
file_grpc_reflection_v1_reflection_proto_rawDescData = file_grpc_reflection_v1_reflection_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_grpc_reflection_v1_reflection_proto_rawDescGZIP() []byte {
|
||||
file_grpc_reflection_v1_reflection_proto_rawDescOnce.Do(func() {
|
||||
file_grpc_reflection_v1_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_reflection_v1_reflection_proto_rawDescData)
|
||||
})
|
||||
return file_grpc_reflection_v1_reflection_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_grpc_reflection_v1_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_grpc_reflection_v1_reflection_proto_goTypes = []any{
|
||||
(*ServerReflectionRequest)(nil), // 0: grpc.reflection.v1.ServerReflectionRequest
|
||||
(*ExtensionRequest)(nil), // 1: grpc.reflection.v1.ExtensionRequest
|
||||
(*ServerReflectionResponse)(nil), // 2: grpc.reflection.v1.ServerReflectionResponse
|
||||
(*FileDescriptorResponse)(nil), // 3: grpc.reflection.v1.FileDescriptorResponse
|
||||
(*ExtensionNumberResponse)(nil), // 4: grpc.reflection.v1.ExtensionNumberResponse
|
||||
(*ListServiceResponse)(nil), // 5: grpc.reflection.v1.ListServiceResponse
|
||||
(*ServiceResponse)(nil), // 6: grpc.reflection.v1.ServiceResponse
|
||||
(*ErrorResponse)(nil), // 7: grpc.reflection.v1.ErrorResponse
|
||||
}
|
||||
var file_grpc_reflection_v1_reflection_proto_depIdxs = []int32{
|
||||
1, // 0: grpc.reflection.v1.ServerReflectionRequest.file_containing_extension:type_name -> grpc.reflection.v1.ExtensionRequest
|
||||
0, // 1: grpc.reflection.v1.ServerReflectionResponse.original_request:type_name -> grpc.reflection.v1.ServerReflectionRequest
|
||||
3, // 2: grpc.reflection.v1.ServerReflectionResponse.file_descriptor_response:type_name -> grpc.reflection.v1.FileDescriptorResponse
|
||||
4, // 3: grpc.reflection.v1.ServerReflectionResponse.all_extension_numbers_response:type_name -> grpc.reflection.v1.ExtensionNumberResponse
|
||||
5, // 4: grpc.reflection.v1.ServerReflectionResponse.list_services_response:type_name -> grpc.reflection.v1.ListServiceResponse
|
||||
7, // 5: grpc.reflection.v1.ServerReflectionResponse.error_response:type_name -> grpc.reflection.v1.ErrorResponse
|
||||
6, // 6: grpc.reflection.v1.ListServiceResponse.service:type_name -> grpc.reflection.v1.ServiceResponse
|
||||
0, // 7: grpc.reflection.v1.ServerReflection.ServerReflectionInfo:input_type -> grpc.reflection.v1.ServerReflectionRequest
|
||||
2, // 8: grpc.reflection.v1.ServerReflection.ServerReflectionInfo:output_type -> grpc.reflection.v1.ServerReflectionResponse
|
||||
8, // [8:9] is the sub-list for method output_type
|
||||
7, // [7:8] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_grpc_reflection_v1_reflection_proto_init() }
|
||||
func file_grpc_reflection_v1_reflection_proto_init() {
|
||||
if File_grpc_reflection_v1_reflection_proto != nil {
|
||||
return
|
||||
}
|
||||
file_grpc_reflection_v1_reflection_proto_msgTypes[0].OneofWrappers = []any{
|
||||
(*ServerReflectionRequest_FileByFilename)(nil),
|
||||
(*ServerReflectionRequest_FileContainingSymbol)(nil),
|
||||
(*ServerReflectionRequest_FileContainingExtension)(nil),
|
||||
(*ServerReflectionRequest_AllExtensionNumbersOfType)(nil),
|
||||
(*ServerReflectionRequest_ListServices)(nil),
|
||||
}
|
||||
file_grpc_reflection_v1_reflection_proto_msgTypes[2].OneofWrappers = []any{
|
||||
(*ServerReflectionResponse_FileDescriptorResponse)(nil),
|
||||
(*ServerReflectionResponse_AllExtensionNumbersResponse)(nil),
|
||||
(*ServerReflectionResponse_ListServicesResponse)(nil),
|
||||
(*ServerReflectionResponse_ErrorResponse)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_grpc_reflection_v1_reflection_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_grpc_reflection_v1_reflection_proto_goTypes,
|
||||
DependencyIndexes: file_grpc_reflection_v1_reflection_proto_depIdxs,
|
||||
MessageInfos: file_grpc_reflection_v1_reflection_proto_msgTypes,
|
||||
}.Build()
|
||||
File_grpc_reflection_v1_reflection_proto = out.File
|
||||
file_grpc_reflection_v1_reflection_proto_rawDesc = nil
|
||||
file_grpc_reflection_v1_reflection_proto_goTypes = nil
|
||||
file_grpc_reflection_v1_reflection_proto_depIdxs = nil
|
||||
}
|
138
vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection_grpc.pb.go
generated
vendored
Normal file
138
vendor/google.golang.org/grpc/reflection/grpc_reflection_v1/reflection_grpc.pb.go
generated
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
// Copyright 2016 The gRPC Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Service exported by server reflection. A more complete description of how
|
||||
// server reflection works can be found at
|
||||
// https://github.com/grpc/grpc/blob/master/doc/server-reflection.md
|
||||
//
|
||||
// The canonical version of this proto can be found at
|
||||
// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.27.1
|
||||
// source: grpc/reflection/v1/reflection.proto
|
||||
|
||||
package grpc_reflection_v1
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
ServerReflection_ServerReflectionInfo_FullMethodName = "/grpc.reflection.v1.ServerReflection/ServerReflectionInfo"
|
||||
)
|
||||
|
||||
// ServerReflectionClient is the client API for ServerReflection 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 ServerReflectionClient interface {
|
||||
// The reflection service is structured as a bidirectional stream, ensuring
|
||||
// all related requests go to a single server.
|
||||
ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse], error)
|
||||
}
|
||||
|
||||
type serverReflectionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewServerReflectionClient(cc grpc.ClientConnInterface) ServerReflectionClient {
|
||||
return &serverReflectionClient{cc}
|
||||
}
|
||||
|
||||
func (c *serverReflectionClient) ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &ServerReflection_ServiceDesc.Streams[0], ServerReflection_ServerReflectionInfo_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[ServerReflectionRequest, ServerReflectionResponse]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ServerReflection_ServerReflectionInfoClient = grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse]
|
||||
|
||||
// ServerReflectionServer is the server API for ServerReflection service.
|
||||
// All implementations should embed UnimplementedServerReflectionServer
|
||||
// for forward compatibility.
|
||||
type ServerReflectionServer interface {
|
||||
// The reflection service is structured as a bidirectional stream, ensuring
|
||||
// all related requests go to a single server.
|
||||
ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error
|
||||
}
|
||||
|
||||
// UnimplementedServerReflectionServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedServerReflectionServer struct{}
|
||||
|
||||
func (UnimplementedServerReflectionServer) ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method ServerReflectionInfo not implemented")
|
||||
}
|
||||
func (UnimplementedServerReflectionServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeServerReflectionServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ServerReflectionServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeServerReflectionServer interface {
|
||||
mustEmbedUnimplementedServerReflectionServer()
|
||||
}
|
||||
|
||||
func RegisterServerReflectionServer(s grpc.ServiceRegistrar, srv ServerReflectionServer) {
|
||||
// If the following call panics, it indicates UnimplementedServerReflectionServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&ServerReflection_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ServerReflection_ServerReflectionInfo_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(ServerReflectionServer).ServerReflectionInfo(&grpc.GenericServerStream[ServerReflectionRequest, ServerReflectionResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ServerReflection_ServerReflectionInfoServer = grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]
|
||||
|
||||
// ServerReflection_ServiceDesc is the grpc.ServiceDesc for ServerReflection service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ServerReflection_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "grpc.reflection.v1.ServerReflection",
|
||||
HandlerType: (*ServerReflectionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "ServerReflectionInfo",
|
||||
Handler: _ServerReflection_ServerReflectionInfo_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "grpc/reflection/v1/reflection.proto",
|
||||
}
|
914
vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go
generated
vendored
Normal file
914
vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go
generated
vendored
Normal file
@ -0,0 +1,914 @@
|
||||
// Copyright 2016 The gRPC Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// Service exported by server reflection
|
||||
|
||||
// Warning: this entire file is deprecated. Use this instead:
|
||||
// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.2
|
||||
// protoc v5.27.1
|
||||
// grpc/reflection/v1alpha/reflection.proto is a deprecated file.
|
||||
|
||||
package grpc_reflection_v1alpha
|
||||
|
||||
import (
|
||||
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)
|
||||
)
|
||||
|
||||
// The message sent by the client when calling ServerReflectionInfo method.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
type ServerReflectionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
|
||||
// To use reflection service, the client should set one of the following
|
||||
// fields in message_request. The server distinguishes requests by their
|
||||
// defined field and then handles them using corresponding methods.
|
||||
//
|
||||
// Types that are assignable to MessageRequest:
|
||||
//
|
||||
// *ServerReflectionRequest_FileByFilename
|
||||
// *ServerReflectionRequest_FileContainingSymbol
|
||||
// *ServerReflectionRequest_FileContainingExtension
|
||||
// *ServerReflectionRequest_AllExtensionNumbersOfType
|
||||
// *ServerReflectionRequest_ListServices
|
||||
MessageRequest isServerReflectionRequest_MessageRequest `protobuf_oneof:"message_request"`
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) Reset() {
|
||||
*x = ServerReflectionRequest{}
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ServerReflectionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ServerReflectionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ServerReflectionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ServerReflectionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ServerReflectionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionRequest) GetHost() string {
|
||||
if x != nil {
|
||||
return x.Host
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ServerReflectionRequest) GetMessageRequest() isServerReflectionRequest_MessageRequest {
|
||||
if m != nil {
|
||||
return m.MessageRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionRequest) GetFileByFilename() string {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_FileByFilename); ok {
|
||||
return x.FileByFilename
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionRequest) GetFileContainingSymbol() string {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_FileContainingSymbol); ok {
|
||||
return x.FileContainingSymbol
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionRequest) GetFileContainingExtension() *ExtensionRequest {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_FileContainingExtension); ok {
|
||||
return x.FileContainingExtension
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionRequest) GetAllExtensionNumbersOfType() string {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_AllExtensionNumbersOfType); ok {
|
||||
return x.AllExtensionNumbersOfType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionRequest) GetListServices() string {
|
||||
if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_ListServices); ok {
|
||||
return x.ListServices
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type isServerReflectionRequest_MessageRequest interface {
|
||||
isServerReflectionRequest_MessageRequest()
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_FileByFilename struct {
|
||||
// Find a proto file by the file name.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
FileByFilename string `protobuf:"bytes,3,opt,name=file_by_filename,json=fileByFilename,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_FileContainingSymbol struct {
|
||||
// Find the proto file that declares the given fully-qualified symbol name.
|
||||
// This field should be a fully-qualified symbol name
|
||||
// (e.g. <package>.<service>[.<method>] or <package>.<type>).
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
FileContainingSymbol string `protobuf:"bytes,4,opt,name=file_containing_symbol,json=fileContainingSymbol,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_FileContainingExtension struct {
|
||||
// Find the proto file which defines an extension extending the given
|
||||
// message type with the given field number.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
FileContainingExtension *ExtensionRequest `protobuf:"bytes,5,opt,name=file_containing_extension,json=fileContainingExtension,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_AllExtensionNumbersOfType struct {
|
||||
// Finds the tag numbers used by all known extensions of extendee_type, and
|
||||
// appends them to ExtensionNumberResponse in an undefined order.
|
||||
// Its corresponding method is best-effort: it's not guaranteed that the
|
||||
// reflection service will implement this method, and it's not guaranteed
|
||||
// that this method will provide all extensions. Returns
|
||||
// StatusCode::UNIMPLEMENTED if it's not implemented.
|
||||
// This field should be a fully-qualified type name. The format is
|
||||
// <package>.<type>
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
AllExtensionNumbersOfType string `protobuf:"bytes,6,opt,name=all_extension_numbers_of_type,json=allExtensionNumbersOfType,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionRequest_ListServices struct {
|
||||
// List the full names of registered services. The content will not be
|
||||
// checked.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
ListServices string `protobuf:"bytes,7,opt,name=list_services,json=listServices,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*ServerReflectionRequest_FileByFilename) isServerReflectionRequest_MessageRequest() {}
|
||||
|
||||
func (*ServerReflectionRequest_FileContainingSymbol) isServerReflectionRequest_MessageRequest() {}
|
||||
|
||||
func (*ServerReflectionRequest_FileContainingExtension) isServerReflectionRequest_MessageRequest() {}
|
||||
|
||||
func (*ServerReflectionRequest_AllExtensionNumbersOfType) isServerReflectionRequest_MessageRequest() {
|
||||
}
|
||||
|
||||
func (*ServerReflectionRequest_ListServices) isServerReflectionRequest_MessageRequest() {}
|
||||
|
||||
// The type name and extension number sent by the client when requesting
|
||||
// file_containing_extension.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
type ExtensionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Fully-qualified type name. The format should be <package>.<type>
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
ContainingType string `protobuf:"bytes,1,opt,name=containing_type,json=containingType,proto3" json:"containing_type,omitempty"`
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
ExtensionNumber int32 `protobuf:"varint,2,opt,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) Reset() {
|
||||
*x = ExtensionRequest{}
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExtensionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExtensionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ExtensionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExtensionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ExtensionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ExtensionRequest) GetContainingType() string {
|
||||
if x != nil {
|
||||
return x.ContainingType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ExtensionRequest) GetExtensionNumber() int32 {
|
||||
if x != nil {
|
||||
return x.ExtensionNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// The message sent by the server to answer ServerReflectionInfo method.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
type ServerReflectionResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost,proto3" json:"valid_host,omitempty"`
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
OriginalRequest *ServerReflectionRequest `protobuf:"bytes,2,opt,name=original_request,json=originalRequest,proto3" json:"original_request,omitempty"`
|
||||
// The server set one of the following fields according to the message_request
|
||||
// in the request.
|
||||
//
|
||||
// Types that are assignable to MessageResponse:
|
||||
//
|
||||
// *ServerReflectionResponse_FileDescriptorResponse
|
||||
// *ServerReflectionResponse_AllExtensionNumbersResponse
|
||||
// *ServerReflectionResponse_ListServicesResponse
|
||||
// *ServerReflectionResponse_ErrorResponse
|
||||
MessageResponse isServerReflectionResponse_MessageResponse `protobuf_oneof:"message_response"`
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) Reset() {
|
||||
*x = ServerReflectionResponse{}
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ServerReflectionResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ServerReflectionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ServerReflectionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ServerReflectionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ServerReflectionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionResponse) GetValidHost() string {
|
||||
if x != nil {
|
||||
return x.ValidHost
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionResponse) GetOriginalRequest() *ServerReflectionRequest {
|
||||
if x != nil {
|
||||
return x.OriginalRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ServerReflectionResponse) GetMessageResponse() isServerReflectionResponse_MessageResponse {
|
||||
if m != nil {
|
||||
return m.MessageResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionResponse) GetFileDescriptorResponse() *FileDescriptorResponse {
|
||||
if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_FileDescriptorResponse); ok {
|
||||
return x.FileDescriptorResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionResponse) GetAllExtensionNumbersResponse() *ExtensionNumberResponse {
|
||||
if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_AllExtensionNumbersResponse); ok {
|
||||
return x.AllExtensionNumbersResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionResponse) GetListServicesResponse() *ListServiceResponse {
|
||||
if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_ListServicesResponse); ok {
|
||||
return x.ListServicesResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServerReflectionResponse) GetErrorResponse() *ErrorResponse {
|
||||
if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_ErrorResponse); ok {
|
||||
return x.ErrorResponse
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isServerReflectionResponse_MessageResponse interface {
|
||||
isServerReflectionResponse_MessageResponse()
|
||||
}
|
||||
|
||||
type ServerReflectionResponse_FileDescriptorResponse struct {
|
||||
// This message is used to answer file_by_filename, file_containing_symbol,
|
||||
// file_containing_extension requests with transitive dependencies. As
|
||||
// the repeated label is not allowed in oneof fields, we use a
|
||||
// FileDescriptorResponse message to encapsulate the repeated fields.
|
||||
// The reflection service is allowed to avoid sending FileDescriptorProtos
|
||||
// that were previously sent in response to earlier requests in the stream.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
FileDescriptorResponse *FileDescriptorResponse `protobuf:"bytes,4,opt,name=file_descriptor_response,json=fileDescriptorResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionResponse_AllExtensionNumbersResponse struct {
|
||||
// This message is used to answer all_extension_numbers_of_type request.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
AllExtensionNumbersResponse *ExtensionNumberResponse `protobuf:"bytes,5,opt,name=all_extension_numbers_response,json=allExtensionNumbersResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionResponse_ListServicesResponse struct {
|
||||
// This message is used to answer list_services request.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
ListServicesResponse *ListServiceResponse `protobuf:"bytes,6,opt,name=list_services_response,json=listServicesResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
type ServerReflectionResponse_ErrorResponse struct {
|
||||
// This message is used when an error occurs.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
ErrorResponse *ErrorResponse `protobuf:"bytes,7,opt,name=error_response,json=errorResponse,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*ServerReflectionResponse_FileDescriptorResponse) isServerReflectionResponse_MessageResponse() {
|
||||
}
|
||||
|
||||
func (*ServerReflectionResponse_AllExtensionNumbersResponse) isServerReflectionResponse_MessageResponse() {
|
||||
}
|
||||
|
||||
func (*ServerReflectionResponse_ListServicesResponse) isServerReflectionResponse_MessageResponse() {}
|
||||
|
||||
func (*ServerReflectionResponse_ErrorResponse) isServerReflectionResponse_MessageResponse() {}
|
||||
|
||||
// Serialized FileDescriptorProto messages sent by the server answering
|
||||
// a file_by_filename, file_containing_symbol, or file_containing_extension
|
||||
// request.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
type FileDescriptorResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
||||
// descriptor.proto, which uses proto2 only features, by making them opaque
|
||||
// bytes instead.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
FileDescriptorProto [][]byte `protobuf:"bytes,1,rep,name=file_descriptor_proto,json=fileDescriptorProto,proto3" json:"file_descriptor_proto,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FileDescriptorResponse) Reset() {
|
||||
*x = FileDescriptorResponse{}
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *FileDescriptorResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FileDescriptorResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FileDescriptorResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FileDescriptorResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FileDescriptorResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *FileDescriptorResponse) GetFileDescriptorProto() [][]byte {
|
||||
if x != nil {
|
||||
return x.FileDescriptorProto
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// A list of extension numbers sent by the server answering
|
||||
// all_extension_numbers_of_type request.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
type ExtensionNumberResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Full name of the base type, including the package name. The format
|
||||
// is <package>.<type>
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
BaseTypeName string `protobuf:"bytes,1,opt,name=base_type_name,json=baseTypeName,proto3" json:"base_type_name,omitempty"`
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
ExtensionNumber []int32 `protobuf:"varint,2,rep,packed,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ExtensionNumberResponse) Reset() {
|
||||
*x = ExtensionNumberResponse{}
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExtensionNumberResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExtensionNumberResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ExtensionNumberResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExtensionNumberResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ExtensionNumberResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ExtensionNumberResponse) GetBaseTypeName() string {
|
||||
if x != nil {
|
||||
return x.BaseTypeName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ExtensionNumberResponse) GetExtensionNumber() []int32 {
|
||||
if x != nil {
|
||||
return x.ExtensionNumber
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// A list of ServiceResponse sent by the server answering list_services request.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
type ListServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// The information of each service may be expanded in the future, so we use
|
||||
// ServiceResponse message to encapsulate it.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
Service []*ServiceResponse `protobuf:"bytes,1,rep,name=service,proto3" json:"service,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListServiceResponse) Reset() {
|
||||
*x = ListServiceResponse{}
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListServiceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListServiceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListServiceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListServiceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListServiceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ListServiceResponse) GetService() []*ServiceResponse {
|
||||
if x != nil {
|
||||
return x.Service
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// The information of a single service used by ListServiceResponse to answer
|
||||
// list_services request.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
type ServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Full name of a registered service, including its package name. The format
|
||||
// is <package>.<service>
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ServiceResponse) Reset() {
|
||||
*x = ServiceResponse{}
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ServiceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ServiceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ServiceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ServiceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ServiceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ServiceResponse) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// The error code and error message sent by the server when an error occurs.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
type ErrorResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// This field uses the error codes defined in grpc::StatusCode.
|
||||
//
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ErrorResponse) Reset() {
|
||||
*x = ErrorResponse{}
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ErrorResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ErrorResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ErrorResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ErrorResponse) Descriptor() ([]byte, []int) {
|
||||
return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ErrorResponse) GetErrorCode() int32 {
|
||||
if x != nil {
|
||||
return x.ErrorCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
|
||||
func (x *ErrorResponse) GetErrorMessage() string {
|
||||
if x != nil {
|
||||
return x.ErrorMessage
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_grpc_reflection_v1alpha_reflection_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_grpc_reflection_v1alpha_reflection_proto_rawDesc = []byte{
|
||||
0x0a, 0x28, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x72, 0x70, 0x63,
|
||||
0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c,
|
||||
0x70, 0x68, 0x61, 0x22, 0xf8, 0x02, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65,
|
||||
0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68,
|
||||
0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x5f, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
|
||||
0x0e, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x36, 0x0a, 0x16, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69,
|
||||
0x6e, 0x67, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48,
|
||||
0x00, 0x52, 0x14, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e,
|
||||
0x67, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x67, 0x0a, 0x19, 0x66, 0x69, 0x6c, 0x65, 0x5f,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x70,
|
||||
0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61,
|
||||
0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x42, 0x0a, 0x1d, 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x45, 0x78,
|
||||
0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x4f, 0x66,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6c,
|
||||
0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x6d,
|
||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66,
|
||||
0x0a, 0x10, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67,
|
||||
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65,
|
||||
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xc7, 0x04, 0x0a, 0x18, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x6f, 0x73,
|
||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x6f,
|
||||
0x73, 0x74, 0x12, 0x5b, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x72,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67,
|
||||
0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76,
|
||||
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0f,
|
||||
0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x6b, 0x0a, 0x18, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
|
||||
0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65,
|
||||
0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x48, 0x00, 0x52, 0x16, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69,
|
||||
0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x1e,
|
||||
0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75,
|
||||
0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45,
|
||||
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1b, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74,
|
||||
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x14, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x65,
|
||||
0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x72,
|
||||
0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x65,
|
||||
0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x10,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x4c, 0x0a, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
|
||||
0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x44,
|
||||
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a,
|
||||
0x0a, 0x17, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65,
|
||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x73,
|
||||
0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x29, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d,
|
||||
0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x13, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x42, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x0d,
|
||||
0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d,
|
||||
0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x32, 0x93, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7f, 0x0a, 0x14, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30,
|
||||
0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52,
|
||||
0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x73, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x67, 0x72,
|
||||
0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
|
||||
0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72,
|
||||
0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x5f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_grpc_reflection_v1alpha_reflection_proto_rawDescOnce sync.Once
|
||||
file_grpc_reflection_v1alpha_reflection_proto_rawDescData = file_grpc_reflection_v1alpha_reflection_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP() []byte {
|
||||
file_grpc_reflection_v1alpha_reflection_proto_rawDescOnce.Do(func() {
|
||||
file_grpc_reflection_v1alpha_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_reflection_v1alpha_reflection_proto_rawDescData)
|
||||
})
|
||||
return file_grpc_reflection_v1alpha_reflection_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_grpc_reflection_v1alpha_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_grpc_reflection_v1alpha_reflection_proto_goTypes = []any{
|
||||
(*ServerReflectionRequest)(nil), // 0: grpc.reflection.v1alpha.ServerReflectionRequest
|
||||
(*ExtensionRequest)(nil), // 1: grpc.reflection.v1alpha.ExtensionRequest
|
||||
(*ServerReflectionResponse)(nil), // 2: grpc.reflection.v1alpha.ServerReflectionResponse
|
||||
(*FileDescriptorResponse)(nil), // 3: grpc.reflection.v1alpha.FileDescriptorResponse
|
||||
(*ExtensionNumberResponse)(nil), // 4: grpc.reflection.v1alpha.ExtensionNumberResponse
|
||||
(*ListServiceResponse)(nil), // 5: grpc.reflection.v1alpha.ListServiceResponse
|
||||
(*ServiceResponse)(nil), // 6: grpc.reflection.v1alpha.ServiceResponse
|
||||
(*ErrorResponse)(nil), // 7: grpc.reflection.v1alpha.ErrorResponse
|
||||
}
|
||||
var file_grpc_reflection_v1alpha_reflection_proto_depIdxs = []int32{
|
||||
1, // 0: grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension:type_name -> grpc.reflection.v1alpha.ExtensionRequest
|
||||
0, // 1: grpc.reflection.v1alpha.ServerReflectionResponse.original_request:type_name -> grpc.reflection.v1alpha.ServerReflectionRequest
|
||||
3, // 2: grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response:type_name -> grpc.reflection.v1alpha.FileDescriptorResponse
|
||||
4, // 3: grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response:type_name -> grpc.reflection.v1alpha.ExtensionNumberResponse
|
||||
5, // 4: grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response:type_name -> grpc.reflection.v1alpha.ListServiceResponse
|
||||
7, // 5: grpc.reflection.v1alpha.ServerReflectionResponse.error_response:type_name -> grpc.reflection.v1alpha.ErrorResponse
|
||||
6, // 6: grpc.reflection.v1alpha.ListServiceResponse.service:type_name -> grpc.reflection.v1alpha.ServiceResponse
|
||||
0, // 7: grpc.reflection.v1alpha.ServerReflection.ServerReflectionInfo:input_type -> grpc.reflection.v1alpha.ServerReflectionRequest
|
||||
2, // 8: grpc.reflection.v1alpha.ServerReflection.ServerReflectionInfo:output_type -> grpc.reflection.v1alpha.ServerReflectionResponse
|
||||
8, // [8:9] is the sub-list for method output_type
|
||||
7, // [7:8] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_grpc_reflection_v1alpha_reflection_proto_init() }
|
||||
func file_grpc_reflection_v1alpha_reflection_proto_init() {
|
||||
if File_grpc_reflection_v1alpha_reflection_proto != nil {
|
||||
return
|
||||
}
|
||||
file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].OneofWrappers = []any{
|
||||
(*ServerReflectionRequest_FileByFilename)(nil),
|
||||
(*ServerReflectionRequest_FileContainingSymbol)(nil),
|
||||
(*ServerReflectionRequest_FileContainingExtension)(nil),
|
||||
(*ServerReflectionRequest_AllExtensionNumbersOfType)(nil),
|
||||
(*ServerReflectionRequest_ListServices)(nil),
|
||||
}
|
||||
file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].OneofWrappers = []any{
|
||||
(*ServerReflectionResponse_FileDescriptorResponse)(nil),
|
||||
(*ServerReflectionResponse_AllExtensionNumbersResponse)(nil),
|
||||
(*ServerReflectionResponse_ListServicesResponse)(nil),
|
||||
(*ServerReflectionResponse_ErrorResponse)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_grpc_reflection_v1alpha_reflection_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_grpc_reflection_v1alpha_reflection_proto_goTypes,
|
||||
DependencyIndexes: file_grpc_reflection_v1alpha_reflection_proto_depIdxs,
|
||||
MessageInfos: file_grpc_reflection_v1alpha_reflection_proto_msgTypes,
|
||||
}.Build()
|
||||
File_grpc_reflection_v1alpha_reflection_proto = out.File
|
||||
file_grpc_reflection_v1alpha_reflection_proto_rawDesc = nil
|
||||
file_grpc_reflection_v1alpha_reflection_proto_goTypes = nil
|
||||
file_grpc_reflection_v1alpha_reflection_proto_depIdxs = nil
|
||||
}
|
135
vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go
generated
vendored
Normal file
135
vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go
generated
vendored
Normal file
@ -0,0 +1,135 @@
|
||||
// Copyright 2016 The gRPC Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// Service exported by server reflection
|
||||
|
||||
// Warning: this entire file is deprecated. Use this instead:
|
||||
// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.27.1
|
||||
// grpc/reflection/v1alpha/reflection.proto is a deprecated file.
|
||||
|
||||
package grpc_reflection_v1alpha
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
ServerReflection_ServerReflectionInfo_FullMethodName = "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo"
|
||||
)
|
||||
|
||||
// ServerReflectionClient is the client API for ServerReflection 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 ServerReflectionClient interface {
|
||||
// The reflection service is structured as a bidirectional stream, ensuring
|
||||
// all related requests go to a single server.
|
||||
ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse], error)
|
||||
}
|
||||
|
||||
type serverReflectionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewServerReflectionClient(cc grpc.ClientConnInterface) ServerReflectionClient {
|
||||
return &serverReflectionClient{cc}
|
||||
}
|
||||
|
||||
func (c *serverReflectionClient) ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &ServerReflection_ServiceDesc.Streams[0], ServerReflection_ServerReflectionInfo_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[ServerReflectionRequest, ServerReflectionResponse]{ClientStream: stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ServerReflection_ServerReflectionInfoClient = grpc.BidiStreamingClient[ServerReflectionRequest, ServerReflectionResponse]
|
||||
|
||||
// ServerReflectionServer is the server API for ServerReflection service.
|
||||
// All implementations should embed UnimplementedServerReflectionServer
|
||||
// for forward compatibility.
|
||||
type ServerReflectionServer interface {
|
||||
// The reflection service is structured as a bidirectional stream, ensuring
|
||||
// all related requests go to a single server.
|
||||
ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error
|
||||
}
|
||||
|
||||
// UnimplementedServerReflectionServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedServerReflectionServer struct{}
|
||||
|
||||
func (UnimplementedServerReflectionServer) ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method ServerReflectionInfo not implemented")
|
||||
}
|
||||
func (UnimplementedServerReflectionServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeServerReflectionServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ServerReflectionServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeServerReflectionServer interface {
|
||||
mustEmbedUnimplementedServerReflectionServer()
|
||||
}
|
||||
|
||||
func RegisterServerReflectionServer(s grpc.ServiceRegistrar, srv ServerReflectionServer) {
|
||||
// If the following call panics, it indicates UnimplementedServerReflectionServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&ServerReflection_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ServerReflection_ServerReflectionInfo_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(ServerReflectionServer).ServerReflectionInfo(&grpc.GenericServerStream[ServerReflectionRequest, ServerReflectionResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ServerReflection_ServerReflectionInfoServer = grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]
|
||||
|
||||
// ServerReflection_ServiceDesc is the grpc.ServiceDesc for ServerReflection service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ServerReflection_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "grpc.reflection.v1alpha.ServerReflection",
|
||||
HandlerType: (*ServerReflectionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "ServerReflectionInfo",
|
||||
Handler: _ServerReflection_ServerReflectionInfo_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "grpc/reflection/v1alpha/reflection.proto",
|
||||
}
|
436
vendor/google.golang.org/grpc/reflection/internal/internal.go
generated
vendored
Normal file
436
vendor/google.golang.org/grpc/reflection/internal/internal.go
generated
vendored
Normal file
@ -0,0 +1,436 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2024 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
// Package internal contains code that is shared by both reflection package and
|
||||
// the test package. The packages are split in this way inorder to avoid
|
||||
// dependency to deprecated package github.com/golang/protobuf.
|
||||
package internal
|
||||
|
||||
import (
|
||||
"io"
|
||||
"sort"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protodesc"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
|
||||
v1reflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1"
|
||||
v1reflectionpb "google.golang.org/grpc/reflection/grpc_reflection_v1"
|
||||
v1alphareflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
|
||||
v1alphareflectionpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
|
||||
)
|
||||
|
||||
// ServiceInfoProvider is an interface used to retrieve metadata about the
|
||||
// services to expose.
|
||||
type ServiceInfoProvider interface {
|
||||
GetServiceInfo() map[string]grpc.ServiceInfo
|
||||
}
|
||||
|
||||
// ExtensionResolver is the interface used to query details about extensions.
|
||||
// This interface is satisfied by protoregistry.GlobalTypes.
|
||||
type ExtensionResolver interface {
|
||||
protoregistry.ExtensionTypeResolver
|
||||
RangeExtensionsByMessage(message protoreflect.FullName, f func(protoreflect.ExtensionType) bool)
|
||||
}
|
||||
|
||||
// ServerReflectionServer is the server API for ServerReflection service.
|
||||
type ServerReflectionServer struct {
|
||||
v1alphareflectiongrpc.UnimplementedServerReflectionServer
|
||||
S ServiceInfoProvider
|
||||
DescResolver protodesc.Resolver
|
||||
ExtResolver ExtensionResolver
|
||||
}
|
||||
|
||||
// FileDescWithDependencies returns a slice of serialized fileDescriptors in
|
||||
// wire format ([]byte). The fileDescriptors will include fd and all the
|
||||
// transitive dependencies of fd with names not in sentFileDescriptors.
|
||||
func (s *ServerReflectionServer) FileDescWithDependencies(fd protoreflect.FileDescriptor, sentFileDescriptors map[string]bool) ([][]byte, error) {
|
||||
if fd.IsPlaceholder() {
|
||||
// If the given root file is a placeholder, treat it
|
||||
// as missing instead of serializing it.
|
||||
return nil, protoregistry.NotFound
|
||||
}
|
||||
var r [][]byte
|
||||
queue := []protoreflect.FileDescriptor{fd}
|
||||
for len(queue) > 0 {
|
||||
currentfd := queue[0]
|
||||
queue = queue[1:]
|
||||
if currentfd.IsPlaceholder() {
|
||||
// Skip any missing files in the dependency graph.
|
||||
continue
|
||||
}
|
||||
if sent := sentFileDescriptors[currentfd.Path()]; len(r) == 0 || !sent {
|
||||
sentFileDescriptors[currentfd.Path()] = true
|
||||
fdProto := protodesc.ToFileDescriptorProto(currentfd)
|
||||
currentfdEncoded, err := proto.Marshal(fdProto)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
r = append(r, currentfdEncoded)
|
||||
}
|
||||
for i := 0; i < currentfd.Imports().Len(); i++ {
|
||||
queue = append(queue, currentfd.Imports().Get(i))
|
||||
}
|
||||
}
|
||||
return r, nil
|
||||
}
|
||||
|
||||
// FileDescEncodingContainingSymbol finds the file descriptor containing the
|
||||
// given symbol, finds all of its previously unsent transitive dependencies,
|
||||
// does marshalling on them, and returns the marshalled result. The given symbol
|
||||
// can be a type, a service or a method.
|
||||
func (s *ServerReflectionServer) FileDescEncodingContainingSymbol(name string, sentFileDescriptors map[string]bool) ([][]byte, error) {
|
||||
d, err := s.DescResolver.FindDescriptorByName(protoreflect.FullName(name))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s.FileDescWithDependencies(d.ParentFile(), sentFileDescriptors)
|
||||
}
|
||||
|
||||
// FileDescEncodingContainingExtension finds the file descriptor containing
|
||||
// given extension, finds all of its previously unsent transitive dependencies,
|
||||
// does marshalling on them, and returns the marshalled result.
|
||||
func (s *ServerReflectionServer) FileDescEncodingContainingExtension(typeName string, extNum int32, sentFileDescriptors map[string]bool) ([][]byte, error) {
|
||||
xt, err := s.ExtResolver.FindExtensionByNumber(protoreflect.FullName(typeName), protoreflect.FieldNumber(extNum))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return s.FileDescWithDependencies(xt.TypeDescriptor().ParentFile(), sentFileDescriptors)
|
||||
}
|
||||
|
||||
// AllExtensionNumbersForTypeName returns all extension numbers for the given type.
|
||||
func (s *ServerReflectionServer) AllExtensionNumbersForTypeName(name string) ([]int32, error) {
|
||||
var numbers []int32
|
||||
s.ExtResolver.RangeExtensionsByMessage(protoreflect.FullName(name), func(xt protoreflect.ExtensionType) bool {
|
||||
numbers = append(numbers, int32(xt.TypeDescriptor().Number()))
|
||||
return true
|
||||
})
|
||||
sort.Slice(numbers, func(i, j int) bool {
|
||||
return numbers[i] < numbers[j]
|
||||
})
|
||||
if len(numbers) == 0 {
|
||||
// maybe return an error if given type name is not known
|
||||
if _, err := s.DescResolver.FindDescriptorByName(protoreflect.FullName(name)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return numbers, nil
|
||||
}
|
||||
|
||||
// ListServices returns the names of services this server exposes.
|
||||
func (s *ServerReflectionServer) ListServices() []*v1reflectionpb.ServiceResponse {
|
||||
serviceInfo := s.S.GetServiceInfo()
|
||||
resp := make([]*v1reflectionpb.ServiceResponse, 0, len(serviceInfo))
|
||||
for svc := range serviceInfo {
|
||||
resp = append(resp, &v1reflectionpb.ServiceResponse{Name: svc})
|
||||
}
|
||||
sort.Slice(resp, func(i, j int) bool {
|
||||
return resp[i].Name < resp[j].Name
|
||||
})
|
||||
return resp
|
||||
}
|
||||
|
||||
// ServerReflectionInfo is the reflection service handler.
|
||||
func (s *ServerReflectionServer) ServerReflectionInfo(stream v1reflectiongrpc.ServerReflection_ServerReflectionInfoServer) error {
|
||||
sentFileDescriptors := make(map[string]bool)
|
||||
for {
|
||||
in, err := stream.Recv()
|
||||
if err == io.EOF {
|
||||
return nil
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
out := &v1reflectionpb.ServerReflectionResponse{
|
||||
ValidHost: in.Host,
|
||||
OriginalRequest: in,
|
||||
}
|
||||
switch req := in.MessageRequest.(type) {
|
||||
case *v1reflectionpb.ServerReflectionRequest_FileByFilename:
|
||||
var b [][]byte
|
||||
fd, err := s.DescResolver.FindFileByPath(req.FileByFilename)
|
||||
if err == nil {
|
||||
b, err = s.FileDescWithDependencies(fd, sentFileDescriptors)
|
||||
}
|
||||
if err != nil {
|
||||
out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
|
||||
ErrorResponse: &v1reflectionpb.ErrorResponse{
|
||||
ErrorCode: int32(codes.NotFound),
|
||||
ErrorMessage: err.Error(),
|
||||
},
|
||||
}
|
||||
} else {
|
||||
out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse{
|
||||
FileDescriptorResponse: &v1reflectionpb.FileDescriptorResponse{FileDescriptorProto: b},
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionRequest_FileContainingSymbol:
|
||||
b, err := s.FileDescEncodingContainingSymbol(req.FileContainingSymbol, sentFileDescriptors)
|
||||
if err != nil {
|
||||
out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
|
||||
ErrorResponse: &v1reflectionpb.ErrorResponse{
|
||||
ErrorCode: int32(codes.NotFound),
|
||||
ErrorMessage: err.Error(),
|
||||
},
|
||||
}
|
||||
} else {
|
||||
out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse{
|
||||
FileDescriptorResponse: &v1reflectionpb.FileDescriptorResponse{FileDescriptorProto: b},
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionRequest_FileContainingExtension:
|
||||
typeName := req.FileContainingExtension.ContainingType
|
||||
extNum := req.FileContainingExtension.ExtensionNumber
|
||||
b, err := s.FileDescEncodingContainingExtension(typeName, extNum, sentFileDescriptors)
|
||||
if err != nil {
|
||||
out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
|
||||
ErrorResponse: &v1reflectionpb.ErrorResponse{
|
||||
ErrorCode: int32(codes.NotFound),
|
||||
ErrorMessage: err.Error(),
|
||||
},
|
||||
}
|
||||
} else {
|
||||
out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse{
|
||||
FileDescriptorResponse: &v1reflectionpb.FileDescriptorResponse{FileDescriptorProto: b},
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType:
|
||||
extNums, err := s.AllExtensionNumbersForTypeName(req.AllExtensionNumbersOfType)
|
||||
if err != nil {
|
||||
out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
|
||||
ErrorResponse: &v1reflectionpb.ErrorResponse{
|
||||
ErrorCode: int32(codes.NotFound),
|
||||
ErrorMessage: err.Error(),
|
||||
},
|
||||
}
|
||||
} else {
|
||||
out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse{
|
||||
AllExtensionNumbersResponse: &v1reflectionpb.ExtensionNumberResponse{
|
||||
BaseTypeName: req.AllExtensionNumbersOfType,
|
||||
ExtensionNumber: extNums,
|
||||
},
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionRequest_ListServices:
|
||||
out.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ListServicesResponse{
|
||||
ListServicesResponse: &v1reflectionpb.ListServiceResponse{
|
||||
Service: s.ListServices(),
|
||||
},
|
||||
}
|
||||
default:
|
||||
return status.Errorf(codes.InvalidArgument, "invalid MessageRequest: %v", in.MessageRequest)
|
||||
}
|
||||
|
||||
if err := stream.Send(out); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// V1ToV1AlphaResponse converts a v1 ServerReflectionResponse to a v1alpha.
|
||||
func V1ToV1AlphaResponse(v1 *v1reflectionpb.ServerReflectionResponse) *v1alphareflectionpb.ServerReflectionResponse {
|
||||
var v1alpha v1alphareflectionpb.ServerReflectionResponse
|
||||
v1alpha.ValidHost = v1.ValidHost
|
||||
if v1.OriginalRequest != nil {
|
||||
v1alpha.OriginalRequest = V1ToV1AlphaRequest(v1.OriginalRequest)
|
||||
}
|
||||
switch mr := v1.MessageResponse.(type) {
|
||||
case *v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse:
|
||||
if mr != nil {
|
||||
v1alpha.MessageResponse = &v1alphareflectionpb.ServerReflectionResponse_FileDescriptorResponse{
|
||||
FileDescriptorResponse: &v1alphareflectionpb.FileDescriptorResponse{
|
||||
FileDescriptorProto: mr.FileDescriptorResponse.GetFileDescriptorProto(),
|
||||
},
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse:
|
||||
if mr != nil {
|
||||
v1alpha.MessageResponse = &v1alphareflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse{
|
||||
AllExtensionNumbersResponse: &v1alphareflectionpb.ExtensionNumberResponse{
|
||||
BaseTypeName: mr.AllExtensionNumbersResponse.GetBaseTypeName(),
|
||||
ExtensionNumber: mr.AllExtensionNumbersResponse.GetExtensionNumber(),
|
||||
},
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionResponse_ListServicesResponse:
|
||||
if mr != nil {
|
||||
svcs := make([]*v1alphareflectionpb.ServiceResponse, len(mr.ListServicesResponse.GetService()))
|
||||
for i, svc := range mr.ListServicesResponse.GetService() {
|
||||
svcs[i] = &v1alphareflectionpb.ServiceResponse{
|
||||
Name: svc.GetName(),
|
||||
}
|
||||
}
|
||||
v1alpha.MessageResponse = &v1alphareflectionpb.ServerReflectionResponse_ListServicesResponse{
|
||||
ListServicesResponse: &v1alphareflectionpb.ListServiceResponse{
|
||||
Service: svcs,
|
||||
},
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionResponse_ErrorResponse:
|
||||
if mr != nil {
|
||||
v1alpha.MessageResponse = &v1alphareflectionpb.ServerReflectionResponse_ErrorResponse{
|
||||
ErrorResponse: &v1alphareflectionpb.ErrorResponse{
|
||||
ErrorCode: mr.ErrorResponse.GetErrorCode(),
|
||||
ErrorMessage: mr.ErrorResponse.GetErrorMessage(),
|
||||
},
|
||||
}
|
||||
}
|
||||
default:
|
||||
// no value set
|
||||
}
|
||||
return &v1alpha
|
||||
}
|
||||
|
||||
// V1AlphaToV1Request converts a v1alpha ServerReflectionRequest to a v1.
|
||||
func V1AlphaToV1Request(v1alpha *v1alphareflectionpb.ServerReflectionRequest) *v1reflectionpb.ServerReflectionRequest {
|
||||
var v1 v1reflectionpb.ServerReflectionRequest
|
||||
v1.Host = v1alpha.Host
|
||||
switch mr := v1alpha.MessageRequest.(type) {
|
||||
case *v1alphareflectionpb.ServerReflectionRequest_FileByFilename:
|
||||
v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_FileByFilename{
|
||||
FileByFilename: mr.FileByFilename,
|
||||
}
|
||||
case *v1alphareflectionpb.ServerReflectionRequest_FileContainingSymbol:
|
||||
v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_FileContainingSymbol{
|
||||
FileContainingSymbol: mr.FileContainingSymbol,
|
||||
}
|
||||
case *v1alphareflectionpb.ServerReflectionRequest_FileContainingExtension:
|
||||
if mr.FileContainingExtension != nil {
|
||||
v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_FileContainingExtension{
|
||||
FileContainingExtension: &v1reflectionpb.ExtensionRequest{
|
||||
ContainingType: mr.FileContainingExtension.GetContainingType(),
|
||||
ExtensionNumber: mr.FileContainingExtension.GetExtensionNumber(),
|
||||
},
|
||||
}
|
||||
}
|
||||
case *v1alphareflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType:
|
||||
v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType{
|
||||
AllExtensionNumbersOfType: mr.AllExtensionNumbersOfType,
|
||||
}
|
||||
case *v1alphareflectionpb.ServerReflectionRequest_ListServices:
|
||||
v1.MessageRequest = &v1reflectionpb.ServerReflectionRequest_ListServices{
|
||||
ListServices: mr.ListServices,
|
||||
}
|
||||
default:
|
||||
// no value set
|
||||
}
|
||||
return &v1
|
||||
}
|
||||
|
||||
// V1ToV1AlphaRequest converts a v1 ServerReflectionRequest to a v1alpha.
|
||||
func V1ToV1AlphaRequest(v1 *v1reflectionpb.ServerReflectionRequest) *v1alphareflectionpb.ServerReflectionRequest {
|
||||
var v1alpha v1alphareflectionpb.ServerReflectionRequest
|
||||
v1alpha.Host = v1.Host
|
||||
switch mr := v1.MessageRequest.(type) {
|
||||
case *v1reflectionpb.ServerReflectionRequest_FileByFilename:
|
||||
if mr != nil {
|
||||
v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_FileByFilename{
|
||||
FileByFilename: mr.FileByFilename,
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionRequest_FileContainingSymbol:
|
||||
if mr != nil {
|
||||
v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_FileContainingSymbol{
|
||||
FileContainingSymbol: mr.FileContainingSymbol,
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionRequest_FileContainingExtension:
|
||||
if mr != nil {
|
||||
v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_FileContainingExtension{
|
||||
FileContainingExtension: &v1alphareflectionpb.ExtensionRequest{
|
||||
ContainingType: mr.FileContainingExtension.GetContainingType(),
|
||||
ExtensionNumber: mr.FileContainingExtension.GetExtensionNumber(),
|
||||
},
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType:
|
||||
if mr != nil {
|
||||
v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_AllExtensionNumbersOfType{
|
||||
AllExtensionNumbersOfType: mr.AllExtensionNumbersOfType,
|
||||
}
|
||||
}
|
||||
case *v1reflectionpb.ServerReflectionRequest_ListServices:
|
||||
if mr != nil {
|
||||
v1alpha.MessageRequest = &v1alphareflectionpb.ServerReflectionRequest_ListServices{
|
||||
ListServices: mr.ListServices,
|
||||
}
|
||||
}
|
||||
default:
|
||||
// no value set
|
||||
}
|
||||
return &v1alpha
|
||||
}
|
||||
|
||||
// V1AlphaToV1Response converts a v1alpha ServerReflectionResponse to a v1.
|
||||
func V1AlphaToV1Response(v1alpha *v1alphareflectionpb.ServerReflectionResponse) *v1reflectionpb.ServerReflectionResponse {
|
||||
var v1 v1reflectionpb.ServerReflectionResponse
|
||||
v1.ValidHost = v1alpha.ValidHost
|
||||
if v1alpha.OriginalRequest != nil {
|
||||
v1.OriginalRequest = V1AlphaToV1Request(v1alpha.OriginalRequest)
|
||||
}
|
||||
switch mr := v1alpha.MessageResponse.(type) {
|
||||
case *v1alphareflectionpb.ServerReflectionResponse_FileDescriptorResponse:
|
||||
if mr != nil {
|
||||
v1.MessageResponse = &v1reflectionpb.ServerReflectionResponse_FileDescriptorResponse{
|
||||
FileDescriptorResponse: &v1reflectionpb.FileDescriptorResponse{
|
||||
FileDescriptorProto: mr.FileDescriptorResponse.GetFileDescriptorProto(),
|
||||
},
|
||||
}
|
||||
}
|
||||
case *v1alphareflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse:
|
||||
if mr != nil {
|
||||
v1.MessageResponse = &v1reflectionpb.ServerReflectionResponse_AllExtensionNumbersResponse{
|
||||
AllExtensionNumbersResponse: &v1reflectionpb.ExtensionNumberResponse{
|
||||
BaseTypeName: mr.AllExtensionNumbersResponse.GetBaseTypeName(),
|
||||
ExtensionNumber: mr.AllExtensionNumbersResponse.GetExtensionNumber(),
|
||||
},
|
||||
}
|
||||
}
|
||||
case *v1alphareflectionpb.ServerReflectionResponse_ListServicesResponse:
|
||||
if mr != nil {
|
||||
svcs := make([]*v1reflectionpb.ServiceResponse, len(mr.ListServicesResponse.GetService()))
|
||||
for i, svc := range mr.ListServicesResponse.GetService() {
|
||||
svcs[i] = &v1reflectionpb.ServiceResponse{
|
||||
Name: svc.GetName(),
|
||||
}
|
||||
}
|
||||
v1.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ListServicesResponse{
|
||||
ListServicesResponse: &v1reflectionpb.ListServiceResponse{
|
||||
Service: svcs,
|
||||
},
|
||||
}
|
||||
}
|
||||
case *v1alphareflectionpb.ServerReflectionResponse_ErrorResponse:
|
||||
if mr != nil {
|
||||
v1.MessageResponse = &v1reflectionpb.ServerReflectionResponse_ErrorResponse{
|
||||
ErrorResponse: &v1reflectionpb.ErrorResponse{
|
||||
ErrorCode: mr.ErrorResponse.GetErrorCode(),
|
||||
ErrorMessage: mr.ErrorResponse.GetErrorMessage(),
|
||||
},
|
||||
}
|
||||
}
|
||||
default:
|
||||
// no value set
|
||||
}
|
||||
return &v1
|
||||
}
|
160
vendor/google.golang.org/grpc/reflection/serverreflection.go
generated
vendored
Normal file
160
vendor/google.golang.org/grpc/reflection/serverreflection.go
generated
vendored
Normal file
@ -0,0 +1,160 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
Package reflection implements server reflection service.
|
||||
|
||||
The service implemented is defined in:
|
||||
https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto.
|
||||
|
||||
To register server reflection on a gRPC server:
|
||||
|
||||
import "google.golang.org/grpc/reflection"
|
||||
|
||||
s := grpc.NewServer()
|
||||
pb.RegisterYourOwnServer(s, &server{})
|
||||
|
||||
// Register reflection service on gRPC server.
|
||||
reflection.Register(s)
|
||||
|
||||
s.Serve(lis)
|
||||
*/
|
||||
package reflection // import "google.golang.org/grpc/reflection"
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/reflection/internal"
|
||||
"google.golang.org/protobuf/reflect/protodesc"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
|
||||
v1reflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1"
|
||||
v1alphareflectiongrpc "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
|
||||
)
|
||||
|
||||
// GRPCServer is the interface provided by a gRPC server. It is implemented by
|
||||
// *grpc.Server, but could also be implemented by other concrete types. It acts
|
||||
// as a registry, for accumulating the services exposed by the server.
|
||||
type GRPCServer interface {
|
||||
grpc.ServiceRegistrar
|
||||
ServiceInfoProvider
|
||||
}
|
||||
|
||||
var _ GRPCServer = (*grpc.Server)(nil)
|
||||
|
||||
// Register registers the server reflection service on the given gRPC server.
|
||||
// Both the v1 and v1alpha versions are registered.
|
||||
func Register(s GRPCServer) {
|
||||
svr := NewServerV1(ServerOptions{Services: s})
|
||||
v1alphareflectiongrpc.RegisterServerReflectionServer(s, asV1Alpha(svr))
|
||||
v1reflectiongrpc.RegisterServerReflectionServer(s, svr)
|
||||
}
|
||||
|
||||
// RegisterV1 registers only the v1 version of the server reflection service
|
||||
// on the given gRPC server. Many clients may only support v1alpha so most
|
||||
// users should use Register instead, at least until clients have upgraded.
|
||||
func RegisterV1(s GRPCServer) {
|
||||
svr := NewServerV1(ServerOptions{Services: s})
|
||||
v1reflectiongrpc.RegisterServerReflectionServer(s, svr)
|
||||
}
|
||||
|
||||
// ServiceInfoProvider is an interface used to retrieve metadata about the
|
||||
// services to expose.
|
||||
//
|
||||
// The reflection service is only interested in the service names, but the
|
||||
// signature is this way so that *grpc.Server implements it. So it is okay
|
||||
// for a custom implementation to return zero values for the
|
||||
// grpc.ServiceInfo values in the map.
|
||||
//
|
||||
// # Experimental
|
||||
//
|
||||
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
|
||||
// later release.
|
||||
type ServiceInfoProvider interface {
|
||||
GetServiceInfo() map[string]grpc.ServiceInfo
|
||||
}
|
||||
|
||||
// ExtensionResolver is the interface used to query details about extensions.
|
||||
// This interface is satisfied by protoregistry.GlobalTypes.
|
||||
//
|
||||
// # Experimental
|
||||
//
|
||||
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
|
||||
// later release.
|
||||
type ExtensionResolver interface {
|
||||
protoregistry.ExtensionTypeResolver
|
||||
RangeExtensionsByMessage(message protoreflect.FullName, f func(protoreflect.ExtensionType) bool)
|
||||
}
|
||||
|
||||
// ServerOptions represents the options used to construct a reflection server.
|
||||
//
|
||||
// # Experimental
|
||||
//
|
||||
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
|
||||
// later release.
|
||||
type ServerOptions struct {
|
||||
// The source of advertised RPC services. If not specified, the reflection
|
||||
// server will report an empty list when asked to list services.
|
||||
//
|
||||
// This value will typically be a *grpc.Server. But the set of advertised
|
||||
// services can be customized by wrapping a *grpc.Server or using an
|
||||
// alternate implementation that returns a custom set of service names.
|
||||
Services ServiceInfoProvider
|
||||
// Optional resolver used to load descriptors. If not specified,
|
||||
// protoregistry.GlobalFiles will be used.
|
||||
DescriptorResolver protodesc.Resolver
|
||||
// Optional resolver used to query for known extensions. If not specified,
|
||||
// protoregistry.GlobalTypes will be used.
|
||||
ExtensionResolver ExtensionResolver
|
||||
}
|
||||
|
||||
// NewServer returns a reflection server implementation using the given options.
|
||||
// This can be used to customize behavior of the reflection service. Most usages
|
||||
// should prefer to use Register instead. For backwards compatibility reasons,
|
||||
// this returns the v1alpha version of the reflection server. For a v1 version
|
||||
// of the reflection server, see NewServerV1.
|
||||
//
|
||||
// # Experimental
|
||||
//
|
||||
// Notice: This function is EXPERIMENTAL and may be changed or removed in a
|
||||
// later release.
|
||||
func NewServer(opts ServerOptions) v1alphareflectiongrpc.ServerReflectionServer {
|
||||
return asV1Alpha(NewServerV1(opts))
|
||||
}
|
||||
|
||||
// NewServerV1 returns a reflection server implementation using the given options.
|
||||
// This can be used to customize behavior of the reflection service. Most usages
|
||||
// should prefer to use Register instead.
|
||||
//
|
||||
// # Experimental
|
||||
//
|
||||
// Notice: This function is EXPERIMENTAL and may be changed or removed in a
|
||||
// later release.
|
||||
func NewServerV1(opts ServerOptions) v1reflectiongrpc.ServerReflectionServer {
|
||||
if opts.DescriptorResolver == nil {
|
||||
opts.DescriptorResolver = protoregistry.GlobalFiles
|
||||
}
|
||||
if opts.ExtensionResolver == nil {
|
||||
opts.ExtensionResolver = protoregistry.GlobalTypes
|
||||
}
|
||||
return &internal.ServerReflectionServer{
|
||||
S: opts.Services,
|
||||
DescResolver: opts.DescriptorResolver,
|
||||
ExtResolver: opts.ExtensionResolver,
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user