refactor: add unified all service gateway
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: david.yan(david.yan@qq.com)
|
||||
* @Date: 2021-11-26 15:25:03
|
||||
*/
|
||||
package service
|
||||
package main
|
||||
|
||||
import (
|
||||
"bsm/full/module/base/passport/internal/config"
|
||||
@@ -20,7 +20,7 @@ func Run() {
|
||||
impl.NewImpl()
|
||||
|
||||
// 初始化服务
|
||||
s := server.New(config.Spec.Addr)
|
||||
s := server.New(nil)
|
||||
srv := service.New(
|
||||
s.Grpc,
|
||||
&service.Options{
|
||||
|
||||
@@ -17,10 +17,15 @@ type Server struct {
|
||||
grpcConns map[string]*grpc.ClientConn // 连接池
|
||||
}
|
||||
|
||||
func New(addr string) *Server {
|
||||
func New(grpcServ *grpc.Server) *Server {
|
||||
standalone := grpcServ == nil
|
||||
if standalone {
|
||||
grpcServ = grpc.NewServer()
|
||||
}
|
||||
|
||||
srv := &Server{
|
||||
Ctx: context.Background(),
|
||||
Grpc: grpc.NewServer(),
|
||||
Grpc: grpcServ,
|
||||
grpcConns: make(map[string]*grpc.ClientConn),
|
||||
}
|
||||
|
||||
@@ -31,7 +36,9 @@ func New(addr string) *Server {
|
||||
pb.RegisterRegisterServer(srv.Grpc, NewRegisterServer())
|
||||
pb.RegisterVerifyServer(srv.Grpc, NewVerifyServer())
|
||||
|
||||
reflection.Register(srv.Grpc)
|
||||
if standalone {
|
||||
reflection.Register(srv.Grpc)
|
||||
}
|
||||
|
||||
return srv
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ var File_module_base_passport_proto_account_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_base_passport_proto_account_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"(module/base/passport/proto/account.proto\x12\bpassport\x1a&module/base/passport/proto/const.proto\"\x80\x04\n" +
|
||||
"(module/base/passport/proto/account.proto\x12\bpassport\x1a&module/base/passport/proto/const.proto\"\x8e\x04\n" +
|
||||
"\fGetFullReply\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" +
|
||||
"\aaccount\x18\x02 \x01(\tR\aaccount\x12\x14\n" +
|
||||
@@ -557,8 +557,8 @@ const file_module_base_passport_proto_account_proto_rawDesc = "" +
|
||||
"\x04sign\x18\x0e \x01(\tR\x04sign\x12\x14\n" +
|
||||
"\x05cover\x18\x0f \x01(\tR\x05cover\x12\x14\n" +
|
||||
"\x05score\x18\x10 \x01(\x05R\x05score\x12\x14\n" +
|
||||
"\x05level\x18\x11 \x01(\x05R\x05level\x129\n" +
|
||||
"\rverify_status\x18\x12 \x01(\v2\x14.blocks.VerifyStatusR\fverifyStatus\x12%\n" +
|
||||
"\x05level\x18\x11 \x01(\x05R\x05level\x12G\n" +
|
||||
"\rverify_status\x18\x12 \x01(\v2\".base_passport_blocks.VerifyStatusR\fverifyStatus\x12%\n" +
|
||||
"\x04tags\x18\x13 \x03(\v2\x11.passport.TagItemR\x04tags\"1\n" +
|
||||
"\aTagItem\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
|
||||
@@ -586,13 +586,13 @@ const file_module_base_passport_proto_account_proto_rawDesc = "" +
|
||||
"\x04Data\x18\x01 \x03(\v2#.passport.StatisticsReply.DataEntryR\x04Data\x1a7\n" +
|
||||
"\tDataEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\x03R\x05value:\x028\x012\xf2\x02\n" +
|
||||
"\aAccount\x12.\n" +
|
||||
"\x03Get\x12\r.blocks.Empty\x1a\x16.passport.GetFullReply\"\x00\x12:\n" +
|
||||
"\aSetData\x12\x18.passport.SetDataRequest\x1a\x13.blocks.StatusReply\"\x00\x12B\n" +
|
||||
"\vSetPassword\x12\x1c.passport.SetPasswordRequest\x1a\x13.blocks.StatusReply\"\x00\x125\n" +
|
||||
"\tTagCreate\x12\x11.passport.TagItem\x1a\x13.blocks.StatusReply\"\x00\x128\n" +
|
||||
"\tTagRemove\x12\x14.blocks.IdentRequest\x1a\x13.blocks.StatusReply\"\x00\x12F\n" +
|
||||
"\x05value\x18\x02 \x01(\x03R\x05value:\x028\x012\xc6\x03\n" +
|
||||
"\aAccount\x12<\n" +
|
||||
"\x03Get\x12\x1b.base_passport_blocks.Empty\x1a\x16.passport.GetFullReply\"\x00\x12H\n" +
|
||||
"\aSetData\x12\x18.passport.SetDataRequest\x1a!.base_passport_blocks.StatusReply\"\x00\x12P\n" +
|
||||
"\vSetPassword\x12\x1c.passport.SetPasswordRequest\x1a!.base_passport_blocks.StatusReply\"\x00\x12C\n" +
|
||||
"\tTagCreate\x12\x11.passport.TagItem\x1a!.base_passport_blocks.StatusReply\"\x00\x12T\n" +
|
||||
"\tTagRemove\x12\".base_passport_blocks.IdentRequest\x1a!.base_passport_blocks.StatusReply\"\x00\x12F\n" +
|
||||
"\n" +
|
||||
"Statistics\x12\x1b.passport.StatisticsRequest\x1a\x19.passport.StatisticsReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3"
|
||||
|
||||
@@ -617,26 +617,26 @@ var file_module_base_passport_proto_account_proto_goTypes = []any{
|
||||
(*StatisticsRequest)(nil), // 4: passport.StatisticsRequest
|
||||
(*StatisticsReply)(nil), // 5: passport.StatisticsReply
|
||||
nil, // 6: passport.StatisticsReply.DataEntry
|
||||
(*VerifyStatus)(nil), // 7: blocks.VerifyStatus
|
||||
(*Empty)(nil), // 8: blocks.Empty
|
||||
(*IdentRequest)(nil), // 9: blocks.IdentRequest
|
||||
(*StatusReply)(nil), // 10: blocks.StatusReply
|
||||
(*VerifyStatus)(nil), // 7: base_passport_blocks.VerifyStatus
|
||||
(*Empty)(nil), // 8: base_passport_blocks.Empty
|
||||
(*IdentRequest)(nil), // 9: base_passport_blocks.IdentRequest
|
||||
(*StatusReply)(nil), // 10: base_passport_blocks.StatusReply
|
||||
}
|
||||
var file_module_base_passport_proto_account_proto_depIdxs = []int32{
|
||||
7, // 0: passport.GetFullReply.verify_status:type_name -> blocks.VerifyStatus
|
||||
7, // 0: passport.GetFullReply.verify_status:type_name -> base_passport_blocks.VerifyStatus
|
||||
1, // 1: passport.GetFullReply.tags:type_name -> passport.TagItem
|
||||
6, // 2: passport.StatisticsReply.Data:type_name -> passport.StatisticsReply.DataEntry
|
||||
8, // 3: passport.Account.Get:input_type -> blocks.Empty
|
||||
8, // 3: passport.Account.Get:input_type -> base_passport_blocks.Empty
|
||||
2, // 4: passport.Account.SetData:input_type -> passport.SetDataRequest
|
||||
3, // 5: passport.Account.SetPassword:input_type -> passport.SetPasswordRequest
|
||||
1, // 6: passport.Account.TagCreate:input_type -> passport.TagItem
|
||||
9, // 7: passport.Account.TagRemove:input_type -> blocks.IdentRequest
|
||||
9, // 7: passport.Account.TagRemove:input_type -> base_passport_blocks.IdentRequest
|
||||
4, // 8: passport.Account.Statistics:input_type -> passport.StatisticsRequest
|
||||
0, // 9: passport.Account.Get:output_type -> passport.GetFullReply
|
||||
10, // 10: passport.Account.SetData:output_type -> blocks.StatusReply
|
||||
10, // 11: passport.Account.SetPassword:output_type -> blocks.StatusReply
|
||||
10, // 12: passport.Account.TagCreate:output_type -> blocks.StatusReply
|
||||
10, // 13: passport.Account.TagRemove:output_type -> blocks.StatusReply
|
||||
10, // 10: passport.Account.SetData:output_type -> base_passport_blocks.StatusReply
|
||||
10, // 11: passport.Account.SetPassword:output_type -> base_passport_blocks.StatusReply
|
||||
10, // 12: passport.Account.TagCreate:output_type -> base_passport_blocks.StatusReply
|
||||
10, // 13: passport.Account.TagRemove:output_type -> base_passport_blocks.StatusReply
|
||||
5, // 14: passport.Account.Statistics:output_type -> passport.StatisticsReply
|
||||
9, // [9:15] is the sub-list for method output_type
|
||||
3, // [3:9] is the sub-list for method input_type
|
||||
|
||||
@@ -2975,12 +2975,12 @@ var File_module_base_passport_proto_const_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"&module/base/passport/proto/const.proto\x12\x06blocks\"\a\n" +
|
||||
"\x05Empty\"\xbb\x01\n" +
|
||||
"&module/base/passport/proto/const.proto\x12\x14base_passport_blocks\"\a\n" +
|
||||
"\x05Empty\"\xc9\x01\n" +
|
||||
"\fFetchRequest\x12\x18\n" +
|
||||
"\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x03R\tpage_size\x128\n" +
|
||||
"\x06params\x18\x03 \x03(\v2 .blocks.FetchRequest.ParamsEntryR\x06params\x1a9\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x03R\tpage_size\x12F\n" +
|
||||
"\x06params\x18\x03 \x03(\v2..base_passport_blocks.FetchRequest.ParamsEntryR\x06params\x1a9\n" +
|
||||
"\vParamsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" +
|
||||
@@ -2999,11 +2999,11 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"\x10CmsSearchRequest\x12\x18\n" +
|
||||
"\akeyword\x18\x01 \x01(\tR\akeyword\x12\x18\n" +
|
||||
"\apage_no\x18\x02 \x01(\x03R\apage_no\x12\x1c\n" +
|
||||
"\tpage_size\x18\x03 \x01(\x03R\tpage_size\"\xf6\x02\n" +
|
||||
"\tpage_size\x18\x03 \x01(\x03R\tpage_size\"\x84\x03\n" +
|
||||
"\x10MallFetchRequest\x12\x18\n" +
|
||||
"\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x03R\tpage_size\x12<\n" +
|
||||
"\x06params\x18\x03 \x03(\v2$.blocks.MallFetchRequest.ParamsEntryR\x06params\x12&\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x03R\tpage_size\x12J\n" +
|
||||
"\x06params\x18\x03 \x03(\v22.base_passport_blocks.MallFetchRequest.ParamsEntryR\x06params\x12&\n" +
|
||||
"\x0estore_identity\x18\x04 \x01(\tR\x0estore_identity\x12\x18\n" +
|
||||
"\akeyword\x18\x05 \x01(\tR\akeyword\x12\x1f\n" +
|
||||
"\vcategory_id\x18\x06 \x03(\x03R\n" +
|
||||
@@ -3013,11 +3013,11 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"\tmax_price\x18\t \x01(\x03R\tmax_price\x1a9\n" +
|
||||
"\vParamsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xaf\x02\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xbd\x02\n" +
|
||||
"\x12MarketFetchRequest\x12\x18\n" +
|
||||
"\apage_no\x18\x01 \x01(\x03R\apage_no\x12\x1c\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x03R\tpage_size\x12>\n" +
|
||||
"\x06params\x18\x03 \x03(\v2&.blocks.MarketFetchRequest.ParamsEntryR\x06params\x12\x1a\n" +
|
||||
"\tpage_size\x18\x02 \x01(\x03R\tpage_size\x12L\n" +
|
||||
"\x06params\x18\x03 \x03(\v24.base_passport_blocks.MarketFetchRequest.ParamsEntryR\x06params\x12\x1a\n" +
|
||||
"\bidentity\x18\x04 \x01(\tR\bidentity\x12\x18\n" +
|
||||
"\akeyword\x18\x05 \x01(\tR\akeyword\x12\x16\n" +
|
||||
"\x06status\x18\x06 \x01(\x05R\x06status\x12\x18\n" +
|
||||
@@ -3072,7 +3072,7 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"\x11passport_identity\x18\x02 \x01(\tR\x10passportIdentity\"M\n" +
|
||||
"\tCloudBase\x12\x19\n" +
|
||||
"\bcloud_id\x18\x01 \x01(\x04R\acloudId\x12%\n" +
|
||||
"\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\"\xe0\x02\n" +
|
||||
"\x0ecloud_identity\x18\x02 \x01(\tR\rcloudIdentity\"\xee\x02\n" +
|
||||
"\x0fCmsCategoryItem\x12$\n" +
|
||||
"\rsite_identity\x18\x01 \x01(\tR\rsite_identity\x12\x0e\n" +
|
||||
"\x02id\x18\x02 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
@@ -3088,9 +3088,9 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"created_at\x12\x1e\n" +
|
||||
"\n" +
|
||||
"updated_at\x18\t \x01(\tR\n" +
|
||||
"updated_at\x12-\n" +
|
||||
"updated_at\x12;\n" +
|
||||
"\x05child\x18\n" +
|
||||
" \x03(\v2\x17.blocks.CmsCategoryItemR\x05child\x12\"\n" +
|
||||
" \x03(\v2%.base_passport_blocks.CmsCategoryItemR\x05child\x12\"\n" +
|
||||
"\fcategory_key\x18\v \x01(\tR\fcategory_key\"\xa5\x01\n" +
|
||||
"\vCmsTagsItem\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
@@ -3129,7 +3129,7 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"created_at\x18\b \x01(\tR\n" +
|
||||
"created_at\x12 \n" +
|
||||
"\vmarket_name\x18\t \x01(\tR\vmarket_name\"\xcc\t\n" +
|
||||
"\vmarket_name\x18\t \x01(\tR\vmarket_name\"\xda\t\n" +
|
||||
"\x10OrderSummaryItem\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\border_no\x18\x02 \x01(\tR\border_no\x12\x1e\n" +
|
||||
@@ -3165,8 +3165,8 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"pay_remark\x18\x1e \x01(\tR\n" +
|
||||
"pay_remark\x12\x18\n" +
|
||||
"\acreated\x18\x1f \x01(\tR\acreated\x12\x18\n" +
|
||||
"\aupdated\x18 \x01(\tR\aupdated\x12.\n" +
|
||||
"\adetails\x18! \x03(\v2\x14.blocks.OrderDetailsR\adetails\x12\x12\n" +
|
||||
"\aupdated\x18 \x01(\tR\aupdated\x12<\n" +
|
||||
"\adetails\x18! \x03(\v2\".base_passport_blocks.OrderDetailsR\adetails\x12\x12\n" +
|
||||
"\x04addr\x18\" \x01(\tR\x04addr\x12\"\n" +
|
||||
"\fcar_identity\x18# \x01(\tR\fcar_identity\x12*\n" +
|
||||
"\x10delivery_address\x18$ \x01(\tR\x10delivery_address\x12\x14\n" +
|
||||
@@ -3196,10 +3196,10 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"\aspec_id\x18\f \x01(\x03R\aspec_id\x12*\n" +
|
||||
"\x10product_identity\x18\r \x01(\tR\x10product_identity\x12\x1c\n" +
|
||||
"\tgas_types\x18\x0e \x01(\x03R\tgas_types\x12 \n" +
|
||||
"\vtotal_price\x18\x0f \x01(\x03R\vtotal_price\"O\n" +
|
||||
"\x11FeedPostListReply\x12(\n" +
|
||||
"\x04list\x18\x01 \x03(\v2\x14.blocks.FeedPostItemR\x04list\x12\x10\n" +
|
||||
"\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\xd1\x02\n" +
|
||||
"\vtotal_price\x18\x0f \x01(\x03R\vtotal_price\"]\n" +
|
||||
"\x11FeedPostListReply\x126\n" +
|
||||
"\x04list\x18\x01 \x03(\v2\".base_passport_blocks.FeedPostItemR\x04list\x12\x10\n" +
|
||||
"\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\xed\x02\n" +
|
||||
"\fFeedPostItem\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" +
|
||||
"\acontent\x18\x02 \x01(\tR\acontent\x12\x17\n" +
|
||||
@@ -3210,10 +3210,10 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"cnt_unlike\x18\x06 \x01(\x03R\tcntUnlike\x12\x1f\n" +
|
||||
"\vcnt_comment\x18\a \x01(\x03R\n" +
|
||||
"cntComment\x12\x19\n" +
|
||||
"\bcnt_like\x18\b \x01(\x03R\acntLike\x120\n" +
|
||||
"\aattachs\x18\t \x03(\v2\x16.blocks.FeedAttachItemR\aattachs\x12'\n" +
|
||||
"\bcnt_like\x18\b \x01(\x03R\acntLike\x12>\n" +
|
||||
"\aattachs\x18\t \x03(\v2$.base_passport_blocks.FeedAttachItemR\aattachs\x125\n" +
|
||||
"\x04tags\x18\n" +
|
||||
" \x03(\v2\x13.blocks.FeedTagItemR\x04tags\"_\n" +
|
||||
" \x03(\v2!.base_passport_blocks.FeedTagItemR\x04tags\"_\n" +
|
||||
"\x0eFeedAttachItem\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1f\n" +
|
||||
"\vattach_type\x18\x02 \x01(\tR\n" +
|
||||
@@ -3221,10 +3221,10 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"\x03url\x18\x03 \x01(\tR\x03url\"9\n" +
|
||||
"\vFeedTagItem\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x18\n" +
|
||||
"\acontent\x18\x02 \x01(\tR\acontent\"Q\n" +
|
||||
"\x12GroupPostListReply\x12)\n" +
|
||||
"\x04list\x18\x01 \x03(\v2\x15.blocks.GroupPostItemR\x04list\x12\x10\n" +
|
||||
"\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\xe4\x02\n" +
|
||||
"\acontent\x18\x02 \x01(\tR\acontent\"_\n" +
|
||||
"\x12GroupPostListReply\x127\n" +
|
||||
"\x04list\x18\x01 \x03(\v2#.base_passport_blocks.GroupPostItemR\x04list\x12\x10\n" +
|
||||
"\x03cnt\x18\x02 \x01(\x03R\x03cnt\"\x80\x03\n" +
|
||||
"\rGroupPostItem\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" +
|
||||
"\acontent\x18\x02 \x01(\tR\acontent\x12\x1f\n" +
|
||||
@@ -3236,10 +3236,10 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
"cnt_unlike\x18\x06 \x01(\x03R\tcntUnlike\x12\x1f\n" +
|
||||
"\vcnt_comment\x18\a \x01(\x03R\n" +
|
||||
"cntComment\x12\x19\n" +
|
||||
"\bcnt_like\x18\b \x01(\x03R\acntLike\x121\n" +
|
||||
"\aattachs\x18\t \x03(\v2\x17.blocks.GroupAttachItemR\aattachs\x12(\n" +
|
||||
"\bcnt_like\x18\b \x01(\x03R\acntLike\x12?\n" +
|
||||
"\aattachs\x18\t \x03(\v2%.base_passport_blocks.GroupAttachItemR\aattachs\x126\n" +
|
||||
"\x04tags\x18\n" +
|
||||
" \x03(\v2\x14.blocks.GroupTagItemR\x04tags\"`\n" +
|
||||
" \x03(\v2\".base_passport_blocks.GroupTagItemR\x04tags\"`\n" +
|
||||
"\x0fGroupAttachItem\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1f\n" +
|
||||
"\vattach_type\x18\x02 \x01(\tR\n" +
|
||||
@@ -3263,10 +3263,10 @@ const file_module_base_passport_proto_const_proto_rawDesc = "" +
|
||||
" \x01(\x05R\x04area\x12\x12\n" +
|
||||
"\x04sign\x18\v \x01(\tR\x04sign\x12\x12\n" +
|
||||
"\x04tags\x18\f \x03(\tR\x04tags\x12%\n" +
|
||||
"\x0eforeign_status\x18\r \x01(\x05R\rforeignStatus\"X\n" +
|
||||
"\x0eforeign_status\x18\r \x01(\x05R\rforeignStatus\"f\n" +
|
||||
"\x16FetchRelationItemReply\x12\x14\n" +
|
||||
"\x05total\x18\x01 \x01(\x03R\x05total\x12(\n" +
|
||||
"\x04data\x18\x02 \x03(\v2\x14.blocks.RelationItemR\x04dataB+Z)bsm/full/module/base/passport/pb;passportb\x06proto3"
|
||||
"\x05total\x18\x01 \x01(\x03R\x05total\x126\n" +
|
||||
"\x04data\x18\x02 \x03(\v2\".base_passport_blocks.RelationItemR\x04dataB+Z)bsm/full/module/base/passport/pb;passportb\x06proto3"
|
||||
|
||||
var (
|
||||
file_module_base_passport_proto_const_proto_rawDescOnce sync.Once
|
||||
@@ -3282,60 +3282,60 @@ func file_module_base_passport_proto_const_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_module_base_passport_proto_const_proto_msgTypes = make([]protoimpl.MessageInfo, 40)
|
||||
var file_module_base_passport_proto_const_proto_goTypes = []any{
|
||||
(*Empty)(nil), // 0: blocks.Empty
|
||||
(*FetchRequest)(nil), // 1: blocks.FetchRequest
|
||||
(*IdentRequest)(nil), // 2: blocks.IdentRequest
|
||||
(*VersionRequest)(nil), // 3: blocks.VersionRequest
|
||||
(*SearchRequest)(nil), // 4: blocks.SearchRequest
|
||||
(*StatusReply)(nil), // 5: blocks.StatusReply
|
||||
(*CmsSearchRequest)(nil), // 6: blocks.CmsSearchRequest
|
||||
(*MallFetchRequest)(nil), // 7: blocks.MallFetchRequest
|
||||
(*MarketFetchRequest)(nil), // 8: blocks.MarketFetchRequest
|
||||
(*OrderIdentRequest)(nil), // 9: blocks.OrderIdentRequest
|
||||
(*DeliveryStatusReply)(nil), // 10: blocks.DeliveryStatusReply
|
||||
(*IdentityStatusReply)(nil), // 11: blocks.IdentityStatusReply
|
||||
(*OrderStatusReply)(nil), // 12: blocks.OrderStatusReply
|
||||
(*DataStatusReply)(nil), // 13: blocks.DataStatusReply
|
||||
(*StoreSerialRequest)(nil), // 14: blocks.StoreSerialRequest
|
||||
(*IDRequest)(nil), // 15: blocks.IDRequest
|
||||
(*IDListRequest)(nil), // 16: blocks.IDListRequest
|
||||
(*StdIicuds)(nil), // 17: blocks.StdIicuds
|
||||
(*StdPassport)(nil), // 18: blocks.StdPassport
|
||||
(*CloudBase)(nil), // 19: blocks.CloudBase
|
||||
(*CmsCategoryItem)(nil), // 20: blocks.CmsCategoryItem
|
||||
(*CmsTagsItem)(nil), // 21: blocks.CmsTagsItem
|
||||
(*CmsAccessoryItem)(nil), // 22: blocks.CmsAccessoryItem
|
||||
(*VerifyStatus)(nil), // 23: blocks.VerifyStatus
|
||||
(*MarketLoginReply)(nil), // 24: blocks.MarketLoginReply
|
||||
(*OrderSummaryItem)(nil), // 25: blocks.OrderSummaryItem
|
||||
(*OrderDetails)(nil), // 26: blocks.OrderDetails
|
||||
(*FeedPostListReply)(nil), // 27: blocks.FeedPostListReply
|
||||
(*FeedPostItem)(nil), // 28: blocks.FeedPostItem
|
||||
(*FeedAttachItem)(nil), // 29: blocks.FeedAttachItem
|
||||
(*FeedTagItem)(nil), // 30: blocks.FeedTagItem
|
||||
(*GroupPostListReply)(nil), // 31: blocks.GroupPostListReply
|
||||
(*GroupPostItem)(nil), // 32: blocks.GroupPostItem
|
||||
(*GroupAttachItem)(nil), // 33: blocks.GroupAttachItem
|
||||
(*GroupTagItem)(nil), // 34: blocks.GroupTagItem
|
||||
(*RelationItem)(nil), // 35: blocks.RelationItem
|
||||
(*FetchRelationItemReply)(nil), // 36: blocks.FetchRelationItemReply
|
||||
nil, // 37: blocks.FetchRequest.ParamsEntry
|
||||
nil, // 38: blocks.MallFetchRequest.ParamsEntry
|
||||
nil, // 39: blocks.MarketFetchRequest.ParamsEntry
|
||||
(*Empty)(nil), // 0: base_passport_blocks.Empty
|
||||
(*FetchRequest)(nil), // 1: base_passport_blocks.FetchRequest
|
||||
(*IdentRequest)(nil), // 2: base_passport_blocks.IdentRequest
|
||||
(*VersionRequest)(nil), // 3: base_passport_blocks.VersionRequest
|
||||
(*SearchRequest)(nil), // 4: base_passport_blocks.SearchRequest
|
||||
(*StatusReply)(nil), // 5: base_passport_blocks.StatusReply
|
||||
(*CmsSearchRequest)(nil), // 6: base_passport_blocks.CmsSearchRequest
|
||||
(*MallFetchRequest)(nil), // 7: base_passport_blocks.MallFetchRequest
|
||||
(*MarketFetchRequest)(nil), // 8: base_passport_blocks.MarketFetchRequest
|
||||
(*OrderIdentRequest)(nil), // 9: base_passport_blocks.OrderIdentRequest
|
||||
(*DeliveryStatusReply)(nil), // 10: base_passport_blocks.DeliveryStatusReply
|
||||
(*IdentityStatusReply)(nil), // 11: base_passport_blocks.IdentityStatusReply
|
||||
(*OrderStatusReply)(nil), // 12: base_passport_blocks.OrderStatusReply
|
||||
(*DataStatusReply)(nil), // 13: base_passport_blocks.DataStatusReply
|
||||
(*StoreSerialRequest)(nil), // 14: base_passport_blocks.StoreSerialRequest
|
||||
(*IDRequest)(nil), // 15: base_passport_blocks.IDRequest
|
||||
(*IDListRequest)(nil), // 16: base_passport_blocks.IDListRequest
|
||||
(*StdIicuds)(nil), // 17: base_passport_blocks.StdIicuds
|
||||
(*StdPassport)(nil), // 18: base_passport_blocks.StdPassport
|
||||
(*CloudBase)(nil), // 19: base_passport_blocks.CloudBase
|
||||
(*CmsCategoryItem)(nil), // 20: base_passport_blocks.CmsCategoryItem
|
||||
(*CmsTagsItem)(nil), // 21: base_passport_blocks.CmsTagsItem
|
||||
(*CmsAccessoryItem)(nil), // 22: base_passport_blocks.CmsAccessoryItem
|
||||
(*VerifyStatus)(nil), // 23: base_passport_blocks.VerifyStatus
|
||||
(*MarketLoginReply)(nil), // 24: base_passport_blocks.MarketLoginReply
|
||||
(*OrderSummaryItem)(nil), // 25: base_passport_blocks.OrderSummaryItem
|
||||
(*OrderDetails)(nil), // 26: base_passport_blocks.OrderDetails
|
||||
(*FeedPostListReply)(nil), // 27: base_passport_blocks.FeedPostListReply
|
||||
(*FeedPostItem)(nil), // 28: base_passport_blocks.FeedPostItem
|
||||
(*FeedAttachItem)(nil), // 29: base_passport_blocks.FeedAttachItem
|
||||
(*FeedTagItem)(nil), // 30: base_passport_blocks.FeedTagItem
|
||||
(*GroupPostListReply)(nil), // 31: base_passport_blocks.GroupPostListReply
|
||||
(*GroupPostItem)(nil), // 32: base_passport_blocks.GroupPostItem
|
||||
(*GroupAttachItem)(nil), // 33: base_passport_blocks.GroupAttachItem
|
||||
(*GroupTagItem)(nil), // 34: base_passport_blocks.GroupTagItem
|
||||
(*RelationItem)(nil), // 35: base_passport_blocks.RelationItem
|
||||
(*FetchRelationItemReply)(nil), // 36: base_passport_blocks.FetchRelationItemReply
|
||||
nil, // 37: base_passport_blocks.FetchRequest.ParamsEntry
|
||||
nil, // 38: base_passport_blocks.MallFetchRequest.ParamsEntry
|
||||
nil, // 39: base_passport_blocks.MarketFetchRequest.ParamsEntry
|
||||
}
|
||||
var file_module_base_passport_proto_const_proto_depIdxs = []int32{
|
||||
37, // 0: blocks.FetchRequest.params:type_name -> blocks.FetchRequest.ParamsEntry
|
||||
38, // 1: blocks.MallFetchRequest.params:type_name -> blocks.MallFetchRequest.ParamsEntry
|
||||
39, // 2: blocks.MarketFetchRequest.params:type_name -> blocks.MarketFetchRequest.ParamsEntry
|
||||
20, // 3: blocks.CmsCategoryItem.child:type_name -> blocks.CmsCategoryItem
|
||||
26, // 4: blocks.OrderSummaryItem.details:type_name -> blocks.OrderDetails
|
||||
28, // 5: blocks.FeedPostListReply.list:type_name -> blocks.FeedPostItem
|
||||
29, // 6: blocks.FeedPostItem.attachs:type_name -> blocks.FeedAttachItem
|
||||
30, // 7: blocks.FeedPostItem.tags:type_name -> blocks.FeedTagItem
|
||||
32, // 8: blocks.GroupPostListReply.list:type_name -> blocks.GroupPostItem
|
||||
33, // 9: blocks.GroupPostItem.attachs:type_name -> blocks.GroupAttachItem
|
||||
34, // 10: blocks.GroupPostItem.tags:type_name -> blocks.GroupTagItem
|
||||
35, // 11: blocks.FetchRelationItemReply.data:type_name -> blocks.RelationItem
|
||||
37, // 0: base_passport_blocks.FetchRequest.params:type_name -> base_passport_blocks.FetchRequest.ParamsEntry
|
||||
38, // 1: base_passport_blocks.MallFetchRequest.params:type_name -> base_passport_blocks.MallFetchRequest.ParamsEntry
|
||||
39, // 2: base_passport_blocks.MarketFetchRequest.params:type_name -> base_passport_blocks.MarketFetchRequest.ParamsEntry
|
||||
20, // 3: base_passport_blocks.CmsCategoryItem.child:type_name -> base_passport_blocks.CmsCategoryItem
|
||||
26, // 4: base_passport_blocks.OrderSummaryItem.details:type_name -> base_passport_blocks.OrderDetails
|
||||
28, // 5: base_passport_blocks.FeedPostListReply.list:type_name -> base_passport_blocks.FeedPostItem
|
||||
29, // 6: base_passport_blocks.FeedPostItem.attachs:type_name -> base_passport_blocks.FeedAttachItem
|
||||
30, // 7: base_passport_blocks.FeedPostItem.tags:type_name -> base_passport_blocks.FeedTagItem
|
||||
32, // 8: base_passport_blocks.GroupPostListReply.list:type_name -> base_passport_blocks.GroupPostItem
|
||||
33, // 9: base_passport_blocks.GroupPostItem.attachs:type_name -> base_passport_blocks.GroupAttachItem
|
||||
34, // 10: base_passport_blocks.GroupPostItem.tags:type_name -> base_passport_blocks.GroupTagItem
|
||||
35, // 11: base_passport_blocks.FetchRelationItemReply.data:type_name -> base_passport_blocks.RelationItem
|
||||
12, // [12:12] is the sub-list for method output_type
|
||||
12, // [12:12] is the sub-list for method input_type
|
||||
12, // [12:12] is the sub-list for extension type_name
|
||||
|
||||
@@ -135,10 +135,10 @@ const file_module_base_passport_proto_forget_proto_rawDesc = "" +
|
||||
"\x04code\x18\x02 \x01(\tR\x04code\"L\n" +
|
||||
"\x12ForgetResetRequest\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x1a\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword2\x86\x01\n" +
|
||||
"\x06Forget\x12>\n" +
|
||||
"\x06Verify\x12\x1d.passport.ForgetVerifyRequest\x1a\x13.blocks.StatusReply\"\x00\x12<\n" +
|
||||
"\x05Reset\x12\x1c.passport.ForgetResetRequest\x1a\x13.blocks.StatusReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3"
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword2\xa2\x01\n" +
|
||||
"\x06Forget\x12L\n" +
|
||||
"\x06Verify\x12\x1d.passport.ForgetVerifyRequest\x1a!.base_passport_blocks.StatusReply\"\x00\x12J\n" +
|
||||
"\x05Reset\x12\x1c.passport.ForgetResetRequest\x1a!.base_passport_blocks.StatusReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3"
|
||||
|
||||
var (
|
||||
file_module_base_passport_proto_forget_proto_rawDescOnce sync.Once
|
||||
@@ -156,13 +156,13 @@ var file_module_base_passport_proto_forget_proto_msgTypes = make([]protoimpl.Mes
|
||||
var file_module_base_passport_proto_forget_proto_goTypes = []any{
|
||||
(*ForgetVerifyRequest)(nil), // 0: passport.ForgetVerifyRequest
|
||||
(*ForgetResetRequest)(nil), // 1: passport.ForgetResetRequest
|
||||
(*StatusReply)(nil), // 2: blocks.StatusReply
|
||||
(*StatusReply)(nil), // 2: base_passport_blocks.StatusReply
|
||||
}
|
||||
var file_module_base_passport_proto_forget_proto_depIdxs = []int32{
|
||||
0, // 0: passport.Forget.Verify:input_type -> passport.ForgetVerifyRequest
|
||||
1, // 1: passport.Forget.Reset:input_type -> passport.ForgetResetRequest
|
||||
2, // 2: passport.Forget.Verify:output_type -> blocks.StatusReply
|
||||
2, // 3: passport.Forget.Reset:output_type -> blocks.StatusReply
|
||||
2, // 2: passport.Forget.Verify:output_type -> base_passport_blocks.StatusReply
|
||||
2, // 3: passport.Forget.Reset:output_type -> base_passport_blocks.StatusReply
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
|
||||
@@ -256,14 +256,14 @@ const file_module_base_passport_proto_login_proto_rawDesc = "" +
|
||||
"\tagency_id\x18\x04 \x01(\x03R\bagencyId\x12\x19\n" +
|
||||
"\bstaff_id\x18\x05 \x01(\x03R\astaffId\x12\x1a\n" +
|
||||
"\bowner_id\x18\x06 \x01(\x03R\bowner_id\x12&\n" +
|
||||
"\x0eowner_identity\x18\a \x01(\tR\x0eowner_identity\"\xfe\x01\n" +
|
||||
"\x0eowner_identity\x18\a \x01(\tR\x0eowner_identity\"\x8c\x02\n" +
|
||||
"\n" +
|
||||
"LoginReply\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" +
|
||||
"\x05token\x18\x03 \x01(\tR\x05token\x128\n" +
|
||||
"\x06extend\x18\x04 \x03(\v2 .passport.LoginReply.ExtendEntryR\x06extend\x129\n" +
|
||||
"\rverify_status\x18\x05 \x01(\v2\x14.blocks.VerifyStatusR\fverifyStatus\x1a9\n" +
|
||||
"\x06extend\x18\x04 \x03(\v2 .passport.LoginReply.ExtendEntryR\x06extend\x12G\n" +
|
||||
"\rverify_status\x18\x05 \x01(\v2\".base_passport_blocks.VerifyStatusR\fverifyStatus\x1a9\n" +
|
||||
"\vExtendEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xc0\x01\n" +
|
||||
@@ -290,11 +290,11 @@ var file_module_base_passport_proto_login_proto_goTypes = []any{
|
||||
(*LoginByCodeRequest)(nil), // 1: passport.LoginByCodeRequest
|
||||
(*LoginReply)(nil), // 2: passport.LoginReply
|
||||
nil, // 3: passport.LoginReply.ExtendEntry
|
||||
(*VerifyStatus)(nil), // 4: blocks.VerifyStatus
|
||||
(*VerifyStatus)(nil), // 4: base_passport_blocks.VerifyStatus
|
||||
}
|
||||
var file_module_base_passport_proto_login_proto_depIdxs = []int32{
|
||||
3, // 0: passport.LoginReply.extend:type_name -> passport.LoginReply.ExtendEntry
|
||||
4, // 1: passport.LoginReply.verify_status:type_name -> blocks.VerifyStatus
|
||||
4, // 1: passport.LoginReply.verify_status:type_name -> base_passport_blocks.VerifyStatus
|
||||
0, // 2: passport.Login.Pwd:input_type -> passport.LoginByPwdRequest
|
||||
1, // 3: passport.Login.Code:input_type -> passport.LoginByCodeRequest
|
||||
1, // 4: passport.Login.Quick:input_type -> passport.LoginByCodeRequest
|
||||
|
||||
@@ -229,13 +229,13 @@ const file_module_base_passport_proto_register_proto_rawDesc = "" +
|
||||
"\bstaff_id\x18\b \x01(\x03R\astaffId\x12\x1a\n" +
|
||||
"\bowner_id\x18\t \x01(\x03R\bowner_id\x12&\n" +
|
||||
"\x0eowner_identity\x18\n" +
|
||||
" \x01(\tR\x0eowner_identity\"\x84\x02\n" +
|
||||
" \x01(\tR\x0eowner_identity\"\x92\x02\n" +
|
||||
"\rRegisterReply\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" +
|
||||
"\x05token\x18\x04 \x01(\tR\x05token\x12;\n" +
|
||||
"\x06extend\x18\x05 \x03(\v2#.passport.RegisterReply.ExtendEntryR\x06extend\x129\n" +
|
||||
"\rverify_status\x18\x06 \x01(\v2\x14.blocks.VerifyStatusR\fverifyStatus\x1a9\n" +
|
||||
"\x06extend\x18\x05 \x03(\v2#.passport.RegisterReply.ExtendEntryR\x06extend\x12G\n" +
|
||||
"\rverify_status\x18\x06 \x01(\v2\".base_passport_blocks.VerifyStatusR\fverifyStatus\x1a9\n" +
|
||||
"\vExtendEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\x85\x01\n" +
|
||||
@@ -260,11 +260,11 @@ var file_module_base_passport_proto_register_proto_goTypes = []any{
|
||||
(*RegisterRequest)(nil), // 0: passport.RegisterRequest
|
||||
(*RegisterReply)(nil), // 1: passport.RegisterReply
|
||||
nil, // 2: passport.RegisterReply.ExtendEntry
|
||||
(*VerifyStatus)(nil), // 3: blocks.VerifyStatus
|
||||
(*VerifyStatus)(nil), // 3: base_passport_blocks.VerifyStatus
|
||||
}
|
||||
var file_module_base_passport_proto_register_proto_depIdxs = []int32{
|
||||
2, // 0: passport.RegisterReply.extend:type_name -> passport.RegisterReply.ExtendEntry
|
||||
3, // 1: passport.RegisterReply.verify_status:type_name -> blocks.VerifyStatus
|
||||
3, // 1: passport.RegisterReply.verify_status:type_name -> base_passport_blocks.VerifyStatus
|
||||
0, // 2: passport.Register.Pwd:input_type -> passport.RegisterRequest
|
||||
0, // 3: passport.Register.Code:input_type -> passport.RegisterRequest
|
||||
1, // 4: passport.Register.Pwd:output_type -> passport.RegisterReply
|
||||
|
||||
@@ -452,10 +452,10 @@ const file_module_base_passport_proto_verify_proto_rawDesc = "" +
|
||||
"\x06status\x18\x01 \x01(\tR\x06status\x12\x1e\n" +
|
||||
"\n" +
|
||||
"similarity\x18\x02 \x01(\x02R\n" +
|
||||
"similarity2\x8b\x01\n" +
|
||||
"\x06Verify\x129\n" +
|
||||
"\aRequest\x12\x17.passport.VerifyRequest\x1a\x13.blocks.StatusReply\"\x00\x12F\n" +
|
||||
"\rJumioCallback\x12\x1e.passport.JumioCallbackPayload\x1a\x13.blocks.StatusReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3"
|
||||
"similarity2\xa7\x01\n" +
|
||||
"\x06Verify\x12G\n" +
|
||||
"\aRequest\x12\x17.passport.VerifyRequest\x1a!.base_passport_blocks.StatusReply\"\x00\x12T\n" +
|
||||
"\rJumioCallback\x12\x1e.passport.JumioCallbackPayload\x1a!.base_passport_blocks.StatusReply\"\x00B+Z)bsm/full/module/base/passport/pb;passportb\x06proto3"
|
||||
|
||||
var (
|
||||
file_module_base_passport_proto_verify_proto_rawDescOnce sync.Once
|
||||
@@ -478,7 +478,7 @@ var file_module_base_passport_proto_verify_proto_goTypes = []any{
|
||||
(*PersonalInformation)(nil), // 4: passport.PersonalInformation
|
||||
(*FaceMap)(nil), // 5: passport.FaceMap
|
||||
nil, // 6: passport.VerifyRequest.ArgsEntry
|
||||
(*StatusReply)(nil), // 7: blocks.StatusReply
|
||||
(*StatusReply)(nil), // 7: base_passport_blocks.StatusReply
|
||||
}
|
||||
var file_module_base_passport_proto_verify_proto_depIdxs = []int32{
|
||||
6, // 0: passport.VerifyRequest.args:type_name -> passport.VerifyRequest.ArgsEntry
|
||||
@@ -488,8 +488,8 @@ var file_module_base_passport_proto_verify_proto_depIdxs = []int32{
|
||||
5, // 4: passport.JumioCallbackPayload.face_map:type_name -> passport.FaceMap
|
||||
0, // 5: passport.Verify.Request:input_type -> passport.VerifyRequest
|
||||
1, // 6: passport.Verify.JumioCallback:input_type -> passport.JumioCallbackPayload
|
||||
7, // 7: passport.Verify.Request:output_type -> blocks.StatusReply
|
||||
7, // 8: passport.Verify.JumioCallback:output_type -> blocks.StatusReply
|
||||
7, // 7: passport.Verify.Request:output_type -> base_passport_blocks.StatusReply
|
||||
7, // 8: passport.Verify.JumioCallback:output_type -> base_passport_blocks.StatusReply
|
||||
7, // [7:9] is the sub-list for method output_type
|
||||
5, // [5:7] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
|
||||
@@ -6,19 +6,19 @@ import "module/base/passport/proto/const.proto";
|
||||
// assport通行证模块-帐号数据
|
||||
service Account{
|
||||
// 通过会员所有信息
|
||||
rpc Get(blocks.Empty) returns (GetFullReply) {}
|
||||
rpc Get(base_passport_blocks.Empty) returns (GetFullReply) {}
|
||||
|
||||
// 更新会员的信息数据,字段值为空或是0,将不更新此数据
|
||||
rpc SetData(SetDataRequest) returns (blocks.StatusReply) {}
|
||||
rpc SetData(SetDataRequest) returns (base_passport_blocks.StatusReply) {}
|
||||
|
||||
// 更新会员的密码
|
||||
rpc SetPassword(SetPasswordRequest) returns (blocks.StatusReply) {}
|
||||
rpc SetPassword(SetPasswordRequest) returns (base_passport_blocks.StatusReply) {}
|
||||
|
||||
// 新增标签
|
||||
rpc TagCreate(TagItem) returns (blocks.StatusReply) {}
|
||||
rpc TagCreate(TagItem) returns (base_passport_blocks.StatusReply) {}
|
||||
|
||||
// 删除标签
|
||||
rpc TagRemove(blocks.IdentRequest) returns (blocks.StatusReply) {}
|
||||
rpc TagRemove(base_passport_blocks.IdentRequest) returns (base_passport_blocks.StatusReply) {}
|
||||
|
||||
// 获取会员的相关统计数据
|
||||
rpc Statistics(StatisticsRequest) returns (StatisticsReply) {}
|
||||
@@ -43,7 +43,7 @@ message GetFullReply {
|
||||
string cover = 15; // 背景&封面
|
||||
int32 score = 16; // 积分
|
||||
int32 level = 17; // 等级
|
||||
blocks.VerifyStatus verify_status = 18; // 用户验证状态
|
||||
base_passport_blocks.VerifyStatus verify_status = 18; // 用户验证状态
|
||||
repeated TagItem tags = 19; // 用户标签
|
||||
}
|
||||
|
||||
@@ -79,4 +79,4 @@ message StatisticsRequest {
|
||||
|
||||
message StatisticsReply {
|
||||
map<string,int64> Data=1; //数据以Map格式输出
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package blocks;
|
||||
package base_passport_blocks;
|
||||
|
||||
option go_package = "bsm/full/module/base/passport/pb;passport";
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ import "module/base/passport/proto/const.proto";
|
||||
// Passport通行证模块-找回密码
|
||||
service Forget{
|
||||
// 验证手机号和验证码
|
||||
rpc Verify(ForgetVerifyRequest) returns(blocks.StatusReply) {}
|
||||
rpc Verify(ForgetVerifyRequest) returns(base_passport_blocks.StatusReply) {}
|
||||
|
||||
// 重罢密码
|
||||
rpc Reset(ForgetResetRequest) returns (blocks.StatusReply) {}
|
||||
rpc Reset(ForgetResetRequest) returns (base_passport_blocks.StatusReply) {}
|
||||
}
|
||||
|
||||
message ForgetVerifyRequest {
|
||||
@@ -21,4 +21,4 @@ message ForgetVerifyRequest {
|
||||
message ForgetResetRequest {
|
||||
string identity = 1; //唯一码
|
||||
string password = 2; // 密码
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,6 @@ message LoginReply {
|
||||
string identity = 2; //用户唯一码
|
||||
string token = 3; //用户凭证
|
||||
map<string, string> extend = 4; //扩展字段
|
||||
blocks.VerifyStatus verify_status = 5; // 用户验证状态
|
||||
base_passport_blocks.VerifyStatus verify_status = 5; // 用户验证状态
|
||||
}
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ message RegisterReply {
|
||||
string identity = 2; //用户唯一码
|
||||
string token = 4; //用户Header所需Token
|
||||
map<string, string> extend = 5; //扩展字段
|
||||
blocks.VerifyStatus verify_status = 6; // 用户验证状态
|
||||
base_passport_blocks.VerifyStatus verify_status = 6; // 用户验证状态
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@ import "module/base/passport/proto/const.proto";
|
||||
// Passport(会员通行证)-验证
|
||||
service Verify{
|
||||
// 认证请求
|
||||
rpc Request(VerifyRequest) returns (blocks.StatusReply) {}
|
||||
rpc Request(VerifyRequest) returns (base_passport_blocks.StatusReply) {}
|
||||
|
||||
// KYC 认证回调
|
||||
rpc JumioCallback(JumioCallbackPayload) returns (blocks.StatusReply) {}
|
||||
rpc JumioCallback(JumioCallbackPayload) returns (base_passport_blocks.StatusReply) {}
|
||||
}
|
||||
|
||||
message VerifyRequest {
|
||||
@@ -51,4 +51,4 @@ message PersonalInformation {
|
||||
message FaceMap {
|
||||
string status = 1;
|
||||
float similarity = 2; // 人脸比对相似度
|
||||
}
|
||||
}
|
||||
|
||||
37
module/base/passport/service/expose.go
Normal file
37
module/base/passport/service/expose.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"bsm/full/module/base/passport/internal/server"
|
||||
pb "bsm/full/module/base/passport/pb"
|
||||
gwRuntime "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type ExposeOptions struct {
|
||||
GRPC *grpc.Server
|
||||
Gateway *gwRuntime.ServeMux
|
||||
}
|
||||
|
||||
func Expose(options ExposeOptions) error {
|
||||
server.New(options.GRPC)
|
||||
|
||||
ctx := context.Background()
|
||||
if err := pb.RegisterAccountHandlerServer(ctx, options.Gateway, server.NewAccountServer()); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := pb.RegisterForgetHandlerServer(ctx, options.Gateway, server.NewForgetServer()); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := pb.RegisterLoginHandlerServer(ctx, options.Gateway, server.NewLoginServer()); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := pb.RegisterRegisterHandlerServer(ctx, options.Gateway, server.NewRegisterServer()); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := pb.RegisterVerifyHandlerServer(ctx, options.Gateway, server.NewVerifyServer()); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user