增加根据IP名单代号查找IP名单ID的接口

This commit is contained in:
GoEdgeLab
2024-05-05 14:08:04 +08:00
parent cf508a2771
commit bd0d46f26c
4 changed files with 272 additions and 67 deletions

View File

@@ -4230,6 +4230,15 @@
"user"
],
"isDeprecated": false
},
{
"name": "findIPListIdWithCode",
"requestMessageName": "FindIPListIdWithCodeRequest",
"responseMessageName": "FindIPListIdWithCodeResponse",
"code": "rpc findIPListIdWithCode(FindIPListIdWithCodeRequest) returns (FindIPListIdWithCodeResponse);",
"doc": "根据IP名单代号获取IP名单ID",
"roles": [],
"isDeprecated": false
}
],
"filename": "service_ip_list.proto",
@@ -19387,6 +19396,16 @@
"code": "message FindIPLibraryFileResponse {\n\tIPLibraryFile ipLibraryFile = 1;\n}",
"doc": ""
},
{
"name": "FindIPListIdWithCodeRequest",
"code": "message FindIPListIdWithCodeRequest {\n\tstring code = 1; // IP名单代号\n}",
"doc": "根据IP名单代号获取IP名单ID"
},
{
"name": "FindIPListIdWithCodeResponse",
"code": "message FindIPListIdWithCodeResponse {\n\tint64 ipListId = 1; // IP名单ID\n}",
"doc": ""
},
{
"name": "FindLatestDeployFilesRequest",
"code": "message FindLatestDeployFilesRequest {\n\n}",

View File

@@ -870,6 +870,101 @@ func (x *FindServerIdWithIPListIdResponse) GetServerId() int64 {
return 0
}
// 根据IP名单代号获取IP名单ID
type FindIPListIdWithCodeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // IP名单代号
}
func (x *FindIPListIdWithCodeRequest) Reset() {
*x = FindIPListIdWithCodeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ip_list_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindIPListIdWithCodeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindIPListIdWithCodeRequest) ProtoMessage() {}
func (x *FindIPListIdWithCodeRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_ip_list_proto_msgTypes[15]
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 FindIPListIdWithCodeRequest.ProtoReflect.Descriptor instead.
func (*FindIPListIdWithCodeRequest) Descriptor() ([]byte, []int) {
return file_service_ip_list_proto_rawDescGZIP(), []int{15}
}
func (x *FindIPListIdWithCodeRequest) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
type FindIPListIdWithCodeResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
IpListId int64 `protobuf:"varint,1,opt,name=ipListId,proto3" json:"ipListId,omitempty"` // IP名单ID
}
func (x *FindIPListIdWithCodeResponse) Reset() {
*x = FindIPListIdWithCodeResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ip_list_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindIPListIdWithCodeResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindIPListIdWithCodeResponse) ProtoMessage() {}
func (x *FindIPListIdWithCodeResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_ip_list_proto_msgTypes[16]
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 FindIPListIdWithCodeResponse.ProtoReflect.Descriptor instead.
func (*FindIPListIdWithCodeResponse) Descriptor() ([]byte, []int) {
return file_service_ip_list_proto_rawDescGZIP(), []int{16}
}
func (x *FindIPListIdWithCodeResponse) GetIpListId() int64 {
if x != nil {
return x.IpListId
}
return 0
}
var File_service_ip_list_proto protoreflect.FileDescriptor
var file_service_ip_list_proto_rawDesc = []byte{
@@ -960,55 +1055,67 @@ var file_service_ip_list_proto_rawDesc = []byte{
0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x49, 0x64, 0x32, 0xed, 0x05, 0x0a, 0x0d, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e,
0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x21,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 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, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1d, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50,
0x4c, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70,
0x65, 0x72, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x1b, 0x46, 0x69, 0x6e, 0x64, 0x49, 0x50, 0x4c, 0x69,
0x73, 0x74, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x49,
0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x64, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x4c, 0x69, 0x73,
0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x70, 0x4c, 0x69, 0x73,
0x74, 0x49, 0x64, 0x32, 0xc8, 0x06, 0x0a, 0x0d, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49,
0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,
0x73, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x21, 0x2e,
0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 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, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1d, 0x2e, 0x70,
0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c,
0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c,
0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70,
0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 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, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x70,
0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49,
0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70,
0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49,
0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a,
0x1b, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69,
0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x12, 0x26, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c,
0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x73, 0x49, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a,
0x18, 0x66, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74,
0x68, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49,
0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64,
0x57, 0x69, 0x74, 0x68, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69,
0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x64,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x62,
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 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, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x70, 0x62,
0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62,
0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x1b,
0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73,
0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x12, 0x26, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69,
0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x73, 0x49, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18,
0x66, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68,
0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, 0x50,
0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57,
0x69, 0x74, 0x68, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x66, 0x69, 0x6e, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73,
0x74, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x57, 0x69, 0x74,
0x68, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x57, 0x69,
0x74, 0x68, 0x43, 0x6f, 0x64, 0x65, 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 (
@@ -1023,7 +1130,7 @@ func file_service_ip_list_proto_rawDescGZIP() []byte {
return file_service_ip_list_proto_rawDescData
}
var file_service_ip_list_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_service_ip_list_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_service_ip_list_proto_goTypes = []interface{}{
(*CreateIPListRequest)(nil), // 0: pb.CreateIPListRequest
(*CreateIPListResponse)(nil), // 1: pb.CreateIPListResponse
@@ -1040,14 +1147,16 @@ var file_service_ip_list_proto_goTypes = []interface{}{
(*FindEnabledIPListContainsIPResponse)(nil), // 12: pb.FindEnabledIPListContainsIPResponse
(*FindServerIdWithIPListIdRequest)(nil), // 13: pb.FindServerIdWithIPListIdRequest
(*FindServerIdWithIPListIdResponse)(nil), // 14: pb.FindServerIdWithIPListIdResponse
(*IPList)(nil), // 15: pb.IPList
(*RPCSuccess)(nil), // 16: pb.RPCSuccess
(*RPCCountResponse)(nil), // 17: pb.RPCCountResponse
(*FindIPListIdWithCodeRequest)(nil), // 15: pb.FindIPListIdWithCodeRequest
(*FindIPListIdWithCodeResponse)(nil), // 16: pb.FindIPListIdWithCodeResponse
(*IPList)(nil), // 17: pb.IPList
(*RPCSuccess)(nil), // 18: pb.RPCSuccess
(*RPCCountResponse)(nil), // 19: pb.RPCCountResponse
}
var file_service_ip_list_proto_depIdxs = []int32{
15, // 0: pb.FindEnabledIPListResponse.ipList:type_name -> pb.IPList
15, // 1: pb.ListEnabledIPListsResponse.ipLists:type_name -> pb.IPList
15, // 2: pb.FindEnabledIPListContainsIPResponse.ipLists:type_name -> pb.IPList
17, // 0: pb.FindEnabledIPListResponse.ipList:type_name -> pb.IPList
17, // 1: pb.ListEnabledIPListsResponse.ipLists:type_name -> pb.IPList
17, // 2: pb.FindEnabledIPListContainsIPResponse.ipLists:type_name -> pb.IPList
0, // 3: pb.IPListService.createIPList:input_type -> pb.CreateIPListRequest
2, // 4: pb.IPListService.updateIPList:input_type -> pb.UpdateIPListRequest
3, // 5: pb.IPListService.findEnabledIPList:input_type -> pb.FindEnabledIPListRequest
@@ -1057,17 +1166,19 @@ var file_service_ip_list_proto_depIdxs = []int32{
9, // 9: pb.IPListService.existsEnabledIPList:input_type -> pb.ExistsEnabledIPListRequest
11, // 10: pb.IPListService.findEnabledIPListContainsIP:input_type -> pb.FindEnabledIPListContainsIPRequest
13, // 11: pb.IPListService.findServerIdWithIPListId:input_type -> pb.FindServerIdWithIPListIdRequest
1, // 12: pb.IPListService.createIPList:output_type -> pb.CreateIPListResponse
16, // 13: pb.IPListService.updateIPList:output_type -> pb.RPCSuccess
4, // 14: pb.IPListService.findEnabledIPList:output_type -> pb.FindEnabledIPListResponse
17, // 15: pb.IPListService.countAllEnabledIPLists:output_type -> pb.RPCCountResponse
7, // 16: pb.IPListService.listEnabledIPLists:output_type -> pb.ListEnabledIPListsResponse
16, // 17: pb.IPListService.deleteIPList:output_type -> pb.RPCSuccess
10, // 18: pb.IPListService.existsEnabledIPList:output_type -> pb.ExistsEnabledIPListResponse
12, // 19: pb.IPListService.findEnabledIPListContainsIP:output_type -> pb.FindEnabledIPListContainsIPResponse
14, // 20: pb.IPListService.findServerIdWithIPListId:output_type -> pb.FindServerIdWithIPListIdResponse
12, // [12:21] is the sub-list for method output_type
3, // [3:12] is the sub-list for method input_type
15, // 12: pb.IPListService.findIPListIdWithCode:input_type -> pb.FindIPListIdWithCodeRequest
1, // 13: pb.IPListService.createIPList:output_type -> pb.CreateIPListResponse
18, // 14: pb.IPListService.updateIPList:output_type -> pb.RPCSuccess
4, // 15: pb.IPListService.findEnabledIPList:output_type -> pb.FindEnabledIPListResponse
19, // 16: pb.IPListService.countAllEnabledIPLists:output_type -> pb.RPCCountResponse
7, // 17: pb.IPListService.listEnabledIPLists:output_type -> pb.ListEnabledIPListsResponse
18, // 18: pb.IPListService.deleteIPList:output_type -> pb.RPCSuccess
10, // 19: pb.IPListService.existsEnabledIPList:output_type -> pb.ExistsEnabledIPListResponse
12, // 20: pb.IPListService.findEnabledIPListContainsIP:output_type -> pb.FindEnabledIPListContainsIPResponse
14, // 21: pb.IPListService.findServerIdWithIPListId:output_type -> pb.FindServerIdWithIPListIdResponse
16, // 22: pb.IPListService.findIPListIdWithCode:output_type -> pb.FindIPListIdWithCodeResponse
13, // [13:23] is the sub-list for method output_type
3, // [3:13] 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
@@ -1261,6 +1372,30 @@ func file_service_ip_list_proto_init() {
return nil
}
}
file_service_ip_list_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindIPListIdWithCodeRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_ip_list_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindIPListIdWithCodeResponse); 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{
@@ -1268,7 +1403,7 @@ func file_service_ip_list_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_ip_list_proto_rawDesc,
NumEnums: 0,
NumMessages: 15,
NumMessages: 17,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -28,6 +28,7 @@ const (
IPListService_ExistsEnabledIPList_FullMethodName = "/pb.IPListService/existsEnabledIPList"
IPListService_FindEnabledIPListContainsIP_FullMethodName = "/pb.IPListService/findEnabledIPListContainsIP"
IPListService_FindServerIdWithIPListId_FullMethodName = "/pb.IPListService/findServerIdWithIPListId"
IPListService_FindIPListIdWithCode_FullMethodName = "/pb.IPListService/findIPListIdWithCode"
)
// IPListServiceClient is the client API for IPListService service.
@@ -52,6 +53,8 @@ type IPListServiceClient interface {
FindEnabledIPListContainsIP(ctx context.Context, in *FindEnabledIPListContainsIPRequest, opts ...grpc.CallOption) (*FindEnabledIPListContainsIPResponse, error)
// 查找IP名单对应的网站ID
FindServerIdWithIPListId(ctx context.Context, in *FindServerIdWithIPListIdRequest, opts ...grpc.CallOption) (*FindServerIdWithIPListIdResponse, error)
// 根据IP名单代号获取IP名单ID
FindIPListIdWithCode(ctx context.Context, in *FindIPListIdWithCodeRequest, opts ...grpc.CallOption) (*FindIPListIdWithCodeResponse, error)
}
type iPListServiceClient struct {
@@ -143,6 +146,15 @@ func (c *iPListServiceClient) FindServerIdWithIPListId(ctx context.Context, in *
return out, nil
}
func (c *iPListServiceClient) FindIPListIdWithCode(ctx context.Context, in *FindIPListIdWithCodeRequest, opts ...grpc.CallOption) (*FindIPListIdWithCodeResponse, error) {
out := new(FindIPListIdWithCodeResponse)
err := c.cc.Invoke(ctx, IPListService_FindIPListIdWithCode_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// IPListServiceServer is the server API for IPListService service.
// All implementations should embed UnimplementedIPListServiceServer
// for forward compatibility
@@ -165,6 +177,8 @@ type IPListServiceServer interface {
FindEnabledIPListContainsIP(context.Context, *FindEnabledIPListContainsIPRequest) (*FindEnabledIPListContainsIPResponse, error)
// 查找IP名单对应的网站ID
FindServerIdWithIPListId(context.Context, *FindServerIdWithIPListIdRequest) (*FindServerIdWithIPListIdResponse, error)
// 根据IP名单代号获取IP名单ID
FindIPListIdWithCode(context.Context, *FindIPListIdWithCodeRequest) (*FindIPListIdWithCodeResponse, error)
}
// UnimplementedIPListServiceServer should be embedded to have forward compatible implementations.
@@ -198,6 +212,9 @@ func (UnimplementedIPListServiceServer) FindEnabledIPListContainsIP(context.Cont
func (UnimplementedIPListServiceServer) FindServerIdWithIPListId(context.Context, *FindServerIdWithIPListIdRequest) (*FindServerIdWithIPListIdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindServerIdWithIPListId not implemented")
}
func (UnimplementedIPListServiceServer) FindIPListIdWithCode(context.Context, *FindIPListIdWithCodeRequest) (*FindIPListIdWithCodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindIPListIdWithCode not implemented")
}
// UnsafeIPListServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to IPListServiceServer will
@@ -372,6 +389,24 @@ func _IPListService_FindServerIdWithIPListId_Handler(srv interface{}, ctx contex
return interceptor(ctx, in, info, handler)
}
func _IPListService_FindIPListIdWithCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindIPListIdWithCodeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IPListServiceServer).FindIPListIdWithCode(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: IPListService_FindIPListIdWithCode_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IPListServiceServer).FindIPListIdWithCode(ctx, req.(*FindIPListIdWithCodeRequest))
}
return interceptor(ctx, in, info, handler)
}
// IPListService_ServiceDesc is the grpc.ServiceDesc for IPListService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -415,6 +450,10 @@ var IPListService_ServiceDesc = grpc.ServiceDesc{
MethodName: "findServerIdWithIPListId",
Handler: _IPListService_FindServerIdWithIPListId_Handler,
},
{
MethodName: "findIPListIdWithCode",
Handler: _IPListService_FindIPListIdWithCode_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_ip_list.proto",

View File

@@ -34,6 +34,9 @@ service IPListService {
// 查找IP名单对应的网站ID
rpc findServerIdWithIPListId(FindServerIdWithIPListIdRequest) returns (FindServerIdWithIPListIdResponse);
// 根据IP名单代号获取IP名单ID
rpc findIPListIdWithCode(FindIPListIdWithCodeRequest) returns (FindIPListIdWithCodeResponse);
}
// 创建IP列表
@@ -120,4 +123,13 @@ message FindServerIdWithIPListIdRequest {
message FindServerIdWithIPListIdResponse {
int64 serverId = 1; // 网站ID如果是公共IP名单则对应的网站ID为0
}
// 根据IP名单代号获取IP名单ID
message FindIPListIdWithCodeRequest {
string code = 1; // IP名单代号
}
message FindIPListIdWithCodeResponse {
int64 ipListId = 1; // IP名单ID
}