refactor: localize protobuf definitions
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
package passport
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -42,7 +41,7 @@ type GetFullReply struct {
|
||||
Cover string `protobuf:"bytes,15,opt,name=cover,proto3" json:"cover,omitempty"` // 背景&封面
|
||||
Score int32 `protobuf:"varint,16,opt,name=score,proto3" json:"score,omitempty"` // 积分
|
||||
Level int32 `protobuf:"varint,17,opt,name=level,proto3" json:"level,omitempty"` // 等级
|
||||
VerifyStatus *protobuf.VerifyStatus `protobuf:"bytes,18,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态
|
||||
VerifyStatus *VerifyStatus `protobuf:"bytes,18,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态
|
||||
Tags []*TagItem `protobuf:"bytes,19,rep,name=tags,proto3" json:"tags,omitempty"` // 用户标签
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -197,7 +196,7 @@ func (x *GetFullReply) GetLevel() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetFullReply) GetVerifyStatus() *protobuf.VerifyStatus {
|
||||
func (x *GetFullReply) GetVerifyStatus() *VerifyStatus {
|
||||
if x != nil {
|
||||
return x.VerifyStatus
|
||||
}
|
||||
@@ -539,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\x15protobuf/blocks.proto\"\x80\x04\n" +
|
||||
"(module/base/passport/proto/account.proto\x12\bpassport\x1a&module/base/passport/proto/const.proto\"\x80\x04\n" +
|
||||
"\fGetFullReply\x12\x1a\n" +
|
||||
"\bidentity\x18\x01 \x01(\tR\bidentity\x12\x18\n" +
|
||||
"\aaccount\x18\x02 \x01(\tR\aaccount\x12\x14\n" +
|
||||
@@ -611,17 +610,17 @@ func file_module_base_passport_proto_account_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_module_base_passport_proto_account_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_module_base_passport_proto_account_proto_goTypes = []any{
|
||||
(*GetFullReply)(nil), // 0: passport.GetFullReply
|
||||
(*TagItem)(nil), // 1: passport.TagItem
|
||||
(*SetDataRequest)(nil), // 2: passport.SetDataRequest
|
||||
(*SetPasswordRequest)(nil), // 3: passport.SetPasswordRequest
|
||||
(*StatisticsRequest)(nil), // 4: passport.StatisticsRequest
|
||||
(*StatisticsReply)(nil), // 5: passport.StatisticsReply
|
||||
nil, // 6: passport.StatisticsReply.DataEntry
|
||||
(*protobuf.VerifyStatus)(nil), // 7: blocks.VerifyStatus
|
||||
(*protobuf.Empty)(nil), // 8: blocks.Empty
|
||||
(*protobuf.IdentRequest)(nil), // 9: blocks.IdentRequest
|
||||
(*protobuf.StatusReply)(nil), // 10: blocks.StatusReply
|
||||
(*GetFullReply)(nil), // 0: passport.GetFullReply
|
||||
(*TagItem)(nil), // 1: passport.TagItem
|
||||
(*SetDataRequest)(nil), // 2: passport.SetDataRequest
|
||||
(*SetPasswordRequest)(nil), // 3: passport.SetPasswordRequest
|
||||
(*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
|
||||
}
|
||||
var file_module_base_passport_proto_account_proto_depIdxs = []int32{
|
||||
7, // 0: passport.GetFullReply.verify_status:type_name -> blocks.VerifyStatus
|
||||
@@ -651,6 +650,7 @@ func file_module_base_passport_proto_account_proto_init() {
|
||||
if File_module_base_passport_proto_account_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_base_passport_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@@ -9,7 +9,6 @@ It translates gRPC into RESTful JSON APIs.
|
||||
package passport
|
||||
|
||||
import (
|
||||
"bsm/full/protobuf"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -38,7 +37,7 @@ var (
|
||||
|
||||
func request_Account_Get_0(ctx context.Context, marshaler runtime.Marshaler, client AccountClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.Empty
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -53,7 +52,7 @@ func request_Account_Get_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
|
||||
func local_request_Account_Get_0(ctx context.Context, marshaler runtime.Marshaler, server AccountServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.Empty
|
||||
protoReq Empty
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -146,7 +145,7 @@ func local_request_Account_TagCreate_0(ctx context.Context, marshaler runtime.Ma
|
||||
|
||||
func request_Account_TagRemove_0(ctx context.Context, marshaler runtime.Marshaler, client AccountClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
@@ -161,7 +160,7 @@ func request_Account_TagRemove_0(ctx context.Context, marshaler runtime.Marshale
|
||||
|
||||
func local_request_Account_TagRemove_0(ctx context.Context, marshaler runtime.Marshaler, server AccountServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq blocks.IdentRequest
|
||||
protoReq IdentRequest
|
||||
metadata runtime.ServerMetadata
|
||||
)
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package passport
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -35,15 +34,15 @@ const (
|
||||
// assport通行证模块-帐号数据
|
||||
type AccountClient interface {
|
||||
// 通过会员所有信息
|
||||
Get(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*GetFullReply, error)
|
||||
Get(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetFullReply, error)
|
||||
// 更新会员的信息数据,字段值为空或是0,将不更新此数据
|
||||
SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 更新会员的密码
|
||||
SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 新增标签
|
||||
TagCreate(ctx context.Context, in *TagItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
TagCreate(ctx context.Context, in *TagItem, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 删除标签
|
||||
TagRemove(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
TagRemove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 获取会员的相关统计数据
|
||||
Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsReply, error)
|
||||
}
|
||||
@@ -56,7 +55,7 @@ func NewAccountClient(cc grpc.ClientConnInterface) AccountClient {
|
||||
return &accountClient{cc}
|
||||
}
|
||||
|
||||
func (c *accountClient) Get(ctx context.Context, in *protobuf.Empty, opts ...grpc.CallOption) (*GetFullReply, error) {
|
||||
func (c *accountClient) Get(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetFullReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetFullReply)
|
||||
err := c.cc.Invoke(ctx, Account_Get_FullMethodName, in, out, cOpts...)
|
||||
@@ -66,9 +65,9 @@ func (c *accountClient) Get(ctx context.Context, in *protobuf.Empty, opts ...grp
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *accountClient) SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Account_SetData_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -76,9 +75,9 @@ func (c *accountClient) SetData(ctx context.Context, in *SetDataRequest, opts ..
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *accountClient) SetPassword(ctx context.Context, in *SetPasswordRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Account_SetPassword_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -86,9 +85,9 @@ func (c *accountClient) SetPassword(ctx context.Context, in *SetPasswordRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) TagCreate(ctx context.Context, in *TagItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *accountClient) TagCreate(ctx context.Context, in *TagItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Account_TagCreate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -96,9 +95,9 @@ func (c *accountClient) TagCreate(ctx context.Context, in *TagItem, opts ...grpc
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *accountClient) TagRemove(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *accountClient) TagRemove(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Account_TagRemove_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -123,15 +122,15 @@ func (c *accountClient) Statistics(ctx context.Context, in *StatisticsRequest, o
|
||||
// assport通行证模块-帐号数据
|
||||
type AccountServer interface {
|
||||
// 通过会员所有信息
|
||||
Get(context.Context, *protobuf.Empty) (*GetFullReply, error)
|
||||
Get(context.Context, *Empty) (*GetFullReply, error)
|
||||
// 更新会员的信息数据,字段值为空或是0,将不更新此数据
|
||||
SetData(context.Context, *SetDataRequest) (*protobuf.StatusReply, error)
|
||||
SetData(context.Context, *SetDataRequest) (*StatusReply, error)
|
||||
// 更新会员的密码
|
||||
SetPassword(context.Context, *SetPasswordRequest) (*protobuf.StatusReply, error)
|
||||
SetPassword(context.Context, *SetPasswordRequest) (*StatusReply, error)
|
||||
// 新增标签
|
||||
TagCreate(context.Context, *TagItem) (*protobuf.StatusReply, error)
|
||||
TagCreate(context.Context, *TagItem) (*StatusReply, error)
|
||||
// 删除标签
|
||||
TagRemove(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
|
||||
TagRemove(context.Context, *IdentRequest) (*StatusReply, error)
|
||||
// 获取会员的相关统计数据
|
||||
Statistics(context.Context, *StatisticsRequest) (*StatisticsReply, error)
|
||||
}
|
||||
@@ -143,19 +142,19 @@ type AccountServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedAccountServer struct{}
|
||||
|
||||
func (UnimplementedAccountServer) Get(context.Context, *protobuf.Empty) (*GetFullReply, error) {
|
||||
func (UnimplementedAccountServer) Get(context.Context, *Empty) (*GetFullReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) SetData(context.Context, *SetDataRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAccountServer) SetData(context.Context, *SetDataRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SetData not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) SetPassword(context.Context, *SetPasswordRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAccountServer) SetPassword(context.Context, *SetPasswordRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SetPassword not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) TagCreate(context.Context, *TagItem) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAccountServer) TagCreate(context.Context, *TagItem) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TagCreate not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) TagRemove(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedAccountServer) TagRemove(context.Context, *IdentRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TagRemove not implemented")
|
||||
}
|
||||
func (UnimplementedAccountServer) Statistics(context.Context, *StatisticsRequest) (*StatisticsReply, error) {
|
||||
@@ -182,7 +181,7 @@ func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) {
|
||||
}
|
||||
|
||||
func _Account_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.Empty)
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -194,7 +193,7 @@ func _Account_Get_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
FullMethod: Account_Get_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).Get(ctx, req.(*protobuf.Empty))
|
||||
return srv.(AccountServer).Get(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -254,7 +253,7 @@ func _Account_TagCreate_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
}
|
||||
|
||||
func _Account_TagRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(protobuf.IdentRequest)
|
||||
in := new(IdentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -266,7 +265,7 @@ func _Account_TagRemove_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
FullMethod: Account_TagRemove_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AccountServer).TagRemove(ctx, req.(*protobuf.IdentRequest))
|
||||
return srv.(AccountServer).TagRemove(ctx, req.(*IdentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package passport
|
||||
|
||||
import blocks "bsm/full/protobuf"
|
||||
|
||||
type Empty = blocks.Empty
|
||||
type FetchRequest = blocks.FetchRequest
|
||||
type IdentRequest = blocks.IdentRequest
|
||||
type VersionRequest = blocks.VersionRequest
|
||||
type SearchRequest = blocks.SearchRequest
|
||||
type StatusReply = blocks.StatusReply
|
||||
type VerifyStatus = blocks.VerifyStatus
|
||||
3368
module/base/passport/pb/const.pb.go
Normal file
3368
module/base/passport/pb/const.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,6 @@
|
||||
package passport
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -130,7 +129,7 @@ var File_module_base_passport_proto_forget_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_base_passport_proto_forget_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"'module/base/passport/proto/forget.proto\x12\bpassport\x1a\x15protobuf/blocks.proto\"?\n" +
|
||||
"'module/base/passport/proto/forget.proto\x12\bpassport\x1a&module/base/passport/proto/const.proto\"?\n" +
|
||||
"\x13ForgetVerifyRequest\x12\x14\n" +
|
||||
"\x05phone\x18\x01 \x01(\tR\x05phone\x12\x12\n" +
|
||||
"\x04code\x18\x02 \x01(\tR\x04code\"L\n" +
|
||||
@@ -155,9 +154,9 @@ func file_module_base_passport_proto_forget_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_module_base_passport_proto_forget_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_module_base_passport_proto_forget_proto_goTypes = []any{
|
||||
(*ForgetVerifyRequest)(nil), // 0: passport.ForgetVerifyRequest
|
||||
(*ForgetResetRequest)(nil), // 1: passport.ForgetResetRequest
|
||||
(*protobuf.StatusReply)(nil), // 2: blocks.StatusReply
|
||||
(*ForgetVerifyRequest)(nil), // 0: passport.ForgetVerifyRequest
|
||||
(*ForgetResetRequest)(nil), // 1: passport.ForgetResetRequest
|
||||
(*StatusReply)(nil), // 2: blocks.StatusReply
|
||||
}
|
||||
var file_module_base_passport_proto_forget_proto_depIdxs = []int32{
|
||||
0, // 0: passport.Forget.Verify:input_type -> passport.ForgetVerifyRequest
|
||||
@@ -176,6 +175,7 @@ func file_module_base_passport_proto_forget_proto_init() {
|
||||
if File_module_base_passport_proto_forget_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_base_passport_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package passport
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -31,9 +30,9 @@ const (
|
||||
// Passport通行证模块-找回密码
|
||||
type ForgetClient interface {
|
||||
// 验证手机号和验证码
|
||||
Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// 重罢密码
|
||||
Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
}
|
||||
|
||||
type forgetClient struct {
|
||||
@@ -44,9 +43,9 @@ func NewForgetClient(cc grpc.ClientConnInterface) ForgetClient {
|
||||
return &forgetClient{cc}
|
||||
}
|
||||
|
||||
func (c *forgetClient) Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *forgetClient) Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Forget_Verify_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -54,9 +53,9 @@ func (c *forgetClient) Verify(ctx context.Context, in *ForgetVerifyRequest, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Forget_Reset_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -71,9 +70,9 @@ func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts .
|
||||
// Passport通行证模块-找回密码
|
||||
type ForgetServer interface {
|
||||
// 验证手机号和验证码
|
||||
Verify(context.Context, *ForgetVerifyRequest) (*protobuf.StatusReply, error)
|
||||
Verify(context.Context, *ForgetVerifyRequest) (*StatusReply, error)
|
||||
// 重罢密码
|
||||
Reset(context.Context, *ForgetResetRequest) (*protobuf.StatusReply, error)
|
||||
Reset(context.Context, *ForgetResetRequest) (*StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedForgetServer should be embedded to have
|
||||
@@ -83,10 +82,10 @@ type ForgetServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedForgetServer struct{}
|
||||
|
||||
func (UnimplementedForgetServer) Verify(context.Context, *ForgetVerifyRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedForgetServer) Verify(context.Context, *ForgetVerifyRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Verify not implemented")
|
||||
}
|
||||
func (UnimplementedForgetServer) Reset(context.Context, *ForgetResetRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedForgetServer) Reset(context.Context, *ForgetResetRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Reset not implemented")
|
||||
}
|
||||
func (UnimplementedForgetServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package passport
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -172,7 +171,7 @@ type LoginReply struct {
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` //用户唯一码
|
||||
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` //用户凭证
|
||||
Extend map[string]string `protobuf:"bytes,4,rep,name=extend,proto3" json:"extend,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //扩展字段
|
||||
VerifyStatus *protobuf.VerifyStatus `protobuf:"bytes,5,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态
|
||||
VerifyStatus *VerifyStatus `protobuf:"bytes,5,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -235,7 +234,7 @@ func (x *LoginReply) GetExtend() map[string]string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *LoginReply) GetVerifyStatus() *protobuf.VerifyStatus {
|
||||
func (x *LoginReply) GetVerifyStatus() *VerifyStatus {
|
||||
if x != nil {
|
||||
return x.VerifyStatus
|
||||
}
|
||||
@@ -246,7 +245,7 @@ var File_module_base_passport_proto_login_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_base_passport_proto_login_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"&module/base/passport/proto/login.proto\x12\bpassport\x1a\x15protobuf/blocks.proto\"I\n" +
|
||||
"&module/base/passport/proto/login.proto\x12\bpassport\x1a&module/base/passport/proto/const.proto\"I\n" +
|
||||
"\x11LoginByPwdRequest\x12\x18\n" +
|
||||
"\aaccount\x18\x01 \x01(\tR\aaccount\x12\x1a\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\"\xd4\x01\n" +
|
||||
@@ -287,11 +286,11 @@ func file_module_base_passport_proto_login_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_module_base_passport_proto_login_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_module_base_passport_proto_login_proto_goTypes = []any{
|
||||
(*LoginByPwdRequest)(nil), // 0: passport.LoginByPwdRequest
|
||||
(*LoginByCodeRequest)(nil), // 1: passport.LoginByCodeRequest
|
||||
(*LoginReply)(nil), // 2: passport.LoginReply
|
||||
nil, // 3: passport.LoginReply.ExtendEntry
|
||||
(*protobuf.VerifyStatus)(nil), // 4: blocks.VerifyStatus
|
||||
(*LoginByPwdRequest)(nil), // 0: passport.LoginByPwdRequest
|
||||
(*LoginByCodeRequest)(nil), // 1: passport.LoginByCodeRequest
|
||||
(*LoginReply)(nil), // 2: passport.LoginReply
|
||||
nil, // 3: passport.LoginReply.ExtendEntry
|
||||
(*VerifyStatus)(nil), // 4: blocks.VerifyStatus
|
||||
}
|
||||
var file_module_base_passport_proto_login_proto_depIdxs = []int32{
|
||||
3, // 0: passport.LoginReply.extend:type_name -> passport.LoginReply.ExtendEntry
|
||||
@@ -314,6 +313,7 @@ func file_module_base_passport_proto_login_proto_init() {
|
||||
if File_module_base_passport_proto_login_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_base_passport_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package passport
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -144,7 +143,7 @@ type RegisterReply struct {
|
||||
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` //用户唯一码
|
||||
Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` //用户Header所需Token
|
||||
Extend map[string]string `protobuf:"bytes,5,rep,name=extend,proto3" json:"extend,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //扩展字段
|
||||
VerifyStatus *protobuf.VerifyStatus `protobuf:"bytes,6,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态
|
||||
VerifyStatus *VerifyStatus `protobuf:"bytes,6,opt,name=verify_status,json=verifyStatus,proto3" json:"verify_status,omitempty"` // 用户验证状态
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -207,7 +206,7 @@ func (x *RegisterReply) GetExtend() map[string]string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RegisterReply) GetVerifyStatus() *protobuf.VerifyStatus {
|
||||
func (x *RegisterReply) GetVerifyStatus() *VerifyStatus {
|
||||
if x != nil {
|
||||
return x.VerifyStatus
|
||||
}
|
||||
@@ -218,7 +217,7 @@ var File_module_base_passport_proto_register_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_base_passport_proto_register_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
")module/base/passport/proto/register.proto\x12\bpassport\x1a\x15protobuf/blocks.proto\"\x9d\x02\n" +
|
||||
")module/base/passport/proto/register.proto\x12\bpassport\x1a&module/base/passport/proto/const.proto\"\x9d\x02\n" +
|
||||
"\x0fRegisterRequest\x12\x18\n" +
|
||||
"\acountry\x18\x01 \x01(\tR\acountry\x12\x14\n" +
|
||||
"\x05email\x18\x02 \x01(\tR\x05email\x12\x18\n" +
|
||||
@@ -258,10 +257,10 @@ func file_module_base_passport_proto_register_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_module_base_passport_proto_register_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
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
|
||||
(*protobuf.VerifyStatus)(nil), // 3: blocks.VerifyStatus
|
||||
(*RegisterRequest)(nil), // 0: passport.RegisterRequest
|
||||
(*RegisterReply)(nil), // 1: passport.RegisterReply
|
||||
nil, // 2: passport.RegisterReply.ExtendEntry
|
||||
(*VerifyStatus)(nil), // 3: blocks.VerifyStatus
|
||||
}
|
||||
var file_module_base_passport_proto_register_proto_depIdxs = []int32{
|
||||
2, // 0: passport.RegisterReply.extend:type_name -> passport.RegisterReply.ExtendEntry
|
||||
@@ -282,6 +281,7 @@ func file_module_base_passport_proto_register_proto_init() {
|
||||
if File_module_base_passport_proto_register_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_base_passport_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package passport
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@@ -419,7 +418,7 @@ var File_module_base_passport_proto_verify_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_module_base_passport_proto_verify_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"'module/base/passport/proto/verify.proto\x12\bpassport\x1a\x15protobuf/blocks.proto\"\x9b\x01\n" +
|
||||
"'module/base/passport/proto/verify.proto\x12\bpassport\x1a&module/base/passport/proto/const.proto\"\x9b\x01\n" +
|
||||
"\rVerifyRequest\x12\x1a\n" +
|
||||
"\bprovider\x18\x01 \x01(\tR\bprovider\x125\n" +
|
||||
"\x04args\x18\x02 \x03(\v2!.passport.VerifyRequest.ArgsEntryR\x04args\x1a7\n" +
|
||||
@@ -479,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
|
||||
(*protobuf.StatusReply)(nil), // 7: blocks.StatusReply
|
||||
(*StatusReply)(nil), // 7: blocks.StatusReply
|
||||
}
|
||||
var file_module_base_passport_proto_verify_proto_depIdxs = []int32{
|
||||
6, // 0: passport.VerifyRequest.args:type_name -> passport.VerifyRequest.ArgsEntry
|
||||
@@ -503,6 +502,7 @@ func file_module_base_passport_proto_verify_proto_init() {
|
||||
if File_module_base_passport_proto_verify_proto != nil {
|
||||
return
|
||||
}
|
||||
file_module_base_passport_proto_const_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package passport
|
||||
|
||||
import (
|
||||
protobuf "bsm/full/protobuf"
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -31,9 +30,9 @@ const (
|
||||
// Passport(会员通行证)-验证
|
||||
type VerifyClient interface {
|
||||
// 认证请求
|
||||
Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
// KYC 认证回调
|
||||
JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
|
||||
JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*StatusReply, error)
|
||||
}
|
||||
|
||||
type verifyClient struct {
|
||||
@@ -44,9 +43,9 @@ func NewVerifyClient(cc grpc.ClientConnInterface) VerifyClient {
|
||||
return &verifyClient{cc}
|
||||
}
|
||||
|
||||
func (c *verifyClient) Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *verifyClient) Request(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Verify_Request_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -54,9 +53,9 @@ func (c *verifyClient) Request(ctx context.Context, in *VerifyRequest, opts ...g
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *verifyClient) JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
|
||||
func (c *verifyClient) JumioCallback(ctx context.Context, in *JumioCallbackPayload, opts ...grpc.CallOption) (*StatusReply, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(protobuf.StatusReply)
|
||||
out := new(StatusReply)
|
||||
err := c.cc.Invoke(ctx, Verify_JumioCallback_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -71,9 +70,9 @@ func (c *verifyClient) JumioCallback(ctx context.Context, in *JumioCallbackPaylo
|
||||
// Passport(会员通行证)-验证
|
||||
type VerifyServer interface {
|
||||
// 认证请求
|
||||
Request(context.Context, *VerifyRequest) (*protobuf.StatusReply, error)
|
||||
Request(context.Context, *VerifyRequest) (*StatusReply, error)
|
||||
// KYC 认证回调
|
||||
JumioCallback(context.Context, *JumioCallbackPayload) (*protobuf.StatusReply, error)
|
||||
JumioCallback(context.Context, *JumioCallbackPayload) (*StatusReply, error)
|
||||
}
|
||||
|
||||
// UnimplementedVerifyServer should be embedded to have
|
||||
@@ -83,10 +82,10 @@ type VerifyServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedVerifyServer struct{}
|
||||
|
||||
func (UnimplementedVerifyServer) Request(context.Context, *VerifyRequest) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedVerifyServer) Request(context.Context, *VerifyRequest) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Request not implemented")
|
||||
}
|
||||
func (UnimplementedVerifyServer) JumioCallback(context.Context, *JumioCallbackPayload) (*protobuf.StatusReply, error) {
|
||||
func (UnimplementedVerifyServer) JumioCallback(context.Context, *JumioCallbackPayload) (*StatusReply, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method JumioCallback not implemented")
|
||||
}
|
||||
func (UnimplementedVerifyServer) testEmbeddedByValue() {}
|
||||
|
||||
Reference in New Issue
Block a user