diff --git a/pkg/rpc/pb/model_ns_cluster.pb.go b/pkg/rpc/pb/model_ns_cluster.pb.go new file mode 100644 index 0000000..dc7443b --- /dev/null +++ b/pkg/rpc/pb/model_ns_cluster.pb.go @@ -0,0 +1,166 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: models/model_ns_cluster.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 NSCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *NSCluster) Reset() { + *x = NSCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_models_model_ns_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NSCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NSCluster) ProtoMessage() {} + +func (x *NSCluster) ProtoReflect() protoreflect.Message { + mi := &file_models_model_ns_cluster_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 NSCluster.ProtoReflect.Descriptor instead. +func (*NSCluster) Descriptor() ([]byte, []int) { + return file_models_model_ns_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *NSCluster) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *NSCluster) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +func (x *NSCluster) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_models_model_ns_cluster_proto protoreflect.FileDescriptor + +var file_models_model_ns_cluster_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, + 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x02, 0x70, 0x62, 0x22, 0x43, 0x0a, 0x09, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_models_model_ns_cluster_proto_rawDescOnce sync.Once + file_models_model_ns_cluster_proto_rawDescData = file_models_model_ns_cluster_proto_rawDesc +) + +func file_models_model_ns_cluster_proto_rawDescGZIP() []byte { + file_models_model_ns_cluster_proto_rawDescOnce.Do(func() { + file_models_model_ns_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_ns_cluster_proto_rawDescData) + }) + return file_models_model_ns_cluster_proto_rawDescData +} + +var file_models_model_ns_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_models_model_ns_cluster_proto_goTypes = []interface{}{ + (*NSCluster)(nil), // 0: pb.NSCluster +} +var file_models_model_ns_cluster_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_models_model_ns_cluster_proto_init() } +func file_models_model_ns_cluster_proto_init() { + if File_models_model_ns_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_models_model_ns_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NSCluster); 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_models_model_ns_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_models_model_ns_cluster_proto_goTypes, + DependencyIndexes: file_models_model_ns_cluster_proto_depIdxs, + MessageInfos: file_models_model_ns_cluster_proto_msgTypes, + }.Build() + File_models_model_ns_cluster_proto = out.File + file_models_model_ns_cluster_proto_rawDesc = nil + file_models_model_ns_cluster_proto_goTypes = nil + file_models_model_ns_cluster_proto_depIdxs = nil +} diff --git a/pkg/rpc/pb/service_ns_cluster.pb.go b/pkg/rpc/pb/service_ns_cluster.pb.go new file mode 100644 index 0000000..62ef56b --- /dev/null +++ b/pkg/rpc/pb/service_ns_cluster.pb.go @@ -0,0 +1,1179 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.3 +// source: service_ns_cluster.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 CreateNSClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *CreateNSClusterRequest) Reset() { + *x = CreateNSClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNSClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNSClusterRequest) ProtoMessage() {} + +func (x *CreateNSClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 CreateNSClusterRequest.ProtoReflect.Descriptor instead. +func (*CreateNSClusterRequest) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateNSClusterRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type CreateNSClusterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NsClusterId int64 `protobuf:"varint,1,opt,name=nsClusterId,proto3" json:"nsClusterId,omitempty"` +} + +func (x *CreateNSClusterResponse) Reset() { + *x = CreateNSClusterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNSClusterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNSClusterResponse) ProtoMessage() {} + +func (x *CreateNSClusterResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 CreateNSClusterResponse.ProtoReflect.Descriptor instead. +func (*CreateNSClusterResponse) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateNSClusterResponse) GetNsClusterId() int64 { + if x != nil { + return x.NsClusterId + } + return 0 +} + +// 修改集群 +type UpdateNSClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NsClusterId int64 `protobuf:"varint,1,opt,name=nsClusterId,proto3" json:"nsClusterId,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"` +} + +func (x *UpdateNSClusterRequest) Reset() { + *x = UpdateNSClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNSClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNSClusterRequest) ProtoMessage() {} + +func (x *UpdateNSClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 UpdateNSClusterRequest.ProtoReflect.Descriptor instead. +func (*UpdateNSClusterRequest) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{2} +} + +func (x *UpdateNSClusterRequest) GetNsClusterId() int64 { + if x != nil { + return x.NsClusterId + } + return 0 +} + +func (x *UpdateNSClusterRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateNSClusterRequest) GetIsOn() bool { + if x != nil { + return x.IsOn + } + return false +} + +// 删除集群 +type DeleteNSCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NsClusterId int64 `protobuf:"varint,1,opt,name=nsClusterId,proto3" json:"nsClusterId,omitempty"` +} + +func (x *DeleteNSCluster) Reset() { + *x = DeleteNSCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNSCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNSCluster) ProtoMessage() {} + +func (x *DeleteNSCluster) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 DeleteNSCluster.ProtoReflect.Descriptor instead. +func (*DeleteNSCluster) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteNSCluster) GetNsClusterId() int64 { + if x != nil { + return x.NsClusterId + } + return 0 +} + +// 查找单个可用集群信息 +type FindEnabledNSClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NsClusterId int64 `protobuf:"varint,1,opt,name=nsClusterId,proto3" json:"nsClusterId,omitempty"` +} + +func (x *FindEnabledNSClusterRequest) Reset() { + *x = FindEnabledNSClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledNSClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledNSClusterRequest) ProtoMessage() {} + +func (x *FindEnabledNSClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 FindEnabledNSClusterRequest.ProtoReflect.Descriptor instead. +func (*FindEnabledNSClusterRequest) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{4} +} + +func (x *FindEnabledNSClusterRequest) GetNsClusterId() int64 { + if x != nil { + return x.NsClusterId + } + return 0 +} + +type FindEnabledNSClusterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NsCluster *NSCluster `protobuf:"bytes,1,opt,name=nsCluster,proto3" json:"nsCluster,omitempty"` +} + +func (x *FindEnabledNSClusterResponse) Reset() { + *x = FindEnabledNSClusterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindEnabledNSClusterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindEnabledNSClusterResponse) ProtoMessage() {} + +func (x *FindEnabledNSClusterResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 FindEnabledNSClusterResponse.ProtoReflect.Descriptor instead. +func (*FindEnabledNSClusterResponse) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{5} +} + +func (x *FindEnabledNSClusterResponse) GetNsCluster() *NSCluster { + if x != nil { + return x.NsCluster + } + return nil +} + +// 计算所有可用集群的数量 +type CountAllEnabledNSClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CountAllEnabledNSClustersRequest) Reset() { + *x = CountAllEnabledNSClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CountAllEnabledNSClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CountAllEnabledNSClustersRequest) ProtoMessage() {} + +func (x *CountAllEnabledNSClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 CountAllEnabledNSClustersRequest.ProtoReflect.Descriptor instead. +func (*CountAllEnabledNSClustersRequest) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{6} +} + +// 列出单页可用集群 +type ListEnabledNSClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` + Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *ListEnabledNSClustersRequest) Reset() { + *x = ListEnabledNSClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnabledNSClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnabledNSClustersRequest) ProtoMessage() {} + +func (x *ListEnabledNSClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 ListEnabledNSClustersRequest.ProtoReflect.Descriptor instead. +func (*ListEnabledNSClustersRequest) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{7} +} + +func (x *ListEnabledNSClustersRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ListEnabledNSClustersRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +type ListEnabledNSClustersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NsClusters []*NSCluster `protobuf:"bytes,1,rep,name=nsClusters,proto3" json:"nsClusters,omitempty"` +} + +func (x *ListEnabledNSClustersResponse) Reset() { + *x = ListEnabledNSClustersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnabledNSClustersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnabledNSClustersResponse) ProtoMessage() {} + +func (x *ListEnabledNSClustersResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 ListEnabledNSClustersResponse.ProtoReflect.Descriptor instead. +func (*ListEnabledNSClustersResponse) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{8} +} + +func (x *ListEnabledNSClustersResponse) GetNsClusters() []*NSCluster { + if x != nil { + return x.NsClusters + } + return nil +} + +// 查找所有可用集群 +type FindAllEnabledNSClustersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FindAllEnabledNSClustersRequest) Reset() { + *x = FindAllEnabledNSClustersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllEnabledNSClustersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllEnabledNSClustersRequest) ProtoMessage() {} + +func (x *FindAllEnabledNSClustersRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 FindAllEnabledNSClustersRequest.ProtoReflect.Descriptor instead. +func (*FindAllEnabledNSClustersRequest) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{9} +} + +type FindAllEnabledNSClustersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NsClusters []*NSCluster `protobuf:"bytes,1,rep,name=nsClusters,proto3" json:"nsClusters,omitempty"` +} + +func (x *FindAllEnabledNSClustersResponse) Reset() { + *x = FindAllEnabledNSClustersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_ns_cluster_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindAllEnabledNSClustersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindAllEnabledNSClustersResponse) ProtoMessage() {} + +func (x *FindAllEnabledNSClustersResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_ns_cluster_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 FindAllEnabledNSClustersResponse.ProtoReflect.Descriptor instead. +func (*FindAllEnabledNSClustersResponse) Descriptor() ([]byte, []int) { + return file_service_ns_cluster_proto_rawDescGZIP(), []int{10} +} + +func (x *FindAllEnabledNSClustersResponse) GetNsClusters() []*NSCluster { + if x != nil { + return x.NsClusters + } + return nil +} + +var File_service_ns_cluster_proto protoreflect.FileDescriptor + +var file_service_ns_cluster_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x73, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1d, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x73, 0x5f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 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, 0x62, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 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, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x22, 0x33, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 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, 0x3f, 0x0a, 0x1b, + 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, 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, 0x4b, 0x0a, + 0x1c, 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, 0x2b, 0x0a, + 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x22, 0x0a, 0x20, 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, 0x22, 0x4a, + 0x0a, 0x1c, 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, 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, 0x4e, 0x0a, 0x1d, 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, 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, 0x22, 0x21, 0x0a, 0x1f, 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, 0x22, 0x51, 0x0a, + 0x20, 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, 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, 0xce, 0x04, 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, 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, +} + +var ( + file_service_ns_cluster_proto_rawDescOnce sync.Once + file_service_ns_cluster_proto_rawDescData = file_service_ns_cluster_proto_rawDesc +) + +func file_service_ns_cluster_proto_rawDescGZIP() []byte { + file_service_ns_cluster_proto_rawDescOnce.Do(func() { + file_service_ns_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_ns_cluster_proto_rawDescData) + }) + return file_service_ns_cluster_proto_rawDescData +} + +var file_service_ns_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_service_ns_cluster_proto_goTypes = []interface{}{ + (*CreateNSClusterRequest)(nil), // 0: pb.CreateNSClusterRequest + (*CreateNSClusterResponse)(nil), // 1: pb.CreateNSClusterResponse + (*UpdateNSClusterRequest)(nil), // 2: pb.UpdateNSClusterRequest + (*DeleteNSCluster)(nil), // 3: pb.DeleteNSCluster + (*FindEnabledNSClusterRequest)(nil), // 4: pb.FindEnabledNSClusterRequest + (*FindEnabledNSClusterResponse)(nil), // 5: pb.FindEnabledNSClusterResponse + (*CountAllEnabledNSClustersRequest)(nil), // 6: pb.CountAllEnabledNSClustersRequest + (*ListEnabledNSClustersRequest)(nil), // 7: pb.ListEnabledNSClustersRequest + (*ListEnabledNSClustersResponse)(nil), // 8: pb.ListEnabledNSClustersResponse + (*FindAllEnabledNSClustersRequest)(nil), // 9: pb.FindAllEnabledNSClustersRequest + (*FindAllEnabledNSClustersResponse)(nil), // 10: pb.FindAllEnabledNSClustersResponse + (*NSCluster)(nil), // 11: pb.NSCluster + (*RPCSuccess)(nil), // 12: pb.RPCSuccess + (*RPCCountResponse)(nil), // 13: pb.RPCCountResponse +} +var file_service_ns_cluster_proto_depIdxs = []int32{ + 11, // 0: pb.FindEnabledNSClusterResponse.nsCluster:type_name -> pb.NSCluster + 11, // 1: pb.ListEnabledNSClustersResponse.nsClusters:type_name -> pb.NSCluster + 11, // 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.deleteNSCluster:input_type -> pb.DeleteNSCluster + 4, // 6: pb.NSClusterService.findEnabledNSCluster:input_type -> pb.FindEnabledNSClusterRequest + 6, // 7: pb.NSClusterService.countAllEnabledNSClusters:input_type -> pb.CountAllEnabledNSClustersRequest + 7, // 8: pb.NSClusterService.listEnabledNSClusters:input_type -> pb.ListEnabledNSClustersRequest + 9, // 9: pb.NSClusterService.findAllEnabledNSClusters:input_type -> pb.FindAllEnabledNSClustersRequest + 1, // 10: pb.NSClusterService.createNSCluster:output_type -> pb.CreateNSClusterResponse + 12, // 11: pb.NSClusterService.updateNSCluster:output_type -> pb.RPCSuccess + 12, // 12: pb.NSClusterService.deleteNSCluster:output_type -> pb.RPCSuccess + 5, // 13: pb.NSClusterService.findEnabledNSCluster:output_type -> pb.FindEnabledNSClusterResponse + 13, // 14: pb.NSClusterService.countAllEnabledNSClusters:output_type -> pb.RPCCountResponse + 8, // 15: pb.NSClusterService.listEnabledNSClusters:output_type -> pb.ListEnabledNSClustersResponse + 10, // 16: pb.NSClusterService.findAllEnabledNSClusters:output_type -> pb.FindAllEnabledNSClustersResponse + 10, // [10:17] is the sub-list for method output_type + 3, // [3:10] 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 +} + +func init() { file_service_ns_cluster_proto_init() } +func file_service_ns_cluster_proto_init() { + if File_service_ns_cluster_proto != nil { + return + } + file_models_model_ns_cluster_proto_init() + file_models_rpc_messages_proto_init() + if !protoimpl.UnsafeEnabled { + file_service_ns_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNSClusterRequest); 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[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNSClusterResponse); 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[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNSClusterRequest); 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[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteNSCluster); 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[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledNSClusterRequest); 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[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindEnabledNSClusterResponse); 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[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountAllEnabledNSClustersRequest); 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[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledNSClustersRequest); 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[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnabledNSClustersResponse); 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[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllEnabledNSClustersRequest); 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[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindAllEnabledNSClustersResponse); 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_ns_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_ns_cluster_proto_goTypes, + DependencyIndexes: file_service_ns_cluster_proto_depIdxs, + MessageInfos: file_service_ns_cluster_proto_msgTypes, + }.Build() + File_service_ns_cluster_proto = out.File + file_service_ns_cluster_proto_rawDesc = nil + file_service_ns_cluster_proto_goTypes = nil + file_service_ns_cluster_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 + +// NSClusterServiceClient is the client API for NSClusterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type NSClusterServiceClient interface { + // 创建集群 + CreateNSCluster(ctx context.Context, in *CreateNSClusterRequest, opts ...grpc.CallOption) (*CreateNSClusterResponse, error) + // 修改集群 + UpdateNSCluster(ctx context.Context, in *UpdateNSClusterRequest, opts ...grpc.CallOption) (*RPCSuccess, error) + // 删除集群 + DeleteNSCluster(ctx context.Context, in *DeleteNSCluster, opts ...grpc.CallOption) (*RPCSuccess, error) + // 查找单个可用集群信息 + FindEnabledNSCluster(ctx context.Context, in *FindEnabledNSClusterRequest, opts ...grpc.CallOption) (*FindEnabledNSClusterResponse, error) + // 计算所有可用集群的数量 + CountAllEnabledNSClusters(ctx context.Context, in *CountAllEnabledNSClustersRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) + // 列出单页可用集群 + ListEnabledNSClusters(ctx context.Context, in *ListEnabledNSClustersRequest, opts ...grpc.CallOption) (*ListEnabledNSClustersResponse, error) + // 查找所有可用集群 + FindAllEnabledNSClusters(ctx context.Context, in *FindAllEnabledNSClustersRequest, opts ...grpc.CallOption) (*FindAllEnabledNSClustersResponse, error) +} + +type nSClusterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNSClusterServiceClient(cc grpc.ClientConnInterface) NSClusterServiceClient { + return &nSClusterServiceClient{cc} +} + +func (c *nSClusterServiceClient) CreateNSCluster(ctx context.Context, in *CreateNSClusterRequest, opts ...grpc.CallOption) (*CreateNSClusterResponse, error) { + out := new(CreateNSClusterResponse) + err := c.cc.Invoke(ctx, "/pb.NSClusterService/createNSCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSClusterServiceClient) UpdateNSCluster(ctx context.Context, in *UpdateNSClusterRequest, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.NSClusterService/updateNSCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSClusterServiceClient) DeleteNSCluster(ctx context.Context, in *DeleteNSCluster, opts ...grpc.CallOption) (*RPCSuccess, error) { + out := new(RPCSuccess) + err := c.cc.Invoke(ctx, "/pb.NSClusterService/deleteNSCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSClusterServiceClient) FindEnabledNSCluster(ctx context.Context, in *FindEnabledNSClusterRequest, opts ...grpc.CallOption) (*FindEnabledNSClusterResponse, error) { + out := new(FindEnabledNSClusterResponse) + err := c.cc.Invoke(ctx, "/pb.NSClusterService/findEnabledNSCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSClusterServiceClient) CountAllEnabledNSClusters(ctx context.Context, in *CountAllEnabledNSClustersRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) { + out := new(RPCCountResponse) + err := c.cc.Invoke(ctx, "/pb.NSClusterService/countAllEnabledNSClusters", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSClusterServiceClient) ListEnabledNSClusters(ctx context.Context, in *ListEnabledNSClustersRequest, opts ...grpc.CallOption) (*ListEnabledNSClustersResponse, error) { + out := new(ListEnabledNSClustersResponse) + err := c.cc.Invoke(ctx, "/pb.NSClusterService/listEnabledNSClusters", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nSClusterServiceClient) FindAllEnabledNSClusters(ctx context.Context, in *FindAllEnabledNSClustersRequest, opts ...grpc.CallOption) (*FindAllEnabledNSClustersResponse, error) { + out := new(FindAllEnabledNSClustersResponse) + err := c.cc.Invoke(ctx, "/pb.NSClusterService/findAllEnabledNSClusters", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NSClusterServiceServer is the server API for NSClusterService service. +type NSClusterServiceServer interface { + // 创建集群 + CreateNSCluster(context.Context, *CreateNSClusterRequest) (*CreateNSClusterResponse, error) + // 修改集群 + UpdateNSCluster(context.Context, *UpdateNSClusterRequest) (*RPCSuccess, error) + // 删除集群 + DeleteNSCluster(context.Context, *DeleteNSCluster) (*RPCSuccess, error) + // 查找单个可用集群信息 + FindEnabledNSCluster(context.Context, *FindEnabledNSClusterRequest) (*FindEnabledNSClusterResponse, error) + // 计算所有可用集群的数量 + CountAllEnabledNSClusters(context.Context, *CountAllEnabledNSClustersRequest) (*RPCCountResponse, error) + // 列出单页可用集群 + ListEnabledNSClusters(context.Context, *ListEnabledNSClustersRequest) (*ListEnabledNSClustersResponse, error) + // 查找所有可用集群 + FindAllEnabledNSClusters(context.Context, *FindAllEnabledNSClustersRequest) (*FindAllEnabledNSClustersResponse, error) +} + +// UnimplementedNSClusterServiceServer can be embedded to have forward compatible implementations. +type UnimplementedNSClusterServiceServer struct { +} + +func (*UnimplementedNSClusterServiceServer) CreateNSCluster(context.Context, *CreateNSClusterRequest) (*CreateNSClusterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNSCluster not implemented") +} +func (*UnimplementedNSClusterServiceServer) UpdateNSCluster(context.Context, *UpdateNSClusterRequest) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNSCluster not implemented") +} +func (*UnimplementedNSClusterServiceServer) DeleteNSCluster(context.Context, *DeleteNSCluster) (*RPCSuccess, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteNSCluster not implemented") +} +func (*UnimplementedNSClusterServiceServer) FindEnabledNSCluster(context.Context, *FindEnabledNSClusterRequest) (*FindEnabledNSClusterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindEnabledNSCluster not implemented") +} +func (*UnimplementedNSClusterServiceServer) CountAllEnabledNSClusters(context.Context, *CountAllEnabledNSClustersRequest) (*RPCCountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledNSClusters not implemented") +} +func (*UnimplementedNSClusterServiceServer) ListEnabledNSClusters(context.Context, *ListEnabledNSClustersRequest) (*ListEnabledNSClustersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEnabledNSClusters not implemented") +} +func (*UnimplementedNSClusterServiceServer) FindAllEnabledNSClusters(context.Context, *FindAllEnabledNSClustersRequest) (*FindAllEnabledNSClustersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledNSClusters not implemented") +} + +func RegisterNSClusterServiceServer(s *grpc.Server, srv NSClusterServiceServer) { + s.RegisterService(&_NSClusterService_serviceDesc, srv) +} + +func _NSClusterService_CreateNSCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNSClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSClusterServiceServer).CreateNSCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NSClusterService/CreateNSCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSClusterServiceServer).CreateNSCluster(ctx, req.(*CreateNSClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSClusterService_UpdateNSCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNSClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSClusterServiceServer).UpdateNSCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NSClusterService/UpdateNSCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSClusterServiceServer).UpdateNSCluster(ctx, req.(*UpdateNSClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSClusterService_DeleteNSCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteNSCluster) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSClusterServiceServer).DeleteNSCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NSClusterService/DeleteNSCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSClusterServiceServer).DeleteNSCluster(ctx, req.(*DeleteNSCluster)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSClusterService_FindEnabledNSCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindEnabledNSClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSClusterServiceServer).FindEnabledNSCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NSClusterService/FindEnabledNSCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSClusterServiceServer).FindEnabledNSCluster(ctx, req.(*FindEnabledNSClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSClusterService_CountAllEnabledNSClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CountAllEnabledNSClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSClusterServiceServer).CountAllEnabledNSClusters(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NSClusterService/CountAllEnabledNSClusters", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSClusterServiceServer).CountAllEnabledNSClusters(ctx, req.(*CountAllEnabledNSClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSClusterService_ListEnabledNSClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEnabledNSClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSClusterServiceServer).ListEnabledNSClusters(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NSClusterService/ListEnabledNSClusters", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSClusterServiceServer).ListEnabledNSClusters(ctx, req.(*ListEnabledNSClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NSClusterService_FindAllEnabledNSClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindAllEnabledNSClustersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NSClusterServiceServer).FindAllEnabledNSClusters(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.NSClusterService/FindAllEnabledNSClusters", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NSClusterServiceServer).FindAllEnabledNSClusters(ctx, req.(*FindAllEnabledNSClustersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _NSClusterService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.NSClusterService", + HandlerType: (*NSClusterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "createNSCluster", + Handler: _NSClusterService_CreateNSCluster_Handler, + }, + { + MethodName: "updateNSCluster", + Handler: _NSClusterService_UpdateNSCluster_Handler, + }, + { + MethodName: "deleteNSCluster", + Handler: _NSClusterService_DeleteNSCluster_Handler, + }, + { + MethodName: "findEnabledNSCluster", + Handler: _NSClusterService_FindEnabledNSCluster_Handler, + }, + { + MethodName: "countAllEnabledNSClusters", + Handler: _NSClusterService_CountAllEnabledNSClusters_Handler, + }, + { + MethodName: "listEnabledNSClusters", + Handler: _NSClusterService_ListEnabledNSClusters_Handler, + }, + { + MethodName: "findAllEnabledNSClusters", + Handler: _NSClusterService_FindAllEnabledNSClusters_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_ns_cluster.proto", +} diff --git a/pkg/rpc/protos/models/model_ns_cluster.proto b/pkg/rpc/protos/models/model_ns_cluster.proto new file mode 100644 index 0000000..96a742b --- /dev/null +++ b/pkg/rpc/protos/models/model_ns_cluster.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +// 域名服务集群 +message NSCluster { + int64 id = 1; + bool isOn = 2; + string name = 3; +} \ No newline at end of file diff --git a/pkg/rpc/protos/service_ns_cluster.proto b/pkg/rpc/protos/service_ns_cluster.proto new file mode 100644 index 0000000..8f8a4b1 --- /dev/null +++ b/pkg/rpc/protos/service_ns_cluster.proto @@ -0,0 +1,84 @@ +syntax = "proto3"; +option go_package = "./pb"; + +package pb; + +import "models/model_ns_cluster.proto"; +import "models/rpc_messages.proto"; + +// 域名服务集群相关服务 +service NSClusterService { + // 创建集群 + rpc createNSCluster (CreateNSClusterRequest) returns (CreateNSClusterResponse); + + // 修改集群 + rpc updateNSCluster (UpdateNSClusterRequest) returns (RPCSuccess); + + // 删除集群 + rpc deleteNSCluster (DeleteNSCluster) returns (RPCSuccess); + + // 查找单个可用集群信息 + rpc findEnabledNSCluster (FindEnabledNSClusterRequest) returns (FindEnabledNSClusterResponse); + + // 计算所有可用集群的数量 + rpc countAllEnabledNSClusters (CountAllEnabledNSClustersRequest) returns (RPCCountResponse); + + // 列出单页可用集群 + rpc listEnabledNSClusters (ListEnabledNSClustersRequest) returns (ListEnabledNSClustersResponse); + + // 查找所有可用集群 + rpc findAllEnabledNSClusters (FindAllEnabledNSClustersRequest) returns (FindAllEnabledNSClustersResponse); +} + +// 创建集群 +message CreateNSClusterRequest { + string name = 1; +} + +message CreateNSClusterResponse { + int64 nsClusterId = 1; +} + +// 修改集群 +message UpdateNSClusterRequest { + int64 nsClusterId = 1; + string name = 2; + bool isOn = 3; +} + +// 删除集群 +message DeleteNSCluster { + int64 nsClusterId = 1; +} + +// 查找单个可用集群信息 +message FindEnabledNSClusterRequest { + int64 nsClusterId = 1; +} + +message FindEnabledNSClusterResponse { + NSCluster nsCluster = 1; +} + +// 计算所有可用集群的数量 +message CountAllEnabledNSClustersRequest { +} + +// 列出单页可用集群 +message ListEnabledNSClustersRequest { + int64 offset = 1; + int64 size = 2; +} + +message ListEnabledNSClustersResponse { + repeated NSCluster nsClusters = 1; +} + +// 查找所有可用集群 +message FindAllEnabledNSClustersRequest { + +} + +message FindAllEnabledNSClustersResponse { + repeated NSCluster nsClusters = 1; +} \ No newline at end of file