mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 20:40:25 +08:00
增加城市/ISP查询接口;WAF增加国家/地区、省份、城市、ISP等参数
This commit is contained in:
@@ -30,9 +30,10 @@ type RegionCity struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Codes []string `protobuf:"bytes,3,rep,name=codes,proto3" json:"codes,omitempty"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Codes []string `protobuf:"bytes,3,rep,name=codes,proto3" json:"codes,omitempty"`
|
||||
RegionProvinceId int64 `protobuf:"varint,4,opt,name=regionProvinceId,proto3" json:"regionProvinceId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RegionCity) Reset() {
|
||||
@@ -88,17 +89,27 @@ func (x *RegionCity) GetCodes() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RegionCity) GetRegionProvinceId() int64 {
|
||||
if x != nil {
|
||||
return x.RegionProvinceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_region_city_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_region_city_proto_rawDesc = []byte{
|
||||
0x0a, 0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72,
|
||||
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x02, 0x70, 0x62, 0x22, 0x46, 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69,
|
||||
0x12, 0x02, 0x70, 0x62, 0x22, 0x72, 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69,
|
||||
0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18,
|
||||
0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10,
|
||||
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
483
pkg/rpc/pb/service_region_city.pb.go
Normal file
483
pkg/rpc/pb/service_region_city.pb.go
Normal file
@@ -0,0 +1,483 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.12.3
|
||||
// source: service_region_city.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 查找所有城市
|
||||
type FindAllEnabledRegionCitiesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionCitiesRequest) Reset() {
|
||||
*x = FindAllEnabledRegionCitiesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_city_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionCitiesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindAllEnabledRegionCitiesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FindAllEnabledRegionCitiesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_city_proto_msgTypes[0]
|
||||
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 FindAllEnabledRegionCitiesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FindAllEnabledRegionCitiesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_city_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type FindAllEnabledRegionCitiesResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RegionCities []*RegionCity `protobuf:"bytes,1,rep,name=regionCities,proto3" json:"regionCities,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionCitiesResponse) Reset() {
|
||||
*x = FindAllEnabledRegionCitiesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_city_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionCitiesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindAllEnabledRegionCitiesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FindAllEnabledRegionCitiesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_city_proto_msgTypes[1]
|
||||
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 FindAllEnabledRegionCitiesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FindAllEnabledRegionCitiesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_city_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionCitiesResponse) GetRegionCities() []*RegionCity {
|
||||
if x != nil {
|
||||
return x.RegionCities
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 查找单个城市信息
|
||||
type FindEnabledRegionCityRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RegionCityId int64 `protobuf:"varint,1,opt,name=regionCityId,proto3" json:"regionCityId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCityRequest) Reset() {
|
||||
*x = FindEnabledRegionCityRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_city_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCityRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindEnabledRegionCityRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FindEnabledRegionCityRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_city_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 FindEnabledRegionCityRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FindEnabledRegionCityRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_city_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCityRequest) GetRegionCityId() int64 {
|
||||
if x != nil {
|
||||
return x.RegionCityId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type FindEnabledRegionCityResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RegionCity *RegionCity `protobuf:"bytes,1,opt,name=regionCity,proto3" json:"regionCity,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCityResponse) Reset() {
|
||||
*x = FindEnabledRegionCityResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_city_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCityResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindEnabledRegionCityResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FindEnabledRegionCityResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_city_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 FindEnabledRegionCityResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FindEnabledRegionCityResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_city_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCityResponse) GetRegionCity() *RegionCity {
|
||||
if x != nil {
|
||||
return x.RegionCity
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_service_region_city_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_region_city_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x5f, 0x63, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a,
|
||||
0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||
0x23, 0x0a, 0x21, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x22, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45,
|
||||
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x69,
|
||||
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0c, 0x72, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x79,
|
||||
0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x42,
|
||||
0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67,
|
||||
0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x79,
|
||||
0x49, 0x64, 0x22, 0x4f, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74,
|
||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67,
|
||||
0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43,
|
||||
0x69, 0x74, 0x79, 0x32, 0xde, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69,
|
||||
0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x1a, 0x66, 0x69, 0x6e,
|
||||
0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x43, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 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, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26,
|
||||
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, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x12,
|
||||
0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x69, 0x74, 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 (
|
||||
file_service_region_city_proto_rawDescOnce sync.Once
|
||||
file_service_region_city_proto_rawDescData = file_service_region_city_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_service_region_city_proto_rawDescGZIP() []byte {
|
||||
file_service_region_city_proto_rawDescOnce.Do(func() {
|
||||
file_service_region_city_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_region_city_proto_rawDescData)
|
||||
})
|
||||
return file_service_region_city_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_region_city_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_service_region_city_proto_goTypes = []interface{}{
|
||||
(*FindAllEnabledRegionCitiesRequest)(nil), // 0: pb.FindAllEnabledRegionCitiesRequest
|
||||
(*FindAllEnabledRegionCitiesResponse)(nil), // 1: pb.FindAllEnabledRegionCitiesResponse
|
||||
(*FindEnabledRegionCityRequest)(nil), // 2: pb.FindEnabledRegionCityRequest
|
||||
(*FindEnabledRegionCityResponse)(nil), // 3: pb.FindEnabledRegionCityResponse
|
||||
(*RegionCity)(nil), // 4: pb.RegionCity
|
||||
}
|
||||
var file_service_region_city_proto_depIdxs = []int32{
|
||||
4, // 0: pb.FindAllEnabledRegionCitiesResponse.regionCities:type_name -> pb.RegionCity
|
||||
4, // 1: pb.FindEnabledRegionCityResponse.regionCity:type_name -> pb.RegionCity
|
||||
0, // 2: pb.RegionCityService.findAllEnabledRegionCities:input_type -> pb.FindAllEnabledRegionCitiesRequest
|
||||
2, // 3: pb.RegionCityService.findEnabledRegionCity:input_type -> pb.FindEnabledRegionCityRequest
|
||||
1, // 4: pb.RegionCityService.findAllEnabledRegionCities:output_type -> pb.FindAllEnabledRegionCitiesResponse
|
||||
3, // 5: pb.RegionCityService.findEnabledRegionCity:output_type -> pb.FindEnabledRegionCityResponse
|
||||
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_city_proto_init() }
|
||||
func file_service_region_city_proto_init() {
|
||||
if File_service_region_city_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_region_city_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_service_region_city_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindAllEnabledRegionCitiesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_city_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindAllEnabledRegionCitiesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_city_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindEnabledRegionCityRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_city_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindEnabledRegionCityResponse); 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{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_region_city_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_service_region_city_proto_goTypes,
|
||||
DependencyIndexes: file_service_region_city_proto_depIdxs,
|
||||
MessageInfos: file_service_region_city_proto_msgTypes,
|
||||
}.Build()
|
||||
File_service_region_city_proto = out.File
|
||||
file_service_region_city_proto_rawDesc = nil
|
||||
file_service_region_city_proto_goTypes = nil
|
||||
file_service_region_city_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// RegionCityServiceClient is the client API for RegionCityService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type RegionCityServiceClient interface {
|
||||
// 查找所有城市
|
||||
FindAllEnabledRegionCities(ctx context.Context, in *FindAllEnabledRegionCitiesRequest, opts ...grpc.CallOption) (*FindAllEnabledRegionCitiesResponse, error)
|
||||
// 查找单个城市信息
|
||||
FindEnabledRegionCity(ctx context.Context, in *FindEnabledRegionCityRequest, opts ...grpc.CallOption) (*FindEnabledRegionCityResponse, error)
|
||||
}
|
||||
|
||||
type regionCityServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRegionCityServiceClient(cc grpc.ClientConnInterface) RegionCityServiceClient {
|
||||
return ®ionCityServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *regionCityServiceClient) FindAllEnabledRegionCities(ctx context.Context, in *FindAllEnabledRegionCitiesRequest, opts ...grpc.CallOption) (*FindAllEnabledRegionCitiesResponse, error) {
|
||||
out := new(FindAllEnabledRegionCitiesResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.RegionCityService/findAllEnabledRegionCities", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *regionCityServiceClient) FindEnabledRegionCity(ctx context.Context, in *FindEnabledRegionCityRequest, opts ...grpc.CallOption) (*FindEnabledRegionCityResponse, error) {
|
||||
out := new(FindEnabledRegionCityResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.RegionCityService/findEnabledRegionCity", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RegionCityServiceServer is the server API for RegionCityService service.
|
||||
type RegionCityServiceServer interface {
|
||||
// 查找所有城市
|
||||
FindAllEnabledRegionCities(context.Context, *FindAllEnabledRegionCitiesRequest) (*FindAllEnabledRegionCitiesResponse, error)
|
||||
// 查找单个城市信息
|
||||
FindEnabledRegionCity(context.Context, *FindEnabledRegionCityRequest) (*FindEnabledRegionCityResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRegionCityServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedRegionCityServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRegionCityServiceServer) FindAllEnabledRegionCities(context.Context, *FindAllEnabledRegionCitiesRequest) (*FindAllEnabledRegionCitiesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledRegionCities not implemented")
|
||||
}
|
||||
func (*UnimplementedRegionCityServiceServer) FindEnabledRegionCity(context.Context, *FindEnabledRegionCityRequest) (*FindEnabledRegionCityResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledRegionCity not implemented")
|
||||
}
|
||||
|
||||
func RegisterRegionCityServiceServer(s *grpc.Server, srv RegionCityServiceServer) {
|
||||
s.RegisterService(&_RegionCityService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _RegionCityService_FindAllEnabledRegionCities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindAllEnabledRegionCitiesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegionCityServiceServer).FindAllEnabledRegionCities(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.RegionCityService/FindAllEnabledRegionCities",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegionCityServiceServer).FindAllEnabledRegionCities(ctx, req.(*FindAllEnabledRegionCitiesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RegionCityService_FindEnabledRegionCity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindEnabledRegionCityRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegionCityServiceServer).FindEnabledRegionCity(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.RegionCityService/FindEnabledRegionCity",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegionCityServiceServer).FindEnabledRegionCity(ctx, req.(*FindEnabledRegionCityRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RegionCityService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.RegionCityService",
|
||||
HandlerType: (*RegionCityServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "findAllEnabledRegionCities",
|
||||
Handler: _RegionCityService_FindAllEnabledRegionCities_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findEnabledRegionCity",
|
||||
Handler: _RegionCityService_FindEnabledRegionCity_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_region_city.proto",
|
||||
}
|
||||
@@ -73,7 +73,7 @@ type FindAllEnabledRegionCountriesResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Countries []*RegionCountry `protobuf:"bytes,1,rep,name=countries,proto3" json:"countries,omitempty"`
|
||||
RegionCountries []*RegionCountry `protobuf:"bytes,1,rep,name=regionCountries,proto3" json:"regionCountries,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionCountriesResponse) Reset() {
|
||||
@@ -108,9 +108,9 @@ func (*FindAllEnabledRegionCountriesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_country_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionCountriesResponse) GetCountries() []*RegionCountry {
|
||||
func (x *FindAllEnabledRegionCountriesResponse) GetRegionCountries() []*RegionCountry {
|
||||
if x != nil {
|
||||
return x.Countries
|
||||
return x.RegionCountries
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -121,7 +121,7 @@ type FindEnabledRegionCountryRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
CountryId int64 `protobuf:"varint,1,opt,name=countryId,proto3" json:"countryId,omitempty"`
|
||||
RegionCountryId int64 `protobuf:"varint,1,opt,name=regionCountryId,proto3" json:"regionCountryId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryRequest) Reset() {
|
||||
@@ -156,9 +156,9 @@ func (*FindEnabledRegionCountryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_country_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryRequest) GetCountryId() int64 {
|
||||
func (x *FindEnabledRegionCountryRequest) GetRegionCountryId() int64 {
|
||||
if x != nil {
|
||||
return x.CountryId
|
||||
return x.RegionCountryId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -168,7 +168,7 @@ type FindEnabledRegionCountryResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Country *RegionCountry `protobuf:"bytes,1,opt,name=country,proto3" json:"country,omitempty"`
|
||||
RegionCountry *RegionCountry `protobuf:"bytes,1,opt,name=regionCountry,proto3" json:"regionCountry,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryResponse) Reset() {
|
||||
@@ -203,9 +203,9 @@ func (*FindEnabledRegionCountryResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_country_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionCountryResponse) GetCountry() *RegionCountry {
|
||||
func (x *FindEnabledRegionCountryResponse) GetRegionCountry() *RegionCountry {
|
||||
if x != nil {
|
||||
return x.Country
|
||||
return x.RegionCountry
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -219,38 +219,41 @@ var file_service_region_country_proto_rawDesc = []byte{
|
||||
0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x26, 0x0a, 0x24, 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, 0x22, 0x58, 0x0a,
|
||||
0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x64, 0x0a,
|
||||
0x25, 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, 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, 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,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x43, 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, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72,
|
||||
0x69, 0x65, 0x73, 0x22, 0x4b, 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, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64,
|
||||
0x22, 0x5b, 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, 0x37, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 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, 0x0d,
|
||||
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 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, 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,
|
||||
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 (
|
||||
@@ -274,8 +277,8 @@ var file_service_region_country_proto_goTypes = []interface{}{
|
||||
(*RegionCountry)(nil), // 4: pb.RegionCountry
|
||||
}
|
||||
var file_service_region_country_proto_depIdxs = []int32{
|
||||
4, // 0: pb.FindAllEnabledRegionCountriesResponse.countries:type_name -> pb.RegionCountry
|
||||
4, // 1: pb.FindEnabledRegionCountryResponse.country:type_name -> pb.RegionCountry
|
||||
4, // 0: pb.FindAllEnabledRegionCountriesResponse.regionCountries:type_name -> pb.RegionCountry
|
||||
4, // 1: pb.FindEnabledRegionCountryResponse.regionCountry: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
|
||||
|
||||
488
pkg/rpc/pb/service_region_provider.pb.go
Normal file
488
pkg/rpc/pb/service_region_provider.pb.go
Normal file
@@ -0,0 +1,488 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.12.3
|
||||
// source: service_region_provider.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 查找所有ISP
|
||||
type FindAllEnabledRegionProvidersRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionProvidersRequest) Reset() {
|
||||
*x = FindAllEnabledRegionProvidersRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_provider_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionProvidersRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindAllEnabledRegionProvidersRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FindAllEnabledRegionProvidersRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_provider_proto_msgTypes[0]
|
||||
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 FindAllEnabledRegionProvidersRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FindAllEnabledRegionProvidersRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_provider_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type FindAllEnabledRegionProvidersResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RegionProviders []*RegionProvider `protobuf:"bytes,1,rep,name=regionProviders,proto3" json:"regionProviders,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionProvidersResponse) Reset() {
|
||||
*x = FindAllEnabledRegionProvidersResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_provider_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionProvidersResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindAllEnabledRegionProvidersResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FindAllEnabledRegionProvidersResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_provider_proto_msgTypes[1]
|
||||
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 FindAllEnabledRegionProvidersResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FindAllEnabledRegionProvidersResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_provider_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionProvidersResponse) GetRegionProviders() []*RegionProvider {
|
||||
if x != nil {
|
||||
return x.RegionProviders
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 查找单个ISP信息
|
||||
type FindEnabledRegionProviderRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RegionProviderId int64 `protobuf:"varint,1,opt,name=regionProviderId,proto3" json:"regionProviderId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProviderRequest) Reset() {
|
||||
*x = FindEnabledRegionProviderRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_provider_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProviderRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindEnabledRegionProviderRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FindEnabledRegionProviderRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_provider_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 FindEnabledRegionProviderRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FindEnabledRegionProviderRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_provider_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProviderRequest) GetRegionProviderId() int64 {
|
||||
if x != nil {
|
||||
return x.RegionProviderId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type FindEnabledRegionProviderResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RegionProvider *RegionProvider `protobuf:"bytes,1,opt,name=regionProvider,proto3" json:"regionProvider,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProviderResponse) Reset() {
|
||||
*x = FindEnabledRegionProviderResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_region_provider_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProviderResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindEnabledRegionProviderResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FindEnabledRegionProviderResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_region_provider_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 FindEnabledRegionProviderResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FindEnabledRegionProviderResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_provider_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProviderResponse) GetRegionProvider() *RegionProvider {
|
||||
if x != nil {
|
||||
return x.RegionProvider
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_service_region_provider_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_region_provider_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x02, 0x70, 0x62, 0x1a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x26, 0x0a, 0x24, 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, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
|
||||
0x65, 0x0a, 0x25, 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, 0x64, 0x65, 0x72, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
|
||||
0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
|
||||
0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0x4e, 0x0a, 0x20, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69,
|
||||
0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76,
|
||||
0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x21, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69,
|
||||
0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0e, 0x72,
|
||||
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x32, 0xf7, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 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, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 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, 0x50, 0x72, 0x6f, 0x76,
|
||||
0x69, 0x64, 0x65, 0x72, 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, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 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, 0x64, 0x65, 0x72, 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,
|
||||
0x64, 0x65, 0x72, 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, 0x64, 0x65, 0x72, 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 (
|
||||
file_service_region_provider_proto_rawDescOnce sync.Once
|
||||
file_service_region_provider_proto_rawDescData = file_service_region_provider_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_service_region_provider_proto_rawDescGZIP() []byte {
|
||||
file_service_region_provider_proto_rawDescOnce.Do(func() {
|
||||
file_service_region_provider_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_region_provider_proto_rawDescData)
|
||||
})
|
||||
return file_service_region_provider_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_region_provider_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_service_region_provider_proto_goTypes = []interface{}{
|
||||
(*FindAllEnabledRegionProvidersRequest)(nil), // 0: pb.FindAllEnabledRegionProvidersRequest
|
||||
(*FindAllEnabledRegionProvidersResponse)(nil), // 1: pb.FindAllEnabledRegionProvidersResponse
|
||||
(*FindEnabledRegionProviderRequest)(nil), // 2: pb.FindEnabledRegionProviderRequest
|
||||
(*FindEnabledRegionProviderResponse)(nil), // 3: pb.FindEnabledRegionProviderResponse
|
||||
(*RegionProvider)(nil), // 4: pb.RegionProvider
|
||||
}
|
||||
var file_service_region_provider_proto_depIdxs = []int32{
|
||||
4, // 0: pb.FindAllEnabledRegionProvidersResponse.regionProviders:type_name -> pb.RegionProvider
|
||||
4, // 1: pb.FindEnabledRegionProviderResponse.regionProvider:type_name -> pb.RegionProvider
|
||||
0, // 2: pb.RegionProviderService.findAllEnabledRegionProviders:input_type -> pb.FindAllEnabledRegionProvidersRequest
|
||||
2, // 3: pb.RegionProviderService.findEnabledRegionProvider:input_type -> pb.FindEnabledRegionProviderRequest
|
||||
1, // 4: pb.RegionProviderService.findAllEnabledRegionProviders:output_type -> pb.FindAllEnabledRegionProvidersResponse
|
||||
3, // 5: pb.RegionProviderService.findEnabledRegionProvider:output_type -> pb.FindEnabledRegionProviderResponse
|
||||
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_provider_proto_init() }
|
||||
func file_service_region_provider_proto_init() {
|
||||
if File_service_region_provider_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_region_provider_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_service_region_provider_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindAllEnabledRegionProvidersRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_provider_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindAllEnabledRegionProvidersResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_provider_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindEnabledRegionProviderRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_region_provider_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindEnabledRegionProviderResponse); 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{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_region_provider_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_service_region_provider_proto_goTypes,
|
||||
DependencyIndexes: file_service_region_provider_proto_depIdxs,
|
||||
MessageInfos: file_service_region_provider_proto_msgTypes,
|
||||
}.Build()
|
||||
File_service_region_provider_proto = out.File
|
||||
file_service_region_provider_proto_rawDesc = nil
|
||||
file_service_region_provider_proto_goTypes = nil
|
||||
file_service_region_provider_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// RegionProviderServiceClient is the client API for RegionProviderService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type RegionProviderServiceClient interface {
|
||||
// 查找所有ISP
|
||||
FindAllEnabledRegionProviders(ctx context.Context, in *FindAllEnabledRegionProvidersRequest, opts ...grpc.CallOption) (*FindAllEnabledRegionProvidersResponse, error)
|
||||
// 查找单个ISP信息
|
||||
FindEnabledRegionProvider(ctx context.Context, in *FindEnabledRegionProviderRequest, opts ...grpc.CallOption) (*FindEnabledRegionProviderResponse, error)
|
||||
}
|
||||
|
||||
type regionProviderServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRegionProviderServiceClient(cc grpc.ClientConnInterface) RegionProviderServiceClient {
|
||||
return ®ionProviderServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *regionProviderServiceClient) FindAllEnabledRegionProviders(ctx context.Context, in *FindAllEnabledRegionProvidersRequest, opts ...grpc.CallOption) (*FindAllEnabledRegionProvidersResponse, error) {
|
||||
out := new(FindAllEnabledRegionProvidersResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.RegionProviderService/findAllEnabledRegionProviders", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *regionProviderServiceClient) FindEnabledRegionProvider(ctx context.Context, in *FindEnabledRegionProviderRequest, opts ...grpc.CallOption) (*FindEnabledRegionProviderResponse, error) {
|
||||
out := new(FindEnabledRegionProviderResponse)
|
||||
err := c.cc.Invoke(ctx, "/pb.RegionProviderService/findEnabledRegionProvider", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RegionProviderServiceServer is the server API for RegionProviderService service.
|
||||
type RegionProviderServiceServer interface {
|
||||
// 查找所有ISP
|
||||
FindAllEnabledRegionProviders(context.Context, *FindAllEnabledRegionProvidersRequest) (*FindAllEnabledRegionProvidersResponse, error)
|
||||
// 查找单个ISP信息
|
||||
FindEnabledRegionProvider(context.Context, *FindEnabledRegionProviderRequest) (*FindEnabledRegionProviderResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRegionProviderServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedRegionProviderServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRegionProviderServiceServer) FindAllEnabledRegionProviders(context.Context, *FindAllEnabledRegionProvidersRequest) (*FindAllEnabledRegionProvidersResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledRegionProviders not implemented")
|
||||
}
|
||||
func (*UnimplementedRegionProviderServiceServer) FindEnabledRegionProvider(context.Context, *FindEnabledRegionProviderRequest) (*FindEnabledRegionProviderResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledRegionProvider not implemented")
|
||||
}
|
||||
|
||||
func RegisterRegionProviderServiceServer(s *grpc.Server, srv RegionProviderServiceServer) {
|
||||
s.RegisterService(&_RegionProviderService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _RegionProviderService_FindAllEnabledRegionProviders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindAllEnabledRegionProvidersRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegionProviderServiceServer).FindAllEnabledRegionProviders(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.RegionProviderService/FindAllEnabledRegionProviders",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegionProviderServiceServer).FindAllEnabledRegionProviders(ctx, req.(*FindAllEnabledRegionProvidersRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RegionProviderService_FindEnabledRegionProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindEnabledRegionProviderRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegionProviderServiceServer).FindEnabledRegionProvider(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pb.RegionProviderService/FindEnabledRegionProvider",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegionProviderServiceServer).FindEnabledRegionProvider(ctx, req.(*FindEnabledRegionProviderRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RegionProviderService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "pb.RegionProviderService",
|
||||
HandlerType: (*RegionProviderServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "findAllEnabledRegionProviders",
|
||||
Handler: _RegionProviderService_FindAllEnabledRegionProviders_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findEnabledRegionProvider",
|
||||
Handler: _RegionProviderService_FindEnabledRegionProvider_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_region_provider.proto",
|
||||
}
|
||||
@@ -35,7 +35,7 @@ type FindAllEnabledRegionProvincesWithCountryIdRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
CountryId int64 `protobuf:"varint,1,opt,name=countryId,proto3" json:"countryId,omitempty"`
|
||||
RegionCountryId int64 `protobuf:"varint,1,opt,name=regionCountryId,proto3" json:"regionCountryId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionProvincesWithCountryIdRequest) Reset() {
|
||||
@@ -70,9 +70,9 @@ func (*FindAllEnabledRegionProvincesWithCountryIdRequest) Descriptor() ([]byte,
|
||||
return file_service_region_province_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionProvincesWithCountryIdRequest) GetCountryId() int64 {
|
||||
func (x *FindAllEnabledRegionProvincesWithCountryIdRequest) GetRegionCountryId() int64 {
|
||||
if x != nil {
|
||||
return x.CountryId
|
||||
return x.RegionCountryId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -82,7 +82,7 @@ type FindAllEnabledRegionProvincesWithCountryIdResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Provinces []*RegionProvince `protobuf:"bytes,1,rep,name=provinces,proto3" json:"provinces,omitempty"`
|
||||
RegionProvinces []*RegionProvince `protobuf:"bytes,1,rep,name=regionProvinces,proto3" json:"regionProvinces,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionProvincesWithCountryIdResponse) Reset() {
|
||||
@@ -117,9 +117,9 @@ func (*FindAllEnabledRegionProvincesWithCountryIdResponse) Descriptor() ([]byte,
|
||||
return file_service_region_province_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *FindAllEnabledRegionProvincesWithCountryIdResponse) GetProvinces() []*RegionProvince {
|
||||
func (x *FindAllEnabledRegionProvincesWithCountryIdResponse) GetRegionProvinces() []*RegionProvince {
|
||||
if x != nil {
|
||||
return x.Provinces
|
||||
return x.RegionProvinces
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -130,7 +130,7 @@ type FindEnabledRegionProvinceRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ProvinceId int64 `protobuf:"varint,1,opt,name=provinceId,proto3" json:"provinceId,omitempty"`
|
||||
RegionProvinceId int64 `protobuf:"varint,1,opt,name=regionProvinceId,proto3" json:"regionProvinceId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceRequest) Reset() {
|
||||
@@ -165,9 +165,9 @@ func (*FindEnabledRegionProvinceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_province_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceRequest) GetProvinceId() int64 {
|
||||
func (x *FindEnabledRegionProvinceRequest) GetRegionProvinceId() int64 {
|
||||
if x != nil {
|
||||
return x.ProvinceId
|
||||
return x.RegionProvinceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -177,7 +177,7 @@ type FindEnabledRegionProvinceResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Province *RegionProvince `protobuf:"bytes,1,opt,name=province,proto3" json:"province,omitempty"`
|
||||
RegionProvince *RegionProvince `protobuf:"bytes,1,opt,name=regionProvince,proto3" json:"regionProvince,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceResponse) Reset() {
|
||||
@@ -212,9 +212,9 @@ func (*FindEnabledRegionProvinceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_region_province_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *FindEnabledRegionProvinceResponse) GetProvince() *RegionProvince {
|
||||
func (x *FindEnabledRegionProvinceResponse) GetRegionProvince() *RegionProvince {
|
||||
if x != nil {
|
||||
return x.Province
|
||||
return x.RegionProvince
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -226,28 +226,31 @@ var file_service_region_province_proto_rawDesc = []byte{
|
||||
0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x02, 0x70, 0x62, 0x1a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x31, 0x46, 0x69, 0x6e, 0x64, 0x41,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x31, 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, 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, 0x66, 0x0a, 0x32, 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,
|
||||
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, 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,
|
||||
0x74, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f,
|
||||
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x22, 0x72, 0x0a, 0x32, 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, 0x12, 0x3c, 0x0a, 0x0f,
|
||||
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 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, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f,
|
||||
0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x4e, 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, 0x2a,
|
||||
0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x5f, 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,
|
||||
0x3a, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 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, 0x0e, 0x72, 0x65, 0x67,
|
||||
0x69, 0x6f, 0x6e, 0x50, 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,
|
||||
@@ -290,8 +293,8 @@ var file_service_region_province_proto_goTypes = []interface{}{
|
||||
(*RegionProvince)(nil), // 4: pb.RegionProvince
|
||||
}
|
||||
var file_service_region_province_proto_depIdxs = []int32{
|
||||
4, // 0: pb.FindAllEnabledRegionProvincesWithCountryIdResponse.provinces:type_name -> pb.RegionProvince
|
||||
4, // 1: pb.FindEnabledRegionProvinceResponse.province:type_name -> pb.RegionProvince
|
||||
4, // 0: pb.FindAllEnabledRegionProvincesWithCountryIdResponse.regionProvinces:type_name -> pb.RegionProvince
|
||||
4, // 1: pb.FindEnabledRegionProvinceResponse.regionProvince: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
|
||||
|
||||
@@ -7,4 +7,5 @@ message RegionCity {
|
||||
int64 id = 1;
|
||||
string name = 2;
|
||||
repeated string codes = 3;
|
||||
int64 regionProvinceId = 4;
|
||||
}
|
||||
|
||||
33
pkg/rpc/protos/service_region_city.proto
Normal file
33
pkg/rpc/protos/service_region_city.proto
Normal file
@@ -0,0 +1,33 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "models/model_region_city.proto";
|
||||
|
||||
// 城市相关服务
|
||||
service RegionCityService {
|
||||
// 查找所有城市
|
||||
rpc findAllEnabledRegionCities (FindAllEnabledRegionCitiesRequest) returns (FindAllEnabledRegionCitiesResponse);
|
||||
|
||||
// 查找单个城市信息
|
||||
rpc findEnabledRegionCity (FindEnabledRegionCityRequest) returns (FindEnabledRegionCityResponse);
|
||||
}
|
||||
|
||||
// 查找所有城市
|
||||
message FindAllEnabledRegionCitiesRequest {
|
||||
|
||||
}
|
||||
|
||||
message FindAllEnabledRegionCitiesResponse {
|
||||
repeated RegionCity regionCities = 1;
|
||||
}
|
||||
|
||||
// 查找单个城市信息
|
||||
message FindEnabledRegionCityRequest {
|
||||
int64 regionCityId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledRegionCityResponse {
|
||||
RegionCity regionCity = 1;
|
||||
}
|
||||
@@ -20,14 +20,14 @@ message FindAllEnabledRegionCountriesRequest {
|
||||
}
|
||||
|
||||
message FindAllEnabledRegionCountriesResponse {
|
||||
repeated RegionCountry countries = 1;
|
||||
repeated RegionCountry regionCountries = 1;
|
||||
}
|
||||
|
||||
// 查找单个国家信息
|
||||
message FindEnabledRegionCountryRequest {
|
||||
int64 countryId = 1;
|
||||
int64 regionCountryId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledRegionCountryResponse {
|
||||
RegionCountry country = 1;
|
||||
RegionCountry regionCountry = 1;
|
||||
}
|
||||
33
pkg/rpc/protos/service_region_provider.proto
Normal file
33
pkg/rpc/protos/service_region_provider.proto
Normal file
@@ -0,0 +1,33 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
|
||||
import "models/model_region_provider.proto";
|
||||
|
||||
// ISP相关服务
|
||||
service RegionProviderService {
|
||||
// 查找所有ISP
|
||||
rpc findAllEnabledRegionProviders (FindAllEnabledRegionProvidersRequest) returns (FindAllEnabledRegionProvidersResponse);
|
||||
|
||||
// 查找单个ISP信息
|
||||
rpc findEnabledRegionProvider (FindEnabledRegionProviderRequest) returns (FindEnabledRegionProviderResponse);
|
||||
}
|
||||
|
||||
// 查找所有ISP
|
||||
message FindAllEnabledRegionProvidersRequest {
|
||||
|
||||
}
|
||||
|
||||
message FindAllEnabledRegionProvidersResponse {
|
||||
repeated RegionProvider regionProviders = 1;
|
||||
}
|
||||
|
||||
// 查找单个ISP信息
|
||||
message FindEnabledRegionProviderRequest {
|
||||
int64 regionProviderId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledRegionProviderResponse {
|
||||
RegionProvider regionProvider = 1;
|
||||
}
|
||||
@@ -16,18 +16,18 @@ service RegionProvinceService {
|
||||
|
||||
// 查找所有省份
|
||||
message FindAllEnabledRegionProvincesWithCountryIdRequest {
|
||||
int64 countryId = 1;
|
||||
int64 regionCountryId = 1;
|
||||
}
|
||||
|
||||
message FindAllEnabledRegionProvincesWithCountryIdResponse {
|
||||
repeated RegionProvince provinces = 1;
|
||||
repeated RegionProvince regionProvinces = 1;
|
||||
}
|
||||
|
||||
// 查找单个省份信息
|
||||
message FindEnabledRegionProvinceRequest {
|
||||
int64 provinceId = 1;
|
||||
int64 regionProvinceId = 1;
|
||||
}
|
||||
|
||||
message FindEnabledRegionProvinceResponse {
|
||||
RegionProvince province = 1;
|
||||
RegionProvince regionProvince = 1;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ func NewKeyValue(name string, value string) *KeyValue {
|
||||
}
|
||||
}
|
||||
|
||||
// check point definition
|
||||
// HTTPFirewallCheckpointDefinition check point definition
|
||||
type HTTPFirewallCheckpointDefinition struct {
|
||||
Name string `json:"name"` // 名称
|
||||
Description string `json:"description"` // 描述
|
||||
|
||||
@@ -174,7 +174,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
|
||||
{
|
||||
Name: "所有Header信息",
|
||||
Prefix: "headers",
|
||||
Description: "使用\n隔开的Header信息字符串",
|
||||
Description: "使用\\n隔开的Header信息字符串",
|
||||
IsRequest: true,
|
||||
},
|
||||
{
|
||||
@@ -184,6 +184,34 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
|
||||
IsRequest: true,
|
||||
HasParams: true,
|
||||
},
|
||||
{
|
||||
Name: "国家/地区名称",
|
||||
Prefix: "geoCountryName",
|
||||
Description: "国家/地区名称",
|
||||
IsRequest: true,
|
||||
HasParams: false,
|
||||
},
|
||||
{
|
||||
Name: "省份名称",
|
||||
Prefix: "geoProvinceName",
|
||||
Description: "中国省份名称",
|
||||
IsRequest: true,
|
||||
HasParams: false,
|
||||
},
|
||||
{
|
||||
Name: "城市名称",
|
||||
Prefix: "geoCityName",
|
||||
Description: "中国城市名称",
|
||||
IsRequest: true,
|
||||
HasParams: false,
|
||||
},
|
||||
{
|
||||
Name: "ISP名称",
|
||||
Prefix: "ispName",
|
||||
Description: "ISP名称",
|
||||
IsRequest: true,
|
||||
HasParams: false,
|
||||
},
|
||||
{
|
||||
Name: "CC统计",
|
||||
Prefix: "cc2",
|
||||
@@ -306,7 +334,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
|
||||
},
|
||||
}
|
||||
|
||||
// 查找Checkpoint定义
|
||||
// FindCheckpointDefinition 查找Checkpoint定义
|
||||
func FindCheckpointDefinition(prefix string) *HTTPFirewallCheckpointDefinition {
|
||||
for _, checkpoint := range AllCheckpoints {
|
||||
if checkpoint.Prefix == prefix {
|
||||
@@ -316,7 +344,7 @@ func FindCheckpointDefinition(prefix string) *HTTPFirewallCheckpointDefinition {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 判断Checkpoint是否为组合的
|
||||
// CheckCheckpointIsComposed 判断Checkpoint是否为组合的
|
||||
func CheckCheckpointIsComposed(prefix string) bool {
|
||||
for _, checkpoint := range AllCheckpoints {
|
||||
if checkpoint.Prefix == prefix {
|
||||
|
||||
Reference in New Issue
Block a user