实现域名、记录同步等API

This commit is contained in:
刘祥超
2021-06-01 16:43:13 +08:00
parent c725c9e082
commit e4d958fd2c
19 changed files with 1400 additions and 369 deletions

View File

@@ -522,6 +522,109 @@ func (x *UpdateNSRouteOrdersRequest) GetNsRouteIds() []int64 {
return nil
}
// 根据版本列出一组线路
type ListNSRoutesAfterVersionRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
}
func (x *ListNSRoutesAfterVersionRequest) Reset() {
*x = ListNSRoutesAfterVersionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ns_route_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListNSRoutesAfterVersionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListNSRoutesAfterVersionRequest) ProtoMessage() {}
func (x *ListNSRoutesAfterVersionRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_ns_route_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 ListNSRoutesAfterVersionRequest.ProtoReflect.Descriptor instead.
func (*ListNSRoutesAfterVersionRequest) Descriptor() ([]byte, []int) {
return file_service_ns_route_proto_rawDescGZIP(), []int{9}
}
func (x *ListNSRoutesAfterVersionRequest) GetVersion() int64 {
if x != nil {
return x.Version
}
return 0
}
func (x *ListNSRoutesAfterVersionRequest) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
type ListNSRoutesAfterVersionResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NsRoutes []*NSRoute `protobuf:"bytes,1,rep,name=nsRoutes,proto3" json:"nsRoutes,omitempty"`
}
func (x *ListNSRoutesAfterVersionResponse) Reset() {
*x = ListNSRoutesAfterVersionResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ns_route_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListNSRoutesAfterVersionResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListNSRoutesAfterVersionResponse) ProtoMessage() {}
func (x *ListNSRoutesAfterVersionResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_ns_route_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 ListNSRoutesAfterVersionResponse.ProtoReflect.Descriptor instead.
func (*ListNSRoutesAfterVersionResponse) Descriptor() ([]byte, []int) {
return file_service_ns_route_proto_rawDescGZIP(), []int{10}
}
func (x *ListNSRoutesAfterVersionResponse) GetNsRoutes() []*NSRoute {
if x != nil {
return x.NsRoutes
}
return nil
}
var File_service_ns_route_proto protoreflect.FileDescriptor
var file_service_ns_route_proto_rawDesc = []byte{
@@ -578,37 +681,53 @@ var file_service_ns_route_proto_rawDesc = []byte{
0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74,
0x65, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x73, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x49, 0x64, 0x73, 0x32, 0xc9, 0x03, 0x0a, 0x0e, 0x4e, 0x53, 0x52, 0x6f, 0x75,
0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x39, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e,
0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x64, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62,
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75,
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x16, 0x66, 0x69,
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c,
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e,
0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75,
0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x13, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53,
0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 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,
0x75, 0x74, 0x65, 0x49, 0x64, 0x73, 0x22, 0x4f, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53,
0x52, 0x6f, 0x75, 0x74, 0x65, 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, 0x4b, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x4e,
0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x08, 0x6e,
0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
0x70, 0x62, 0x2e, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x08, 0x6e, 0x73, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x73, 0x32, 0xb0, 0x04, 0x0a, 0x0e, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53,
0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a,
0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x18,
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50,
0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64,
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74,
0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41,
0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x13, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73,
0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
0x12, 0x65, 0x0a, 0x18, 0x6c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
0x41, 0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70,
0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x41, 0x66,
0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x52, 0x6f, 0x75,
0x74, 0x65, 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 (
@@ -623,40 +742,45 @@ func file_service_ns_route_proto_rawDescGZIP() []byte {
return file_service_ns_route_proto_rawDescData
}
var file_service_ns_route_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_service_ns_route_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_service_ns_route_proto_goTypes = []interface{}{
(*CreateNSRouteRequest)(nil), // 0: pb.CreateNSRouteRequest
(*CreateNSRouteResponse)(nil), // 1: pb.CreateNSRouteResponse
(*UpdateNSRouteRequest)(nil), // 2: pb.UpdateNSRouteRequest
(*DeleteNSRouteRequest)(nil), // 3: pb.DeleteNSRouteRequest
(*FindEnabledNSRouteRequest)(nil), // 4: pb.FindEnabledNSRouteRequest
(*FindEnabledNSRouteResponse)(nil), // 5: pb.FindEnabledNSRouteResponse
(*FindAllEnabledNSRoutesRequest)(nil), // 6: pb.FindAllEnabledNSRoutesRequest
(*FindAllEnabledNSRoutesResponse)(nil), // 7: pb.FindAllEnabledNSRoutesResponse
(*UpdateNSRouteOrdersRequest)(nil), // 8: pb.UpdateNSRouteOrdersRequest
(*NSRoute)(nil), // 9: pb.NSRoute
(*RPCSuccess)(nil), // 10: pb.RPCSuccess
(*CreateNSRouteRequest)(nil), // 0: pb.CreateNSRouteRequest
(*CreateNSRouteResponse)(nil), // 1: pb.CreateNSRouteResponse
(*UpdateNSRouteRequest)(nil), // 2: pb.UpdateNSRouteRequest
(*DeleteNSRouteRequest)(nil), // 3: pb.DeleteNSRouteRequest
(*FindEnabledNSRouteRequest)(nil), // 4: pb.FindEnabledNSRouteRequest
(*FindEnabledNSRouteResponse)(nil), // 5: pb.FindEnabledNSRouteResponse
(*FindAllEnabledNSRoutesRequest)(nil), // 6: pb.FindAllEnabledNSRoutesRequest
(*FindAllEnabledNSRoutesResponse)(nil), // 7: pb.FindAllEnabledNSRoutesResponse
(*UpdateNSRouteOrdersRequest)(nil), // 8: pb.UpdateNSRouteOrdersRequest
(*ListNSRoutesAfterVersionRequest)(nil), // 9: pb.ListNSRoutesAfterVersionRequest
(*ListNSRoutesAfterVersionResponse)(nil), // 10: pb.ListNSRoutesAfterVersionResponse
(*NSRoute)(nil), // 11: pb.NSRoute
(*RPCSuccess)(nil), // 12: pb.RPCSuccess
}
var file_service_ns_route_proto_depIdxs = []int32{
9, // 0: pb.FindEnabledNSRouteResponse.nsRoute:type_name -> pb.NSRoute
9, // 1: pb.FindAllEnabledNSRoutesResponse.nsRoutes:type_name -> pb.NSRoute
0, // 2: pb.NSRouteService.createNSRoute:input_type -> pb.CreateNSRouteRequest
2, // 3: pb.NSRouteService.updateNSRoute:input_type -> pb.UpdateNSRouteRequest
3, // 4: pb.NSRouteService.deleteNSRoute:input_type -> pb.DeleteNSRouteRequest
4, // 5: pb.NSRouteService.findEnabledNSRoute:input_type -> pb.FindEnabledNSRouteRequest
6, // 6: pb.NSRouteService.findAllEnabledNSRoutes:input_type -> pb.FindAllEnabledNSRoutesRequest
8, // 7: pb.NSRouteService.updateNSRouteOrders:input_type -> pb.UpdateNSRouteOrdersRequest
1, // 8: pb.NSRouteService.createNSRoute:output_type -> pb.CreateNSRouteResponse
10, // 9: pb.NSRouteService.updateNSRoute:output_type -> pb.RPCSuccess
10, // 10: pb.NSRouteService.deleteNSRoute:output_type -> pb.RPCSuccess
5, // 11: pb.NSRouteService.findEnabledNSRoute:output_type -> pb.FindEnabledNSRouteResponse
7, // 12: pb.NSRouteService.findAllEnabledNSRoutes:output_type -> pb.FindAllEnabledNSRoutesResponse
10, // 13: pb.NSRouteService.updateNSRouteOrders:output_type -> pb.RPCSuccess
8, // [8:14] is the sub-list for method output_type
2, // [2:8] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
11, // 0: pb.FindEnabledNSRouteResponse.nsRoute:type_name -> pb.NSRoute
11, // 1: pb.FindAllEnabledNSRoutesResponse.nsRoutes:type_name -> pb.NSRoute
11, // 2: pb.ListNSRoutesAfterVersionResponse.nsRoutes:type_name -> pb.NSRoute
0, // 3: pb.NSRouteService.createNSRoute:input_type -> pb.CreateNSRouteRequest
2, // 4: pb.NSRouteService.updateNSRoute:input_type -> pb.UpdateNSRouteRequest
3, // 5: pb.NSRouteService.deleteNSRoute:input_type -> pb.DeleteNSRouteRequest
4, // 6: pb.NSRouteService.findEnabledNSRoute:input_type -> pb.FindEnabledNSRouteRequest
6, // 7: pb.NSRouteService.findAllEnabledNSRoutes:input_type -> pb.FindAllEnabledNSRoutesRequest
8, // 8: pb.NSRouteService.updateNSRouteOrders:input_type -> pb.UpdateNSRouteOrdersRequest
9, // 9: pb.NSRouteService.listNSRoutesAfterVersion:input_type -> pb.ListNSRoutesAfterVersionRequest
1, // 10: pb.NSRouteService.createNSRoute:output_type -> pb.CreateNSRouteResponse
12, // 11: pb.NSRouteService.updateNSRoute:output_type -> pb.RPCSuccess
12, // 12: pb.NSRouteService.deleteNSRoute:output_type -> pb.RPCSuccess
5, // 13: pb.NSRouteService.findEnabledNSRoute:output_type -> pb.FindEnabledNSRouteResponse
7, // 14: pb.NSRouteService.findAllEnabledNSRoutes:output_type -> pb.FindAllEnabledNSRoutesResponse
12, // 15: pb.NSRouteService.updateNSRouteOrders:output_type -> pb.RPCSuccess
10, // 16: pb.NSRouteService.listNSRoutesAfterVersion:output_type -> pb.ListNSRoutesAfterVersionResponse
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_route_proto_init() }
@@ -775,6 +899,30 @@ func file_service_ns_route_proto_init() {
return nil
}
}
file_service_ns_route_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListNSRoutesAfterVersionRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_ns_route_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListNSRoutesAfterVersionResponse); 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{
@@ -782,7 +930,7 @@ func file_service_ns_route_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_ns_route_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
@@ -820,6 +968,8 @@ type NSRouteServiceClient interface {
FindAllEnabledNSRoutes(ctx context.Context, in *FindAllEnabledNSRoutesRequest, opts ...grpc.CallOption) (*FindAllEnabledNSRoutesResponse, error)
// 设置线路排序
UpdateNSRouteOrders(ctx context.Context, in *UpdateNSRouteOrdersRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 根据版本列出一组线路
ListNSRoutesAfterVersion(ctx context.Context, in *ListNSRoutesAfterVersionRequest, opts ...grpc.CallOption) (*ListNSRoutesAfterVersionResponse, error)
}
type nSRouteServiceClient struct {
@@ -884,6 +1034,15 @@ func (c *nSRouteServiceClient) UpdateNSRouteOrders(ctx context.Context, in *Upda
return out, nil
}
func (c *nSRouteServiceClient) ListNSRoutesAfterVersion(ctx context.Context, in *ListNSRoutesAfterVersionRequest, opts ...grpc.CallOption) (*ListNSRoutesAfterVersionResponse, error) {
out := new(ListNSRoutesAfterVersionResponse)
err := c.cc.Invoke(ctx, "/pb.NSRouteService/listNSRoutesAfterVersion", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NSRouteServiceServer is the server API for NSRouteService service.
type NSRouteServiceServer interface {
// 创建线路
@@ -898,6 +1057,8 @@ type NSRouteServiceServer interface {
FindAllEnabledNSRoutes(context.Context, *FindAllEnabledNSRoutesRequest) (*FindAllEnabledNSRoutesResponse, error)
// 设置线路排序
UpdateNSRouteOrders(context.Context, *UpdateNSRouteOrdersRequest) (*RPCSuccess, error)
// 根据版本列出一组线路
ListNSRoutesAfterVersion(context.Context, *ListNSRoutesAfterVersionRequest) (*ListNSRoutesAfterVersionResponse, error)
}
// UnimplementedNSRouteServiceServer can be embedded to have forward compatible implementations.
@@ -922,6 +1083,9 @@ func (*UnimplementedNSRouteServiceServer) FindAllEnabledNSRoutes(context.Context
func (*UnimplementedNSRouteServiceServer) UpdateNSRouteOrders(context.Context, *UpdateNSRouteOrdersRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateNSRouteOrders not implemented")
}
func (*UnimplementedNSRouteServiceServer) ListNSRoutesAfterVersion(context.Context, *ListNSRoutesAfterVersionRequest) (*ListNSRoutesAfterVersionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListNSRoutesAfterVersion not implemented")
}
func RegisterNSRouteServiceServer(s *grpc.Server, srv NSRouteServiceServer) {
s.RegisterService(&_NSRouteService_serviceDesc, srv)
@@ -1035,6 +1199,24 @@ func _NSRouteService_UpdateNSRouteOrders_Handler(srv interface{}, ctx context.Co
return interceptor(ctx, in, info, handler)
}
func _NSRouteService_ListNSRoutesAfterVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListNSRoutesAfterVersionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSRouteServiceServer).ListNSRoutesAfterVersion(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSRouteService/ListNSRoutesAfterVersion",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSRouteServiceServer).ListNSRoutesAfterVersion(ctx, req.(*ListNSRoutesAfterVersionRequest))
}
return interceptor(ctx, in, info, handler)
}
var _NSRouteService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.NSRouteService",
HandlerType: (*NSRouteServiceServer)(nil),
@@ -1063,6 +1245,10 @@ var _NSRouteService_serviceDesc = grpc.ServiceDesc{
MethodName: "updateNSRouteOrders",
Handler: _NSRouteService_UpdateNSRouteOrders_Handler,
},
{
MethodName: "listNSRoutesAfterVersion",
Handler: _NSRouteService_ListNSRoutesAfterVersion_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_ns_route.proto",