优化智能DNS相关接口

This commit is contained in:
GoEdgeLab
2022-09-24 14:07:59 +08:00
parent ab22f7e0e0
commit 16486d39bd
6 changed files with 4466 additions and 4035 deletions

View File

@@ -39,6 +39,8 @@ type NSCluster struct {
TlsJSON []byte `protobuf:"bytes,6,opt,name=tlsJSON,proto3" json:"tlsJSON,omitempty"`
UdpJSON []byte `protobuf:"bytes,7,opt,name=udpJSON,proto3" json:"udpJSON,omitempty"`
Hosts []string `protobuf:"bytes,8,rep,name=hosts,proto3" json:"hosts,omitempty"`
SoaJSON []byte `protobuf:"bytes,12,opt,name=soaJSON,proto3" json:"soaJSON,omitempty"`
Email string `protobuf:"bytes,13,opt,name=email,proto3" json:"email,omitempty"`
AutoRemoteStart bool `protobuf:"varint,9,opt,name=autoRemoteStart,proto3" json:"autoRemoteStart,omitempty"`
TimeZone string `protobuf:"bytes,10,opt,name=timeZone,proto3" json:"timeZone,omitempty"`
AnswerJSON []byte `protobuf:"bytes,11,opt,name=answerJSON,proto3" json:"answerJSON,omitempty"`
@@ -132,6 +134,20 @@ func (x *NSCluster) GetHosts() []string {
return nil
}
func (x *NSCluster) GetSoaJSON() []byte {
if x != nil {
return x.SoaJSON
}
return nil
}
func (x *NSCluster) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *NSCluster) GetAutoRemoteStart() bool {
if x != nil {
return x.AutoRemoteStart
@@ -158,7 +174,7 @@ 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, 0xad, 0x02, 0x0a, 0x09, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
0x02, 0x70, 0x62, 0x22, 0xdd, 0x02, 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,
@@ -170,7 +186,10 @@ var file_models_model_ns_cluster_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a,
0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73,
0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x28, 0x0a,
0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x18, 0x0a,
0x07, 0x73, 0x6f, 0x61, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
0x73, 0x6f, 0x61, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x28, 0x0a,
0x0f, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74,
0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x6d, 0x6f,
0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5a,