From aa86446f4fcb1f67da5d8d2a6da6955d6b940ab2 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Tue, 15 Sep 2020 14:44:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B6=E6=AE=B5=E6=80=A7=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/rpc/pb/model_http_web.pb.go | 155 ++ pkg/rpc/pb/model_reverse_proxy.pb.go | 179 ++ pkg/rpc/pb/model_server.pb.go | 158 +- pkg/rpc/pb/service_http_web.pb.go | 652 +++++ pkg/rpc/pb/service_origin_server.pb.go | 250 +- pkg/rpc/pb/service_reverse_proxy.pb.go | 1223 +++++++++ pkg/rpc/pb/service_server.pb.go | 2419 +++++++++++++++-- pkg/rpc/protos/model_http_web.proto | 9 + pkg/rpc/protos/model_reverse_proxy.proto | 11 + pkg/rpc/protos/model_server.proto | 27 +- pkg/rpc/protos/service_http_web.proto | 45 + pkg/rpc/protos/service_origin_server.proto | 12 + pkg/rpc/protos/service_reverse_proxy.proto | 85 + pkg/rpc/protos/service_server.proto | 173 +- pkg/serverconfigs/network_address_config.go | 10 +- pkg/serverconfigs/origin_server_config.go | 22 +- pkg/serverconfigs/protocol.go | 51 +- pkg/serverconfigs/protocol_test.go | 22 + pkg/serverconfigs/reverse_proxy_config.go | 64 +- .../candidate.go | 2 +- .../scheduling.go | 2 +- .../scheduling_hash.go | 4 +- .../scheduling_hash_test.go | 2 +- .../scheduling_random.go | 4 +- .../scheduling_random_test.go | 2 +- .../scheduling_round_robin.go | 4 +- .../scheduling_round_robin_test.go | 2 +- .../scheduling_sticky.go | 4 +- .../scheduling_sticky_test.go | 18 +- .../utils.go | 2 +- pkg/serverconfigs/server_config.go | 19 +- pkg/serverconfigs/server_group.go | 6 +- 32 files changed, 5228 insertions(+), 410 deletions(-) create mode 100644 pkg/rpc/pb/model_http_web.pb.go create mode 100644 pkg/rpc/pb/model_reverse_proxy.pb.go create mode 100644 pkg/rpc/pb/service_http_web.pb.go create mode 100644 pkg/rpc/pb/service_reverse_proxy.pb.go create mode 100644 pkg/rpc/protos/model_http_web.proto create mode 100644 pkg/rpc/protos/model_reverse_proxy.proto create mode 100644 pkg/rpc/protos/service_http_web.proto create mode 100644 pkg/rpc/protos/service_reverse_proxy.proto create mode 100644 pkg/serverconfigs/protocol_test.go rename pkg/serverconfigs/{scheduling => schedulingconfigs}/candidate.go (83%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/scheduling.go (96%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/scheduling_hash.go (89%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/scheduling_hash_test.go (96%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/scheduling_random.go (94%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/scheduling_random_test.go (97%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/scheduling_round_robin.go (95%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/scheduling_round_robin_test.go (98%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/scheduling_sticky.go (98%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/scheduling_sticky_test.go (82%) rename pkg/serverconfigs/{scheduling => schedulingconfigs}/utils.go (95%) diff --git a/pkg/rpc/pb/model_http_web.pb.go b/pkg/rpc/pb/model_http_web.pb.go new file mode 100644 index 0000000..961d382 --- /dev/null +++ b/pkg/rpc/pb/model_http_web.pb.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: model_http_web.proto + +package pb + +import ( + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type HTTPWeb struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` +} + +func (x *HTTPWeb) Reset() { + *x = HTTPWeb{} + if protoimpl.UnsafeEnabled { + mi := &file_model_http_web_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPWeb) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPWeb) ProtoMessage() {} + +func (x *HTTPWeb) ProtoReflect() protoreflect.Message { + mi := &file_model_http_web_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 HTTPWeb.ProtoReflect.Descriptor instead. +func (*HTTPWeb) Descriptor() ([]byte, []int) { + return file_model_http_web_proto_rawDescGZIP(), []int{0} +} + +func (x *HTTPWeb) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *HTTPWeb) GetRoot() string { + if x != nil { + return x.Root + } + return "" +} + +var File_model_http_web_proto protoreflect.FileDescriptor + +var file_model_http_web_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x77, 0x65, 0x62, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x2d, 0x0a, 0x07, 0x48, 0x54, + 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_http_web_proto_rawDescOnce sync.Once + file_model_http_web_proto_rawDescData = file_model_http_web_proto_rawDesc +) + +func file_model_http_web_proto_rawDescGZIP() []byte { + file_model_http_web_proto_rawDescOnce.Do(func() { + file_model_http_web_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_http_web_proto_rawDescData) + }) + return file_model_http_web_proto_rawDescData +} + +var file_model_http_web_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_http_web_proto_goTypes = []interface{}{ + (*HTTPWeb)(nil), // 0: pb.HTTPWeb +} +var file_model_http_web_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_model_http_web_proto_init() } +func file_model_http_web_proto_init() { + if File_model_http_web_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_http_web_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPWeb); 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_model_http_web_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_http_web_proto_goTypes, + DependencyIndexes: file_model_http_web_proto_depIdxs, + MessageInfos: file_model_http_web_proto_msgTypes, + }.Build() + File_model_http_web_proto = out.File + file_model_http_web_proto_rawDesc = nil + file_model_http_web_proto_goTypes = nil + file_model_http_web_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/model_reverse_proxy.pb.go b/pkg/rpc/pb/model_reverse_proxy.pb.go new file mode 100644 index 0000000..bd895ef --- /dev/null +++ b/pkg/rpc/pb/model_reverse_proxy.pb.go @@ -0,0 +1,179 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: model_reverse_proxy.proto + +package pb + +import ( + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ReverseProxy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + SchedulingJSON []byte `protobuf:"bytes,2,opt,name=schedulingJSON,proto3" json:"schedulingJSON,omitempty"` + PrimaryOriginsJSON []byte `protobuf:"bytes,3,opt,name=primaryOriginsJSON,proto3" json:"primaryOriginsJSON,omitempty"` + BackupOriginsJSON []byte `protobuf:"bytes,4,opt,name=backupOriginsJSON,proto3" json:"backupOriginsJSON,omitempty"` +} + +func (x *ReverseProxy) Reset() { + *x = ReverseProxy{} + if protoimpl.UnsafeEnabled { + mi := &file_model_reverse_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReverseProxy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReverseProxy) ProtoMessage() {} + +func (x *ReverseProxy) ProtoReflect() protoreflect.Message { + mi := &file_model_reverse_proxy_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 ReverseProxy.ProtoReflect.Descriptor instead. +func (*ReverseProxy) Descriptor() ([]byte, []int) { + return file_model_reverse_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *ReverseProxy) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ReverseProxy) GetSchedulingJSON() []byte { + if x != nil { + return x.SchedulingJSON + } + return nil +} + +func (x *ReverseProxy) GetPrimaryOriginsJSON() []byte { + if x != nil { + return x.PrimaryOriginsJSON + } + return nil +} + +func (x *ReverseProxy) GetBackupOriginsJSON() []byte { + if x != nil { + return x.BackupOriginsJSON + } + return nil +} + +var File_model_reverse_proxy_proto protoreflect.FileDescriptor + +var file_model_reverse_proxy_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, + 0xa4, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x4a, 0x53, + 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x69, 0x6e, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6d, + 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2c, 0x0a, 0x11, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x11, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_reverse_proxy_proto_rawDescOnce sync.Once + file_model_reverse_proxy_proto_rawDescData = file_model_reverse_proxy_proto_rawDesc +) + +func file_model_reverse_proxy_proto_rawDescGZIP() []byte { + file_model_reverse_proxy_proto_rawDescOnce.Do(func() { + file_model_reverse_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_reverse_proxy_proto_rawDescData) + }) + return file_model_reverse_proxy_proto_rawDescData +} + +var file_model_reverse_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_reverse_proxy_proto_goTypes = []interface{}{ + (*ReverseProxy)(nil), // 0: pb.ReverseProxy +} +var file_model_reverse_proxy_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_model_reverse_proxy_proto_init() } +func file_model_reverse_proxy_proto_init() { + if File_model_reverse_proxy_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_reverse_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReverseProxy); 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_model_reverse_proxy_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_reverse_proxy_proto_goTypes, + DependencyIndexes: file_model_reverse_proxy_proto_depIdxs, + MessageInfos: file_model_reverse_proxy_proto_msgTypes, + }.Build() + File_model_reverse_proxy_proto = out.File + file_model_reverse_proxy_proto_rawDesc = nil + file_model_reverse_proxy_proto_goTypes = nil + file_model_reverse_proxy_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/model_server.pb.go b/pkg/rpc/pb/model_server.pb.go index 3051d5e..a5f67b5 100644 --- a/pkg/rpc/pb/model_server.pb.go +++ b/pkg/rpc/pb/model_server.pb.go @@ -30,15 +30,25 @@ type Server struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - IncludeNodes []byte `protobuf:"bytes,6,opt,name=includeNodes,proto3" json:"includeNodes,omitempty"` - ExcludeNodes []byte `protobuf:"bytes,7,opt,name=excludeNodes,proto3" json:"excludeNodes,omitempty"` - CreatedAt int64 `protobuf:"varint,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"` - Cluster *NodeCluster `protobuf:"bytes,10,opt,name=cluster,proto3" json:"cluster,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + IncludeNodes []byte `protobuf:"bytes,5,opt,name=includeNodes,proto3" json:"includeNodes,omitempty"` + ExcludeNodes []byte `protobuf:"bytes,6,opt,name=excludeNodes,proto3" json:"excludeNodes,omitempty"` + CreatedAt int64 `protobuf:"varint,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + // 配置相关 + Config []byte `protobuf:"bytes,17,opt,name=config,proto3" json:"config,omitempty"` + ServerNamesJON []byte `protobuf:"bytes,8,opt,name=serverNamesJON,proto3" json:"serverNamesJON,omitempty"` + HttpJSON []byte `protobuf:"bytes,9,opt,name=httpJSON,proto3" json:"httpJSON,omitempty"` + HttpsJSON []byte `protobuf:"bytes,10,opt,name=httpsJSON,proto3" json:"httpsJSON,omitempty"` + TcpJSON []byte `protobuf:"bytes,11,opt,name=tcpJSON,proto3" json:"tcpJSON,omitempty"` + TlsJSON []byte `protobuf:"bytes,12,opt,name=tlsJSON,proto3" json:"tlsJSON,omitempty"` + UnixJSON []byte `protobuf:"bytes,13,opt,name=unixJSON,proto3" json:"unixJSON,omitempty"` + UdpJSON []byte `protobuf:"bytes,14,opt,name=udpJSON,proto3" json:"udpJSON,omitempty"` + WebId int64 `protobuf:"varint,15,opt,name=webId,proto3" json:"webId,omitempty"` + ReverseProxyId int64 `protobuf:"varint,16,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` + Cluster *NodeCluster `protobuf:"bytes,30,opt,name=cluster,proto3" json:"cluster,omitempty"` } func (x *Server) Reset() { @@ -80,13 +90,6 @@ func (x *Server) GetId() int64 { return 0 } -func (x *Server) GetConfig() []byte { - if x != nil { - return x.Config - } - return nil -} - func (x *Server) GetType() string { if x != nil { return x.Type @@ -129,6 +132,76 @@ func (x *Server) GetCreatedAt() int64 { return 0 } +func (x *Server) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +func (x *Server) GetServerNamesJON() []byte { + if x != nil { + return x.ServerNamesJON + } + return nil +} + +func (x *Server) GetHttpJSON() []byte { + if x != nil { + return x.HttpJSON + } + return nil +} + +func (x *Server) GetHttpsJSON() []byte { + if x != nil { + return x.HttpsJSON + } + return nil +} + +func (x *Server) GetTcpJSON() []byte { + if x != nil { + return x.TcpJSON + } + return nil +} + +func (x *Server) GetTlsJSON() []byte { + if x != nil { + return x.TlsJSON + } + return nil +} + +func (x *Server) GetUnixJSON() []byte { + if x != nil { + return x.UnixJSON + } + return nil +} + +func (x *Server) GetUdpJSON() []byte { + if x != nil { + return x.UdpJSON + } + return nil +} + +func (x *Server) GetWebId() int64 { + if x != nil { + return x.WebId + } + return 0 +} + +func (x *Server) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + func (x *Server) GetCluster() *NodeCluster { if x != nil { return x.Cluster @@ -142,24 +215,41 @@ var file_model_server_proto_rawDesc = []byte{ 0x0a, 0x12, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x8b, 0x02, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, - 0x64, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, - 0x64, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x22, 0x95, 0x04, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, + 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, + 0x08, 0x68, 0x74, 0x74, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x68, 0x74, 0x74, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, + 0x4f, 0x4e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, 0x4f, + 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x75, + 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x75, + 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, + 0x4f, 0x4e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, + 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x12, + 0x29, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/rpc/pb/service_http_web.pb.go b/pkg/rpc/pb/service_http_web.pb.go new file mode 100644 index 0000000..e518240 --- /dev/null +++ b/pkg/rpc/pb/service_http_web.pb.go @@ -0,0 +1,652 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: service_http_web.proto + +package pb + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// 创建Web配置 +type CreateHTTPWebRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Root string `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` +} + +func (x *CreateHTTPWebRequest) Reset() { + *x = CreateHTTPWebRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_web_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHTTPWebRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHTTPWebRequest) ProtoMessage() {} + +func (x *CreateHTTPWebRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_web_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 CreateHTTPWebRequest.ProtoReflect.Descriptor instead. +func (*CreateHTTPWebRequest) Descriptor() ([]byte, []int) { + return file_service_http_web_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateHTTPWebRequest) GetRoot() string { + if x != nil { + return x.Root + } + return "" +} + +type CreateHTTPWebResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WebId int64 `protobuf:"varint,1,opt,name=webId,proto3" json:"webId,omitempty"` +} + +func (x *CreateHTTPWebResponse) Reset() { + *x = CreateHTTPWebResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_web_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHTTPWebResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHTTPWebResponse) ProtoMessage() {} + +func (x *CreateHTTPWebResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_web_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 CreateHTTPWebResponse.ProtoReflect.Descriptor instead. +func (*CreateHTTPWebResponse) Descriptor() ([]byte, []int) { + return file_service_http_web_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateHTTPWebResponse) GetWebId() int64 { + if x != nil { + return x.WebId + } + return 0 +} + +// 查找Web配置 +type FindEnabledHTTPWebRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WebId int64 `protobuf:"varint,1,opt,name=webId,proto3" json:"webId,omitempty"` +} + +func (x *FindEnabledHTTPWebRequest) Reset() { + *x = FindEnabledHTTPWebRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_web_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledHTTPWebRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledHTTPWebRequest) ProtoMessage() {} + +func (x *FindEnabledHTTPWebRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_web_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 FindEnabledHTTPWebRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledHTTPWebRequest) Descriptor() ([]byte, []int) { + return file_service_http_web_proto_rawDescGZIP(), []int{2} +} + +func (x *FindEnabledHTTPWebRequest) GetWebId() int64 { + if x != nil { + return x.WebId + } + return 0 +} + +type FindEnabledHTTPWebResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Web *HTTPWeb `protobuf:"bytes,1,opt,name=web,proto3" json:"web,omitempty"` +} + +func (x *FindEnabledHTTPWebResponse) Reset() { + *x = FindEnabledHTTPWebResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_web_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledHTTPWebResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledHTTPWebResponse) ProtoMessage() {} + +func (x *FindEnabledHTTPWebResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_web_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 FindEnabledHTTPWebResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledHTTPWebResponse) Descriptor() ([]byte, []int) { + return file_service_http_web_proto_rawDescGZIP(), []int{3} +} + +func (x *FindEnabledHTTPWebResponse) GetWeb() *HTTPWeb { + if x != nil { + return x.Web + } + return nil +} + +// 更新Web配置 +type UpdateHTTPWebRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WebId int64 `protobuf:"varint,1,opt,name=webId,proto3" json:"webId,omitempty"` + Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` +} + +func (x *UpdateHTTPWebRequest) Reset() { + *x = UpdateHTTPWebRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_web_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHTTPWebRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHTTPWebRequest) ProtoMessage() {} + +func (x *UpdateHTTPWebRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_http_web_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 UpdateHTTPWebRequest.ProtoReflect.Descriptor instead. +func (*UpdateHTTPWebRequest) Descriptor() ([]byte, []int) { + return file_service_http_web_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateHTTPWebRequest) GetWebId() int64 { + if x != nil { + return x.WebId + } + return 0 +} + +func (x *UpdateHTTPWebRequest) GetRoot() string { + if x != nil { + return x.Root + } + return "" +} + +type UpdateHTTPWebResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateHTTPWebResponse) Reset() { + *x = UpdateHTTPWebResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_http_web_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHTTPWebResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHTTPWebResponse) ProtoMessage() {} + +func (x *UpdateHTTPWebResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_http_web_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 UpdateHTTPWebResponse.ProtoReflect.Descriptor instead. +func (*UpdateHTTPWebResponse) Descriptor() ([]byte, []int) { + return file_service_http_web_proto_rawDescGZIP(), []int{5} +} + +var File_service_http_web_proto protoreflect.FileDescriptor + +var file_service_http_web_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x77, + 0x65, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x14, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x77, 0x65, 0x62, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x2a, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, + 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x2d, + 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x22, 0x31, 0x0a, + 0x19, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, + 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x65, + 0x62, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, + 0x22, 0x3b, 0x0a, 0x1a, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, + 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, + 0x0a, 0x03, 0x77, 0x65, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, + 0x2e, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x03, 0x77, 0x65, 0x62, 0x22, 0x40, 0x0a, + 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, + 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf1, 0x01, 0x0a, 0x0e, 0x48, 0x54, 0x54, + 0x50, 0x57, 0x65, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, + 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, + 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_http_web_proto_rawDescOnce sync.Once + file_service_http_web_proto_rawDescData = file_service_http_web_proto_rawDesc +) + +func file_service_http_web_proto_rawDescGZIP() []byte { + file_service_http_web_proto_rawDescOnce.Do(func() { + file_service_http_web_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_http_web_proto_rawDescData) + }) + return file_service_http_web_proto_rawDescData +} + +var file_service_http_web_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_service_http_web_proto_goTypes = []interface{}{ + (*CreateHTTPWebRequest)(nil), // 0: pb.CreateHTTPWebRequest + (*CreateHTTPWebResponse)(nil), // 1: pb.CreateHTTPWebResponse + (*FindEnabledHTTPWebRequest)(nil), // 2: pb.FindEnabledHTTPWebRequest + (*FindEnabledHTTPWebResponse)(nil), // 3: pb.FindEnabledHTTPWebResponse + (*UpdateHTTPWebRequest)(nil), // 4: pb.UpdateHTTPWebRequest + (*UpdateHTTPWebResponse)(nil), // 5: pb.UpdateHTTPWebResponse + (*HTTPWeb)(nil), // 6: pb.HTTPWeb +} +var file_service_http_web_proto_depIdxs = []int32{ + 6, // 0: pb.FindEnabledHTTPWebResponse.web:type_name -> pb.HTTPWeb + 0, // 1: pb.HTTPWebService.createHTTPWeb:input_type -> pb.CreateHTTPWebRequest + 2, // 2: pb.HTTPWebService.findEnabledHTTPWeb:input_type -> pb.FindEnabledHTTPWebRequest + 4, // 3: pb.HTTPWebService.updateHTTPWeb:input_type -> pb.UpdateHTTPWebRequest + 1, // 4: pb.HTTPWebService.createHTTPWeb:output_type -> pb.CreateHTTPWebResponse + 3, // 5: pb.HTTPWebService.findEnabledHTTPWeb:output_type -> pb.FindEnabledHTTPWebResponse + 5, // 6: pb.HTTPWebService.updateHTTPWeb:output_type -> pb.UpdateHTTPWebResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_service_http_web_proto_init() } +func file_service_http_web_proto_init() { + if File_service_http_web_proto != nil { + return + } + file_model_http_web_proto_init() + if !protoimpl.UnsafeEnabled { + file_service_http_web_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHTTPWebRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_web_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHTTPWebResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_web_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledHTTPWebRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_web_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledHTTPWebResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_web_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHTTPWebRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_http_web_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHTTPWebResponse); 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_service_http_web_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_http_web_proto_goTypes, + DependencyIndexes: file_service_http_web_proto_depIdxs, + MessageInfos: file_service_http_web_proto_msgTypes, + }.Build() + File_service_http_web_proto = out.File + file_service_http_web_proto_rawDesc = nil + file_service_http_web_proto_goTypes = nil + file_service_http_web_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// HTTPWebServiceClient is the client API for HTTPWebService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HTTPWebServiceClient interface { + // 创建Web配置 + CreateHTTPWeb(ctx context.Context, in *CreateHTTPWebRequest, opts ...grpc.CallOption) (*CreateHTTPWebResponse, error) + // 查找Web配置 + FindEnabledHTTPWeb(ctx context.Context, in *FindEnabledHTTPWebRequest, opts ...grpc.CallOption) (*FindEnabledHTTPWebResponse, error) + // 更新Web配置 + UpdateHTTPWeb(ctx context.Context, in *UpdateHTTPWebRequest, opts ...grpc.CallOption) (*UpdateHTTPWebResponse, error) +} + +type hTTPWebServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHTTPWebServiceClient(cc grpc.ClientConnInterface) HTTPWebServiceClient { + return &hTTPWebServiceClient{cc} +} + +func (c *hTTPWebServiceClient) CreateHTTPWeb(ctx context.Context, in *CreateHTTPWebRequest, opts ...grpc.CallOption) (*CreateHTTPWebResponse, error) { + out := new(CreateHTTPWebResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPWebService/createHTTPWeb", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hTTPWebServiceClient) FindEnabledHTTPWeb(ctx context.Context, in *FindEnabledHTTPWebRequest, opts ...grpc.CallOption) (*FindEnabledHTTPWebResponse, error) { + out := new(FindEnabledHTTPWebResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPWebService/findEnabledHTTPWeb", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hTTPWebServiceClient) UpdateHTTPWeb(ctx context.Context, in *UpdateHTTPWebRequest, opts ...grpc.CallOption) (*UpdateHTTPWebResponse, error) { + out := new(UpdateHTTPWebResponse) + err := c.cc.Invoke(ctx, "/pb.HTTPWebService/updateHTTPWeb", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HTTPWebServiceServer is the server API for HTTPWebService service. +type HTTPWebServiceServer interface { + // 创建Web配置 + CreateHTTPWeb(context.Context, *CreateHTTPWebRequest) (*CreateHTTPWebResponse, error) + // 查找Web配置 + FindEnabledHTTPWeb(context.Context, *FindEnabledHTTPWebRequest) (*FindEnabledHTTPWebResponse, error) + // 更新Web配置 + UpdateHTTPWeb(context.Context, *UpdateHTTPWebRequest) (*UpdateHTTPWebResponse, error) +} + +// UnimplementedHTTPWebServiceServer can be embedded to have forward compatible implementations. +type UnimplementedHTTPWebServiceServer struct { +} + +func (*UnimplementedHTTPWebServiceServer) CreateHTTPWeb(context.Context, *CreateHTTPWebRequest) (*CreateHTTPWebResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateHTTPWeb not implemented") +} +func (*UnimplementedHTTPWebServiceServer) FindEnabledHTTPWeb(context.Context, *FindEnabledHTTPWebRequest) (*FindEnabledHTTPWebResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledHTTPWeb not implemented") +} +func (*UnimplementedHTTPWebServiceServer) UpdateHTTPWeb(context.Context, *UpdateHTTPWebRequest) (*UpdateHTTPWebResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPWeb not implemented") +} + +func RegisterHTTPWebServiceServer(s *grpc.Server, srv HTTPWebServiceServer) { + s.RegisterService(&_HTTPWebService_serviceDesc, srv) +} + +func _HTTPWebService_CreateHTTPWeb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateHTTPWebRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPWebServiceServer).CreateHTTPWeb(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPWebService/CreateHTTPWeb", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPWebServiceServer).CreateHTTPWeb(ctx, req.(*CreateHTTPWebRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HTTPWebService_FindEnabledHTTPWeb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledHTTPWebRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPWebServiceServer).FindEnabledHTTPWeb(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPWebService/FindEnabledHTTPWeb", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPWebServiceServer).FindEnabledHTTPWeb(ctx, req.(*FindEnabledHTTPWebRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HTTPWebService_UpdateHTTPWeb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateHTTPWebRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HTTPWebServiceServer).UpdateHTTPWeb(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.HTTPWebService/UpdateHTTPWeb", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HTTPWebServiceServer).UpdateHTTPWeb(ctx, req.(*UpdateHTTPWebRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HTTPWebService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.HTTPWebService", + HandlerType: (*HTTPWebServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "createHTTPWeb", + Handler: _HTTPWebService_CreateHTTPWeb_Handler, + }, + { + MethodName: "findEnabledHTTPWeb", + Handler: _HTTPWebService_FindEnabledHTTPWeb_Handler, + }, + { + MethodName: "updateHTTPWeb", + Handler: _HTTPWebService_UpdateHTTPWeb_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_http_web.proto", +} diff --git a/pkg/rpc/pb/service_origin_server.pb.go b/pkg/rpc/pb/service_origin_server.pb.go index c39aabf..3a53b60 100644 --- a/pkg/rpc/pb/service_origin_server.pb.go +++ b/pkg/rpc/pb/service_origin_server.pb.go @@ -345,6 +345,101 @@ func (x *FindEnabledOriginServerResponse) GetOrigin() *OriginServer { return nil } +// 查找源站配置 +type FindEnabledOriginServerConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OriginId int64 `protobuf:"varint,1,opt,name=originId,proto3" json:"originId,omitempty"` +} + +func (x *FindEnabledOriginServerConfigRequest) Reset() { + *x = FindEnabledOriginServerConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_origin_server_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledOriginServerConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledOriginServerConfigRequest) ProtoMessage() {} + +func (x *FindEnabledOriginServerConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_origin_server_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 FindEnabledOriginServerConfigRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledOriginServerConfigRequest) Descriptor() ([]byte, []int) { + return file_service_origin_server_proto_rawDescGZIP(), []int{6} +} + +func (x *FindEnabledOriginServerConfigRequest) GetOriginId() int64 { + if x != nil { + return x.OriginId + } + return 0 +} + +type FindEnabledOriginServerConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *FindEnabledOriginServerConfigResponse) Reset() { + *x = FindEnabledOriginServerConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_origin_server_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledOriginServerConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledOriginServerConfigResponse) ProtoMessage() {} + +func (x *FindEnabledOriginServerConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_origin_server_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 FindEnabledOriginServerConfigResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledOriginServerConfigResponse) Descriptor() ([]byte, []int) { + return file_service_origin_server_proto_rawDescGZIP(), []int{7} +} + +func (x *FindEnabledOriginServerConfigResponse) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + var File_service_origin_server_proto protoreflect.FileDescriptor var file_service_origin_server_proto_rawDesc = []byte{ @@ -384,27 +479,42 @@ var file_service_origin_server_proto_rawDesc = []byte{ 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x32, - 0xa3, 0x02, 0x0a, 0x13, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1d, 0x2e, - 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, - 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, + 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, + 0x42, 0x0a, 0x24, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x25, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x32, 0x99, 0x03, 0x0a, 0x13, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x12, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, + 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x70, - 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x12, 0x53, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x66, 0x69, + 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x2e, 0x70, 0x62, + 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -419,29 +529,33 @@ func file_service_origin_server_proto_rawDescGZIP() []byte { return file_service_origin_server_proto_rawDescData } -var file_service_origin_server_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_service_origin_server_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_service_origin_server_proto_goTypes = []interface{}{ - (*CreateOriginServerRequest)(nil), // 0: pb.CreateOriginServerRequest - (*CreateOriginServerResponse)(nil), // 1: pb.CreateOriginServerResponse - (*UpdateOriginServerRequest)(nil), // 2: pb.UpdateOriginServerRequest - (*UpdateOriginServerResponse)(nil), // 3: pb.UpdateOriginServerResponse - (*FindEnabledOriginServerRequest)(nil), // 4: pb.FindEnabledOriginServerRequest - (*FindEnabledOriginServerResponse)(nil), // 5: pb.FindEnabledOriginServerResponse - (*NetworkAddress)(nil), // 6: pb.NetworkAddress - (*OriginServer)(nil), // 7: pb.OriginServer + (*CreateOriginServerRequest)(nil), // 0: pb.CreateOriginServerRequest + (*CreateOriginServerResponse)(nil), // 1: pb.CreateOriginServerResponse + (*UpdateOriginServerRequest)(nil), // 2: pb.UpdateOriginServerRequest + (*UpdateOriginServerResponse)(nil), // 3: pb.UpdateOriginServerResponse + (*FindEnabledOriginServerRequest)(nil), // 4: pb.FindEnabledOriginServerRequest + (*FindEnabledOriginServerResponse)(nil), // 5: pb.FindEnabledOriginServerResponse + (*FindEnabledOriginServerConfigRequest)(nil), // 6: pb.FindEnabledOriginServerConfigRequest + (*FindEnabledOriginServerConfigResponse)(nil), // 7: pb.FindEnabledOriginServerConfigResponse + (*NetworkAddress)(nil), // 8: pb.NetworkAddress + (*OriginServer)(nil), // 9: pb.OriginServer } var file_service_origin_server_proto_depIdxs = []int32{ - 6, // 0: pb.CreateOriginServerRequest.addr:type_name -> pb.NetworkAddress - 6, // 1: pb.UpdateOriginServerRequest.addr:type_name -> pb.NetworkAddress - 7, // 2: pb.FindEnabledOriginServerResponse.Origin:type_name -> pb.OriginServer + 8, // 0: pb.CreateOriginServerRequest.addr:type_name -> pb.NetworkAddress + 8, // 1: pb.UpdateOriginServerRequest.addr:type_name -> pb.NetworkAddress + 9, // 2: pb.FindEnabledOriginServerResponse.Origin:type_name -> pb.OriginServer 0, // 3: pb.OriginServerService.createOriginServer:input_type -> pb.CreateOriginServerRequest 2, // 4: pb.OriginServerService.updateOriginServer:input_type -> pb.UpdateOriginServerRequest 4, // 5: pb.OriginServerService.findEnabledOriginServer:input_type -> pb.FindEnabledOriginServerRequest - 1, // 6: pb.OriginServerService.createOriginServer:output_type -> pb.CreateOriginServerResponse - 3, // 7: pb.OriginServerService.updateOriginServer:output_type -> pb.UpdateOriginServerResponse - 5, // 8: pb.OriginServerService.findEnabledOriginServer:output_type -> pb.FindEnabledOriginServerResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type + 6, // 6: pb.OriginServerService.findEnabledOriginServerConfig:input_type -> pb.FindEnabledOriginServerConfigRequest + 1, // 7: pb.OriginServerService.createOriginServer:output_type -> pb.CreateOriginServerResponse + 3, // 8: pb.OriginServerService.updateOriginServer:output_type -> pb.UpdateOriginServerResponse + 5, // 9: pb.OriginServerService.findEnabledOriginServer:output_type -> pb.FindEnabledOriginServerResponse + 7, // 10: pb.OriginServerService.findEnabledOriginServerConfig:output_type -> pb.FindEnabledOriginServerConfigResponse + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name @@ -527,6 +641,30 @@ func file_service_origin_server_proto_init() { return nil } } + file_service_origin_server_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledOriginServerConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_origin_server_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledOriginServerConfigResponse); 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{ @@ -534,7 +672,7 @@ func file_service_origin_server_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_origin_server_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, @@ -566,6 +704,8 @@ type OriginServerServiceClient interface { UpdateOriginServer(ctx context.Context, in *UpdateOriginServerRequest, opts ...grpc.CallOption) (*UpdateOriginServerResponse, error) // 查找单个源站信息 FindEnabledOriginServer(ctx context.Context, in *FindEnabledOriginServerRequest, opts ...grpc.CallOption) (*FindEnabledOriginServerResponse, error) + // 查找源站配置 + FindEnabledOriginServerConfig(ctx context.Context, in *FindEnabledOriginServerConfigRequest, opts ...grpc.CallOption) (*FindEnabledOriginServerConfigResponse, error) } type originServerServiceClient struct { @@ -603,6 +743,15 @@ func (c *originServerServiceClient) FindEnabledOriginServer(ctx context.Context, return out, nil } +func (c *originServerServiceClient) FindEnabledOriginServerConfig(ctx context.Context, in *FindEnabledOriginServerConfigRequest, opts ...grpc.CallOption) (*FindEnabledOriginServerConfigResponse, error) { + out := new(FindEnabledOriginServerConfigResponse) + err := c.cc.Invoke(ctx, "/pb.OriginServerService/findEnabledOriginServerConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // OriginServerServiceServer is the server API for OriginServerService service. type OriginServerServiceServer interface { // 创建源站 @@ -611,6 +760,8 @@ type OriginServerServiceServer interface { UpdateOriginServer(context.Context, *UpdateOriginServerRequest) (*UpdateOriginServerResponse, error) // 查找单个源站信息 FindEnabledOriginServer(context.Context, *FindEnabledOriginServerRequest) (*FindEnabledOriginServerResponse, error) + // 查找源站配置 + FindEnabledOriginServerConfig(context.Context, *FindEnabledOriginServerConfigRequest) (*FindEnabledOriginServerConfigResponse, error) } // UnimplementedOriginServerServiceServer can be embedded to have forward compatible implementations. @@ -626,6 +777,9 @@ func (*UnimplementedOriginServerServiceServer) UpdateOriginServer(context.Contex func (*UnimplementedOriginServerServiceServer) FindEnabledOriginServer(context.Context, *FindEnabledOriginServerRequest) (*FindEnabledOriginServerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindEnabledOriginServer not implemented") } +func (*UnimplementedOriginServerServiceServer) FindEnabledOriginServerConfig(context.Context, *FindEnabledOriginServerConfigRequest) (*FindEnabledOriginServerConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledOriginServerConfig not implemented") +} func RegisterOriginServerServiceServer(s *grpc.Server, srv OriginServerServiceServer) { s.RegisterService(&_OriginServerService_serviceDesc, srv) @@ -685,6 +839,24 @@ func _OriginServerService_FindEnabledOriginServer_Handler(srv interface{}, ctx c return interceptor(ctx, in, info, handler) } +func _OriginServerService_FindEnabledOriginServerConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledOriginServerConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OriginServerServiceServer).FindEnabledOriginServerConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.OriginServerService/FindEnabledOriginServerConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OriginServerServiceServer).FindEnabledOriginServerConfig(ctx, req.(*FindEnabledOriginServerConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _OriginServerService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.OriginServerService", HandlerType: (*OriginServerServiceServer)(nil), @@ -701,6 +873,10 @@ var _OriginServerService_serviceDesc = grpc.ServiceDesc{ MethodName: "findEnabledOriginServer", Handler: _OriginServerService_FindEnabledOriginServer_Handler, }, + { + MethodName: "findEnabledOriginServerConfig", + Handler: _OriginServerService_FindEnabledOriginServerConfig_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_origin_server.proto", diff --git a/pkg/rpc/pb/service_reverse_proxy.pb.go b/pkg/rpc/pb/service_reverse_proxy.pb.go new file mode 100644 index 0000000..45f7885 --- /dev/null +++ b/pkg/rpc/pb/service_reverse_proxy.pb.go @@ -0,0 +1,1223 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: service_reverse_proxy.proto + +package pb + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// 创建反向代理 +type CreateReverseProxyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SchedulingJSON []byte `protobuf:"bytes,1,opt,name=schedulingJSON,proto3" json:"schedulingJSON,omitempty"` + PrimaryOriginsJSON []byte `protobuf:"bytes,2,opt,name=primaryOriginsJSON,proto3" json:"primaryOriginsJSON,omitempty"` + BackupOriginsJSON []byte `protobuf:"bytes,3,opt,name=backupOriginsJSON,proto3" json:"backupOriginsJSON,omitempty"` +} + +func (x *CreateReverseProxyRequest) Reset() { + *x = CreateReverseProxyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateReverseProxyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateReverseProxyRequest) ProtoMessage() {} + +func (x *CreateReverseProxyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 CreateReverseProxyRequest.ProtoReflect.Descriptor instead. +func (*CreateReverseProxyRequest) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateReverseProxyRequest) GetSchedulingJSON() []byte { + if x != nil { + return x.SchedulingJSON + } + return nil +} + +func (x *CreateReverseProxyRequest) GetPrimaryOriginsJSON() []byte { + if x != nil { + return x.PrimaryOriginsJSON + } + return nil +} + +func (x *CreateReverseProxyRequest) GetBackupOriginsJSON() []byte { + if x != nil { + return x.BackupOriginsJSON + } + return nil +} + +type CreateReverseProxyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` +} + +func (x *CreateReverseProxyResponse) Reset() { + *x = CreateReverseProxyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateReverseProxyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateReverseProxyResponse) ProtoMessage() {} + +func (x *CreateReverseProxyResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 CreateReverseProxyResponse.ProtoReflect.Descriptor instead. +func (*CreateReverseProxyResponse) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateReverseProxyResponse) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + +// 查找反向代理 +type FindEnabledReverseProxyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` +} + +func (x *FindEnabledReverseProxyRequest) Reset() { + *x = FindEnabledReverseProxyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledReverseProxyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledReverseProxyRequest) ProtoMessage() {} + +func (x *FindEnabledReverseProxyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 FindEnabledReverseProxyRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledReverseProxyRequest) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{2} +} + +func (x *FindEnabledReverseProxyRequest) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + +type FindEnabledReverseProxyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxy *ReverseProxy `protobuf:"bytes,1,opt,name=reverseProxy,proto3" json:"reverseProxy,omitempty"` +} + +func (x *FindEnabledReverseProxyResponse) Reset() { + *x = FindEnabledReverseProxyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledReverseProxyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledReverseProxyResponse) ProtoMessage() {} + +func (x *FindEnabledReverseProxyResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 FindEnabledReverseProxyResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledReverseProxyResponse) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{3} +} + +func (x *FindEnabledReverseProxyResponse) GetReverseProxy() *ReverseProxy { + if x != nil { + return x.ReverseProxy + } + return nil +} + +// 查找反向代理配置 +type FindEnabledReverseProxyConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` +} + +func (x *FindEnabledReverseProxyConfigRequest) Reset() { + *x = FindEnabledReverseProxyConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledReverseProxyConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledReverseProxyConfigRequest) ProtoMessage() {} + +func (x *FindEnabledReverseProxyConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 FindEnabledReverseProxyConfigRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledReverseProxyConfigRequest) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{4} +} + +func (x *FindEnabledReverseProxyConfigRequest) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + +type FindEnabledReverseProxyConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *FindEnabledReverseProxyConfigResponse) Reset() { + *x = FindEnabledReverseProxyConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledReverseProxyConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledReverseProxyConfigResponse) ProtoMessage() {} + +func (x *FindEnabledReverseProxyConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 FindEnabledReverseProxyConfigResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledReverseProxyConfigResponse) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{5} +} + +func (x *FindEnabledReverseProxyConfigResponse) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +// 修改反向代理调度算法 +type UpdateReverseProxySchedulingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` + SchedulingJSON []byte `protobuf:"bytes,2,opt,name=schedulingJSON,proto3" json:"schedulingJSON,omitempty"` +} + +func (x *UpdateReverseProxySchedulingRequest) Reset() { + *x = UpdateReverseProxySchedulingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReverseProxySchedulingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReverseProxySchedulingRequest) ProtoMessage() {} + +func (x *UpdateReverseProxySchedulingRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 UpdateReverseProxySchedulingRequest.ProtoReflect.Descriptor instead. +func (*UpdateReverseProxySchedulingRequest) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateReverseProxySchedulingRequest) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + +func (x *UpdateReverseProxySchedulingRequest) GetSchedulingJSON() []byte { + if x != nil { + return x.SchedulingJSON + } + return nil +} + +type UpdateReverseProxySchedulingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateReverseProxySchedulingResponse) Reset() { + *x = UpdateReverseProxySchedulingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReverseProxySchedulingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReverseProxySchedulingResponse) ProtoMessage() {} + +func (x *UpdateReverseProxySchedulingResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 UpdateReverseProxySchedulingResponse.ProtoReflect.Descriptor instead. +func (*UpdateReverseProxySchedulingResponse) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{7} +} + +// 修改主要源站信息 +type UpdateReverseProxyPrimaryOriginsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` + OriginsJSON []byte `protobuf:"bytes,2,opt,name=originsJSON,proto3" json:"originsJSON,omitempty"` +} + +func (x *UpdateReverseProxyPrimaryOriginsRequest) Reset() { + *x = UpdateReverseProxyPrimaryOriginsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReverseProxyPrimaryOriginsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReverseProxyPrimaryOriginsRequest) ProtoMessage() {} + +func (x *UpdateReverseProxyPrimaryOriginsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 UpdateReverseProxyPrimaryOriginsRequest.ProtoReflect.Descriptor instead. +func (*UpdateReverseProxyPrimaryOriginsRequest) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateReverseProxyPrimaryOriginsRequest) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + +func (x *UpdateReverseProxyPrimaryOriginsRequest) GetOriginsJSON() []byte { + if x != nil { + return x.OriginsJSON + } + return nil +} + +type UpdateReverseProxyPrimaryOriginsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateReverseProxyPrimaryOriginsResponse) Reset() { + *x = UpdateReverseProxyPrimaryOriginsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReverseProxyPrimaryOriginsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReverseProxyPrimaryOriginsResponse) ProtoMessage() {} + +func (x *UpdateReverseProxyPrimaryOriginsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 UpdateReverseProxyPrimaryOriginsResponse.ProtoReflect.Descriptor instead. +func (*UpdateReverseProxyPrimaryOriginsResponse) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{9} +} + +// 修改备用源站信息 +type UpdateReverseProxyBackupOriginsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` + OriginsJSON []byte `protobuf:"bytes,2,opt,name=originsJSON,proto3" json:"originsJSON,omitempty"` +} + +func (x *UpdateReverseProxyBackupOriginsRequest) Reset() { + *x = UpdateReverseProxyBackupOriginsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReverseProxyBackupOriginsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReverseProxyBackupOriginsRequest) ProtoMessage() {} + +func (x *UpdateReverseProxyBackupOriginsRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 UpdateReverseProxyBackupOriginsRequest.ProtoReflect.Descriptor instead. +func (*UpdateReverseProxyBackupOriginsRequest) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateReverseProxyBackupOriginsRequest) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + +func (x *UpdateReverseProxyBackupOriginsRequest) GetOriginsJSON() []byte { + if x != nil { + return x.OriginsJSON + } + return nil +} + +type UpdateReverseProxyBackupOriginsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateReverseProxyBackupOriginsResponse) Reset() { + *x = UpdateReverseProxyBackupOriginsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_reverse_proxy_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateReverseProxyBackupOriginsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReverseProxyBackupOriginsResponse) ProtoMessage() {} + +func (x *UpdateReverseProxyBackupOriginsResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_reverse_proxy_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 UpdateReverseProxyBackupOriginsResponse.ProtoReflect.Descriptor instead. +func (*UpdateReverseProxyBackupOriginsResponse) Descriptor() ([]byte, []int) { + return file_service_reverse_proxy_proto_rawDescGZIP(), []int{11} +} + +var File_service_reverse_proxy_proto protoreflect.FileDescriptor + +var file_service_reverse_proxy_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, + 0x62, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x01, 0x0a, + 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x4a, 0x53, + 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, + 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, + 0x4f, 0x4e, 0x12, 0x2c, 0x0a, 0x11, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x62, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, + 0x22, 0x44, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, + 0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, + 0x22, 0x57, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, + 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x22, 0x4e, 0x0a, 0x24, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x25, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x75, 0x0a, 0x23, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x4a, 0x53, 0x4f, + 0x4e, 0x22, 0x26, 0x0a, 0x24, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x73, 0x0a, 0x27, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x2a, + 0x0a, 0x28, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x0a, 0x26, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x29, + 0x0a, 0x27, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb2, 0x05, 0x0a, 0x13, 0x52, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x53, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x66, 0x69, + 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x2e, 0x70, 0x62, + 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x71, 0x0a, 0x1c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, + 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d, + 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x1f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_reverse_proxy_proto_rawDescOnce sync.Once + file_service_reverse_proxy_proto_rawDescData = file_service_reverse_proxy_proto_rawDesc +) + +func file_service_reverse_proxy_proto_rawDescGZIP() []byte { + file_service_reverse_proxy_proto_rawDescOnce.Do(func() { + file_service_reverse_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_reverse_proxy_proto_rawDescData) + }) + return file_service_reverse_proxy_proto_rawDescData +} + +var file_service_reverse_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_service_reverse_proxy_proto_goTypes = []interface{}{ + (*CreateReverseProxyRequest)(nil), // 0: pb.CreateReverseProxyRequest + (*CreateReverseProxyResponse)(nil), // 1: pb.CreateReverseProxyResponse + (*FindEnabledReverseProxyRequest)(nil), // 2: pb.FindEnabledReverseProxyRequest + (*FindEnabledReverseProxyResponse)(nil), // 3: pb.FindEnabledReverseProxyResponse + (*FindEnabledReverseProxyConfigRequest)(nil), // 4: pb.FindEnabledReverseProxyConfigRequest + (*FindEnabledReverseProxyConfigResponse)(nil), // 5: pb.FindEnabledReverseProxyConfigResponse + (*UpdateReverseProxySchedulingRequest)(nil), // 6: pb.UpdateReverseProxySchedulingRequest + (*UpdateReverseProxySchedulingResponse)(nil), // 7: pb.UpdateReverseProxySchedulingResponse + (*UpdateReverseProxyPrimaryOriginsRequest)(nil), // 8: pb.UpdateReverseProxyPrimaryOriginsRequest + (*UpdateReverseProxyPrimaryOriginsResponse)(nil), // 9: pb.UpdateReverseProxyPrimaryOriginsResponse + (*UpdateReverseProxyBackupOriginsRequest)(nil), // 10: pb.UpdateReverseProxyBackupOriginsRequest + (*UpdateReverseProxyBackupOriginsResponse)(nil), // 11: pb.UpdateReverseProxyBackupOriginsResponse + (*ReverseProxy)(nil), // 12: pb.ReverseProxy +} +var file_service_reverse_proxy_proto_depIdxs = []int32{ + 12, // 0: pb.FindEnabledReverseProxyResponse.reverseProxy:type_name -> pb.ReverseProxy + 0, // 1: pb.ReverseProxyService.createReverseProxy:input_type -> pb.CreateReverseProxyRequest + 2, // 2: pb.ReverseProxyService.findEnabledReverseProxy:input_type -> pb.FindEnabledReverseProxyRequest + 4, // 3: pb.ReverseProxyService.findEnabledReverseProxyConfig:input_type -> pb.FindEnabledReverseProxyConfigRequest + 6, // 4: pb.ReverseProxyService.updateReverseProxyScheduling:input_type -> pb.UpdateReverseProxySchedulingRequest + 8, // 5: pb.ReverseProxyService.updateReverseProxyPrimaryOrigins:input_type -> pb.UpdateReverseProxyPrimaryOriginsRequest + 10, // 6: pb.ReverseProxyService.updateReverseProxyBackupOrigins:input_type -> pb.UpdateReverseProxyBackupOriginsRequest + 1, // 7: pb.ReverseProxyService.createReverseProxy:output_type -> pb.CreateReverseProxyResponse + 3, // 8: pb.ReverseProxyService.findEnabledReverseProxy:output_type -> pb.FindEnabledReverseProxyResponse + 5, // 9: pb.ReverseProxyService.findEnabledReverseProxyConfig:output_type -> pb.FindEnabledReverseProxyConfigResponse + 7, // 10: pb.ReverseProxyService.updateReverseProxyScheduling:output_type -> pb.UpdateReverseProxySchedulingResponse + 9, // 11: pb.ReverseProxyService.updateReverseProxyPrimaryOrigins:output_type -> pb.UpdateReverseProxyPrimaryOriginsResponse + 11, // 12: pb.ReverseProxyService.updateReverseProxyBackupOrigins:output_type -> pb.UpdateReverseProxyBackupOriginsResponse + 7, // [7:13] is the sub-list for method output_type + 1, // [1:7] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_service_reverse_proxy_proto_init() } +func file_service_reverse_proxy_proto_init() { + if File_service_reverse_proxy_proto != nil { + return + } + file_model_reverse_proxy_proto_init() + if !protoimpl.UnsafeEnabled { + file_service_reverse_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateReverseProxyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateReverseProxyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledReverseProxyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledReverseProxyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledReverseProxyConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledReverseProxyConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReverseProxySchedulingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReverseProxySchedulingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReverseProxyPrimaryOriginsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReverseProxyPrimaryOriginsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReverseProxyBackupOriginsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_reverse_proxy_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateReverseProxyBackupOriginsResponse); 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_service_reverse_proxy_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_reverse_proxy_proto_goTypes, + DependencyIndexes: file_service_reverse_proxy_proto_depIdxs, + MessageInfos: file_service_reverse_proxy_proto_msgTypes, + }.Build() + File_service_reverse_proxy_proto = out.File + file_service_reverse_proxy_proto_rawDesc = nil + file_service_reverse_proxy_proto_goTypes = nil + file_service_reverse_proxy_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ReverseProxyServiceClient is the client API for ReverseProxyService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ReverseProxyServiceClient interface { + // 创建反向代理 + CreateReverseProxy(ctx context.Context, in *CreateReverseProxyRequest, opts ...grpc.CallOption) (*CreateReverseProxyResponse, error) + // 查找反向代理 + FindEnabledReverseProxy(ctx context.Context, in *FindEnabledReverseProxyRequest, opts ...grpc.CallOption) (*FindEnabledReverseProxyResponse, error) + // 查找反向代理配置 + FindEnabledReverseProxyConfig(ctx context.Context, in *FindEnabledReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindEnabledReverseProxyConfigResponse, error) + // 修改反向代理的调度算法 + UpdateReverseProxyScheduling(ctx context.Context, in *UpdateReverseProxySchedulingRequest, opts ...grpc.CallOption) (*UpdateReverseProxySchedulingResponse, error) + // 修改主要源站信息 + UpdateReverseProxyPrimaryOrigins(ctx context.Context, in *UpdateReverseProxyPrimaryOriginsRequest, opts ...grpc.CallOption) (*UpdateReverseProxyPrimaryOriginsResponse, error) + // 修改备用源站信息 + UpdateReverseProxyBackupOrigins(ctx context.Context, in *UpdateReverseProxyBackupOriginsRequest, opts ...grpc.CallOption) (*UpdateReverseProxyBackupOriginsResponse, error) +} + +type reverseProxyServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewReverseProxyServiceClient(cc grpc.ClientConnInterface) ReverseProxyServiceClient { + return &reverseProxyServiceClient{cc} +} + +func (c *reverseProxyServiceClient) CreateReverseProxy(ctx context.Context, in *CreateReverseProxyRequest, opts ...grpc.CallOption) (*CreateReverseProxyResponse, error) { + out := new(CreateReverseProxyResponse) + err := c.cc.Invoke(ctx, "/pb.ReverseProxyService/createReverseProxy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reverseProxyServiceClient) FindEnabledReverseProxy(ctx context.Context, in *FindEnabledReverseProxyRequest, opts ...grpc.CallOption) (*FindEnabledReverseProxyResponse, error) { + out := new(FindEnabledReverseProxyResponse) + err := c.cc.Invoke(ctx, "/pb.ReverseProxyService/findEnabledReverseProxy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reverseProxyServiceClient) FindEnabledReverseProxyConfig(ctx context.Context, in *FindEnabledReverseProxyConfigRequest, opts ...grpc.CallOption) (*FindEnabledReverseProxyConfigResponse, error) { + out := new(FindEnabledReverseProxyConfigResponse) + err := c.cc.Invoke(ctx, "/pb.ReverseProxyService/findEnabledReverseProxyConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reverseProxyServiceClient) UpdateReverseProxyScheduling(ctx context.Context, in *UpdateReverseProxySchedulingRequest, opts ...grpc.CallOption) (*UpdateReverseProxySchedulingResponse, error) { + out := new(UpdateReverseProxySchedulingResponse) + err := c.cc.Invoke(ctx, "/pb.ReverseProxyService/updateReverseProxyScheduling", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reverseProxyServiceClient) UpdateReverseProxyPrimaryOrigins(ctx context.Context, in *UpdateReverseProxyPrimaryOriginsRequest, opts ...grpc.CallOption) (*UpdateReverseProxyPrimaryOriginsResponse, error) { + out := new(UpdateReverseProxyPrimaryOriginsResponse) + err := c.cc.Invoke(ctx, "/pb.ReverseProxyService/updateReverseProxyPrimaryOrigins", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reverseProxyServiceClient) UpdateReverseProxyBackupOrigins(ctx context.Context, in *UpdateReverseProxyBackupOriginsRequest, opts ...grpc.CallOption) (*UpdateReverseProxyBackupOriginsResponse, error) { + out := new(UpdateReverseProxyBackupOriginsResponse) + err := c.cc.Invoke(ctx, "/pb.ReverseProxyService/updateReverseProxyBackupOrigins", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReverseProxyServiceServer is the server API for ReverseProxyService service. +type ReverseProxyServiceServer interface { + // 创建反向代理 + CreateReverseProxy(context.Context, *CreateReverseProxyRequest) (*CreateReverseProxyResponse, error) + // 查找反向代理 + FindEnabledReverseProxy(context.Context, *FindEnabledReverseProxyRequest) (*FindEnabledReverseProxyResponse, error) + // 查找反向代理配置 + FindEnabledReverseProxyConfig(context.Context, *FindEnabledReverseProxyConfigRequest) (*FindEnabledReverseProxyConfigResponse, error) + // 修改反向代理的调度算法 + UpdateReverseProxyScheduling(context.Context, *UpdateReverseProxySchedulingRequest) (*UpdateReverseProxySchedulingResponse, error) + // 修改主要源站信息 + UpdateReverseProxyPrimaryOrigins(context.Context, *UpdateReverseProxyPrimaryOriginsRequest) (*UpdateReverseProxyPrimaryOriginsResponse, error) + // 修改备用源站信息 + UpdateReverseProxyBackupOrigins(context.Context, *UpdateReverseProxyBackupOriginsRequest) (*UpdateReverseProxyBackupOriginsResponse, error) +} + +// UnimplementedReverseProxyServiceServer can be embedded to have forward compatible implementations. +type UnimplementedReverseProxyServiceServer struct { +} + +func (*UnimplementedReverseProxyServiceServer) CreateReverseProxy(context.Context, *CreateReverseProxyRequest) (*CreateReverseProxyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateReverseProxy not implemented") +} +func (*UnimplementedReverseProxyServiceServer) FindEnabledReverseProxy(context.Context, *FindEnabledReverseProxyRequest) (*FindEnabledReverseProxyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledReverseProxy not implemented") +} +func (*UnimplementedReverseProxyServiceServer) FindEnabledReverseProxyConfig(context.Context, *FindEnabledReverseProxyConfigRequest) (*FindEnabledReverseProxyConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledReverseProxyConfig not implemented") +} +func (*UnimplementedReverseProxyServiceServer) UpdateReverseProxyScheduling(context.Context, *UpdateReverseProxySchedulingRequest) (*UpdateReverseProxySchedulingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateReverseProxyScheduling not implemented") +} +func (*UnimplementedReverseProxyServiceServer) UpdateReverseProxyPrimaryOrigins(context.Context, *UpdateReverseProxyPrimaryOriginsRequest) (*UpdateReverseProxyPrimaryOriginsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateReverseProxyPrimaryOrigins not implemented") +} +func (*UnimplementedReverseProxyServiceServer) UpdateReverseProxyBackupOrigins(context.Context, *UpdateReverseProxyBackupOriginsRequest) (*UpdateReverseProxyBackupOriginsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateReverseProxyBackupOrigins not implemented") +} + +func RegisterReverseProxyServiceServer(s *grpc.Server, srv ReverseProxyServiceServer) { + s.RegisterService(&_ReverseProxyService_serviceDesc, srv) +} + +func _ReverseProxyService_CreateReverseProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateReverseProxyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReverseProxyServiceServer).CreateReverseProxy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReverseProxyService/CreateReverseProxy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReverseProxyServiceServer).CreateReverseProxy(ctx, req.(*CreateReverseProxyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReverseProxyService_FindEnabledReverseProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledReverseProxyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReverseProxyServiceServer).FindEnabledReverseProxy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReverseProxyService/FindEnabledReverseProxy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReverseProxyServiceServer).FindEnabledReverseProxy(ctx, req.(*FindEnabledReverseProxyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReverseProxyService_FindEnabledReverseProxyConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledReverseProxyConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReverseProxyServiceServer).FindEnabledReverseProxyConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReverseProxyService/FindEnabledReverseProxyConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReverseProxyServiceServer).FindEnabledReverseProxyConfig(ctx, req.(*FindEnabledReverseProxyConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReverseProxyService_UpdateReverseProxyScheduling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReverseProxySchedulingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReverseProxyServiceServer).UpdateReverseProxyScheduling(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReverseProxyService/UpdateReverseProxyScheduling", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReverseProxyServiceServer).UpdateReverseProxyScheduling(ctx, req.(*UpdateReverseProxySchedulingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReverseProxyService_UpdateReverseProxyPrimaryOrigins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReverseProxyPrimaryOriginsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReverseProxyServiceServer).UpdateReverseProxyPrimaryOrigins(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReverseProxyService/UpdateReverseProxyPrimaryOrigins", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReverseProxyServiceServer).UpdateReverseProxyPrimaryOrigins(ctx, req.(*UpdateReverseProxyPrimaryOriginsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReverseProxyService_UpdateReverseProxyBackupOrigins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReverseProxyBackupOriginsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReverseProxyServiceServer).UpdateReverseProxyBackupOrigins(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ReverseProxyService/UpdateReverseProxyBackupOrigins", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReverseProxyServiceServer).UpdateReverseProxyBackupOrigins(ctx, req.(*UpdateReverseProxyBackupOriginsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ReverseProxyService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.ReverseProxyService", + HandlerType: (*ReverseProxyServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "createReverseProxy", + Handler: _ReverseProxyService_CreateReverseProxy_Handler, + }, + { + MethodName: "findEnabledReverseProxy", + Handler: _ReverseProxyService_FindEnabledReverseProxy_Handler, + }, + { + MethodName: "findEnabledReverseProxyConfig", + Handler: _ReverseProxyService_FindEnabledReverseProxyConfig_Handler, + }, + { + MethodName: "updateReverseProxyScheduling", + Handler: _ReverseProxyService_UpdateReverseProxyScheduling_Handler, + }, + { + MethodName: "updateReverseProxyPrimaryOrigins", + Handler: _ReverseProxyService_UpdateReverseProxyPrimaryOrigins_Handler, + }, + { + MethodName: "updateReverseProxyBackupOrigins", + Handler: _ReverseProxyService_UpdateReverseProxyBackupOrigins_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_reverse_proxy.proto", +} diff --git a/pkg/rpc/pb/service_server.pb.go b/pkg/rpc/pb/service_server.pb.go index 740dcdf..3d7f370 100644 --- a/pkg/rpc/pb/service_server.pb.go +++ b/pkg/rpc/pb/service_server.pb.go @@ -35,15 +35,24 @@ type CreateServerRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` - AdminId int64 `protobuf:"varint,2,opt,name=adminId,proto3" json:"adminId,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - ClusterId int64 `protobuf:"varint,6,opt,name=clusterId,proto3" json:"clusterId,omitempty"` - Config []byte `protobuf:"bytes,7,opt,name=config,proto3" json:"config,omitempty"` - IncludeNodesJSON []byte `protobuf:"bytes,8,opt,name=includeNodesJSON,proto3" json:"includeNodesJSON,omitempty"` - ExcludeNodesJSON []byte `protobuf:"bytes,9,opt,name=excludeNodesJSON,proto3" json:"excludeNodesJSON,omitempty"` + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + AdminId int64 `protobuf:"varint,2,opt,name=adminId,proto3" json:"adminId,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + // 配置相关 + ServerNamesJON []byte `protobuf:"bytes,8,opt,name=serverNamesJON,proto3" json:"serverNamesJON,omitempty"` + HttpJSON []byte `protobuf:"bytes,9,opt,name=httpJSON,proto3" json:"httpJSON,omitempty"` + HttpsJSON []byte `protobuf:"bytes,10,opt,name=httpsJSON,proto3" json:"httpsJSON,omitempty"` + TcpJSON []byte `protobuf:"bytes,11,opt,name=tcpJSON,proto3" json:"tcpJSON,omitempty"` + TlsJSON []byte `protobuf:"bytes,12,opt,name=tlsJSON,proto3" json:"tlsJSON,omitempty"` + UnixJSON []byte `protobuf:"bytes,13,opt,name=unixJSON,proto3" json:"unixJSON,omitempty"` + UdpJSON []byte `protobuf:"bytes,14,opt,name=udpJSON,proto3" json:"udpJSON,omitempty"` + WebId int64 `protobuf:"varint,15,opt,name=webId,proto3" json:"webId,omitempty"` + ReverseProxyId int64 `protobuf:"varint,16,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` + ClusterId int64 `protobuf:"varint,30,opt,name=clusterId,proto3" json:"clusterId,omitempty"` + IncludeNodesJSON []byte `protobuf:"bytes,31,opt,name=includeNodesJSON,proto3" json:"includeNodesJSON,omitempty"` + ExcludeNodesJSON []byte `protobuf:"bytes,32,opt,name=excludeNodesJSON,proto3" json:"excludeNodesJSON,omitempty"` } func (x *CreateServerRequest) Reset() { @@ -113,6 +122,69 @@ func (x *CreateServerRequest) GetDescription() string { return "" } +func (x *CreateServerRequest) GetServerNamesJON() []byte { + if x != nil { + return x.ServerNamesJON + } + return nil +} + +func (x *CreateServerRequest) GetHttpJSON() []byte { + if x != nil { + return x.HttpJSON + } + return nil +} + +func (x *CreateServerRequest) GetHttpsJSON() []byte { + if x != nil { + return x.HttpsJSON + } + return nil +} + +func (x *CreateServerRequest) GetTcpJSON() []byte { + if x != nil { + return x.TcpJSON + } + return nil +} + +func (x *CreateServerRequest) GetTlsJSON() []byte { + if x != nil { + return x.TlsJSON + } + return nil +} + +func (x *CreateServerRequest) GetUnixJSON() []byte { + if x != nil { + return x.UnixJSON + } + return nil +} + +func (x *CreateServerRequest) GetUdpJSON() []byte { + if x != nil { + return x.UdpJSON + } + return nil +} + +func (x *CreateServerRequest) GetWebId() int64 { + if x != nil { + return x.WebId + } + return 0 +} + +func (x *CreateServerRequest) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + func (x *CreateServerRequest) GetClusterId() int64 { if x != nil { return x.ClusterId @@ -120,13 +192,6 @@ func (x *CreateServerRequest) GetClusterId() int64 { return 0 } -func (x *CreateServerRequest) GetConfig() []byte { - if x != nil { - return x.Config - } - return nil -} - func (x *CreateServerRequest) GetIncludeNodesJSON() []byte { if x != nil { return x.IncludeNodesJSON @@ -188,25 +253,20 @@ func (x *CreateServerResponse) GetServerId() int64 { return 0 } -// 修改服务 -type UpdateServerRequest struct { +// 修改服务基本信息 +type UpdateServerBasicRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` - UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` - AdminId int64 `protobuf:"varint,3,opt,name=adminId,proto3" json:"adminId,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - ClusterId int64 `protobuf:"varint,6,opt,name=clusterId,proto3" json:"clusterId,omitempty"` - Config []byte `protobuf:"bytes,7,opt,name=config,proto3" json:"config,omitempty"` - IncludeNodesJSON []byte `protobuf:"bytes,8,opt,name=includeNodesJSON,proto3" json:"includeNodesJSON,omitempty"` - ExcludeNodesJSON []byte `protobuf:"bytes,9,opt,name=excludeNodesJSON,proto3" json:"excludeNodesJSON,omitempty"` + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"` } -func (x *UpdateServerRequest) Reset() { - *x = UpdateServerRequest{} +func (x *UpdateServerBasicRequest) Reset() { + *x = UpdateServerBasicRequest{} if protoimpl.UnsafeEnabled { mi := &file_service_server_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -214,13 +274,13 @@ func (x *UpdateServerRequest) Reset() { } } -func (x *UpdateServerRequest) String() string { +func (x *UpdateServerBasicRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateServerRequest) ProtoMessage() {} +func (*UpdateServerBasicRequest) ProtoMessage() {} -func (x *UpdateServerRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateServerBasicRequest) ProtoReflect() protoreflect.Message { mi := &file_service_server_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -232,82 +292,47 @@ func (x *UpdateServerRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateServerRequest.ProtoReflect.Descriptor instead. -func (*UpdateServerRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateServerBasicRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerBasicRequest) Descriptor() ([]byte, []int) { return file_service_server_proto_rawDescGZIP(), []int{2} } -func (x *UpdateServerRequest) GetServerId() int64 { +func (x *UpdateServerBasicRequest) GetServerId() int64 { if x != nil { return x.ServerId } return 0 } -func (x *UpdateServerRequest) GetUserId() int64 { - if x != nil { - return x.UserId - } - return 0 -} - -func (x *UpdateServerRequest) GetAdminId() int64 { - if x != nil { - return x.AdminId - } - return 0 -} - -func (x *UpdateServerRequest) GetName() string { +func (x *UpdateServerBasicRequest) GetName() string { if x != nil { return x.Name } return "" } -func (x *UpdateServerRequest) GetDescription() string { +func (x *UpdateServerBasicRequest) GetDescription() string { if x != nil { return x.Description } return "" } -func (x *UpdateServerRequest) GetClusterId() int64 { +func (x *UpdateServerBasicRequest) GetClusterId() int64 { if x != nil { return x.ClusterId } return 0 } -func (x *UpdateServerRequest) GetConfig() []byte { - if x != nil { - return x.Config - } - return nil -} - -func (x *UpdateServerRequest) GetIncludeNodesJSON() []byte { - if x != nil { - return x.IncludeNodesJSON - } - return nil -} - -func (x *UpdateServerRequest) GetExcludeNodesJSON() []byte { - if x != nil { - return x.ExcludeNodesJSON - } - return nil -} - -type UpdateServerResponse struct { +type UpdateServerBasicResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *UpdateServerResponse) Reset() { - *x = UpdateServerResponse{} +func (x *UpdateServerBasicResponse) Reset() { + *x = UpdateServerBasicResponse{} if protoimpl.UnsafeEnabled { mi := &file_service_server_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -315,13 +340,13 @@ func (x *UpdateServerResponse) Reset() { } } -func (x *UpdateServerResponse) String() string { +func (x *UpdateServerBasicResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateServerResponse) ProtoMessage() {} +func (*UpdateServerBasicResponse) ProtoMessage() {} -func (x *UpdateServerResponse) ProtoReflect() protoreflect.Message { +func (x *UpdateServerBasicResponse) ProtoReflect() protoreflect.Message { mi := &file_service_server_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -333,11 +358,849 @@ func (x *UpdateServerResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateServerResponse.ProtoReflect.Descriptor instead. -func (*UpdateServerResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateServerBasicResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerBasicResponse) Descriptor() ([]byte, []int) { return file_service_server_proto_rawDescGZIP(), []int{3} } +// 修改服务的HTTP等设置 +type UpdateServerHTTPRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *UpdateServerHTTPRequest) Reset() { + *x = UpdateServerHTTPRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerHTTPRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerHTTPRequest) ProtoMessage() {} + +func (x *UpdateServerHTTPRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_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 UpdateServerHTTPRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerHTTPRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateServerHTTPRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateServerHTTPRequest) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +type UpdateServerHTTPResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateServerHTTPResponse) Reset() { + *x = UpdateServerHTTPResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerHTTPResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerHTTPResponse) ProtoMessage() {} + +func (x *UpdateServerHTTPResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_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 UpdateServerHTTPResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerHTTPResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{5} +} + +type UpdateServerHTTPSRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *UpdateServerHTTPSRequest) Reset() { + *x = UpdateServerHTTPSRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerHTTPSRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerHTTPSRequest) ProtoMessage() {} + +func (x *UpdateServerHTTPSRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_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 UpdateServerHTTPSRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerHTTPSRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateServerHTTPSRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateServerHTTPSRequest) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +type UpdateServerHTTPSResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateServerHTTPSResponse) Reset() { + *x = UpdateServerHTTPSResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerHTTPSResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerHTTPSResponse) ProtoMessage() {} + +func (x *UpdateServerHTTPSResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_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 UpdateServerHTTPSResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerHTTPSResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{7} +} + +type UpdateServerTCPRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *UpdateServerTCPRequest) Reset() { + *x = UpdateServerTCPRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerTCPRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerTCPRequest) ProtoMessage() {} + +func (x *UpdateServerTCPRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_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 UpdateServerTCPRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerTCPRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateServerTCPRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateServerTCPRequest) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +type UpdateServerTCPResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateServerTCPResponse) Reset() { + *x = UpdateServerTCPResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerTCPResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerTCPResponse) ProtoMessage() {} + +func (x *UpdateServerTCPResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_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 UpdateServerTCPResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerTCPResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{9} +} + +type UpdateServerTLSRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *UpdateServerTLSRequest) Reset() { + *x = UpdateServerTLSRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerTLSRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerTLSRequest) ProtoMessage() {} + +func (x *UpdateServerTLSRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_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 UpdateServerTLSRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerTLSRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateServerTLSRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateServerTLSRequest) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +type UpdateServerTLSResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateServerTLSResponse) Reset() { + *x = UpdateServerTLSResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerTLSResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerTLSResponse) ProtoMessage() {} + +func (x *UpdateServerTLSResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_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 UpdateServerTLSResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerTLSResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{11} +} + +type UpdateServerUnixRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *UpdateServerUnixRequest) Reset() { + *x = UpdateServerUnixRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerUnixRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerUnixRequest) ProtoMessage() {} + +func (x *UpdateServerUnixRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_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 UpdateServerUnixRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerUnixRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateServerUnixRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateServerUnixRequest) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +type UpdateServerUnixResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateServerUnixResponse) Reset() { + *x = UpdateServerUnixResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerUnixResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerUnixResponse) ProtoMessage() {} + +func (x *UpdateServerUnixResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateServerUnixResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerUnixResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{13} +} + +type UpdateServerUDPRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *UpdateServerUDPRequest) Reset() { + *x = UpdateServerUDPRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerUDPRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerUDPRequest) ProtoMessage() {} + +func (x *UpdateServerUDPRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateServerUDPRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerUDPRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{14} +} + +func (x *UpdateServerUDPRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateServerUDPRequest) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +type UpdateServerUDPResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateServerUDPResponse) Reset() { + *x = UpdateServerUDPResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerUDPResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerUDPResponse) ProtoMessage() {} + +func (x *UpdateServerUDPResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateServerUDPResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerUDPResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{15} +} + +type UpdateServerWebRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + WebId int64 `protobuf:"varint,2,opt,name=webId,proto3" json:"webId,omitempty"` +} + +func (x *UpdateServerWebRequest) Reset() { + *x = UpdateServerWebRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerWebRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerWebRequest) ProtoMessage() {} + +func (x *UpdateServerWebRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateServerWebRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerWebRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{16} +} + +func (x *UpdateServerWebRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateServerWebRequest) GetWebId() int64 { + if x != nil { + return x.WebId + } + return 0 +} + +type UpdateServerWebResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateServerWebResponse) Reset() { + *x = UpdateServerWebResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerWebResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerWebResponse) ProtoMessage() {} + +func (x *UpdateServerWebResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateServerWebResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerWebResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{17} +} + +type UpdateServerReverseProxyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + ReverseProxyId int64 `protobuf:"varint,2,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` +} + +func (x *UpdateServerReverseProxyRequest) Reset() { + *x = UpdateServerReverseProxyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerReverseProxyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerReverseProxyRequest) ProtoMessage() {} + +func (x *UpdateServerReverseProxyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateServerReverseProxyRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerReverseProxyRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{18} +} + +func (x *UpdateServerReverseProxyRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateServerReverseProxyRequest) GetReverseProxyId() int64 { + if x != nil { + return x.ReverseProxyId + } + return 0 +} + +type UpdateServerReverseProxyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateServerReverseProxyResponse) Reset() { + *x = UpdateServerReverseProxyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerReverseProxyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerReverseProxyResponse) ProtoMessage() {} + +func (x *UpdateServerReverseProxyResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[19] + 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 UpdateServerReverseProxyResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerReverseProxyResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{19} +} + +type UpdateServerNamesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *UpdateServerNamesRequest) Reset() { + *x = UpdateServerNamesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerNamesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerNamesRequest) ProtoMessage() {} + +func (x *UpdateServerNamesRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[20] + 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 UpdateServerNamesRequest.ProtoReflect.Descriptor instead. +func (*UpdateServerNamesRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{20} +} + +func (x *UpdateServerNamesRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *UpdateServerNamesRequest) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +type UpdateServerNamesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateServerNamesResponse) Reset() { + *x = UpdateServerNamesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateServerNamesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateServerNamesResponse) ProtoMessage() {} + +func (x *UpdateServerNamesResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[21] + 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 UpdateServerNamesResponse.ProtoReflect.Descriptor instead. +func (*UpdateServerNamesResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{21} +} + // 计算服务数量 type CountAllEnabledServersRequest struct { state protoimpl.MessageState @@ -348,7 +1211,7 @@ type CountAllEnabledServersRequest struct { func (x *CountAllEnabledServersRequest) Reset() { *x = CountAllEnabledServersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_server_proto_msgTypes[4] + mi := &file_service_server_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -361,7 +1224,7 @@ func (x *CountAllEnabledServersRequest) String() string { func (*CountAllEnabledServersRequest) ProtoMessage() {} func (x *CountAllEnabledServersRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_server_proto_msgTypes[4] + mi := &file_service_server_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -374,7 +1237,7 @@ func (x *CountAllEnabledServersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CountAllEnabledServersRequest.ProtoReflect.Descriptor instead. func (*CountAllEnabledServersRequest) Descriptor() ([]byte, []int) { - return file_service_server_proto_rawDescGZIP(), []int{4} + return file_service_server_proto_rawDescGZIP(), []int{22} } type CountAllEnabledServersResponse struct { @@ -388,7 +1251,7 @@ type CountAllEnabledServersResponse struct { func (x *CountAllEnabledServersResponse) Reset() { *x = CountAllEnabledServersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_server_proto_msgTypes[5] + mi := &file_service_server_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -401,7 +1264,7 @@ func (x *CountAllEnabledServersResponse) String() string { func (*CountAllEnabledServersResponse) ProtoMessage() {} func (x *CountAllEnabledServersResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_server_proto_msgTypes[5] + mi := &file_service_server_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -414,7 +1277,7 @@ func (x *CountAllEnabledServersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CountAllEnabledServersResponse.ProtoReflect.Descriptor instead. func (*CountAllEnabledServersResponse) Descriptor() ([]byte, []int) { - return file_service_server_proto_rawDescGZIP(), []int{5} + return file_service_server_proto_rawDescGZIP(), []int{23} } func (x *CountAllEnabledServersResponse) GetCount() int64 { @@ -437,7 +1300,7 @@ type ListEnabledServersRequest struct { func (x *ListEnabledServersRequest) Reset() { *x = ListEnabledServersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_server_proto_msgTypes[6] + mi := &file_service_server_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -450,7 +1313,7 @@ func (x *ListEnabledServersRequest) String() string { func (*ListEnabledServersRequest) ProtoMessage() {} func (x *ListEnabledServersRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_server_proto_msgTypes[6] + mi := &file_service_server_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -463,7 +1326,7 @@ func (x *ListEnabledServersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListEnabledServersRequest.ProtoReflect.Descriptor instead. func (*ListEnabledServersRequest) Descriptor() ([]byte, []int) { - return file_service_server_proto_rawDescGZIP(), []int{6} + return file_service_server_proto_rawDescGZIP(), []int{24} } func (x *ListEnabledServersRequest) GetOffset() int64 { @@ -491,7 +1354,7 @@ type ListEnabledServersResponse struct { func (x *ListEnabledServersResponse) Reset() { *x = ListEnabledServersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_server_proto_msgTypes[7] + mi := &file_service_server_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -504,7 +1367,7 @@ func (x *ListEnabledServersResponse) String() string { func (*ListEnabledServersResponse) ProtoMessage() {} func (x *ListEnabledServersResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_server_proto_msgTypes[7] + mi := &file_service_server_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -517,7 +1380,7 @@ func (x *ListEnabledServersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListEnabledServersResponse.ProtoReflect.Descriptor instead. func (*ListEnabledServersResponse) Descriptor() ([]byte, []int) { - return file_service_server_proto_rawDescGZIP(), []int{7} + return file_service_server_proto_rawDescGZIP(), []int{25} } func (x *ListEnabledServersResponse) GetServers() []*Server { @@ -539,7 +1402,7 @@ type DisableServerRequest struct { func (x *DisableServerRequest) Reset() { *x = DisableServerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_server_proto_msgTypes[8] + mi := &file_service_server_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -552,7 +1415,7 @@ func (x *DisableServerRequest) String() string { func (*DisableServerRequest) ProtoMessage() {} func (x *DisableServerRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_server_proto_msgTypes[8] + mi := &file_service_server_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -565,7 +1428,7 @@ func (x *DisableServerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DisableServerRequest.ProtoReflect.Descriptor instead. func (*DisableServerRequest) Descriptor() ([]byte, []int) { - return file_service_server_proto_rawDescGZIP(), []int{8} + return file_service_server_proto_rawDescGZIP(), []int{26} } func (x *DisableServerRequest) GetServerId() int64 { @@ -584,7 +1447,7 @@ type DisableServerResponse struct { func (x *DisableServerResponse) Reset() { *x = DisableServerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_server_proto_msgTypes[9] + mi := &file_service_server_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -597,7 +1460,7 @@ func (x *DisableServerResponse) String() string { func (*DisableServerResponse) ProtoMessage() {} func (x *DisableServerResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_server_proto_msgTypes[9] + mi := &file_service_server_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -610,7 +1473,7 @@ func (x *DisableServerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DisableServerResponse.ProtoReflect.Descriptor instead. func (*DisableServerResponse) Descriptor() ([]byte, []int) { - return file_service_server_proto_rawDescGZIP(), []int{9} + return file_service_server_proto_rawDescGZIP(), []int{27} } // 查找单个服务 @@ -625,7 +1488,7 @@ type FindEnabledServerRequest struct { func (x *FindEnabledServerRequest) Reset() { *x = FindEnabledServerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_service_server_proto_msgTypes[10] + mi := &file_service_server_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -638,7 +1501,7 @@ func (x *FindEnabledServerRequest) String() string { func (*FindEnabledServerRequest) ProtoMessage() {} func (x *FindEnabledServerRequest) ProtoReflect() protoreflect.Message { - mi := &file_service_server_proto_msgTypes[10] + mi := &file_service_server_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -651,7 +1514,7 @@ func (x *FindEnabledServerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FindEnabledServerRequest.ProtoReflect.Descriptor instead. func (*FindEnabledServerRequest) Descriptor() ([]byte, []int) { - return file_service_server_proto_rawDescGZIP(), []int{10} + return file_service_server_proto_rawDescGZIP(), []int{28} } func (x *FindEnabledServerRequest) GetServerId() int64 { @@ -672,7 +1535,7 @@ type FindEnabledServerResponse struct { func (x *FindEnabledServerResponse) Reset() { *x = FindEnabledServerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_service_server_proto_msgTypes[11] + mi := &file_service_server_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -685,7 +1548,7 @@ func (x *FindEnabledServerResponse) String() string { func (*FindEnabledServerResponse) ProtoMessage() {} func (x *FindEnabledServerResponse) ProtoReflect() protoreflect.Message { - mi := &file_service_server_proto_msgTypes[11] + mi := &file_service_server_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -698,7 +1561,7 @@ func (x *FindEnabledServerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FindEnabledServerResponse.ProtoReflect.Descriptor instead. func (*FindEnabledServerResponse) Descriptor() ([]byte, []int) { - return file_service_server_proto_rawDescGZIP(), []int{11} + return file_service_server_proto_rawDescGZIP(), []int{29} } func (x *FindEnabledServerResponse) GetServer() *Server { @@ -708,13 +1571,203 @@ func (x *FindEnabledServerResponse) GetServer() *Server { return nil } +// 查找服务的服务类型 +type FindEnabledServerTypeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` +} + +func (x *FindEnabledServerTypeRequest) Reset() { + *x = FindEnabledServerTypeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledServerTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledServerTypeRequest) ProtoMessage() {} + +func (x *FindEnabledServerTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FindEnabledServerTypeRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledServerTypeRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{30} +} + +func (x *FindEnabledServerTypeRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +type FindEnabledServerTypeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` +} + +func (x *FindEnabledServerTypeResponse) Reset() { + *x = FindEnabledServerTypeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledServerTypeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledServerTypeResponse) ProtoMessage() {} + +func (x *FindEnabledServerTypeResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[31] + 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 FindEnabledServerTypeResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledServerTypeResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{31} +} + +func (x *FindEnabledServerTypeResponse) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +// 查找反向代理设置 +type FindServerReverseProxyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` +} + +func (x *FindServerReverseProxyRequest) Reset() { + *x = FindServerReverseProxyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindServerReverseProxyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindServerReverseProxyRequest) ProtoMessage() {} + +func (x *FindServerReverseProxyRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[32] + 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 FindServerReverseProxyRequest.ProtoReflect.Descriptor instead. +func (*FindServerReverseProxyRequest) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{32} +} + +func (x *FindServerReverseProxyRequest) GetServerId() int64 { + if x != nil { + return x.ServerId + } + return 0 +} + +type FindServerReverseProxyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *FindServerReverseProxyResponse) Reset() { + *x = FindServerReverseProxyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_server_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindServerReverseProxyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindServerReverseProxyResponse) ProtoMessage() {} + +func (x *FindServerReverseProxyResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_server_proto_msgTypes[33] + 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 FindServerReverseProxyResponse.ProtoReflect.Descriptor instead. +func (*FindServerReverseProxyResponse) Descriptor() ([]byte, []int) { + return file_service_server_proto_rawDescGZIP(), []int{33} +} + +func (x *FindServerReverseProxyResponse) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + var File_service_server_proto protoreflect.FileDescriptor var file_service_server_proto_rawDesc = []byte{ 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x12, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, - 0x02, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, + 0x04, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, @@ -723,97 +1776,237 @@ var file_service_server_proto_rawDesc = []byte{ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, - 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2a, 0x0a, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, - 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, - 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, - 0x22, 0x32, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x49, 0x64, 0x22, 0xa7, 0x02, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x53, - 0x4f, 0x4e, 0x12, 0x2a, 0x0a, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, - 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x65, 0x78, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x16, - 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, - 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x36, 0x0a, 0x1e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x47, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x42, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x22, 0x32, 0x0a, 0x14, - 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, - 0x22, 0x17, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x18, 0x46, 0x69, 0x6e, - 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x4a, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x74, + 0x74, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x68, 0x74, + 0x74, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x73, 0x4a, + 0x53, 0x4f, 0x4e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, + 0x0a, 0x07, 0x74, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x74, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x78, + 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x78, + 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, + 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, + 0x65, 0x62, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x1f, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2a, 0x0a, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x4a, 0x53, + 0x4f, 0x4e, 0x22, 0x32, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x4d, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 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, + 0x1a, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, + 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x0a, 0x18, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x53, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x49, 0x64, 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, 0x1b, 0x0a, 0x19, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x53, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 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, 0x19, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x54, 0x4c, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 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, + 0x19, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, + 0x4c, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x17, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, - 0x64, 0x22, 0x3f, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, - 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x32, 0xe3, 0x03, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, - 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x16, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, - 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x6c, - 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 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, 0x1a, 0x0a, 0x18, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x78, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x44, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 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, 0x19, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x55, 0x44, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, + 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, + 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x65, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x22, 0x22, 0x0a, 0x20, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x4e, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 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, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x0a, + 0x1d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x36, + 0x0a, 0x1e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x44, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, - 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x70, 0x62, - 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x47, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, + 0x42, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x73, 0x22, 0x32, 0x0a, 0x14, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x36, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x3a, 0x0a, 0x1c, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3b, 0x0a, 0x1d, 0x46, 0x69, + 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x32, 0x8a, 0x0b, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, + 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1c, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, + 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x73, 0x69, 0x63, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x12, 0x1b, 0x2e, 0x70, + 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, + 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, 0x53, 0x12, 0x1c, 0x2e, 0x70, + 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, + 0x54, 0x50, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x54, 0x54, 0x50, + 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, 0x50, 0x12, 0x1a, 0x2e, 0x70, + 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, + 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x43, 0x50, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x4c, 0x53, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x4c, 0x53, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x4c, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x55, 0x6e, 0x69, 0x78, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4a, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x55, 0x44, 0x50, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x44, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x55, 0x44, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, 0x12, + 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x65, 0x62, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x50, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5f, 0x0a, 0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, + 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, + 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5c, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, + 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, + 0x16, 0x66, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -828,39 +2021,83 @@ func file_service_server_proto_rawDescGZIP() []byte { return file_service_server_proto_rawDescData } -var file_service_server_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_service_server_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_service_server_proto_goTypes = []interface{}{ - (*CreateServerRequest)(nil), // 0: pb.CreateServerRequest - (*CreateServerResponse)(nil), // 1: pb.CreateServerResponse - (*UpdateServerRequest)(nil), // 2: pb.UpdateServerRequest - (*UpdateServerResponse)(nil), // 3: pb.UpdateServerResponse - (*CountAllEnabledServersRequest)(nil), // 4: pb.CountAllEnabledServersRequest - (*CountAllEnabledServersResponse)(nil), // 5: pb.CountAllEnabledServersResponse - (*ListEnabledServersRequest)(nil), // 6: pb.ListEnabledServersRequest - (*ListEnabledServersResponse)(nil), // 7: pb.ListEnabledServersResponse - (*DisableServerRequest)(nil), // 8: pb.DisableServerRequest - (*DisableServerResponse)(nil), // 9: pb.DisableServerResponse - (*FindEnabledServerRequest)(nil), // 10: pb.FindEnabledServerRequest - (*FindEnabledServerResponse)(nil), // 11: pb.FindEnabledServerResponse - (*Server)(nil), // 12: pb.Server + (*CreateServerRequest)(nil), // 0: pb.CreateServerRequest + (*CreateServerResponse)(nil), // 1: pb.CreateServerResponse + (*UpdateServerBasicRequest)(nil), // 2: pb.UpdateServerBasicRequest + (*UpdateServerBasicResponse)(nil), // 3: pb.UpdateServerBasicResponse + (*UpdateServerHTTPRequest)(nil), // 4: pb.UpdateServerHTTPRequest + (*UpdateServerHTTPResponse)(nil), // 5: pb.UpdateServerHTTPResponse + (*UpdateServerHTTPSRequest)(nil), // 6: pb.UpdateServerHTTPSRequest + (*UpdateServerHTTPSResponse)(nil), // 7: pb.UpdateServerHTTPSResponse + (*UpdateServerTCPRequest)(nil), // 8: pb.UpdateServerTCPRequest + (*UpdateServerTCPResponse)(nil), // 9: pb.UpdateServerTCPResponse + (*UpdateServerTLSRequest)(nil), // 10: pb.UpdateServerTLSRequest + (*UpdateServerTLSResponse)(nil), // 11: pb.UpdateServerTLSResponse + (*UpdateServerUnixRequest)(nil), // 12: pb.UpdateServerUnixRequest + (*UpdateServerUnixResponse)(nil), // 13: pb.UpdateServerUnixResponse + (*UpdateServerUDPRequest)(nil), // 14: pb.UpdateServerUDPRequest + (*UpdateServerUDPResponse)(nil), // 15: pb.UpdateServerUDPResponse + (*UpdateServerWebRequest)(nil), // 16: pb.UpdateServerWebRequest + (*UpdateServerWebResponse)(nil), // 17: pb.UpdateServerWebResponse + (*UpdateServerReverseProxyRequest)(nil), // 18: pb.UpdateServerReverseProxyRequest + (*UpdateServerReverseProxyResponse)(nil), // 19: pb.UpdateServerReverseProxyResponse + (*UpdateServerNamesRequest)(nil), // 20: pb.UpdateServerNamesRequest + (*UpdateServerNamesResponse)(nil), // 21: pb.UpdateServerNamesResponse + (*CountAllEnabledServersRequest)(nil), // 22: pb.CountAllEnabledServersRequest + (*CountAllEnabledServersResponse)(nil), // 23: pb.CountAllEnabledServersResponse + (*ListEnabledServersRequest)(nil), // 24: pb.ListEnabledServersRequest + (*ListEnabledServersResponse)(nil), // 25: pb.ListEnabledServersResponse + (*DisableServerRequest)(nil), // 26: pb.DisableServerRequest + (*DisableServerResponse)(nil), // 27: pb.DisableServerResponse + (*FindEnabledServerRequest)(nil), // 28: pb.FindEnabledServerRequest + (*FindEnabledServerResponse)(nil), // 29: pb.FindEnabledServerResponse + (*FindEnabledServerTypeRequest)(nil), // 30: pb.FindEnabledServerTypeRequest + (*FindEnabledServerTypeResponse)(nil), // 31: pb.FindEnabledServerTypeResponse + (*FindServerReverseProxyRequest)(nil), // 32: pb.FindServerReverseProxyRequest + (*FindServerReverseProxyResponse)(nil), // 33: pb.FindServerReverseProxyResponse + (*Server)(nil), // 34: pb.Server } var file_service_server_proto_depIdxs = []int32{ - 12, // 0: pb.ListEnabledServersResponse.servers:type_name -> pb.Server - 12, // 1: pb.FindEnabledServerResponse.server:type_name -> pb.Server + 34, // 0: pb.ListEnabledServersResponse.servers:type_name -> pb.Server + 34, // 1: pb.FindEnabledServerResponse.server:type_name -> pb.Server 0, // 2: pb.ServerService.createServer:input_type -> pb.CreateServerRequest - 2, // 3: pb.ServerService.updateServer:input_type -> pb.UpdateServerRequest - 4, // 4: pb.ServerService.countAllEnabledServers:input_type -> pb.CountAllEnabledServersRequest - 6, // 5: pb.ServerService.listEnabledServers:input_type -> pb.ListEnabledServersRequest - 8, // 6: pb.ServerService.disableServer:input_type -> pb.DisableServerRequest - 10, // 7: pb.ServerService.findEnabledServer:input_type -> pb.FindEnabledServerRequest - 1, // 8: pb.ServerService.createServer:output_type -> pb.CreateServerResponse - 3, // 9: pb.ServerService.updateServer:output_type -> pb.UpdateServerResponse - 5, // 10: pb.ServerService.countAllEnabledServers:output_type -> pb.CountAllEnabledServersResponse - 7, // 11: pb.ServerService.listEnabledServers:output_type -> pb.ListEnabledServersResponse - 9, // 12: pb.ServerService.disableServer:output_type -> pb.DisableServerResponse - 11, // 13: pb.ServerService.findEnabledServer:output_type -> pb.FindEnabledServerResponse - 8, // [8:14] is the sub-list for method output_type - 2, // [2:8] is the sub-list for method input_type + 2, // 3: pb.ServerService.updateServerBasic:input_type -> pb.UpdateServerBasicRequest + 4, // 4: pb.ServerService.updateServerHTTP:input_type -> pb.UpdateServerHTTPRequest + 6, // 5: pb.ServerService.updateServerHTTPS:input_type -> pb.UpdateServerHTTPSRequest + 8, // 6: pb.ServerService.updateServerTCP:input_type -> pb.UpdateServerTCPRequest + 10, // 7: pb.ServerService.updateServerTLS:input_type -> pb.UpdateServerTLSRequest + 12, // 8: pb.ServerService.updateServerUnix:input_type -> pb.UpdateServerUnixRequest + 14, // 9: pb.ServerService.updateServerUDP:input_type -> pb.UpdateServerUDPRequest + 16, // 10: pb.ServerService.updateServerWeb:input_type -> pb.UpdateServerWebRequest + 18, // 11: pb.ServerService.updateServerReverseProxy:input_type -> pb.UpdateServerReverseProxyRequest + 20, // 12: pb.ServerService.updateServerNames:input_type -> pb.UpdateServerNamesRequest + 22, // 13: pb.ServerService.countAllEnabledServers:input_type -> pb.CountAllEnabledServersRequest + 24, // 14: pb.ServerService.listEnabledServers:input_type -> pb.ListEnabledServersRequest + 26, // 15: pb.ServerService.disableServer:input_type -> pb.DisableServerRequest + 28, // 16: pb.ServerService.findEnabledServer:input_type -> pb.FindEnabledServerRequest + 30, // 17: pb.ServerService.findEnabledServerType:input_type -> pb.FindEnabledServerTypeRequest + 32, // 18: pb.ServerService.findServerReverseProxy:input_type -> pb.FindServerReverseProxyRequest + 1, // 19: pb.ServerService.createServer:output_type -> pb.CreateServerResponse + 3, // 20: pb.ServerService.updateServerBasic:output_type -> pb.UpdateServerBasicResponse + 5, // 21: pb.ServerService.updateServerHTTP:output_type -> pb.UpdateServerHTTPResponse + 7, // 22: pb.ServerService.updateServerHTTPS:output_type -> pb.UpdateServerHTTPSResponse + 9, // 23: pb.ServerService.updateServerTCP:output_type -> pb.UpdateServerTCPResponse + 11, // 24: pb.ServerService.updateServerTLS:output_type -> pb.UpdateServerTLSResponse + 13, // 25: pb.ServerService.updateServerUnix:output_type -> pb.UpdateServerUnixResponse + 15, // 26: pb.ServerService.updateServerUDP:output_type -> pb.UpdateServerUDPResponse + 17, // 27: pb.ServerService.updateServerWeb:output_type -> pb.UpdateServerWebResponse + 19, // 28: pb.ServerService.updateServerReverseProxy:output_type -> pb.UpdateServerReverseProxyResponse + 21, // 29: pb.ServerService.updateServerNames:output_type -> pb.UpdateServerNamesResponse + 23, // 30: pb.ServerService.countAllEnabledServers:output_type -> pb.CountAllEnabledServersResponse + 25, // 31: pb.ServerService.listEnabledServers:output_type -> pb.ListEnabledServersResponse + 27, // 32: pb.ServerService.disableServer:output_type -> pb.DisableServerResponse + 29, // 33: pb.ServerService.findEnabledServer:output_type -> pb.FindEnabledServerResponse + 31, // 34: pb.ServerService.findEnabledServerType:output_type -> pb.FindEnabledServerTypeResponse + 33, // 35: pb.ServerService.findServerReverseProxy:output_type -> pb.FindServerReverseProxyResponse + 19, // [19:36] is the sub-list for method output_type + 2, // [2:19] 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 @@ -898,7 +2135,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateServerRequest); i { + switch v := v.(*UpdateServerBasicRequest); i { case 0: return &v.state case 1: @@ -910,7 +2147,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateServerResponse); i { + switch v := v.(*UpdateServerBasicResponse); i { case 0: return &v.state case 1: @@ -922,7 +2159,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CountAllEnabledServersRequest); i { + switch v := v.(*UpdateServerHTTPRequest); i { case 0: return &v.state case 1: @@ -934,7 +2171,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CountAllEnabledServersResponse); i { + switch v := v.(*UpdateServerHTTPResponse); i { case 0: return &v.state case 1: @@ -946,7 +2183,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEnabledServersRequest); i { + switch v := v.(*UpdateServerHTTPSRequest); i { case 0: return &v.state case 1: @@ -958,7 +2195,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListEnabledServersResponse); i { + switch v := v.(*UpdateServerHTTPSResponse); i { case 0: return &v.state case 1: @@ -970,7 +2207,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisableServerRequest); i { + switch v := v.(*UpdateServerTCPRequest); i { case 0: return &v.state case 1: @@ -982,7 +2219,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisableServerResponse); i { + switch v := v.(*UpdateServerTCPResponse); i { case 0: return &v.state case 1: @@ -994,7 +2231,7 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FindEnabledServerRequest); i { + switch v := v.(*UpdateServerTLSRequest); i { case 0: return &v.state case 1: @@ -1006,6 +2243,222 @@ func file_service_server_proto_init() { } } file_service_server_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerTLSResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerUnixRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerUnixResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerUDPRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerUDPResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerWebRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerWebResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerReverseProxyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerReverseProxyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerNamesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateServerNamesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllEnabledServersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllEnabledServersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledServersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledServersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisableServerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisableServerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledServerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FindEnabledServerResponse); i { case 0: return &v.state @@ -1017,6 +2470,54 @@ func file_service_server_proto_init() { return nil } } + file_service_server_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledServerTypeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledServerTypeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindServerReverseProxyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_server_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindServerReverseProxyResponse); 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{ @@ -1024,7 +2525,7 @@ func file_service_server_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_server_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 34, NumExtensions: 0, NumServices: 1, }, @@ -1052,8 +2553,26 @@ const _ = grpc.SupportPackageIsVersion6 type ServerServiceClient interface { // 创建服务 CreateServer(ctx context.Context, in *CreateServerRequest, opts ...grpc.CallOption) (*CreateServerResponse, error) - // 修改服务 - UpdateServer(ctx context.Context, in *UpdateServerRequest, opts ...grpc.CallOption) (*UpdateServerResponse, error) + // 修改服务基本信息 + UpdateServerBasic(ctx context.Context, in *UpdateServerBasicRequest, opts ...grpc.CallOption) (*UpdateServerBasicResponse, error) + // 修改服务的HTTP设置 + UpdateServerHTTP(ctx context.Context, in *UpdateServerHTTPRequest, opts ...grpc.CallOption) (*UpdateServerHTTPResponse, error) + // 修改服务的HTTPS设置 + UpdateServerHTTPS(ctx context.Context, in *UpdateServerHTTPSRequest, opts ...grpc.CallOption) (*UpdateServerHTTPSResponse, error) + // 修改服务的TCP设置 + UpdateServerTCP(ctx context.Context, in *UpdateServerTCPRequest, opts ...grpc.CallOption) (*UpdateServerTCPResponse, error) + // 修改服务的TLS设置 + UpdateServerTLS(ctx context.Context, in *UpdateServerTLSRequest, opts ...grpc.CallOption) (*UpdateServerTLSResponse, error) + // 修改服务的Unix设置 + UpdateServerUnix(ctx context.Context, in *UpdateServerUnixRequest, opts ...grpc.CallOption) (*UpdateServerUnixResponse, error) + // 修改服务的UDP设置 + UpdateServerUDP(ctx context.Context, in *UpdateServerUDPRequest, opts ...grpc.CallOption) (*UpdateServerUDPResponse, error) + // 修改服务的Web设置 + UpdateServerWeb(ctx context.Context, in *UpdateServerWebRequest, opts ...grpc.CallOption) (*UpdateServerWebResponse, error) + // 修改服务的反向代理设置 + UpdateServerReverseProxy(ctx context.Context, in *UpdateServerReverseProxyRequest, opts ...grpc.CallOption) (*UpdateServerReverseProxyResponse, error) + // 修改服务的域名设置 + UpdateServerNames(ctx context.Context, in *UpdateServerNamesRequest, opts ...grpc.CallOption) (*UpdateServerNamesResponse, error) // 计算服务数量 CountAllEnabledServers(ctx context.Context, in *CountAllEnabledServersRequest, opts ...grpc.CallOption) (*CountAllEnabledServersResponse, error) // 列出单页服务 @@ -1062,6 +2581,10 @@ type ServerServiceClient interface { DisableServer(ctx context.Context, in *DisableServerRequest, opts ...grpc.CallOption) (*DisableServerResponse, error) // 查找单个服务 FindEnabledServer(ctx context.Context, in *FindEnabledServerRequest, opts ...grpc.CallOption) (*FindEnabledServerResponse, error) + // 查找服务的服务类型 + FindEnabledServerType(ctx context.Context, in *FindEnabledServerTypeRequest, opts ...grpc.CallOption) (*FindEnabledServerTypeResponse, error) + // 查找反向代理设置 + FindServerReverseProxy(ctx context.Context, in *FindServerReverseProxyRequest, opts ...grpc.CallOption) (*FindServerReverseProxyResponse, error) } type serverServiceClient struct { @@ -1081,9 +2604,90 @@ func (c *serverServiceClient) CreateServer(ctx context.Context, in *CreateServer return out, nil } -func (c *serverServiceClient) UpdateServer(ctx context.Context, in *UpdateServerRequest, opts ...grpc.CallOption) (*UpdateServerResponse, error) { - out := new(UpdateServerResponse) - err := c.cc.Invoke(ctx, "/pb.ServerService/updateServer", in, out, opts...) +func (c *serverServiceClient) UpdateServerBasic(ctx context.Context, in *UpdateServerBasicRequest, opts ...grpc.CallOption) (*UpdateServerBasicResponse, error) { + out := new(UpdateServerBasicResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerBasic", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) UpdateServerHTTP(ctx context.Context, in *UpdateServerHTTPRequest, opts ...grpc.CallOption) (*UpdateServerHTTPResponse, error) { + out := new(UpdateServerHTTPResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerHTTP", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) UpdateServerHTTPS(ctx context.Context, in *UpdateServerHTTPSRequest, opts ...grpc.CallOption) (*UpdateServerHTTPSResponse, error) { + out := new(UpdateServerHTTPSResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerHTTPS", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) UpdateServerTCP(ctx context.Context, in *UpdateServerTCPRequest, opts ...grpc.CallOption) (*UpdateServerTCPResponse, error) { + out := new(UpdateServerTCPResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerTCP", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) UpdateServerTLS(ctx context.Context, in *UpdateServerTLSRequest, opts ...grpc.CallOption) (*UpdateServerTLSResponse, error) { + out := new(UpdateServerTLSResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerTLS", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) UpdateServerUnix(ctx context.Context, in *UpdateServerUnixRequest, opts ...grpc.CallOption) (*UpdateServerUnixResponse, error) { + out := new(UpdateServerUnixResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerUnix", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) UpdateServerUDP(ctx context.Context, in *UpdateServerUDPRequest, opts ...grpc.CallOption) (*UpdateServerUDPResponse, error) { + out := new(UpdateServerUDPResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerUDP", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) UpdateServerWeb(ctx context.Context, in *UpdateServerWebRequest, opts ...grpc.CallOption) (*UpdateServerWebResponse, error) { + out := new(UpdateServerWebResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerWeb", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) UpdateServerReverseProxy(ctx context.Context, in *UpdateServerReverseProxyRequest, opts ...grpc.CallOption) (*UpdateServerReverseProxyResponse, error) { + out := new(UpdateServerReverseProxyResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerReverseProxy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) UpdateServerNames(ctx context.Context, in *UpdateServerNamesRequest, opts ...grpc.CallOption) (*UpdateServerNamesResponse, error) { + out := new(UpdateServerNamesResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/updateServerNames", in, out, opts...) if err != nil { return nil, err } @@ -1126,12 +2730,48 @@ func (c *serverServiceClient) FindEnabledServer(ctx context.Context, in *FindEna return out, nil } +func (c *serverServiceClient) FindEnabledServerType(ctx context.Context, in *FindEnabledServerTypeRequest, opts ...grpc.CallOption) (*FindEnabledServerTypeResponse, error) { + out := new(FindEnabledServerTypeResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/findEnabledServerType", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) FindServerReverseProxy(ctx context.Context, in *FindServerReverseProxyRequest, opts ...grpc.CallOption) (*FindServerReverseProxyResponse, error) { + out := new(FindServerReverseProxyResponse) + err := c.cc.Invoke(ctx, "/pb.ServerService/findServerReverseProxy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ServerServiceServer is the server API for ServerService service. type ServerServiceServer interface { // 创建服务 CreateServer(context.Context, *CreateServerRequest) (*CreateServerResponse, error) - // 修改服务 - UpdateServer(context.Context, *UpdateServerRequest) (*UpdateServerResponse, error) + // 修改服务基本信息 + UpdateServerBasic(context.Context, *UpdateServerBasicRequest) (*UpdateServerBasicResponse, error) + // 修改服务的HTTP设置 + UpdateServerHTTP(context.Context, *UpdateServerHTTPRequest) (*UpdateServerHTTPResponse, error) + // 修改服务的HTTPS设置 + UpdateServerHTTPS(context.Context, *UpdateServerHTTPSRequest) (*UpdateServerHTTPSResponse, error) + // 修改服务的TCP设置 + UpdateServerTCP(context.Context, *UpdateServerTCPRequest) (*UpdateServerTCPResponse, error) + // 修改服务的TLS设置 + UpdateServerTLS(context.Context, *UpdateServerTLSRequest) (*UpdateServerTLSResponse, error) + // 修改服务的Unix设置 + UpdateServerUnix(context.Context, *UpdateServerUnixRequest) (*UpdateServerUnixResponse, error) + // 修改服务的UDP设置 + UpdateServerUDP(context.Context, *UpdateServerUDPRequest) (*UpdateServerUDPResponse, error) + // 修改服务的Web设置 + UpdateServerWeb(context.Context, *UpdateServerWebRequest) (*UpdateServerWebResponse, error) + // 修改服务的反向代理设置 + UpdateServerReverseProxy(context.Context, *UpdateServerReverseProxyRequest) (*UpdateServerReverseProxyResponse, error) + // 修改服务的域名设置 + UpdateServerNames(context.Context, *UpdateServerNamesRequest) (*UpdateServerNamesResponse, error) // 计算服务数量 CountAllEnabledServers(context.Context, *CountAllEnabledServersRequest) (*CountAllEnabledServersResponse, error) // 列出单页服务 @@ -1140,6 +2780,10 @@ type ServerServiceServer interface { DisableServer(context.Context, *DisableServerRequest) (*DisableServerResponse, error) // 查找单个服务 FindEnabledServer(context.Context, *FindEnabledServerRequest) (*FindEnabledServerResponse, error) + // 查找服务的服务类型 + FindEnabledServerType(context.Context, *FindEnabledServerTypeRequest) (*FindEnabledServerTypeResponse, error) + // 查找反向代理设置 + FindServerReverseProxy(context.Context, *FindServerReverseProxyRequest) (*FindServerReverseProxyResponse, error) } // UnimplementedServerServiceServer can be embedded to have forward compatible implementations. @@ -1149,8 +2793,35 @@ type UnimplementedServerServiceServer struct { func (*UnimplementedServerServiceServer) CreateServer(context.Context, *CreateServerRequest) (*CreateServerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateServer not implemented") } -func (*UnimplementedServerServiceServer) UpdateServer(context.Context, *UpdateServerRequest) (*UpdateServerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateServer not implemented") +func (*UnimplementedServerServiceServer) UpdateServerBasic(context.Context, *UpdateServerBasicRequest) (*UpdateServerBasicResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerBasic not implemented") +} +func (*UnimplementedServerServiceServer) UpdateServerHTTP(context.Context, *UpdateServerHTTPRequest) (*UpdateServerHTTPResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerHTTP not implemented") +} +func (*UnimplementedServerServiceServer) UpdateServerHTTPS(context.Context, *UpdateServerHTTPSRequest) (*UpdateServerHTTPSResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerHTTPS not implemented") +} +func (*UnimplementedServerServiceServer) UpdateServerTCP(context.Context, *UpdateServerTCPRequest) (*UpdateServerTCPResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerTCP not implemented") +} +func (*UnimplementedServerServiceServer) UpdateServerTLS(context.Context, *UpdateServerTLSRequest) (*UpdateServerTLSResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerTLS not implemented") +} +func (*UnimplementedServerServiceServer) UpdateServerUnix(context.Context, *UpdateServerUnixRequest) (*UpdateServerUnixResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerUnix not implemented") +} +func (*UnimplementedServerServiceServer) UpdateServerUDP(context.Context, *UpdateServerUDPRequest) (*UpdateServerUDPResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerUDP not implemented") +} +func (*UnimplementedServerServiceServer) UpdateServerWeb(context.Context, *UpdateServerWebRequest) (*UpdateServerWebResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerWeb not implemented") +} +func (*UnimplementedServerServiceServer) UpdateServerReverseProxy(context.Context, *UpdateServerReverseProxyRequest) (*UpdateServerReverseProxyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerReverseProxy not implemented") +} +func (*UnimplementedServerServiceServer) UpdateServerNames(context.Context, *UpdateServerNamesRequest) (*UpdateServerNamesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServerNames not implemented") } func (*UnimplementedServerServiceServer) CountAllEnabledServers(context.Context, *CountAllEnabledServersRequest) (*CountAllEnabledServersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledServers not implemented") @@ -1164,6 +2835,12 @@ func (*UnimplementedServerServiceServer) DisableServer(context.Context, *Disable func (*UnimplementedServerServiceServer) FindEnabledServer(context.Context, *FindEnabledServerRequest) (*FindEnabledServerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindEnabledServer not implemented") } +func (*UnimplementedServerServiceServer) FindEnabledServerType(context.Context, *FindEnabledServerTypeRequest) (*FindEnabledServerTypeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledServerType not implemented") +} +func (*UnimplementedServerServiceServer) FindServerReverseProxy(context.Context, *FindServerReverseProxyRequest) (*FindServerReverseProxyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindServerReverseProxy not implemented") +} func RegisterServerServiceServer(s *grpc.Server, srv ServerServiceServer) { s.RegisterService(&_ServerService_serviceDesc, srv) @@ -1187,20 +2864,182 @@ func _ServerService_CreateServer_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _ServerService_UpdateServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateServerRequest) +func _ServerService_UpdateServerBasic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerBasicRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ServerServiceServer).UpdateServer(ctx, in) + return srv.(ServerServiceServer).UpdateServerBasic(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.ServerService/UpdateServer", + FullMethod: "/pb.ServerService/UpdateServerBasic", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServerServiceServer).UpdateServer(ctx, req.(*UpdateServerRequest)) + return srv.(ServerServiceServer).UpdateServerBasic(ctx, req.(*UpdateServerBasicRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_UpdateServerHTTP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerHTTPRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).UpdateServerHTTP(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/UpdateServerHTTP", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).UpdateServerHTTP(ctx, req.(*UpdateServerHTTPRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_UpdateServerHTTPS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerHTTPSRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).UpdateServerHTTPS(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/UpdateServerHTTPS", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).UpdateServerHTTPS(ctx, req.(*UpdateServerHTTPSRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_UpdateServerTCP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerTCPRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).UpdateServerTCP(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/UpdateServerTCP", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).UpdateServerTCP(ctx, req.(*UpdateServerTCPRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_UpdateServerTLS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerTLSRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).UpdateServerTLS(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/UpdateServerTLS", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).UpdateServerTLS(ctx, req.(*UpdateServerTLSRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_UpdateServerUnix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerUnixRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).UpdateServerUnix(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/UpdateServerUnix", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).UpdateServerUnix(ctx, req.(*UpdateServerUnixRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_UpdateServerUDP_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerUDPRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).UpdateServerUDP(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/UpdateServerUDP", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).UpdateServerUDP(ctx, req.(*UpdateServerUDPRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_UpdateServerWeb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerWebRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).UpdateServerWeb(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/UpdateServerWeb", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).UpdateServerWeb(ctx, req.(*UpdateServerWebRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_UpdateServerReverseProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerReverseProxyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).UpdateServerReverseProxy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/UpdateServerReverseProxy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).UpdateServerReverseProxy(ctx, req.(*UpdateServerReverseProxyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_UpdateServerNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateServerNamesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).UpdateServerNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/UpdateServerNames", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).UpdateServerNames(ctx, req.(*UpdateServerNamesRequest)) } return interceptor(ctx, in, info, handler) } @@ -1277,6 +3116,42 @@ func _ServerService_FindEnabledServer_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _ServerService_FindEnabledServerType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledServerTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).FindEnabledServerType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/FindEnabledServerType", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).FindEnabledServerType(ctx, req.(*FindEnabledServerTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_FindServerReverseProxy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindServerReverseProxyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).FindServerReverseProxy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.ServerService/FindServerReverseProxy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).FindServerReverseProxy(ctx, req.(*FindServerReverseProxyRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _ServerService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.ServerService", HandlerType: (*ServerServiceServer)(nil), @@ -1286,8 +3161,44 @@ var _ServerService_serviceDesc = grpc.ServiceDesc{ Handler: _ServerService_CreateServer_Handler, }, { - MethodName: "updateServer", - Handler: _ServerService_UpdateServer_Handler, + MethodName: "updateServerBasic", + Handler: _ServerService_UpdateServerBasic_Handler, + }, + { + MethodName: "updateServerHTTP", + Handler: _ServerService_UpdateServerHTTP_Handler, + }, + { + MethodName: "updateServerHTTPS", + Handler: _ServerService_UpdateServerHTTPS_Handler, + }, + { + MethodName: "updateServerTCP", + Handler: _ServerService_UpdateServerTCP_Handler, + }, + { + MethodName: "updateServerTLS", + Handler: _ServerService_UpdateServerTLS_Handler, + }, + { + MethodName: "updateServerUnix", + Handler: _ServerService_UpdateServerUnix_Handler, + }, + { + MethodName: "updateServerUDP", + Handler: _ServerService_UpdateServerUDP_Handler, + }, + { + MethodName: "updateServerWeb", + Handler: _ServerService_UpdateServerWeb_Handler, + }, + { + MethodName: "updateServerReverseProxy", + Handler: _ServerService_UpdateServerReverseProxy_Handler, + }, + { + MethodName: "updateServerNames", + Handler: _ServerService_UpdateServerNames_Handler, }, { MethodName: "countAllEnabledServers", @@ -1305,6 +3216,14 @@ var _ServerService_serviceDesc = grpc.ServiceDesc{ MethodName: "findEnabledServer", Handler: _ServerService_FindEnabledServer_Handler, }, + { + MethodName: "findEnabledServerType", + Handler: _ServerService_FindEnabledServerType_Handler, + }, + { + MethodName: "findServerReverseProxy", + Handler: _ServerService_FindServerReverseProxy_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_server.proto", diff --git a/pkg/rpc/protos/model_http_web.proto b/pkg/rpc/protos/model_http_web.proto new file mode 100644 index 0000000..8567f1b --- /dev/null +++ b/pkg/rpc/protos/model_http_web.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +message HTTPWeb { + int64 id = 1; + string root = 2; +} \ No newline at end of file diff --git a/pkg/rpc/protos/model_reverse_proxy.proto b/pkg/rpc/protos/model_reverse_proxy.proto new file mode 100644 index 0000000..e01784a --- /dev/null +++ b/pkg/rpc/protos/model_reverse_proxy.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +message ReverseProxy { + int64 id = 1; + bytes schedulingJSON = 2; + bytes primaryOriginsJSON = 3; + bytes backupOriginsJSON = 4; +} \ No newline at end of file diff --git a/pkg/rpc/protos/model_server.proto b/pkg/rpc/protos/model_server.proto index d7ed82c..5cd3bd0 100644 --- a/pkg/rpc/protos/model_server.proto +++ b/pkg/rpc/protos/model_server.proto @@ -7,13 +7,24 @@ import "model_node_cluster.proto"; message Server { int64 id = 1; - bytes config = 2; - string type = 3; - string name = 4; - string description = 5; - bytes includeNodes = 6; - bytes excludeNodes = 7; - int64 createdAt = 8; + string type = 2; + string name = 3; + string description = 4; + bytes includeNodes = 5; + bytes excludeNodes = 6; + int64 createdAt = 7; - NodeCluster cluster = 10; + // 配置相关 + bytes config = 17; + bytes serverNamesJON = 8; + bytes httpJSON = 9; + bytes httpsJSON = 10; + bytes tcpJSON = 11; + bytes tlsJSON = 12; + bytes unixJSON = 13; + bytes udpJSON = 14; + int64 webId = 15; + int64 reverseProxyId = 16; + + NodeCluster cluster = 30; } diff --git a/pkg/rpc/protos/service_http_web.proto b/pkg/rpc/protos/service_http_web.proto new file mode 100644 index 0000000..9c128ed --- /dev/null +++ b/pkg/rpc/protos/service_http_web.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "model_http_web.proto"; + +service HTTPWebService { + // 创建Web配置 + rpc createHTTPWeb (CreateHTTPWebRequest) returns (CreateHTTPWebResponse); + + // 查找Web配置 + rpc findEnabledHTTPWeb (FindEnabledHTTPWebRequest) returns (FindEnabledHTTPWebResponse); + + // 更新Web配置 + rpc updateHTTPWeb (UpdateHTTPWebRequest) returns (UpdateHTTPWebResponse); +} + +// 创建Web配置 +message CreateHTTPWebRequest { + string root = 1; +} + +message CreateHTTPWebResponse { + int64 webId = 1; +} + +// 查找Web配置 +message FindEnabledHTTPWebRequest { + int64 webId = 1; +} + +message FindEnabledHTTPWebResponse { + HTTPWeb web = 1; +} + +// 更新Web配置 +message UpdateHTTPWebRequest { + int64 webId = 1; + string root = 2; +} + +message UpdateHTTPWebResponse { + +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_origin_server.proto b/pkg/rpc/protos/service_origin_server.proto index e36774f..0694cd9 100644 --- a/pkg/rpc/protos/service_origin_server.proto +++ b/pkg/rpc/protos/service_origin_server.proto @@ -15,6 +15,9 @@ service OriginServerService { // 查找单个源站信息 rpc findEnabledOriginServer (FindEnabledOriginServerRequest) returns (FindEnabledOriginServerResponse); + + // 查找源站配置 + rpc findEnabledOriginServerConfig (FindEnabledOriginServerConfigRequest) returns (FindEnabledOriginServerConfigResponse); } // 创建源站 @@ -47,4 +50,13 @@ message FindEnabledOriginServerRequest { message FindEnabledOriginServerResponse { OriginServer Origin = 1; +} + +// 查找源站配置 +message FindEnabledOriginServerConfigRequest { + int64 originId = 1; +} + +message FindEnabledOriginServerConfigResponse { + bytes config = 1; } \ No newline at end of file diff --git a/pkg/rpc/protos/service_reverse_proxy.proto b/pkg/rpc/protos/service_reverse_proxy.proto new file mode 100644 index 0000000..2316544 --- /dev/null +++ b/pkg/rpc/protos/service_reverse_proxy.proto @@ -0,0 +1,85 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "model_reverse_proxy.proto"; + +service ReverseProxyService { + // 创建反向代理 + rpc createReverseProxy (CreateReverseProxyRequest) returns (CreateReverseProxyResponse); + + // 查找反向代理 + rpc findEnabledReverseProxy (FindEnabledReverseProxyRequest) returns (FindEnabledReverseProxyResponse); + + // 查找反向代理配置 + rpc findEnabledReverseProxyConfig (FindEnabledReverseProxyConfigRequest) returns (FindEnabledReverseProxyConfigResponse); + + // 修改反向代理的调度算法 + rpc updateReverseProxyScheduling (UpdateReverseProxySchedulingRequest) returns (UpdateReverseProxySchedulingResponse); + + // 修改主要源站信息 + rpc updateReverseProxyPrimaryOrigins (UpdateReverseProxyPrimaryOriginsRequest) returns (UpdateReverseProxyPrimaryOriginsResponse); + + // 修改备用源站信息 + rpc updateReverseProxyBackupOrigins (UpdateReverseProxyBackupOriginsRequest) returns (UpdateReverseProxyBackupOriginsResponse); +} + +// 创建反向代理 +message CreateReverseProxyRequest { + bytes schedulingJSON = 1; + bytes primaryOriginsJSON = 2; + bytes backupOriginsJSON = 3; +} + +message CreateReverseProxyResponse { + int64 reverseProxyId = 1; +} + +// 查找反向代理 +message FindEnabledReverseProxyRequest { + int64 reverseProxyId = 1; +} + +message FindEnabledReverseProxyResponse { + ReverseProxy reverseProxy = 1; +} + +// 查找反向代理配置 +message FindEnabledReverseProxyConfigRequest { + int64 reverseProxyId = 1; +} + +message FindEnabledReverseProxyConfigResponse { + bytes config = 1; +} + +// 修改反向代理调度算法 +message UpdateReverseProxySchedulingRequest { + int64 reverseProxyId = 1; + bytes schedulingJSON = 2; +} + +message UpdateReverseProxySchedulingResponse { + +} + +// 修改主要源站信息 +message UpdateReverseProxyPrimaryOriginsRequest { + int64 reverseProxyId = 1; + bytes originsJSON = 2; +} + +message UpdateReverseProxyPrimaryOriginsResponse { + +} + +// 修改备用源站信息 +message UpdateReverseProxyBackupOriginsRequest { + int64 reverseProxyId = 1; + bytes originsJSON = 2; +} + +message UpdateReverseProxyBackupOriginsResponse { + +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_server.proto b/pkg/rpc/protos/service_server.proto index 1389a52..1a515b5 100644 --- a/pkg/rpc/protos/service_server.proto +++ b/pkg/rpc/protos/service_server.proto @@ -8,8 +8,35 @@ service ServerService { // 创建服务 rpc createServer (CreateServerRequest) returns (CreateServerResponse); - // 修改服务 - rpc updateServer (UpdateServerRequest) returns (UpdateServerResponse); + // 修改服务基本信息 + rpc updateServerBasic (UpdateServerBasicRequest) returns (UpdateServerBasicResponse); + + // 修改服务的HTTP设置 + rpc updateServerHTTP (UpdateServerHTTPRequest) returns (UpdateServerHTTPResponse); + + // 修改服务的HTTPS设置 + rpc updateServerHTTPS (UpdateServerHTTPSRequest) returns (UpdateServerHTTPSResponse); + + // 修改服务的TCP设置 + rpc updateServerTCP (UpdateServerTCPRequest) returns (UpdateServerTCPResponse); + + // 修改服务的TLS设置 + rpc updateServerTLS (UpdateServerTLSRequest) returns (UpdateServerTLSResponse); + + // 修改服务的Unix设置 + rpc updateServerUnix (UpdateServerUnixRequest) returns (UpdateServerUnixResponse); + + // 修改服务的UDP设置 + rpc updateServerUDP (UpdateServerUDPRequest) returns (UpdateServerUDPResponse); + + // 修改服务的Web设置 + rpc updateServerWeb (UpdateServerWebRequest) returns (UpdateServerWebResponse); + + // 修改服务的反向代理设置 + rpc updateServerReverseProxy (UpdateServerReverseProxyRequest) returns (UpdateServerReverseProxyResponse); + + // 修改服务的域名设置 + rpc updateServerNames (UpdateServerNamesRequest) returns (UpdateServerNamesResponse); // 计算服务数量 rpc countAllEnabledServers (CountAllEnabledServersRequest) returns (CountAllEnabledServersResponse); @@ -22,6 +49,12 @@ service ServerService { // 查找单个服务 rpc findEnabledServer (FindEnabledServerRequest) returns (FindEnabledServerResponse); + + // 查找服务的服务类型 + rpc findEnabledServerType (FindEnabledServerTypeRequest) returns (FindEnabledServerTypeResponse); + + // 查找反向代理设置 + rpc findServerReverseProxy (FindServerReverseProxyRequest) returns (FindServerReverseProxyResponse); } // 创建服务 @@ -31,30 +64,118 @@ message CreateServerRequest { string type = 3; string name = 4; string description = 5; - int64 clusterId = 6; - bytes config = 7; - bytes includeNodesJSON = 8; - bytes excludeNodesJSON = 9; + + // 配置相关 + bytes serverNamesJON = 8; + bytes httpJSON = 9; + bytes httpsJSON = 10; + bytes tcpJSON = 11; + bytes tlsJSON = 12; + bytes unixJSON = 13; + bytes udpJSON = 14; + int64 webId = 15; + int64 reverseProxyId = 16; + + int64 clusterId = 30; + bytes includeNodesJSON = 31; + bytes excludeNodesJSON = 32; } message CreateServerResponse { int64 serverId = 1; } -// 修改服务 -message UpdateServerRequest { +// 修改服务基本信息 +message UpdateServerBasicRequest { int64 serverId = 1; - int64 userId = 2; - int64 adminId = 3; - string name = 4; - string description = 5; - int64 clusterId = 6; - bytes config = 7; - bytes includeNodesJSON = 8; - bytes excludeNodesJSON = 9; + string name = 2; + string description = 3; + int64 clusterId = 4; } -message UpdateServerResponse { +message UpdateServerBasicResponse { + +} + +// 修改服务的HTTP等设置 +message UpdateServerHTTPRequest { + int64 serverId = 1; + bytes config = 2; +} + +message UpdateServerHTTPResponse { + +} + +message UpdateServerHTTPSRequest { + int64 serverId = 1; + bytes config = 2; +} + +message UpdateServerHTTPSResponse { + +} + +message UpdateServerTCPRequest { + int64 serverId = 1; + bytes config = 2; +} + +message UpdateServerTCPResponse { + +} + +message UpdateServerTLSRequest { + int64 serverId = 1; + bytes config = 2; +} + +message UpdateServerTLSResponse { + +} + +message UpdateServerUnixRequest { + int64 serverId = 1; + bytes config = 2; +} + +message UpdateServerUnixResponse { + +} + +message UpdateServerUDPRequest { + int64 serverId = 1; + bytes config = 2; +} + +message UpdateServerUDPResponse { + +} + +message UpdateServerWebRequest { + int64 serverId = 1; + int64 webId = 2; +} + +message UpdateServerWebResponse { + +} + +message UpdateServerReverseProxyRequest { + int64 serverId = 1; + int64 reverseProxyId = 2; +} + +message UpdateServerReverseProxyResponse { + +} + +message UpdateServerNamesRequest { + int64 serverId = 1; + bytes config = 2; +} + +message UpdateServerNamesResponse { } @@ -93,4 +214,22 @@ message FindEnabledServerRequest { message FindEnabledServerResponse { Server server = 1; +} + +// 查找服务的服务类型 +message FindEnabledServerTypeRequest { + int64 serverId = 1; +} + +message FindEnabledServerTypeResponse { + string type = 1; +} + +// 查找反向代理设置 +message FindServerReverseProxyRequest { + int64 serverId = 1; +} + +message FindServerReverseProxyResponse { + bytes config = 1; } \ No newline at end of file diff --git a/pkg/serverconfigs/network_address_config.go b/pkg/serverconfigs/network_address_config.go index c34da8c..f164456 100644 --- a/pkg/serverconfigs/network_address_config.go +++ b/pkg/serverconfigs/network_address_config.go @@ -11,9 +11,9 @@ var regexpSinglePort = regexp.MustCompile(`^\d+$`) // 网络地址配置 type NetworkAddressConfig struct { - Protocol string `yaml:"protocol" json:"protocol"` // 协议,http、tcp、tcp4、tcp6、unix、udp等 - Host string `yaml:"host" json:"host"` // 主机地址或主机名 - PortRange string `yaml:"portRange" json:"portRange"` // 端口范围,支持 8080、8080-8090、8080:8090 + Protocol Protocol `yaml:"protocol" json:"protocol"` // 协议,http、tcp、tcp4、tcp6、unix、udp等 + Host string `yaml:"host" json:"host"` // 主机地址或主机名 + PortRange string `yaml:"portRange" json:"portRange"` // 端口范围,支持 8080、8080-8090、8080:8090 minPort int maxPort int @@ -58,13 +58,13 @@ func (this *NetworkAddressConfig) Init() error { func (this *NetworkAddressConfig) FullAddresses() []string { if this.Protocol == ProtocolUnix { - return []string{this.Protocol + ":" + this.Host} + return []string{this.Protocol.String() + ":" + this.Host} } result := []string{} for i := this.minPort; i <= this.maxPort; i++ { host := this.Host - result = append(result, this.Protocol+"://"+host+":"+strconv.Itoa(i)) + result = append(result, this.Protocol.String()+"://"+host+":"+strconv.Itoa(i)) } return result } diff --git a/pkg/serverconfigs/origin_server_config.go b/pkg/serverconfigs/origin_server_config.go index 4ab1cce..7a4f7da 100644 --- a/pkg/serverconfigs/origin_server_config.go +++ b/pkg/serverconfigs/origin_server_config.go @@ -22,19 +22,13 @@ type OriginServerConfig struct { Description string `yaml:"description" json:"description"` // 描述 TODO Code string `yaml:"code" json:"code"` // 代号 TODO - Weight uint `yaml:"weight" json:"weight"` // 权重 TODO - IsBackup bool `yaml:"backup" json:"isBackup"` // 是否为备份 TODO - ConnTimeout shared.TimeDuration `yaml:"failTimeout" json:"failTimeout"` // 连接失败超时 TODO - ReadTimeout shared.TimeDuration `yaml:"readTimeout" json:"readTimeout"` // 读取超时时间 TODO - IdleTimeout shared.TimeDuration `yaml:"idleTimeout" json:"idleTimeout"` // 空闲连接超时时间 TODO - MaxFails int32 `yaml:"maxFails" json:"maxFails"` // 最多失败次数 TODO - CurrentFails int32 `yaml:"currentFails" json:"currentFails"` // 当前已失败次数 TODO - MaxConns int32 `yaml:"maxConns" json:"maxConns"` // 最大并发连接数 TODO - CurrentConns int32 `yaml:"currentConns" json:"currentConns"` // 当前连接数 TODO - MaxIdleConns int32 `yaml:"idleConns" json:"idleConns"` // 最大空闲连接数 TODO - - IsDown bool `yaml:"down" json:"isDown"` // 是否下线 TODO - DownTime time.Time `yaml:"downTime,omitempty" json:"downTime,omitempty"` // 下线时间 TODO + Weight uint `yaml:"weight" json:"weight"` // 权重 TODO + ConnTimeout shared.TimeDuration `yaml:"failTimeout" json:"failTimeout"` // 连接失败超时 TODO + ReadTimeout shared.TimeDuration `yaml:"readTimeout" json:"readTimeout"` // 读取超时时间 TODO + IdleTimeout shared.TimeDuration `yaml:"idleTimeout" json:"idleTimeout"` // 空闲连接超时时间 TODO + MaxFails int `yaml:"maxFails" json:"maxFails"` // 最多失败次数 TODO + MaxConns int `yaml:"maxConns" json:"maxConns"` // 最大并发连接数 TODO + MaxIdleConns int `yaml:"idleConns" json:"idleConns"` // 最大空闲连接数 TODO RequestURI string `yaml:"requestURI" json:"requestURI"` // 转发后的请求URI TODO Host string `yaml:"host" json:"host"` // 自定义主机名 TODO @@ -172,5 +166,5 @@ func (this *OriginServerConfig) Connect() (net.Conn, error) { // TODO 支持从Unix、Pipe、HTTP、HTTPS中读取数据 - return nil, errors.New("invalid scheme '" + this.Addr.Protocol + "'") + return nil, errors.New("invalid scheme '" + this.Addr.Protocol.String() + "'") } diff --git a/pkg/serverconfigs/protocol.go b/pkg/serverconfigs/protocol.go index d2dfcf7..b5be234 100644 --- a/pkg/serverconfigs/protocol.go +++ b/pkg/serverconfigs/protocol.go @@ -1,6 +1,6 @@ package serverconfigs -type Protocol = string +type Protocol string const ( ProtocolHTTP Protocol = "http" @@ -27,3 +27,52 @@ const ( func AllProtocols() []Protocol { return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolTCP, ProtocolTLS, ProtocolUnix, ProtocolUDP, ProtocolHTTP4, ProtocolHTTP6, ProtocolHTTPS4, ProtocolHTTPS6, ProtocolTCP4, ProtocolTCP6, ProtocolTLS4, ProtocolTLS6} } + +func (this Protocol) IsHTTPFamily() bool { + return this == ProtocolHTTP || this == ProtocolHTTP4 || this == ProtocolHTTP6 +} + +func (this Protocol) IsHTTPSFamily() bool { + return this == ProtocolHTTPS || this == ProtocolHTTPS4 || this == ProtocolHTTPS6 +} + +func (this Protocol) IsTCPFamily() bool { + return this == ProtocolTCP || this == ProtocolTCP4 || this == ProtocolTCP6 +} + +func (this Protocol) IsTLSFamily() bool { + return this == ProtocolTLS || this == ProtocolTLS4 || this == ProtocolTLS6 +} + +func (this Protocol) IsUnixFamily() bool { + return this == ProtocolUnix +} + +func (this Protocol) IsUDPFamily() bool { + return this == ProtocolUDP +} + +// 主协议 +func (this Protocol) Primary() Protocol { + switch this { + case ProtocolHTTP, ProtocolHTTP4, ProtocolHTTP6: + return ProtocolHTTP + case ProtocolHTTPS, ProtocolHTTPS4, ProtocolHTTPS6: + return ProtocolHTTPS + case ProtocolTCP, ProtocolTCP4, ProtocolTCP6: + return ProtocolTCP + case ProtocolTLS, ProtocolTLS4, ProtocolTLS6: + return ProtocolTLS + case ProtocolUnix: + return ProtocolUnix + case ProtocolUDP: + return ProtocolUDP + default: + return this + } +} + +// 转换为字符串 +func (this Protocol) String() string { + return string(this) +} diff --git a/pkg/serverconfigs/protocol_test.go b/pkg/serverconfigs/protocol_test.go new file mode 100644 index 0000000..8860ec0 --- /dev/null +++ b/pkg/serverconfigs/protocol_test.go @@ -0,0 +1,22 @@ +package serverconfigs + +import ( + "github.com/iwind/TeaGo/assert" + "testing" +) + +func TestProtocol_IsHTTPFamily(t *testing.T) { + a := assert.NewAssertion(t) + t.Log(ProtocolHTTP.String(), ProtocolHTTPS.String(), ProtocolTCP) + a.IsTrue(ProtocolHTTP.IsHTTPFamily()) + a.IsTrue(ProtocolHTTP4.IsHTTPFamily()) + a.IsTrue(ProtocolHTTP6.IsHTTPFamily()) + a.IsTrue(ProtocolHTTPS.IsHTTPSFamily()) + a.IsTrue(ProtocolHTTPS4.IsHTTPSFamily()) + a.IsTrue(ProtocolHTTPS6.IsHTTPSFamily()) + a.IsTrue(ProtocolTCP.IsTCPFamily()) + a.IsTrue(ProtocolTCP.IsTCPFamily()) + a.IsTrue(ProtocolTCP6.IsTCPFamily()) + a.IsTrue(ProtocolUnix.IsUnixFamily()) + a.IsTrue(ProtocolUDP.IsUDPFamily()) +} diff --git a/pkg/serverconfigs/reverse_proxy_config.go b/pkg/serverconfigs/reverse_proxy_config.go index 96390e8..902df3f 100644 --- a/pkg/serverconfigs/reverse_proxy_config.go +++ b/pkg/serverconfigs/reverse_proxy_config.go @@ -1,28 +1,38 @@ package serverconfigs import ( - "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/scheduling" + "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/schedulingconfigs" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" "sync" ) // 反向代理设置 type ReverseProxyConfig struct { - IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用 TODO - Origins []*OriginServerConfig `yaml:"origins" json:"origins"` // 源站列表 - Scheduling *SchedulingConfig `yaml:"scheduling" json:"scheduling"` // 调度算法选项 + IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用 TODO + PrimaryOrigins []*OriginServerConfig `yaml:"primaryOrigins" json:"primaryOrigins"` // 主要源站列表 + BackupOrigins []*OriginServerConfig `yaml:"backupOrigins" json:"backupOrigins"` // 备用源站列表 + Scheduling *SchedulingConfig `yaml:"scheduling" json:"scheduling"` // 调度算法选项 - hasOrigins bool + hasPrimaryOrigins bool + hasBackupOrigins bool schedulingIsBackup bool - schedulingObject scheduling.SchedulingInterface + schedulingObject schedulingconfigs.SchedulingInterface schedulingLocker sync.Mutex } // 初始化 func (this *ReverseProxyConfig) Init() error { - this.hasOrigins = len(this.Origins) > 0 + this.hasPrimaryOrigins = len(this.PrimaryOrigins) > 0 + this.hasBackupOrigins = len(this.BackupOrigins) > 0 - for _, origin := range this.Origins { + for _, origin := range this.PrimaryOrigins { + err := origin.Init() + if err != nil { + return err + } + } + + for _, origin := range this.BackupOrigins { err := origin.Init() if err != nil { return err @@ -35,6 +45,16 @@ func (this *ReverseProxyConfig) Init() error { return nil } +// 添加主源站配置 +func (this *ReverseProxyConfig) AddPrimaryOrigin(origin *OriginServerConfig) { + this.PrimaryOrigins = append(this.PrimaryOrigins, origin) +} + +// 添加备用源站配置 +func (this *ReverseProxyConfig) AddBackupOrigin(origin *OriginServerConfig) { + this.BackupOrigins = append(this.BackupOrigins, origin) +} + // 取得下一个可用的后端服务 func (this *ReverseProxyConfig) NextOrigin(call *shared.RequestCall) *OriginServerConfig { this.schedulingLocker.Lock() @@ -79,23 +99,27 @@ func (this *ReverseProxyConfig) SetupScheduling(isBackup bool) { this.schedulingIsBackup = isBackup if this.Scheduling == nil { - this.schedulingObject = &scheduling.RandomScheduling{} + this.schedulingObject = &schedulingconfigs.RandomScheduling{} } else { typeCode := this.Scheduling.Code - s := scheduling.FindSchedulingType(typeCode) + s := schedulingconfigs.FindSchedulingType(typeCode) if s == nil { this.Scheduling = nil - this.schedulingObject = &scheduling.RandomScheduling{} + this.schedulingObject = &schedulingconfigs.RandomScheduling{} } else { - this.schedulingObject = s["instance"].(scheduling.SchedulingInterface) + this.schedulingObject = s["instance"].(schedulingconfigs.SchedulingInterface) } } - for _, origin := range this.Origins { - if origin.IsOn && !origin.IsDown { - if isBackup && origin.IsBackup { + if !isBackup { + for _, origin := range this.PrimaryOrigins { + if origin.IsOn { this.schedulingObject.Add(origin) - } else if !isBackup && !origin.IsBackup { + } + } + } else { + for _, origin := range this.BackupOrigins { + if origin.IsOn { this.schedulingObject.Add(origin) } } @@ -103,3 +127,11 @@ func (this *ReverseProxyConfig) SetupScheduling(isBackup bool) { this.schedulingObject.Start() } + +// 获取调度配置对象 +func (this *ReverseProxyConfig) FindSchedulingConfig() *SchedulingConfig { + if this.Scheduling == nil { + this.Scheduling = &SchedulingConfig{Code: "random"} + } + return this.Scheduling +} diff --git a/pkg/serverconfigs/scheduling/candidate.go b/pkg/serverconfigs/schedulingconfigs/candidate.go similarity index 83% rename from pkg/serverconfigs/scheduling/candidate.go rename to pkg/serverconfigs/schedulingconfigs/candidate.go index 701e3c0..927967f 100644 --- a/pkg/serverconfigs/scheduling/candidate.go +++ b/pkg/serverconfigs/schedulingconfigs/candidate.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs // 候选对象接口 type CandidateInterface interface { diff --git a/pkg/serverconfigs/scheduling/scheduling.go b/pkg/serverconfigs/schedulingconfigs/scheduling.go similarity index 96% rename from pkg/serverconfigs/scheduling/scheduling.go rename to pkg/serverconfigs/schedulingconfigs/scheduling.go index 0fe1a3c..bd178b8 100644 --- a/pkg/serverconfigs/scheduling/scheduling.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import ( "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" diff --git a/pkg/serverconfigs/scheduling/scheduling_hash.go b/pkg/serverconfigs/schedulingconfigs/scheduling_hash.go similarity index 89% rename from pkg/serverconfigs/scheduling/scheduling_hash.go rename to pkg/serverconfigs/schedulingconfigs/scheduling_hash.go index 2eba100..44231c4 100644 --- a/pkg/serverconfigs/scheduling/scheduling_hash.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_hash.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import ( "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" @@ -39,7 +39,7 @@ func (this *HashScheduling) Summary() maps.Map { return maps.Map{ "code": "hash", "name": "Hash算法", - "description": "根据自定义的键值的Hash值分配后端服务器", + "description": "根据自定义的键值的Hash值分配源站", "networks": []string{"http"}, } } diff --git a/pkg/serverconfigs/scheduling/scheduling_hash_test.go b/pkg/serverconfigs/schedulingconfigs/scheduling_hash_test.go similarity index 96% rename from pkg/serverconfigs/scheduling/scheduling_hash_test.go rename to pkg/serverconfigs/schedulingconfigs/scheduling_hash_test.go index f766886..961e180 100644 --- a/pkg/serverconfigs/scheduling/scheduling_hash_test.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_hash_test.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import ( "fmt" diff --git a/pkg/serverconfigs/scheduling/scheduling_random.go b/pkg/serverconfigs/schedulingconfigs/scheduling_random.go similarity index 94% rename from pkg/serverconfigs/scheduling/scheduling_random.go rename to pkg/serverconfigs/schedulingconfigs/scheduling_random.go index 1ea4c4a..eba07be 100644 --- a/pkg/serverconfigs/scheduling/scheduling_random.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_random.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import ( "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" @@ -72,7 +72,7 @@ func (this *RandomScheduling) Summary() maps.Map { return maps.Map{ "code": "random", "name": "Random随机算法", - "description": "根据权重设置随机分配后端服务器", + "description": "根据权重设置随机分配源站", "networks": []string{"http", "tcp"}, } } diff --git a/pkg/serverconfigs/scheduling/scheduling_random_test.go b/pkg/serverconfigs/schedulingconfigs/scheduling_random_test.go similarity index 97% rename from pkg/serverconfigs/scheduling/scheduling_random_test.go rename to pkg/serverconfigs/schedulingconfigs/scheduling_random_test.go index 4b89e90..3977e9a 100644 --- a/pkg/serverconfigs/scheduling/scheduling_random_test.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_random_test.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import ( "sync" diff --git a/pkg/serverconfigs/scheduling/scheduling_round_robin.go b/pkg/serverconfigs/schedulingconfigs/scheduling_round_robin.go similarity index 95% rename from pkg/serverconfigs/scheduling/scheduling_round_robin.go rename to pkg/serverconfigs/schedulingconfigs/scheduling_round_robin.go index 6ffce55..822f5a9 100644 --- a/pkg/serverconfigs/scheduling/scheduling_round_robin.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_round_robin.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import ( "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" @@ -74,7 +74,7 @@ func (this *RoundRobinScheduling) Summary() maps.Map { return maps.Map{ "code": "roundRobin", "name": "RoundRobin轮询算法", - "description": "根据权重,依次分配后端服务器", + "description": "根据权重,依次分配源站", "networks": []string{"http", "tcp"}, } } diff --git a/pkg/serverconfigs/scheduling/scheduling_round_robin_test.go b/pkg/serverconfigs/schedulingconfigs/scheduling_round_robin_test.go similarity index 98% rename from pkg/serverconfigs/scheduling/scheduling_round_robin_test.go rename to pkg/serverconfigs/schedulingconfigs/scheduling_round_robin_test.go index 20c8152..ccc69da 100644 --- a/pkg/serverconfigs/scheduling/scheduling_round_robin_test.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_round_robin_test.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import "testing" diff --git a/pkg/serverconfigs/scheduling/scheduling_sticky.go b/pkg/serverconfigs/schedulingconfigs/scheduling_sticky.go similarity index 98% rename from pkg/serverconfigs/scheduling/scheduling_sticky.go rename to pkg/serverconfigs/schedulingconfigs/scheduling_sticky.go index 9a1b06a..9b7e702 100644 --- a/pkg/serverconfigs/scheduling/scheduling_sticky.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_sticky.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import ( "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" @@ -100,7 +100,7 @@ func (this *StickyScheduling) Summary() maps.Map { return maps.Map{ "code": "sticky", "name": "Sticky算法", - "description": "利用Cookie、URL参数或者HTTP Header来指定后端服务器", + "description": "利用Cookie、URL参数或者HTTP Header来指定源站", "networks": []string{"http"}, } } diff --git a/pkg/serverconfigs/scheduling/scheduling_sticky_test.go b/pkg/serverconfigs/schedulingconfigs/scheduling_sticky_test.go similarity index 82% rename from pkg/serverconfigs/scheduling/scheduling_sticky_test.go rename to pkg/serverconfigs/schedulingconfigs/scheduling_sticky_test.go index f7346fc..13389e9 100644 --- a/pkg/serverconfigs/scheduling/scheduling_sticky_test.go +++ b/pkg/serverconfigs/schedulingconfigs/scheduling_sticky_test.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import ( "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared" @@ -29,14 +29,14 @@ func TestStickyScheduling_NextArgument(t *testing.T) { t.Log(s.mapping) - req, err := http.NewRequest("GET", "http://www.example.com/?backend=c", nil) + req, err := http.NewRequest("GET", "http://www.example.com/?origin=c", nil) if err != nil { t.Fatal(err) } options := maps.Map{ "type": "argument", - "param": "backend", + "param": "origin", } call := shared.NewRequestCall() call.Request = req @@ -67,19 +67,19 @@ func TestStickyScheduling_NextCookie(t *testing.T) { t.Log(s.mapping) - req, err := http.NewRequest("GET", "http://www.example.com/?backend=c", nil) + req, err := http.NewRequest("GET", "http://www.example.com/?origin=c", nil) if err != nil { t.Fatal(err) } req.AddCookie(&http.Cookie{ - Name: "backend", + Name: "origin", Value: "c", }) options := maps.Map{ "type": "cookie", - "param": "backend", + "param": "origin", } call := shared.NewRequestCall() call.Request = req @@ -110,15 +110,15 @@ func TestStickyScheduling_NextHeader(t *testing.T) { t.Log(s.mapping) - req, err := http.NewRequest("GET", "http://www.example.com/?backend=c", nil) + req, err := http.NewRequest("GET", "http://www.example.com/?origin=c", nil) if err != nil { t.Fatal(err) } - req.Header.Set("backend", "c") + req.Header.Set("origin", "c") options := maps.Map{ "type": "header", - "param": "backend", + "param": "origin", } call := shared.NewRequestCall() call.Request = req diff --git a/pkg/serverconfigs/scheduling/utils.go b/pkg/serverconfigs/schedulingconfigs/utils.go similarity index 95% rename from pkg/serverconfigs/scheduling/utils.go rename to pkg/serverconfigs/schedulingconfigs/utils.go index aa44d98..4782d97 100644 --- a/pkg/serverconfigs/scheduling/utils.go +++ b/pkg/serverconfigs/schedulingconfigs/utils.go @@ -1,4 +1,4 @@ -package scheduling +package schedulingconfigs import "github.com/iwind/TeaGo/maps" diff --git a/pkg/serverconfigs/server_config.go b/pkg/serverconfigs/server_config.go index 1a0e7ce..f1aba70 100644 --- a/pkg/serverconfigs/server_config.go +++ b/pkg/serverconfigs/server_config.go @@ -2,11 +2,13 @@ package serverconfigs import ( "encoding/json" + "errors" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs" ) type ServerConfig struct { - Id string `yaml:"id" json:"id"` // ID + Id int64 `yaml:"id" json:"id"` // ID + Type string `yaml:"type" json:"type"` // 类型 IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启 Components []*ComponentConfig `yaml:"components" json:"components"` // 组件 Filters []*FilterConfig `yaml:"filters" json:"filters"` // 过滤器 @@ -94,7 +96,7 @@ func (this *ServerConfig) Init() error { } func (this *ServerConfig) FullAddresses() []string { - result := []Protocol{} + result := []string{} if this.HTTP != nil && this.HTTP.IsOn { result = append(result, this.HTTP.FullAddresses()...) } @@ -190,3 +192,16 @@ func (this *ServerConfig) SSLConfig() *sslconfigs.SSLConfig { } return nil } + +// 根据条件查找ReverseProxy +func (this *ServerConfig) FindAndCheckReverseProxy(dataType string) (*ReverseProxyConfig, error) { + switch dataType { + case "server": + if this.ReverseProxy == nil { + return nil, errors.New("reverse proxy not been configured") + } + return this.ReverseProxy, nil + default: + return nil, errors.New("invalid data type:'" + dataType + "'") + } +} diff --git a/pkg/serverconfigs/server_group.go b/pkg/serverconfigs/server_group.go index 0939f40..c9718a2 100644 --- a/pkg/serverconfigs/server_group.go +++ b/pkg/serverconfigs/server_group.go @@ -24,7 +24,7 @@ func (this *ServerGroup) FullAddr() string { // 获取当前分组的协议 func (this *ServerGroup) Protocol() Protocol { for _, p := range AllProtocols() { - if strings.HasPrefix(this.fullAddr, p+":") { + if strings.HasPrefix(this.fullAddr, p.String()+":") { return p } } @@ -35,9 +35,9 @@ func (this *ServerGroup) Protocol() Protocol { func (this *ServerGroup) Addr() string { protocol := this.Protocol() if protocol == ProtocolUnix { - return strings.TrimPrefix(this.fullAddr, protocol+":") + return strings.TrimPrefix(this.fullAddr, protocol.String()+":") } - return strings.TrimPrefix(this.fullAddr, protocol+"://") + return strings.TrimPrefix(this.fullAddr, protocol.String()+"://") } // 判断当前分组是否为HTTP