DNS支持TSIG

This commit is contained in:
刘祥超
2021-07-25 15:08:38 +08:00
parent f1da942189
commit 32d542aa6c
13 changed files with 907 additions and 149 deletions

View File

@@ -650,6 +650,157 @@ func (x *ListNSDomainsAfterVersionResponse) GetNsDomains() []*NSDomain {
return nil
}
// 查找TSIG配置
type FindEnabledNSDomainTSIGRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NsDomainId int64 `protobuf:"varint,1,opt,name=nsDomainId,proto3" json:"nsDomainId,omitempty"`
}
func (x *FindEnabledNSDomainTSIGRequest) Reset() {
*x = FindEnabledNSDomainTSIGRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ns_domain_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindEnabledNSDomainTSIGRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindEnabledNSDomainTSIGRequest) ProtoMessage() {}
func (x *FindEnabledNSDomainTSIGRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_ns_domain_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindEnabledNSDomainTSIGRequest.ProtoReflect.Descriptor instead.
func (*FindEnabledNSDomainTSIGRequest) Descriptor() ([]byte, []int) {
return file_service_ns_domain_proto_rawDescGZIP(), []int{11}
}
func (x *FindEnabledNSDomainTSIGRequest) GetNsDomainId() int64 {
if x != nil {
return x.NsDomainId
}
return 0
}
type FindEnabledNSDomainTSIGResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TsigJSON []byte `protobuf:"bytes,1,opt,name=tsigJSON,proto3" json:"tsigJSON,omitempty"`
}
func (x *FindEnabledNSDomainTSIGResponse) Reset() {
*x = FindEnabledNSDomainTSIGResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ns_domain_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindEnabledNSDomainTSIGResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindEnabledNSDomainTSIGResponse) ProtoMessage() {}
func (x *FindEnabledNSDomainTSIGResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_ns_domain_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindEnabledNSDomainTSIGResponse.ProtoReflect.Descriptor instead.
func (*FindEnabledNSDomainTSIGResponse) Descriptor() ([]byte, []int) {
return file_service_ns_domain_proto_rawDescGZIP(), []int{12}
}
func (x *FindEnabledNSDomainTSIGResponse) GetTsigJSON() []byte {
if x != nil {
return x.TsigJSON
}
return nil
}
// 修改TSIG配置
type UpdateNSDomainTSIGRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NsDomainId int64 `protobuf:"varint,1,opt,name=nsDomainId,proto3" json:"nsDomainId,omitempty"`
TsigJSON []byte `protobuf:"bytes,2,opt,name=tsigJSON,proto3" json:"tsigJSON,omitempty"`
}
func (x *UpdateNSDomainTSIGRequest) Reset() {
*x = UpdateNSDomainTSIGRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ns_domain_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateNSDomainTSIGRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateNSDomainTSIGRequest) ProtoMessage() {}
func (x *UpdateNSDomainTSIGRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_ns_domain_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateNSDomainTSIGRequest.ProtoReflect.Descriptor instead.
func (*UpdateNSDomainTSIGRequest) Descriptor() ([]byte, []int) {
return file_service_ns_domain_proto_rawDescGZIP(), []int{13}
}
func (x *UpdateNSDomainTSIGRequest) GetNsDomainId() int64 {
if x != nil {
return x.NsDomainId
}
return 0
}
func (x *UpdateNSDomainTSIGRequest) GetTsigJSON() []byte {
if x != nil {
return x.TsigJSON
}
return nil
}
var File_service_ns_domain_proto protoreflect.FileDescriptor
var file_service_ns_domain_proto_rawDesc = []byte{
@@ -721,44 +872,69 @@ var file_service_ns_domain_proto_rawDesc = []byte{
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x09, 0x6e, 0x73, 0x44,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70,
0x62, 0x2e, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x09, 0x6e, 0x73, 0x44, 0x6f,
0x6d, 0x61, 0x69, 0x6e, 0x73, 0x32, 0xc8, 0x04, 0x0a, 0x0f, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61,
0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f,
0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12,
0x3b, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69,
0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x44,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70,
0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x13,
0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d,
0x61, 0x69, 0x6e, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x18, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73,
0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 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, 0x59, 0x0a, 0x14, 0x6c,
0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61,
0x69, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x6c, 0x69, 0x73, 0x74, 0x4e, 0x53,
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x44,
0x6d, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x40, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x54, 0x53, 0x49, 0x47,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x44, 0x6f, 0x6d,
0x61, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x44,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x54, 0x53,
0x49, 0x47, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x73,
0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x73,
0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x57, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x54, 0x53, 0x49, 0x47, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69,
0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x73, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x73, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x32,
0xf1, 0x05, 0x0a, 0x0f, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x44,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f,
0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0e,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19,
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61,
0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x3b, 0x0a, 0x0e, 0x64, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62,
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1e, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53,
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53,
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55,
0x0a, 0x18, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e,
0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 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, 0x59, 0x0a, 0x14, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x1f, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53,
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20,
0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e,
0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x68, 0x0a, 0x19, 0x6c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73,
0x41, 0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x44,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x41, 0x66, 0x74, 0x65,
0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69,
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69,
0x6e, 0x54, 0x53, 0x49, 0x47, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x54, 0x53,
0x49, 0x47, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61,
0x69, 0x6e, 0x54, 0x53, 0x49, 0x47, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43,
0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
0x54, 0x53, 0x49, 0x47, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x54, 0x53, 0x49, 0x47, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@@ -773,7 +949,7 @@ func file_service_ns_domain_proto_rawDescGZIP() []byte {
return file_service_ns_domain_proto_rawDescData
}
var file_service_ns_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_service_ns_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_service_ns_domain_proto_goTypes = []interface{}{
(*CreateNSDomainRequest)(nil), // 0: pb.CreateNSDomainRequest
(*CreateNSDomainResponse)(nil), // 1: pb.CreateNSDomainResponse
@@ -786,14 +962,17 @@ var file_service_ns_domain_proto_goTypes = []interface{}{
(*ListEnabledNSDomainsResponse)(nil), // 8: pb.ListEnabledNSDomainsResponse
(*ListNSDomainsAfterVersionRequest)(nil), // 9: pb.ListNSDomainsAfterVersionRequest
(*ListNSDomainsAfterVersionResponse)(nil), // 10: pb.ListNSDomainsAfterVersionResponse
(*NSDomain)(nil), // 11: pb.NSDomain
(*RPCSuccess)(nil), // 12: pb.RPCSuccess
(*RPCCountResponse)(nil), // 13: pb.RPCCountResponse
(*FindEnabledNSDomainTSIGRequest)(nil), // 11: pb.FindEnabledNSDomainTSIGRequest
(*FindEnabledNSDomainTSIGResponse)(nil), // 12: pb.FindEnabledNSDomainTSIGResponse
(*UpdateNSDomainTSIGRequest)(nil), // 13: pb.UpdateNSDomainTSIGRequest
(*NSDomain)(nil), // 14: pb.NSDomain
(*RPCSuccess)(nil), // 15: pb.RPCSuccess
(*RPCCountResponse)(nil), // 16: pb.RPCCountResponse
}
var file_service_ns_domain_proto_depIdxs = []int32{
11, // 0: pb.FindEnabledNSDomainResponse.nsDomain:type_name -> pb.NSDomain
11, // 1: pb.ListEnabledNSDomainsResponse.nsDomains:type_name -> pb.NSDomain
11, // 2: pb.ListNSDomainsAfterVersionResponse.nsDomains:type_name -> pb.NSDomain
14, // 0: pb.FindEnabledNSDomainResponse.nsDomain:type_name -> pb.NSDomain
14, // 1: pb.ListEnabledNSDomainsResponse.nsDomains:type_name -> pb.NSDomain
14, // 2: pb.ListNSDomainsAfterVersionResponse.nsDomains:type_name -> pb.NSDomain
0, // 3: pb.NSDomainService.createNSDomain:input_type -> pb.CreateNSDomainRequest
2, // 4: pb.NSDomainService.updateNSDomain:input_type -> pb.UpdateNSDomainRequest
3, // 5: pb.NSDomainService.deleteNSDomain:input_type -> pb.DeleteNSDomainRequest
@@ -801,15 +980,19 @@ var file_service_ns_domain_proto_depIdxs = []int32{
6, // 7: pb.NSDomainService.countAllEnabledNSDomains:input_type -> pb.CountAllEnabledNSDomainsRequest
7, // 8: pb.NSDomainService.listEnabledNSDomains:input_type -> pb.ListEnabledNSDomainsRequest
9, // 9: pb.NSDomainService.listNSDomainsAfterVersion:input_type -> pb.ListNSDomainsAfterVersionRequest
1, // 10: pb.NSDomainService.createNSDomain:output_type -> pb.CreateNSDomainResponse
12, // 11: pb.NSDomainService.updateNSDomain:output_type -> pb.RPCSuccess
12, // 12: pb.NSDomainService.deleteNSDomain:output_type -> pb.RPCSuccess
5, // 13: pb.NSDomainService.findEnabledNSDomain:output_type -> pb.FindEnabledNSDomainResponse
13, // 14: pb.NSDomainService.countAllEnabledNSDomains:output_type -> pb.RPCCountResponse
8, // 15: pb.NSDomainService.listEnabledNSDomains:output_type -> pb.ListEnabledNSDomainsResponse
10, // 16: pb.NSDomainService.listNSDomainsAfterVersion:output_type -> pb.ListNSDomainsAfterVersionResponse
10, // [10:17] is the sub-list for method output_type
3, // [3:10] is the sub-list for method input_type
11, // 10: pb.NSDomainService.findEnabledNSDomainTSIG:input_type -> pb.FindEnabledNSDomainTSIGRequest
13, // 11: pb.NSDomainService.updateNSDomainTSIG:input_type -> pb.UpdateNSDomainTSIGRequest
1, // 12: pb.NSDomainService.createNSDomain:output_type -> pb.CreateNSDomainResponse
15, // 13: pb.NSDomainService.updateNSDomain:output_type -> pb.RPCSuccess
15, // 14: pb.NSDomainService.deleteNSDomain:output_type -> pb.RPCSuccess
5, // 15: pb.NSDomainService.findEnabledNSDomain:output_type -> pb.FindEnabledNSDomainResponse
16, // 16: pb.NSDomainService.countAllEnabledNSDomains:output_type -> pb.RPCCountResponse
8, // 17: pb.NSDomainService.listEnabledNSDomains:output_type -> pb.ListEnabledNSDomainsResponse
10, // 18: pb.NSDomainService.listNSDomainsAfterVersion:output_type -> pb.ListNSDomainsAfterVersionResponse
12, // 19: pb.NSDomainService.findEnabledNSDomainTSIG:output_type -> pb.FindEnabledNSDomainTSIGResponse
15, // 20: pb.NSDomainService.updateNSDomainTSIG:output_type -> pb.RPCSuccess
12, // [12:21] is the sub-list for method output_type
3, // [3:12] 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
@@ -955,6 +1138,42 @@ func file_service_ns_domain_proto_init() {
return nil
}
}
file_service_ns_domain_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindEnabledNSDomainTSIGRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_ns_domain_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindEnabledNSDomainTSIGResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_ns_domain_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateNSDomainTSIGRequest); 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{
@@ -962,7 +1181,7 @@ func file_service_ns_domain_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_ns_domain_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumMessages: 14,
NumExtensions: 0,
NumServices: 1,
},
@@ -1002,6 +1221,10 @@ type NSDomainServiceClient interface {
ListEnabledNSDomains(ctx context.Context, in *ListEnabledNSDomainsRequest, opts ...grpc.CallOption) (*ListEnabledNSDomainsResponse, error)
// 根据版本列出一组域名
ListNSDomainsAfterVersion(ctx context.Context, in *ListNSDomainsAfterVersionRequest, opts ...grpc.CallOption) (*ListNSDomainsAfterVersionResponse, error)
// 查找TSIG配置
FindEnabledNSDomainTSIG(ctx context.Context, in *FindEnabledNSDomainTSIGRequest, opts ...grpc.CallOption) (*FindEnabledNSDomainTSIGResponse, error)
// 修改TSIG配置
UpdateNSDomainTSIG(ctx context.Context, in *UpdateNSDomainTSIGRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type nSDomainServiceClient struct {
@@ -1075,6 +1298,24 @@ func (c *nSDomainServiceClient) ListNSDomainsAfterVersion(ctx context.Context, i
return out, nil
}
func (c *nSDomainServiceClient) FindEnabledNSDomainTSIG(ctx context.Context, in *FindEnabledNSDomainTSIGRequest, opts ...grpc.CallOption) (*FindEnabledNSDomainTSIGResponse, error) {
out := new(FindEnabledNSDomainTSIGResponse)
err := c.cc.Invoke(ctx, "/pb.NSDomainService/findEnabledNSDomainTSIG", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nSDomainServiceClient) UpdateNSDomainTSIG(ctx context.Context, in *UpdateNSDomainTSIGRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, "/pb.NSDomainService/updateNSDomainTSIG", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NSDomainServiceServer is the server API for NSDomainService service.
type NSDomainServiceServer interface {
// 创建域名
@@ -1091,6 +1332,10 @@ type NSDomainServiceServer interface {
ListEnabledNSDomains(context.Context, *ListEnabledNSDomainsRequest) (*ListEnabledNSDomainsResponse, error)
// 根据版本列出一组域名
ListNSDomainsAfterVersion(context.Context, *ListNSDomainsAfterVersionRequest) (*ListNSDomainsAfterVersionResponse, error)
// 查找TSIG配置
FindEnabledNSDomainTSIG(context.Context, *FindEnabledNSDomainTSIGRequest) (*FindEnabledNSDomainTSIGResponse, error)
// 修改TSIG配置
UpdateNSDomainTSIG(context.Context, *UpdateNSDomainTSIGRequest) (*RPCSuccess, error)
}
// UnimplementedNSDomainServiceServer can be embedded to have forward compatible implementations.
@@ -1118,6 +1363,12 @@ func (*UnimplementedNSDomainServiceServer) ListEnabledNSDomains(context.Context,
func (*UnimplementedNSDomainServiceServer) ListNSDomainsAfterVersion(context.Context, *ListNSDomainsAfterVersionRequest) (*ListNSDomainsAfterVersionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListNSDomainsAfterVersion not implemented")
}
func (*UnimplementedNSDomainServiceServer) FindEnabledNSDomainTSIG(context.Context, *FindEnabledNSDomainTSIGRequest) (*FindEnabledNSDomainTSIGResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledNSDomainTSIG not implemented")
}
func (*UnimplementedNSDomainServiceServer) UpdateNSDomainTSIG(context.Context, *UpdateNSDomainTSIGRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateNSDomainTSIG not implemented")
}
func RegisterNSDomainServiceServer(s *grpc.Server, srv NSDomainServiceServer) {
s.RegisterService(&_NSDomainService_serviceDesc, srv)
@@ -1249,6 +1500,42 @@ func _NSDomainService_ListNSDomainsAfterVersion_Handler(srv interface{}, ctx con
return interceptor(ctx, in, info, handler)
}
func _NSDomainService_FindEnabledNSDomainTSIG_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindEnabledNSDomainTSIGRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSDomainServiceServer).FindEnabledNSDomainTSIG(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSDomainService/FindEnabledNSDomainTSIG",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSDomainServiceServer).FindEnabledNSDomainTSIG(ctx, req.(*FindEnabledNSDomainTSIGRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NSDomainService_UpdateNSDomainTSIG_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateNSDomainTSIGRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSDomainServiceServer).UpdateNSDomainTSIG(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSDomainService/UpdateNSDomainTSIG",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSDomainServiceServer).UpdateNSDomainTSIG(ctx, req.(*UpdateNSDomainTSIGRequest))
}
return interceptor(ctx, in, info, handler)
}
var _NSDomainService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.NSDomainService",
HandlerType: (*NSDomainServiceServer)(nil),
@@ -1281,6 +1568,14 @@ var _NSDomainService_serviceDesc = grpc.ServiceDesc{
MethodName: "listNSDomainsAfterVersion",
Handler: _NSDomainService_ListNSDomainsAfterVersion_Handler,
},
{
MethodName: "findEnabledNSDomainTSIG",
Handler: _NSDomainService_FindEnabledNSDomainTSIG_Handler,
},
{
MethodName: "updateNSDomainTSIG",
Handler: _NSDomainService_UpdateNSDomainTSIG_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_ns_domain.proto",