diff --git a/pkg/dnsconfigs/ns_node_config.go b/pkg/dnsconfigs/ns_node_config.go index c5bb895..1aa1bed 100644 --- a/pkg/dnsconfigs/ns_node_config.go +++ b/pkg/dnsconfigs/ns_node_config.go @@ -5,11 +5,12 @@ package dnsconfigs import "fmt" type NSNodeConfig struct { - Id int64 `yaml:"id" json:"id"` - NodeId string `yaml:"nodeId" json:"nodeId"` - Secret string `yaml:"secret" json:"secret"` - ClusterId int64 `yaml:"clusterId" json:"clusterId"` - AccessLogRef *NSAccessLogRef `yaml:"accessLogRef" json:"accessLogRef"` + Id int64 `yaml:"id" json:"id"` + NodeId string `yaml:"nodeId" json:"nodeId"` + Secret string `yaml:"secret" json:"secret"` + ClusterId int64 `yaml:"clusterId" json:"clusterId"` + AccessLogRef *NSAccessLogRef `yaml:"accessLogRef" json:"accessLogRef"` + RecursionConfig *RecursionConfig `yaml:"recursionConfig" json:"recursionConfig"` paddedId string } diff --git a/pkg/dnsconfigs/recursion_config.go b/pkg/dnsconfigs/recursion_config.go new file mode 100644 index 0000000..9bd6d48 --- /dev/null +++ b/pkg/dnsconfigs/recursion_config.go @@ -0,0 +1,18 @@ +// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. + +package dnsconfigs + +type DNSHost struct { + Host string `json:"host"` + Port int `json:"port"` + Protocol string `json:"protocol"` +} + +// RecursionConfig 递归DNS设置 +type RecursionConfig struct { + IsOn bool `json:"isOn"` + Hosts []*DNSHost `json:"hosts"` + UseLocalHosts bool `json:"useLocalHosts"` // 自动从本机读取DNS + AllowDomains []string `json:"allowDomains"` + DenyDomains []string `json:"denyDomains"` +} diff --git a/pkg/rpc/pb/model_ns_access_log.pb.go b/pkg/rpc/pb/model_ns_access_log.pb.go index 164cec2..090d245 100644 --- a/pkg/rpc/pb/model_ns_access_log.pb.go +++ b/pkg/rpc/pb/model_ns_access_log.pb.go @@ -50,6 +50,7 @@ type NSAccessLog struct { RequestId string `protobuf:"bytes,14,opt,name=requestId,proto3" json:"requestId,omitempty"` TimeLocal string `protobuf:"bytes,15,opt,name=timeLocal,proto3" json:"timeLocal,omitempty"` Error string `protobuf:"bytes,16,opt,name=error,proto3" json:"error,omitempty"` + IsRecursive bool `protobuf:"varint,19,opt,name=isRecursive,proto3" json:"isRecursive,omitempty"` } func (x *NSAccessLog) Reset() { @@ -211,6 +212,13 @@ func (x *NSAccessLog) GetError() string { return "" } +func (x *NSAccessLog) GetIsRecursive() bool { + if x != nil { + return x.IsRecursive + } + return false +} + var File_models_model_ns_access_log_proto protoreflect.FileDescriptor var file_models_model_ns_access_log_proto_rawDesc = []byte{ @@ -218,7 +226,7 @@ var file_models_model_ns_access_log_proto_rawDesc = []byte{ 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x04, 0x0a, 0x0b, 0x4e, 0x53, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x04, 0x0a, 0x0b, 0x4e, 0x53, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6e, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, @@ -255,8 +263,10 @@ var file_models_model_ns_access_log_proto_rawDesc = []byte{ 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, + 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x69, 0x73, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/rpc/pb/service_admin.pb.go b/pkg/rpc/pb/service_admin.pb.go index ee33f52..6ae25ae 100644 --- a/pkg/rpc/pb/service_admin.pb.go +++ b/pkg/rpc/pb/service_admin.pb.go @@ -1382,6 +1382,8 @@ type ComposeAdminDashboardRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` } func (x *ComposeAdminDashboardRequest) Reset() { @@ -1416,6 +1418,13 @@ func (*ComposeAdminDashboardRequest) Descriptor() ([]byte, []int) { return file_service_admin_proto_rawDescGZIP(), []int{25} } +func (x *ComposeAdminDashboardRequest) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + type ComposeAdminDashboardResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2176,9 +2185,11 @@ var file_service_admin_proto_rawDesc = []byte{ 0x54, 0x50, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4f, 0x54, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x4f, 0x54, 0x50, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, + 0x69, 0x72, 0x65, 0x4f, 0x54, 0x50, 0x22, 0x3e, 0x0a, 0x1c, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfb, 0x10, 0x0a, 0x1d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfb, 0x10, 0x0a, 0x1d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, diff --git a/pkg/rpc/pb/service_ns_cluster.pb.go b/pkg/rpc/pb/service_ns_cluster.pb.go index f9efb69..21af807 100644 --- a/pkg/rpc/pb/service_ns_cluster.pb.go +++ b/pkg/rpc/pb/service_ns_cluster.pb.go @@ -718,6 +718,157 @@ func (x *FindAllEnabledNSClustersResponse) GetNsClusters() []*NSCluster { return nil } +// 设置递归DNS配置 +type UpdateNSClusterRecursionConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NsClusterId int64 `protobuf:"varint,1,opt,name=nsClusterId,proto3" json:"nsClusterId,omitempty"` + RecursionJSON []byte `protobuf:"bytes,2,opt,name=recursionJSON,proto3" json:"recursionJSON,omitempty"` +} + +func (x *UpdateNSClusterRecursionConfigRequest) Reset() { + *x = UpdateNSClusterRecursionConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNSClusterRecursionConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNSClusterRecursionConfigRequest) ProtoMessage() {} + +func (x *UpdateNSClusterRecursionConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 UpdateNSClusterRecursionConfigRequest.ProtoReflect.Descriptor instead. +func (*UpdateNSClusterRecursionConfigRequest) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{14} +} + +func (x *UpdateNSClusterRecursionConfigRequest) GetNsClusterId() int64 { + if x != nil { + return x.NsClusterId + } + return 0 +} + +func (x *UpdateNSClusterRecursionConfigRequest) GetRecursionJSON() []byte { + if x != nil { + return x.RecursionJSON + } + return nil +} + +// 读取递归DNS配置 +type FindNSClusterRecursionConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NsClusterId int64 `protobuf:"varint,1,opt,name=nsClusterId,proto3" json:"nsClusterId,omitempty"` +} + +func (x *FindNSClusterRecursionConfigRequest) Reset() { + *x = FindNSClusterRecursionConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindNSClusterRecursionConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindNSClusterRecursionConfigRequest) ProtoMessage() {} + +func (x *FindNSClusterRecursionConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 FindNSClusterRecursionConfigRequest.ProtoReflect.Descriptor instead. +func (*FindNSClusterRecursionConfigRequest) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{15} +} + +func (x *FindNSClusterRecursionConfigRequest) GetNsClusterId() int64 { + if x != nil { + return x.NsClusterId + } + return 0 +} + +type FindNSClusterRecursionConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RecursionJSON []byte `protobuf:"bytes,1,opt,name=recursionJSON,proto3" json:"recursionJSON,omitempty"` +} + +func (x *FindNSClusterRecursionConfigResponse) Reset() { + *x = FindNSClusterRecursionConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindNSClusterRecursionConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindNSClusterRecursionConfigResponse) ProtoMessage() {} + +func (x *FindNSClusterRecursionConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 FindNSClusterRecursionConfigResponse.ProtoReflect.Descriptor instead. +func (*FindNSClusterRecursionConfigResponse) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{16} +} + +func (x *FindNSClusterRecursionConfigResponse) GetRecursionJSON() []byte { + if x != nil { + return x.RecursionJSON + } + return nil +} + var File_service_ns_cluster_proto protoreflect.FileDescriptor var file_service_ns_cluster_proto_rawDesc = []byte{ @@ -788,56 +939,86 @@ var file_service_ns_cluster_proto_rawDesc = []byte{ 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x0a, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x32, 0x80, 0x06, 0x0a, - 0x10, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, - 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, - 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x5f, 0x0a, 0x16, - 0x66, 0x69, 0x6e, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, - 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, - 0x18, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, - 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x36, - 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, - 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, - 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x57, 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, - 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x6c, 0x69, - 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x64, - 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, - 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 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, + 0x52, 0x0a, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0x6f, 0x0a, 0x25, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x73, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x75, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, + 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x47, 0x0a, + 0x23, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x73, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x24, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x53, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, + 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4a, 0x53, 0x4f, 0x4e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x4a, 0x53, 0x4f, 0x4e, 0x32, 0xd0, 0x07, 0x0a, 0x10, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x70, + 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x4e, 0x53, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x21, + 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x67, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, + 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x19, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, + 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x23, 0x2e, 0x70, + 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x1e, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x71, 0x0a, 0x1c, 0x66, 0x69, 0x6e, 0x64, 0x4e, 0x53, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x53, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, 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 ( @@ -852,30 +1033,33 @@ func file_service_ns_cluster_proto_rawDescGZIP() []byte { return file_service_ns_cluster_proto_rawDescData } -var file_service_ns_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_service_ns_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_service_ns_cluster_proto_goTypes = []interface{}{ - (*CreateNSClusterRequest)(nil), // 0: pb.CreateNSClusterRequest - (*CreateNSClusterResponse)(nil), // 1: pb.CreateNSClusterResponse - (*UpdateNSClusterRequest)(nil), // 2: pb.UpdateNSClusterRequest - (*FindNSClusterAccessLogRequest)(nil), // 3: pb.FindNSClusterAccessLogRequest - (*FindNSClusterAccessLogResponse)(nil), // 4: pb.FindNSClusterAccessLogResponse - (*UpdateNSClusterAccessLogRequest)(nil), // 5: pb.UpdateNSClusterAccessLogRequest - (*DeleteNSCluster)(nil), // 6: pb.DeleteNSCluster - (*FindEnabledNSClusterRequest)(nil), // 7: pb.FindEnabledNSClusterRequest - (*FindEnabledNSClusterResponse)(nil), // 8: pb.FindEnabledNSClusterResponse - (*CountAllEnabledNSClustersRequest)(nil), // 9: pb.CountAllEnabledNSClustersRequest - (*ListEnabledNSClustersRequest)(nil), // 10: pb.ListEnabledNSClustersRequest - (*ListEnabledNSClustersResponse)(nil), // 11: pb.ListEnabledNSClustersResponse - (*FindAllEnabledNSClustersRequest)(nil), // 12: pb.FindAllEnabledNSClustersRequest - (*FindAllEnabledNSClustersResponse)(nil), // 13: pb.FindAllEnabledNSClustersResponse - (*NSCluster)(nil), // 14: pb.NSCluster - (*RPCSuccess)(nil), // 15: pb.RPCSuccess - (*RPCCountResponse)(nil), // 16: pb.RPCCountResponse + (*CreateNSClusterRequest)(nil), // 0: pb.CreateNSClusterRequest + (*CreateNSClusterResponse)(nil), // 1: pb.CreateNSClusterResponse + (*UpdateNSClusterRequest)(nil), // 2: pb.UpdateNSClusterRequest + (*FindNSClusterAccessLogRequest)(nil), // 3: pb.FindNSClusterAccessLogRequest + (*FindNSClusterAccessLogResponse)(nil), // 4: pb.FindNSClusterAccessLogResponse + (*UpdateNSClusterAccessLogRequest)(nil), // 5: pb.UpdateNSClusterAccessLogRequest + (*DeleteNSCluster)(nil), // 6: pb.DeleteNSCluster + (*FindEnabledNSClusterRequest)(nil), // 7: pb.FindEnabledNSClusterRequest + (*FindEnabledNSClusterResponse)(nil), // 8: pb.FindEnabledNSClusterResponse + (*CountAllEnabledNSClustersRequest)(nil), // 9: pb.CountAllEnabledNSClustersRequest + (*ListEnabledNSClustersRequest)(nil), // 10: pb.ListEnabledNSClustersRequest + (*ListEnabledNSClustersResponse)(nil), // 11: pb.ListEnabledNSClustersResponse + (*FindAllEnabledNSClustersRequest)(nil), // 12: pb.FindAllEnabledNSClustersRequest + (*FindAllEnabledNSClustersResponse)(nil), // 13: pb.FindAllEnabledNSClustersResponse + (*UpdateNSClusterRecursionConfigRequest)(nil), // 14: pb.UpdateNSClusterRecursionConfigRequest + (*FindNSClusterRecursionConfigRequest)(nil), // 15: pb.FindNSClusterRecursionConfigRequest + (*FindNSClusterRecursionConfigResponse)(nil), // 16: pb.FindNSClusterRecursionConfigResponse + (*NSCluster)(nil), // 17: pb.NSCluster + (*RPCSuccess)(nil), // 18: pb.RPCSuccess + (*RPCCountResponse)(nil), // 19: pb.RPCCountResponse } var file_service_ns_cluster_proto_depIdxs = []int32{ - 14, // 0: pb.FindEnabledNSClusterResponse.nsCluster:type_name -> pb.NSCluster - 14, // 1: pb.ListEnabledNSClustersResponse.nsClusters:type_name -> pb.NSCluster - 14, // 2: pb.FindAllEnabledNSClustersResponse.nsClusters:type_name -> pb.NSCluster + 17, // 0: pb.FindEnabledNSClusterResponse.nsCluster:type_name -> pb.NSCluster + 17, // 1: pb.ListEnabledNSClustersResponse.nsClusters:type_name -> pb.NSCluster + 17, // 2: pb.FindAllEnabledNSClustersResponse.nsClusters:type_name -> pb.NSCluster 0, // 3: pb.NSClusterService.createNSCluster:input_type -> pb.CreateNSClusterRequest 2, // 4: pb.NSClusterService.updateNSCluster:input_type -> pb.UpdateNSClusterRequest 3, // 5: pb.NSClusterService.findNSClusterAccessLog:input_type -> pb.FindNSClusterAccessLogRequest @@ -885,17 +1069,21 @@ var file_service_ns_cluster_proto_depIdxs = []int32{ 9, // 9: pb.NSClusterService.countAllEnabledNSClusters:input_type -> pb.CountAllEnabledNSClustersRequest 10, // 10: pb.NSClusterService.listEnabledNSClusters:input_type -> pb.ListEnabledNSClustersRequest 12, // 11: pb.NSClusterService.findAllEnabledNSClusters:input_type -> pb.FindAllEnabledNSClustersRequest - 1, // 12: pb.NSClusterService.createNSCluster:output_type -> pb.CreateNSClusterResponse - 15, // 13: pb.NSClusterService.updateNSCluster:output_type -> pb.RPCSuccess - 4, // 14: pb.NSClusterService.findNSClusterAccessLog:output_type -> pb.FindNSClusterAccessLogResponse - 15, // 15: pb.NSClusterService.updateNSClusterAccessLog:output_type -> pb.RPCSuccess - 15, // 16: pb.NSClusterService.deleteNSCluster:output_type -> pb.RPCSuccess - 8, // 17: pb.NSClusterService.findEnabledNSCluster:output_type -> pb.FindEnabledNSClusterResponse - 16, // 18: pb.NSClusterService.countAllEnabledNSClusters:output_type -> pb.RPCCountResponse - 11, // 19: pb.NSClusterService.listEnabledNSClusters:output_type -> pb.ListEnabledNSClustersResponse - 13, // 20: pb.NSClusterService.findAllEnabledNSClusters:output_type -> pb.FindAllEnabledNSClustersResponse - 12, // [12:21] is the sub-list for method output_type - 3, // [3:12] is the sub-list for method input_type + 14, // 12: pb.NSClusterService.updateNSClusterRecursionConfig:input_type -> pb.UpdateNSClusterRecursionConfigRequest + 15, // 13: pb.NSClusterService.findNSClusterRecursionConfig:input_type -> pb.FindNSClusterRecursionConfigRequest + 1, // 14: pb.NSClusterService.createNSCluster:output_type -> pb.CreateNSClusterResponse + 18, // 15: pb.NSClusterService.updateNSCluster:output_type -> pb.RPCSuccess + 4, // 16: pb.NSClusterService.findNSClusterAccessLog:output_type -> pb.FindNSClusterAccessLogResponse + 18, // 17: pb.NSClusterService.updateNSClusterAccessLog:output_type -> pb.RPCSuccess + 18, // 18: pb.NSClusterService.deleteNSCluster:output_type -> pb.RPCSuccess + 8, // 19: pb.NSClusterService.findEnabledNSCluster:output_type -> pb.FindEnabledNSClusterResponse + 19, // 20: pb.NSClusterService.countAllEnabledNSClusters:output_type -> pb.RPCCountResponse + 11, // 21: pb.NSClusterService.listEnabledNSClusters:output_type -> pb.ListEnabledNSClustersResponse + 13, // 22: pb.NSClusterService.findAllEnabledNSClusters:output_type -> pb.FindAllEnabledNSClustersResponse + 18, // 23: pb.NSClusterService.updateNSClusterRecursionConfig:output_type -> pb.RPCSuccess + 16, // 24: pb.NSClusterService.findNSClusterRecursionConfig:output_type -> pb.FindNSClusterRecursionConfigResponse + 14, // [14:25] is the sub-list for method output_type + 3, // [3:14] 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 @@ -1077,6 +1265,42 @@ func file_service_ns_cluster_proto_init() { return nil } } + file_service_ns_cluster_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNSClusterRecursionConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_ns_cluster_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindNSClusterRecursionConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_ns_cluster_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindNSClusterRecursionConfigResponse); 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{ @@ -1084,7 +1308,7 @@ func file_service_ns_cluster_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_ns_cluster_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, @@ -1128,6 +1352,10 @@ type NSClusterServiceClient interface { ListEnabledNSClusters(ctx context.Context, in *ListEnabledNSClustersRequest, opts ...grpc.CallOption) (*ListEnabledNSClustersResponse, error) // 查找所有可用集群 FindAllEnabledNSClusters(ctx context.Context, in *FindAllEnabledNSClustersRequest, opts ...grpc.CallOption) (*FindAllEnabledNSClustersResponse, error) + // 设置递归DNS配置 + UpdateNSClusterRecursionConfig(ctx context.Context, in *UpdateNSClusterRecursionConfigRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 读取递归DNS配置 + FindNSClusterRecursionConfig(ctx context.Context, in *FindNSClusterRecursionConfigRequest, opts ...grpc.CallOption) (*FindNSClusterRecursionConfigResponse, error) } type nSClusterServiceClient struct { @@ -1219,6 +1447,24 @@ func (c *nSClusterServiceClient) FindAllEnabledNSClusters(ctx context.Context, i return out, nil } +func (c *nSClusterServiceClient) UpdateNSClusterRecursionConfig(ctx context.Context, in *UpdateNSClusterRecursionConfigRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.NSClusterService/updateNSClusterRecursionConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSClusterServiceClient) FindNSClusterRecursionConfig(ctx context.Context, in *FindNSClusterRecursionConfigRequest, opts ...grpc.CallOption) (*FindNSClusterRecursionConfigResponse, error) { + out := new(FindNSClusterRecursionConfigResponse) + err := c.cc.Invoke(ctx, "/pb.NSClusterService/findNSClusterRecursionConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // NSClusterServiceServer is the server API for NSClusterService service. type NSClusterServiceServer interface { // 创建集群 @@ -1239,6 +1485,10 @@ type NSClusterServiceServer interface { ListEnabledNSClusters(context.Context, *ListEnabledNSClustersRequest) (*ListEnabledNSClustersResponse, error) // 查找所有可用集群 FindAllEnabledNSClusters(context.Context, *FindAllEnabledNSClustersRequest) (*FindAllEnabledNSClustersResponse, error) + // 设置递归DNS配置 + UpdateNSClusterRecursionConfig(context.Context, *UpdateNSClusterRecursionConfigRequest) (*RPCSuccess, error) + // 读取递归DNS配置 + FindNSClusterRecursionConfig(context.Context, *FindNSClusterRecursionConfigRequest) (*FindNSClusterRecursionConfigResponse, error) } // UnimplementedNSClusterServiceServer can be embedded to have forward compatible implementations. @@ -1272,6 +1522,12 @@ func (*UnimplementedNSClusterServiceServer) ListEnabledNSClusters(context.Contex func (*UnimplementedNSClusterServiceServer) FindAllEnabledNSClusters(context.Context, *FindAllEnabledNSClustersRequest) (*FindAllEnabledNSClustersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledNSClusters not implemented") } +func (*UnimplementedNSClusterServiceServer) UpdateNSClusterRecursionConfig(context.Context, *UpdateNSClusterRecursionConfigRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNSClusterRecursionConfig not implemented") +} +func (*UnimplementedNSClusterServiceServer) FindNSClusterRecursionConfig(context.Context, *FindNSClusterRecursionConfigRequest) (*FindNSClusterRecursionConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindNSClusterRecursionConfig not implemented") +} func RegisterNSClusterServiceServer(s *grpc.Server, srv NSClusterServiceServer) { s.RegisterService(&_NSClusterService_serviceDesc, srv) @@ -1439,6 +1695,42 @@ func _NSClusterService_FindAllEnabledNSClusters_Handler(srv interface{}, ctx con return interceptor(ctx, in, info, handler) } +func _NSClusterService_UpdateNSClusterRecursionConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNSClusterRecursionConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSClusterServiceServer).UpdateNSClusterRecursionConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NSClusterService/UpdateNSClusterRecursionConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSClusterServiceServer).UpdateNSClusterRecursionConfig(ctx, req.(*UpdateNSClusterRecursionConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSClusterService_FindNSClusterRecursionConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindNSClusterRecursionConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSClusterServiceServer).FindNSClusterRecursionConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NSClusterService/FindNSClusterRecursionConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSClusterServiceServer).FindNSClusterRecursionConfig(ctx, req.(*FindNSClusterRecursionConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _NSClusterService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.NSClusterService", HandlerType: (*NSClusterServiceServer)(nil), @@ -1479,6 +1771,14 @@ var _NSClusterService_serviceDesc = grpc.ServiceDesc{ MethodName: "findAllEnabledNSClusters", Handler: _NSClusterService_FindAllEnabledNSClusters_Handler, }, + { + MethodName: "updateNSClusterRecursionConfig", + Handler: _NSClusterService_UpdateNSClusterRecursionConfig_Handler, + }, + { + MethodName: "findNSClusterRecursionConfig", + Handler: _NSClusterService_FindNSClusterRecursionConfig_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_ns_cluster.proto", diff --git a/pkg/rpc/protos/models/model_ns_access_log.proto b/pkg/rpc/protos/models/model_ns_access_log.proto index 37c148f..2ca18c1 100644 --- a/pkg/rpc/protos/models/model_ns_access_log.proto +++ b/pkg/rpc/protos/models/model_ns_access_log.proto @@ -25,4 +25,5 @@ message NSAccessLog { string requestId = 14; string timeLocal = 15; string error = 16; + bool isRecursive = 19; } \ No newline at end of file diff --git a/pkg/rpc/protos/service_admin.proto b/pkg/rpc/protos/service_admin.proto index 7d9a4ba..37ec5c7 100644 --- a/pkg/rpc/protos/service_admin.proto +++ b/pkg/rpc/protos/service_admin.proto @@ -200,6 +200,7 @@ message CheckAdminOTPWithUsernameResponse { // 取得管理员Dashboard数据 message ComposeAdminDashboardRequest { + string apiVersion = 1; } message ComposeAdminDashboardResponse { @@ -266,8 +267,6 @@ message ComposeAdminDashboardResponse { int64 countNodes = 1; string newVersion = 2; } - - } // 修改管理员使用的界面风格 diff --git a/pkg/rpc/protos/service_ns_cluster.proto b/pkg/rpc/protos/service_ns_cluster.proto index 9bcfd7a..4d629ef 100644 --- a/pkg/rpc/protos/service_ns_cluster.proto +++ b/pkg/rpc/protos/service_ns_cluster.proto @@ -34,6 +34,12 @@ service NSClusterService { // 查找所有可用集群 rpc findAllEnabledNSClusters (FindAllEnabledNSClustersRequest) returns (FindAllEnabledNSClustersResponse); + + // 设置递归DNS配置 + rpc updateNSClusterRecursionConfig(UpdateNSClusterRecursionConfigRequest) returns (RPCSuccess); + + // 读取递归DNS配置 + rpc findNSClusterRecursionConfig(FindNSClusterRecursionConfigRequest) returns (FindNSClusterRecursionConfigResponse); } // 创建集群 @@ -103,4 +109,19 @@ message FindAllEnabledNSClustersRequest { message FindAllEnabledNSClustersResponse { repeated NSCluster nsClusters = 1; +} + +// 设置递归DNS配置 +message UpdateNSClusterRecursionConfigRequest { + int64 nsClusterId = 1; + bytes recursionJSON = 2; +} + +// 读取递归DNS配置 +message FindNSClusterRecursionConfigRequest { + int64 nsClusterId = 1; +} + +message FindNSClusterRecursionConfigResponse { + bytes recursionJSON = 1; } \ No newline at end of file