diff --git a/pkg/dnsconfigs/routes.go b/pkg/dnsconfigs/routes.go index 95d932b..c2e69c3 100644 --- a/pkg/dnsconfigs/routes.go +++ b/pkg/dnsconfigs/routes.go @@ -8,6 +8,34 @@ type Route struct { AliasNames []string `json:"aliasNames"` } +var allDefaultRouteMapping = map[string]*Route{} // code => *Route + +func init() { + for _, route := range AllDefaultRoutes { + allDefaultRouteMapping[route.Code] = route + } + for _, route := range AllDefaultISPRoutes { + allDefaultRouteMapping[route.Code] = route + } + for _, route := range AllDefaultChinaProvinceRoutes { + allDefaultRouteMapping[route.Code] = route + } + for _, route := range AllDefaultWorldRegionRoutes { + allDefaultRouteMapping[route.Code] = route + } +} + +// AllDefaultRoutes 默认线路 +var AllDefaultRoutes = []*Route{ + { + Name: "默认线路", + Code: DefaultRouteCode, + AliasNames: []string{"默认线路"}, + }, +} + +const DefaultRouteCode = "default" + // AllDefaultISPRoutes 运营商线路 var AllDefaultISPRoutes = []*Route{ { @@ -1455,3 +1483,8 @@ var AllDefaultWorldRegionRoutes = []*Route{ AliasNames: []string{"圣诞岛"}, }, } + +// FindDefaultRoute 根据代号查找线路 +func FindDefaultRoute(code string) *Route { + return allDefaultRouteMapping[code] +} diff --git a/pkg/dnsconfigs/routes_test.go b/pkg/dnsconfigs/routes_test.go index cb7ccad..6c4fd4d 100644 --- a/pkg/dnsconfigs/routes_test.go +++ b/pkg/dnsconfigs/routes_test.go @@ -41,3 +41,16 @@ func TestRoutes(t *testing.T) { } } } + +func TestFindDefaultRoute(t *testing.T) { + t.Log(FindDefaultRoute("isp:china_unicom")) + t.Log(FindDefaultRoute("china:province:beijing")) + t.Log(FindDefaultRoute("world:CN")) + t.Log(FindDefaultRoute("world:US")) +} + +func BenchmarkFindDefaultRoute(b *testing.B) { + for i := 0; i < b.N; i++ { + _ = FindDefaultRoute("world:CN") + } +} diff --git a/pkg/rpc/pb/model_ns_access_log.pb.go b/pkg/rpc/pb/model_ns_access_log.pb.go index 93cf668..11ef42a 100644 --- a/pkg/rpc/pb/model_ns_access_log.pb.go +++ b/pkg/rpc/pb/model_ns_access_log.pb.go @@ -31,22 +31,24 @@ type NSAccessLog struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NsNodeId int64 `protobuf:"varint,1,opt,name=nsNodeId,proto3" json:"nsNodeId,omitempty"` - NsDomainId int64 `protobuf:"varint,2,opt,name=nsDomainId,proto3" json:"nsDomainId,omitempty"` - NsRecordId int64 `protobuf:"varint,3,opt,name=nsRecordId,proto3" json:"nsRecordId,omitempty"` - NsRouteIds []int64 `protobuf:"varint,4,rep,packed,name=nsRouteIds,proto3" json:"nsRouteIds,omitempty"` - RemoteAddr string `protobuf:"bytes,5,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"` - QuestionName string `protobuf:"bytes,6,opt,name=questionName,proto3" json:"questionName,omitempty"` - QuestionType string `protobuf:"bytes,7,opt,name=questionType,proto3" json:"questionType,omitempty"` - RecordName string `protobuf:"bytes,8,opt,name=recordName,proto3" json:"recordName,omitempty"` - RecordType string `protobuf:"bytes,9,opt,name=recordType,proto3" json:"recordType,omitempty"` - RecordValue string `protobuf:"bytes,10,opt,name=recordValue,proto3" json:"recordValue,omitempty"` - Networking string `protobuf:"bytes,11,opt,name=networking,proto3" json:"networking,omitempty"` - ServerAddr string `protobuf:"bytes,12,opt,name=serverAddr,proto3" json:"serverAddr,omitempty"` - Timestamp int64 `protobuf:"varint,13,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - 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"` + NsNodeId int64 `protobuf:"varint,1,opt,name=nsNodeId,proto3" json:"nsNodeId,omitempty"` + NsDomainId int64 `protobuf:"varint,2,opt,name=nsDomainId,proto3" json:"nsDomainId,omitempty"` + NsRecordId int64 `protobuf:"varint,3,opt,name=nsRecordId,proto3" json:"nsRecordId,omitempty"` + // Deprecated: Do not use. + NsRouteIds []int64 `protobuf:"varint,4,rep,packed,name=nsRouteIds,proto3" json:"nsRouteIds,omitempty"` + NsRouteCodes []string `protobuf:"bytes,17,rep,name=nsRouteCodes,proto3" json:"nsRouteCodes,omitempty"` + RemoteAddr string `protobuf:"bytes,5,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"` + QuestionName string `protobuf:"bytes,6,opt,name=questionName,proto3" json:"questionName,omitempty"` + QuestionType string `protobuf:"bytes,7,opt,name=questionType,proto3" json:"questionType,omitempty"` + RecordName string `protobuf:"bytes,8,opt,name=recordName,proto3" json:"recordName,omitempty"` + RecordType string `protobuf:"bytes,9,opt,name=recordType,proto3" json:"recordType,omitempty"` + RecordValue string `protobuf:"bytes,10,opt,name=recordValue,proto3" json:"recordValue,omitempty"` + Networking string `protobuf:"bytes,11,opt,name=networking,proto3" json:"networking,omitempty"` + ServerAddr string `protobuf:"bytes,12,opt,name=serverAddr,proto3" json:"serverAddr,omitempty"` + Timestamp int64 `protobuf:"varint,13,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + 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"` } func (x *NSAccessLog) Reset() { @@ -102,6 +104,7 @@ func (x *NSAccessLog) GetNsRecordId() int64 { return 0 } +// Deprecated: Do not use. func (x *NSAccessLog) GetNsRouteIds() []int64 { if x != nil { return x.NsRouteIds @@ -109,6 +112,13 @@ func (x *NSAccessLog) GetNsRouteIds() []int64 { return nil } +func (x *NSAccessLog) GetNsRouteCodes() []string { + if x != nil { + return x.NsRouteCodes + } + return nil +} + func (x *NSAccessLog) GetRemoteAddr() string { if x != nil { return x.RemoteAddr @@ -198,40 +208,43 @@ var File_models_model_ns_access_log_proto protoreflect.FileDescriptor var file_models_model_ns_access_log_proto_rawDesc = []byte{ 0x0a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x83, 0x04, 0x0a, 0x0b, 0x4e, 0x53, 0x41, 0x63, 0x63, + 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xab, 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, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, - 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x0a, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, - 0x65, 0x71, 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, + 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x73, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, + 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x69, + 0x6e, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 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, } var ( diff --git a/pkg/rpc/pb/model_ns_route.pb.go b/pkg/rpc/pb/model_ns_route.pb.go index 106ee76..d1f21fc 100644 --- a/pkg/rpc/pb/model_ns_route.pb.go +++ b/pkg/rpc/pb/model_ns_route.pb.go @@ -38,6 +38,7 @@ type NSRoute struct { IsDeleted bool `protobuf:"varint,5,opt,name=isDeleted,proto3" json:"isDeleted,omitempty"` Order int64 `protobuf:"varint,6,opt,name=order,proto3" json:"order,omitempty"` Version int64 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` + Code string `protobuf:"bytes,8,opt,name=code,proto3" json:"code,omitempty"` NsCluster *NSCluster `protobuf:"bytes,30,opt,name=nsCluster,proto3" json:"nsCluster,omitempty"` NsDomain *NSDomain `protobuf:"bytes,31,opt,name=nsDomain,proto3" json:"nsDomain,omitempty"` } @@ -123,6 +124,13 @@ func (x *NSRoute) GetVersion() int64 { return 0 } +func (x *NSRoute) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + func (x *NSRoute) GetNsCluster() *NSCluster { if x != nil { return x.NsCluster @@ -145,7 +153,7 @@ var file_models_model_ns_route_proto_rawDesc = []byte{ 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, 0x1c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, - 0x73, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, + 0x73, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x02, 0x0a, 0x07, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 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, @@ -157,13 +165,14 @@ var file_models_model_ns_route_proto_rawDesc = []byte{ 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1e, 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, 0x12, 0x28, 0x0a, - 0x08, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x08, 0x6e, - 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x18, 0x1e, 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, 0x12, 0x28, 0x0a, 0x08, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x1f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x52, 0x08, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/rpc/pb/service_ns_record.pb.go b/pkg/rpc/pb/service_ns_record.pb.go index 61318f0..33e34fe 100644 --- a/pkg/rpc/pb/service_ns_record.pb.go +++ b/pkg/rpc/pb/service_ns_record.pb.go @@ -35,13 +35,15 @@ type CreateNSRecordRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NsDomainId int64 `protobuf:"varint,1,opt,name=nsDomainId,proto3" json:"nsDomainId,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` - Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` - Ttl int32 `protobuf:"varint,6,opt,name=ttl,proto3" json:"ttl,omitempty"` - NsRouteIds []int64 `protobuf:"varint,7,rep,packed,name=nsRouteIds,proto3" json:"nsRouteIds,omitempty"` + NsDomainId int64 `protobuf:"varint,1,opt,name=nsDomainId,proto3" json:"nsDomainId,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` + Ttl int32 `protobuf:"varint,6,opt,name=ttl,proto3" json:"ttl,omitempty"` + // Deprecated: Do not use. + NsRouteIds []int64 `protobuf:"varint,7,rep,packed,name=nsRouteIds,proto3" json:"nsRouteIds,omitempty"` + NsRouteCodes []string `protobuf:"bytes,8,rep,name=nsRouteCodes,proto3" json:"nsRouteCodes,omitempty"` // 路线代号 } func (x *CreateNSRecordRequest) Reset() { @@ -118,6 +120,7 @@ func (x *CreateNSRecordRequest) GetTtl() int32 { return 0 } +// Deprecated: Do not use. func (x *CreateNSRecordRequest) GetNsRouteIds() []int64 { if x != nil { return x.NsRouteIds @@ -125,6 +128,13 @@ func (x *CreateNSRecordRequest) GetNsRouteIds() []int64 { return nil } +func (x *CreateNSRecordRequest) GetNsRouteCodes() []string { + if x != nil { + return x.NsRouteCodes + } + return nil +} + type CreateNSRecordResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -178,14 +188,16 @@ type UpdateNSRecordRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NsRecordId int64 `protobuf:"varint,1,opt,name=nsRecordId,proto3" json:"nsRecordId,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` - Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` - Ttl int32 `protobuf:"varint,6,opt,name=ttl,proto3" json:"ttl,omitempty"` - NsRouteIds []int64 `protobuf:"varint,7,rep,packed,name=nsRouteIds,proto3" json:"nsRouteIds,omitempty"` - IsOn bool `protobuf:"varint,8,opt,name=isOn,proto3" json:"isOn,omitempty"` + NsRecordId int64 `protobuf:"varint,1,opt,name=nsRecordId,proto3" json:"nsRecordId,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` + Ttl int32 `protobuf:"varint,6,opt,name=ttl,proto3" json:"ttl,omitempty"` + // Deprecated: Do not use. + NsRouteIds []int64 `protobuf:"varint,7,rep,packed,name=nsRouteIds,proto3" json:"nsRouteIds,omitempty"` + IsOn bool `protobuf:"varint,8,opt,name=isOn,proto3" json:"isOn,omitempty"` + NsRouteCodes []string `protobuf:"bytes,9,rep,name=nsRouteCodes,proto3" json:"nsRouteCodes,omitempty"` // 路线代号 } func (x *UpdateNSRecordRequest) Reset() { @@ -262,6 +274,7 @@ func (x *UpdateNSRecordRequest) GetTtl() int32 { return 0 } +// Deprecated: Do not use. func (x *UpdateNSRecordRequest) GetNsRouteIds() []int64 { if x != nil { return x.NsRouteIds @@ -276,6 +289,13 @@ func (x *UpdateNSRecordRequest) GetIsOn() bool { return false } +func (x *UpdateNSRecordRequest) GetNsRouteCodes() []string { + if x != nil { + return x.NsRouteCodes + } + return nil +} + // 删除记录 type DeleteNSRecordRequest struct { state protoimpl.MessageState @@ -332,8 +352,10 @@ type CountAllEnabledNSRecordsRequest struct { NsDomainId int64 `protobuf:"varint,1,opt,name=nsDomainId,proto3" json:"nsDomainId,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - NsRouteId int64 `protobuf:"varint,3,opt,name=nsRouteId,proto3" json:"nsRouteId,omitempty"` - Keyword string `protobuf:"bytes,4,opt,name=keyword,proto3" json:"keyword,omitempty"` + // Deprecated: Do not use. + NsRouteId int64 `protobuf:"varint,3,opt,name=nsRouteId,proto3" json:"nsRouteId,omitempty"` // 使用nsRouteCode代替 + NsRouteCode string `protobuf:"bytes,5,opt,name=nsRouteCode,proto3" json:"nsRouteCode,omitempty"` + Keyword string `protobuf:"bytes,4,opt,name=keyword,proto3" json:"keyword,omitempty"` } func (x *CountAllEnabledNSRecordsRequest) Reset() { @@ -382,6 +404,7 @@ func (x *CountAllEnabledNSRecordsRequest) GetType() string { return "" } +// Deprecated: Do not use. func (x *CountAllEnabledNSRecordsRequest) GetNsRouteId() int64 { if x != nil { return x.NsRouteId @@ -389,6 +412,13 @@ func (x *CountAllEnabledNSRecordsRequest) GetNsRouteId() int64 { return 0 } +func (x *CountAllEnabledNSRecordsRequest) GetNsRouteCode() string { + if x != nil { + return x.NsRouteCode + } + return "" +} + func (x *CountAllEnabledNSRecordsRequest) GetKeyword() string { if x != nil { return x.Keyword @@ -404,10 +434,12 @@ type ListEnabledNSRecordsRequest struct { NsDomainId int64 `protobuf:"varint,1,opt,name=nsDomainId,proto3" json:"nsDomainId,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - NsRouteId int64 `protobuf:"varint,3,opt,name=nsRouteId,proto3" json:"nsRouteId,omitempty"` - Keyword string `protobuf:"bytes,4,opt,name=keyword,proto3" json:"keyword,omitempty"` - Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` + // Deprecated: Do not use. + NsRouteId int64 `protobuf:"varint,3,opt,name=nsRouteId,proto3" json:"nsRouteId,omitempty"` // 使用nsRouteCode代替 + NsRouteCode string `protobuf:"bytes,7,opt,name=nsRouteCode,proto3" json:"nsRouteCode,omitempty"` + Keyword string `protobuf:"bytes,4,opt,name=keyword,proto3" json:"keyword,omitempty"` + Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` + Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` } func (x *ListEnabledNSRecordsRequest) Reset() { @@ -456,6 +488,7 @@ func (x *ListEnabledNSRecordsRequest) GetType() string { return "" } +// Deprecated: Do not use. func (x *ListEnabledNSRecordsRequest) GetNsRouteId() int64 { if x != nil { return x.NsRouteId @@ -463,6 +496,13 @@ func (x *ListEnabledNSRecordsRequest) GetNsRouteId() int64 { return 0 } +func (x *ListEnabledNSRecordsRequest) GetNsRouteCode() string { + if x != nil { + return x.NsRouteCode + } + return "" +} + func (x *ListEnabledNSRecordsRequest) GetKeyword() string { if x != nil { return x.Keyword @@ -737,7 +777,7 @@ var file_service_ns_record_proto_rawDesc = []byte{ 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0xc9, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf1, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, @@ -748,111 +788,121 @@ var file_service_ns_record_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, - 0x74, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, - 0x64, 0x73, 0x22, 0x38, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, - 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x22, 0xdd, 0x01, 0x0a, - 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x49, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x22, 0x37, 0x0a, 0x15, + 0x74, 0x6c, 0x12, 0x22, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x73, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x16, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x49, 0x64, 0x22, 0x85, 0x02, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x74, 0x6c, + 0x12, 0x22, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x49, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x73, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, + 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x37, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x49, 0x64, 0x22, 0x8d, 0x01, 0x0a, 0x1f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x6f, 0x72, 0x64, 0x49, 0x64, 0x22, 0xb3, 0x01, 0x0a, 0x1f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 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, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6b, - 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, - 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb5, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 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, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x73, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x73, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, - 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x4a, 0x0a, - 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, - 0x09, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x09, - 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x3c, 0x0a, 0x1a, 0x46, 0x69, 0x6e, - 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x1b, 0x46, 0x69, 0x6e, 0x64, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x08, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x22, 0x50, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x22, 0x4f, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x09, 0x6e, 0x73, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, - 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x09, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x32, 0xc8, 0x04, 0x0a, 0x0f, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3b, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, - 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, - 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x18, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 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, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x12, + 0x20, 0x0a, 0x0b, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xdb, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, - 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, + 0x6f, 0x72, 0x64, 0x73, 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, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x20, 0x0a, 0x09, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x49, + 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x4a, 0x0a, 0x1c, 0x4c, 0x69, 0x73, + 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x09, 0x6e, 0x73, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, + 0x62, 0x2e, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x09, 0x6e, 0x73, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x3c, 0x0a, 0x1a, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x6c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 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, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 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, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, + 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x1b, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x28, 0x0a, 0x08, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x52, 0x08, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x50, 0x0a, 0x20, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x41, 0x66, 0x74, + 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x4f, + 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x41, + 0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x09, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x52, 0x09, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x32, + 0xc8, 0x04, 0x0a, 0x0f, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0e, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x19, + 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 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, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x62, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x18, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x64, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, + 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x68, 0x0a, 0x19, 0x6c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 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, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 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, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 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, } var ( diff --git a/pkg/rpc/protos/models/model_ns_access_log.proto b/pkg/rpc/protos/models/model_ns_access_log.proto index e7915da..730aea8 100644 --- a/pkg/rpc/protos/models/model_ns_access_log.proto +++ b/pkg/rpc/protos/models/model_ns_access_log.proto @@ -8,7 +8,8 @@ message NSAccessLog { int64 nsNodeId = 1; int64 nsDomainId = 2; int64 nsRecordId = 3; - repeated int64 nsRouteIds = 4; + repeated int64 nsRouteIds = 4 [deprecated = true]; + repeated string nsRouteCodes = 17; string remoteAddr = 5; string questionName = 6; string questionType = 7; diff --git a/pkg/rpc/protos/models/model_ns_route.proto b/pkg/rpc/protos/models/model_ns_route.proto index d80bc51..f01dce6 100644 --- a/pkg/rpc/protos/models/model_ns_route.proto +++ b/pkg/rpc/protos/models/model_ns_route.proto @@ -15,6 +15,7 @@ message NSRoute { bool isDeleted = 5; int64 order = 6; int64 version = 7; + string code = 8; NSCluster nsCluster = 30; NSDomain nsDomain = 31; diff --git a/pkg/rpc/protos/service_ns_record.proto b/pkg/rpc/protos/service_ns_record.proto index 62b01c0..937ac5c 100644 --- a/pkg/rpc/protos/service_ns_record.proto +++ b/pkg/rpc/protos/service_ns_record.proto @@ -38,7 +38,8 @@ message CreateNSRecordRequest { string type = 4; string value = 5; int32 ttl = 6; - repeated int64 nsRouteIds = 7; + repeated int64 nsRouteIds = 7 [deprecated = true]; + repeated string nsRouteCodes = 8; // 路线代号 } message CreateNSRecordResponse { @@ -53,8 +54,9 @@ message UpdateNSRecordRequest { string type = 4; string value = 5; int32 ttl = 6; - repeated int64 nsRouteIds = 7; + repeated int64 nsRouteIds = 7 [deprecated = true]; bool isOn = 8; + repeated string nsRouteCodes = 9; // 路线代号 } // 删除记录 @@ -66,7 +68,8 @@ message DeleteNSRecordRequest { message CountAllEnabledNSRecordsRequest { int64 nsDomainId = 1; string type = 2; - int64 nsRouteId = 3; + int64 nsRouteId = 3 [deprecated = true]; // 使用nsRouteCode代替 + string nsRouteCode = 5; string keyword = 4; } @@ -74,7 +77,8 @@ message CountAllEnabledNSRecordsRequest { message ListEnabledNSRecordsRequest { int64 nsDomainId = 1; string type = 2; - int64 nsRouteId = 3; + int64 nsRouteId = 3 [deprecated = true]; // 使用nsRouteCode代替 + string nsRouteCode = 7; string keyword = 4; int64 offset = 5; int64 size = 6;