mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 20:40:25 +08:00
安全设置增加允许访问的国家地区、省份、是否局域网访问
This commit is contained in:
@@ -566,11 +566,13 @@ type IPRegion struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Country string `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"`
|
||||
Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"`
|
||||
Province string `protobuf:"bytes,3,opt,name=province,proto3" json:"province,omitempty"`
|
||||
City string `protobuf:"bytes,4,opt,name=city,proto3" json:"city,omitempty"`
|
||||
Isp string `protobuf:"bytes,5,opt,name=isp,proto3" json:"isp,omitempty"`
|
||||
Country string `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"`
|
||||
Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"`
|
||||
Province string `protobuf:"bytes,3,opt,name=province,proto3" json:"province,omitempty"`
|
||||
City string `protobuf:"bytes,4,opt,name=city,proto3" json:"city,omitempty"`
|
||||
Isp string `protobuf:"bytes,5,opt,name=isp,proto3" json:"isp,omitempty"`
|
||||
CountryId int64 `protobuf:"varint,6,opt,name=countryId,proto3" json:"countryId,omitempty"`
|
||||
ProvinceId int64 `protobuf:"varint,7,opt,name=provinceId,proto3" json:"provinceId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *IPRegion) Reset() {
|
||||
@@ -640,6 +642,20 @@ func (x *IPRegion) GetIsp() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *IPRegion) GetCountryId() int64 {
|
||||
if x != nil {
|
||||
return x.CountryId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *IPRegion) GetProvinceId() int64 {
|
||||
if x != nil {
|
||||
return x.ProvinceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_service_ip_library_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_ip_library_proto_rawDesc = []byte{
|
||||
@@ -693,52 +709,56 @@ var file_service_ip_library_proto_rawDesc = []byte{
|
||||
0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x50, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x52, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x22, 0x7e, 0x0a, 0x08,
|
||||
0x49, 0x50, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x73,
|
||||
0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x73, 0x70, 0x32, 0xb4, 0x04, 0x0a,
|
||||
0x10, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x62,
|
||||
0x72, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69,
|
||||
0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a,
|
||||
0x1b, 0x66, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x50, 0x4c, 0x69, 0x62,
|
||||
0x72, 0x61, 0x72, 0x79, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x50, 0x4c, 0x69,
|
||||
0x62, 0x72, 0x61, 0x72, 0x79, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61,
|
||||
0x74, 0x65, 0x73, 0x74, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x57, 0x69, 0x74,
|
||||
0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a,
|
||||
0x14, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69,
|
||||
0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x22, 0xbc, 0x01, 0x0a,
|
||||
0x08, 0x49, 0x50, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x69,
|
||||
0x73, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x73, 0x70, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x32, 0xb4, 0x04, 0x0a, 0x10,
|
||||
0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x4a, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72,
|
||||
0x61, 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49,
|
||||
0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x62,
|
||||
0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x1b,
|
||||
0x66, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72,
|
||||
0x61, 0x72, 0x79, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x50, 0x4c, 0x69, 0x62,
|
||||
0x72, 0x61, 0x72, 0x79, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74,
|
||||
0x65, 0x73, 0x74, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x57, 0x69, 0x74, 0x68,
|
||||
0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14,
|
||||
0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x62,
|
||||
0x72, 0x61, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45,
|
||||
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x21, 0x66, 0x69, 0x6e,
|
||||
0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x62,
|
||||
0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x57, 0x69, 0x74,
|
||||
0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x54,
|
||||
0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x64,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x1a,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72,
|
||||
0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x6c, 0x6f,
|
||||
0x6f, 0x6b, 0x75, 0x70, 0x49, 0x50, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x50, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x6f,
|
||||
0x6b, 0x75, 0x70, 0x49, 0x50, 0x52, 0x65, 0x67, 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, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x21, 0x66, 0x69, 0x6e, 0x64,
|
||||
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72,
|
||||
0x61, 0x72, 0x69, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x64, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68,
|
||||
0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49,
|
||||
0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79,
|
||||
0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x64, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61,
|
||||
0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
|
||||
0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x6c, 0x6f, 0x6f,
|
||||
0x6b, 0x75, 0x70, 0x49, 0x50, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x49, 0x50, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b,
|
||||
0x75, 0x70, 0x49, 0x50, 0x52, 0x65, 0x67, 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 (
|
||||
|
||||
@@ -115,6 +115,101 @@ func (x *FindAllEnabledRegionCountriesResponse) GetCountries() []*RegionCountry
|
||||
return nil
|
||||
}
|
||||
|
||||
// 查找单个国家信息
|
||||
type FindEnabledRegionCountryRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
CountryId int64 `protobuf:"varint,1,opt,name=countryId,proto3" json:"countryId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryRequest) Reset() {
|
||||
*x = FindEnabledRegionCountryRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_country_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindEnabledRegionCountryRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FindEnabledRegionCountryRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_country_proto_msgTypes[2]
|
||||
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 FindEnabledRegionCountryRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FindEnabledRegionCountryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_country_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryRequest) GetCountryId() int64 {
|
||||
if x != nil {
|
||||
return x.CountryId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type FindEnabledRegionCountryResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Country *RegionCountry `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryResponse) Reset() {
|
||||
*x = FindEnabledRegionCountryResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_country_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindEnabledRegionCountryResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FindEnabledRegionCountryResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_country_proto_msgTypes[3]
|
||||
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 FindEnabledRegionCountryResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FindEnabledRegionCountryResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_country_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryResponse) GetCountry() *RegionCountry {
|
||||
if x != nil {
|
||||
return x.Country
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_service_region_country_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_region_country_proto_rawDesc = []byte{
|
||||
@@ -130,16 +225,32 @@ var file_service_region_country_proto_rawDesc = []byte{
|
||||
0x2f, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73,
|
||||
0x32, 0x8c, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x66, 0x69, 0x6e,
|
||||
0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c,
|
||||
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x22, 0x3f, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52,
|
||||
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49,
|
||||
0x64, 0x22, 0x4f, 0x0a, 0x20, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x32, 0xf3, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x66,
|
||||
0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67,
|
||||
0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
|
||||
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x23, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
|
||||
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 (
|
||||
@@ -154,21 +265,26 @@ func file_service_region_country_proto_rawDescGZIP() []byte {
|
||||
return file_service_region_country_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_region_country_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_service_region_country_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_service_region_country_proto_goTypes = []interface{}{
|
||||
(*FindAllEnabledRegionCountriesRequest)(nil), // 0: pb.FindAllEnabledRegionCountriesRequest
|
||||
(*FindAllEnabledRegionCountriesResponse)(nil), // 1: pb.FindAllEnabledRegionCountriesResponse
|
||||
(*RegionCountry)(nil), // 2: pb.RegionCountry
|
||||
(*FindEnabledRegionCountryRequest)(nil), // 2: pb.FindEnabledRegionCountryRequest
|
||||
(*FindEnabledRegionCountryResponse)(nil), // 3: pb.FindEnabledRegionCountryResponse
|
||||
(*RegionCountry)(nil), // 4: pb.RegionCountry
|
||||
}
|
||||
var file_service_region_country_proto_depIdxs = []int32{
|
||||
2, // 0: pb.FindAllEnabledRegionCountriesResponse.countries:type_name -> pb.RegionCountry
|
||||
0, // 1: pb.RegionCountryService.findAllEnabledRegionCountries:input_type -> pb.FindAllEnabledRegionCountriesRequest
|
||||
1, // 2: pb.RegionCountryService.findAllEnabledRegionCountries:output_type -> pb.FindAllEnabledRegionCountriesResponse
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
4, // 0: pb.FindAllEnabledRegionCountriesResponse.countries:type_name -> pb.RegionCountry
|
||||
4, // 1: pb.FindEnabledRegionCountryResponse.country:type_name -> pb.RegionCountry
|
||||
0, // 2: pb.RegionCountryService.findAllEnabledRegionCountries:input_type -> pb.FindAllEnabledRegionCountriesRequest
|
||||
2, // 3: pb.RegionCountryService.findEnabledRegionCountry:input_type -> pb.FindEnabledRegionCountryRequest
|
||||
1, // 4: pb.RegionCountryService.findAllEnabledRegionCountries:output_type -> pb.FindAllEnabledRegionCountriesResponse
|
||||
3, // 5: pb.RegionCountryService.findEnabledRegionCountry:output_type -> pb.FindEnabledRegionCountryResponse
|
||||
4, // [4:6] is the sub-list for method output_type
|
||||
2, // [2:4] 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
|
||||
}
|
||||
|
||||
func init() { file_service_region_country_proto_init() }
|
||||
@@ -202,6 +318,30 @@ func file_service_region_country_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_country_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindEnabledRegionCountryRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_country_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindEnabledRegionCountryResponse); 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{
|
||||
@@ -209,7 +349,7 @@ func file_service_region_country_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_region_country_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
@@ -237,6 +377,8 @@ const _ = grpc.SupportPackageIsVersion6
|
||||
type RegionCountryServiceClient interface {
|
||||
// 查找所有的国家列表
|
||||
FindAllEnabledRegionCountries(ctx context.Context, in *FindAllEnabledRegionCountriesRequest, opts ...grpc.CallOption) (*FindAllEnabledRegionCountriesResponse, error)
|
||||
// 查找单个国家信息
|
||||
FindEnabledRegionCountry(ctx context.Context, in *FindEnabledRegionCountryRequest, opts ...grpc.CallOption) (*FindEnabledRegionCountryResponse, error)
|
||||
}
|
||||
|
||||
type regionCountryServiceClient struct {
|
||||
@@ -256,10 +398,21 @@ func (c *regionCountryServiceClient) FindAllEnabledRegionCountries(ctx context.C
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *regionCountryServiceClient) FindEnabledRegionCountry(ctx context.Context, in *FindEnabledRegionCountryRequest, opts ...grpc.CallOption) (*FindEnabledRegionCountryResponse, error) {
|
||||
out := new(FindEnabledRegionCountryResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.RegionCountryService/findEnabledRegionCountry", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RegionCountryServiceServer is the server API for RegionCountryService service.
|
||||
type RegionCountryServiceServer interface {
|
||||
// 查找所有的国家列表
|
||||
FindAllEnabledRegionCountries(context.Context, *FindAllEnabledRegionCountriesRequest) (*FindAllEnabledRegionCountriesResponse, error)
|
||||
// 查找单个国家信息
|
||||
FindEnabledRegionCountry(context.Context, *FindEnabledRegionCountryRequest) (*FindEnabledRegionCountryResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRegionCountryServiceServer can be embedded to have forward compatible implementations.
|
||||
@@ -269,6 +422,9 @@ type UnimplementedRegionCountryServiceServer struct {
|
||||
func (*UnimplementedRegionCountryServiceServer) FindAllEnabledRegionCountries(context.Context, *FindAllEnabledRegionCountriesRequest) (*FindAllEnabledRegionCountriesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledRegionCountries not implemented")
|
||||
}
|
||||
func (*UnimplementedRegionCountryServiceServer) FindEnabledRegionCountry(context.Context, *FindEnabledRegionCountryRequest) (*FindEnabledRegionCountryResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledRegionCountry not implemented")
|
||||
}
|
||||
|
||||
func RegisterRegionCountryServiceServer(s *grpc.Server, srv RegionCountryServiceServer) {
|
||||
s.RegisterService(&_RegionCountryService_serviceDesc, srv)
|
||||
@@ -292,6 +448,24 @@ func _RegionCountryService_FindAllEnabledRegionCountries_Handler(srv interface{}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RegionCountryService_FindEnabledRegionCountry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindEnabledRegionCountryRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegionCountryServiceServer).FindEnabledRegionCountry(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.RegionCountryService/FindEnabledRegionCountry",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegionCountryServiceServer).FindEnabledRegionCountry(ctx, req.(*FindEnabledRegionCountryRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RegionCountryService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.RegionCountryService",
|
||||
HandlerType: (*RegionCountryServiceServer)(nil),
|
||||
@@ -300,6 +474,10 @@ var _RegionCountryService_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "findAllEnabledRegionCountries",
|
||||
Handler: _RegionCountryService_FindAllEnabledRegionCountries_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findEnabledRegionCountry",
|
||||
Handler: _RegionCountryService_FindEnabledRegionCountry_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_region_country.proto",
|
||||
|
||||
@@ -124,6 +124,101 @@ func (x *FindAllEnabledRegionProvincesWithCountryIdResponse) GetProvinces() []*R
|
||||
return nil
|
||||
}
|
||||
|
||||
// 查找单个省份信息
|
||||
type FindEnabledRegionProvinceRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ProvinceId int64 `protobuf:"varint,1,opt,name=provinceId,proto3" json:"provinceId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceRequest) Reset() {
|
||||
*x = FindEnabledRegionProvinceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_province_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindEnabledRegionProvinceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FindEnabledRegionProvinceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_province_proto_msgTypes[2]
|
||||
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 FindEnabledRegionProvinceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FindEnabledRegionProvinceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_province_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceRequest) GetProvinceId() int64 {
|
||||
if x != nil {
|
||||
return x.ProvinceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type FindEnabledRegionProvinceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Province *RegionProvince `protobuf:"bytes,1,opt,name=province,proto3" json:"province,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceResponse) Reset() {
|
||||
*x = FindEnabledRegionProvinceResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_province_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindEnabledRegionProvinceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FindEnabledRegionProvinceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_province_proto_msgTypes[3]
|
||||
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 FindEnabledRegionProvinceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FindEnabledRegionProvinceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_province_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceResponse) GetProvince() *RegionProvince {
|
||||
if x != nil {
|
||||
return x.Province
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_service_region_province_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_region_province_proto_rawDesc = []byte{
|
||||
@@ -142,20 +237,36 @@ var file_service_region_province_proto_rawDesc = []byte{
|
||||
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x09, 0x70, 0x72, 0x6f,
|
||||
0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65,
|
||||
0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x32, 0xb5, 0x01, 0x0a, 0x15,
|
||||
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x2a, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c,
|
||||
0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x42, 0x0a, 0x20, 0x46,
|
||||
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22,
|
||||
0x53, 0x0a, 0x21, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76,
|
||||
0x69, 0x6e, 0x63, 0x65, 0x32, 0x9f, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9b,
|
||||
0x01, 0x0a, 0x2a, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73,
|
||||
0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12, 0x35, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73,
|
||||
0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c,
|
||||
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x49, 0x64, 0x12, 0x35, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c,
|
||||
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52,
|
||||
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69,
|
||||
0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 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,
|
||||
0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19,
|
||||
0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46,
|
||||
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 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 (
|
||||
@@ -170,21 +281,26 @@ func file_service_region_province_proto_rawDescGZIP() []byte {
|
||||
return file_service_region_province_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_region_province_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_service_region_province_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_service_region_province_proto_goTypes = []interface{}{
|
||||
(*FindAllEnabledRegionProvincesWithCountryIdRequest)(nil), // 0: pb.FindAllEnabledRegionProvincesWithCountryIdRequest
|
||||
(*FindAllEnabledRegionProvincesWithCountryIdResponse)(nil), // 1: pb.FindAllEnabledRegionProvincesWithCountryIdResponse
|
||||
(*RegionProvince)(nil), // 2: pb.RegionProvince
|
||||
(*FindEnabledRegionProvinceRequest)(nil), // 2: pb.FindEnabledRegionProvinceRequest
|
||||
(*FindEnabledRegionProvinceResponse)(nil), // 3: pb.FindEnabledRegionProvinceResponse
|
||||
(*RegionProvince)(nil), // 4: pb.RegionProvince
|
||||
}
|
||||
var file_service_region_province_proto_depIdxs = []int32{
|
||||
2, // 0: pb.FindAllEnabledRegionProvincesWithCountryIdResponse.provinces:type_name -> pb.RegionProvince
|
||||
0, // 1: pb.RegionProvinceService.findAllEnabledRegionProvincesWithCountryId:input_type -> pb.FindAllEnabledRegionProvincesWithCountryIdRequest
|
||||
1, // 2: pb.RegionProvinceService.findAllEnabledRegionProvincesWithCountryId:output_type -> pb.FindAllEnabledRegionProvincesWithCountryIdResponse
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
4, // 0: pb.FindAllEnabledRegionProvincesWithCountryIdResponse.provinces:type_name -> pb.RegionProvince
|
||||
4, // 1: pb.FindEnabledRegionProvinceResponse.province:type_name -> pb.RegionProvince
|
||||
0, // 2: pb.RegionProvinceService.findAllEnabledRegionProvincesWithCountryId:input_type -> pb.FindAllEnabledRegionProvincesWithCountryIdRequest
|
||||
2, // 3: pb.RegionProvinceService.findEnabledRegionProvince:input_type -> pb.FindEnabledRegionProvinceRequest
|
||||
1, // 4: pb.RegionProvinceService.findAllEnabledRegionProvincesWithCountryId:output_type -> pb.FindAllEnabledRegionProvincesWithCountryIdResponse
|
||||
3, // 5: pb.RegionProvinceService.findEnabledRegionProvince:output_type -> pb.FindEnabledRegionProvinceResponse
|
||||
4, // [4:6] is the sub-list for method output_type
|
||||
2, // [2:4] 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
|
||||
}
|
||||
|
||||
func init() { file_service_region_province_proto_init() }
|
||||
@@ -218,6 +334,30 @@ func file_service_region_province_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_province_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindEnabledRegionProvinceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_province_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindEnabledRegionProvinceResponse); 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{
|
||||
@@ -225,7 +365,7 @@ func file_service_region_province_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_region_province_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
@@ -253,6 +393,8 @@ const _ = grpc.SupportPackageIsVersion6
|
||||
type RegionProvinceServiceClient interface {
|
||||
// 查找所有省份
|
||||
FindAllEnabledRegionProvincesWithCountryId(ctx context.Context, in *FindAllEnabledRegionProvincesWithCountryIdRequest, opts ...grpc.CallOption) (*FindAllEnabledRegionProvincesWithCountryIdResponse, error)
|
||||
// 查找单个省份信息
|
||||
FindEnabledRegionProvince(ctx context.Context, in *FindEnabledRegionProvinceRequest, opts ...grpc.CallOption) (*FindEnabledRegionProvinceResponse, error)
|
||||
}
|
||||
|
||||
type regionProvinceServiceClient struct {
|
||||
@@ -272,10 +414,21 @@ func (c *regionProvinceServiceClient) FindAllEnabledRegionProvincesWithCountryId
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *regionProvinceServiceClient) FindEnabledRegionProvince(ctx context.Context, in *FindEnabledRegionProvinceRequest, opts ...grpc.CallOption) (*FindEnabledRegionProvinceResponse, error) {
|
||||
out := new(FindEnabledRegionProvinceResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.RegionProvinceService/findEnabledRegionProvince", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RegionProvinceServiceServer is the server API for RegionProvinceService service.
|
||||
type RegionProvinceServiceServer interface {
|
||||
// 查找所有省份
|
||||
FindAllEnabledRegionProvincesWithCountryId(context.Context, *FindAllEnabledRegionProvincesWithCountryIdRequest) (*FindAllEnabledRegionProvincesWithCountryIdResponse, error)
|
||||
// 查找单个省份信息
|
||||
FindEnabledRegionProvince(context.Context, *FindEnabledRegionProvinceRequest) (*FindEnabledRegionProvinceResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRegionProvinceServiceServer can be embedded to have forward compatible implementations.
|
||||
@@ -285,6 +438,9 @@ type UnimplementedRegionProvinceServiceServer struct {
|
||||
func (*UnimplementedRegionProvinceServiceServer) FindAllEnabledRegionProvincesWithCountryId(context.Context, *FindAllEnabledRegionProvincesWithCountryIdRequest) (*FindAllEnabledRegionProvincesWithCountryIdResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledRegionProvincesWithCountryId not implemented")
|
||||
}
|
||||
func (*UnimplementedRegionProvinceServiceServer) FindEnabledRegionProvince(context.Context, *FindEnabledRegionProvinceRequest) (*FindEnabledRegionProvinceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledRegionProvince not implemented")
|
||||
}
|
||||
|
||||
func RegisterRegionProvinceServiceServer(s *grpc.Server, srv RegionProvinceServiceServer) {
|
||||
s.RegisterService(&_RegionProvinceService_serviceDesc, srv)
|
||||
@@ -308,6 +464,24 @@ func _RegionProvinceService_FindAllEnabledRegionProvincesWithCountryId_Handler(s
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RegionProvinceService_FindEnabledRegionProvince_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindEnabledRegionProvinceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegionProvinceServiceServer).FindEnabledRegionProvince(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.RegionProvinceService/FindEnabledRegionProvince",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegionProvinceServiceServer).FindEnabledRegionProvince(ctx, req.(*FindEnabledRegionProvinceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RegionProvinceService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.RegionProvinceService",
|
||||
HandlerType: (*RegionProvinceServiceServer)(nil),
|
||||
@@ -316,6 +490,10 @@ var _RegionProvinceService_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "findAllEnabledRegionProvincesWithCountryId",
|
||||
Handler: _RegionProvinceService_FindAllEnabledRegionProvincesWithCountryId_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findEnabledRegionProvince",
|
||||
Handler: _RegionProvinceService_FindEnabledRegionProvince_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_region_province.proto",
|
||||
|
||||
@@ -85,4 +85,6 @@ message IPRegion {
|
||||
string province = 3;
|
||||
string city = 4;
|
||||
string isp = 5;
|
||||
int64 countryId = 6;
|
||||
int64 provinceId = 7;
|
||||
}
|
||||
@@ -9,6 +9,9 @@ import "model_region_country.proto";
|
||||
service RegionCountryService {
|
||||
// 查找所有的国家列表
|
||||
rpc findAllEnabledRegionCountries (FindAllEnabledRegionCountriesRequest) returns (FindAllEnabledRegionCountriesResponse);
|
||||
|
||||
// 查找单个国家信息
|
||||
rpc findEnabledRegionCountry (FindEnabledRegionCountryRequest) returns (FindEnabledRegionCountryResponse);
|
||||
}
|
||||
|
||||
// 查找所有的国家列表
|
||||
@@ -18,4 +21,13 @@ message FindAllEnabledRegionCountriesRequest {
|
||||
|
||||
message FindAllEnabledRegionCountriesResponse {
|
||||
repeated RegionCountry countries = 1;
|
||||
}
|
||||
|
||||
// 查找单个国家信息
|
||||
message FindEnabledRegionCountryRequest {
|
||||
int64 countryId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledRegionCountryResponse {
|
||||
RegionCountry country = 1;
|
||||
}
|
||||
@@ -9,6 +9,9 @@ import "model_region_province.proto";
|
||||
service RegionProvinceService {
|
||||
// 查找所有省份
|
||||
rpc findAllEnabledRegionProvincesWithCountryId (FindAllEnabledRegionProvincesWithCountryIdRequest) returns (FindAllEnabledRegionProvincesWithCountryIdResponse);
|
||||
|
||||
// 查找单个省份信息
|
||||
rpc findEnabledRegionProvince (FindEnabledRegionProvinceRequest) returns (FindEnabledRegionProvinceResponse);
|
||||
}
|
||||
|
||||
// 查找所有省份
|
||||
@@ -19,3 +22,12 @@ message FindAllEnabledRegionProvincesWithCountryIdRequest {
|
||||
message FindAllEnabledRegionProvincesWithCountryIdResponse {
|
||||
repeated RegionProvince provinces = 1;
|
||||
}
|
||||
|
||||
// 查找单个省份信息
|
||||
message FindEnabledRegionProvinceRequest {
|
||||
int64 provinceId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledRegionProvinceResponse {
|
||||
RegionProvince province = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user