|
@@ -28,6 +28,10 @@ type MedicalClient interface {
|
|
GetFilterItem(ctx context.Context, in *Zero, opts ...grpc.CallOption) (*FilterItemResp, error)
|
|
GetFilterItem(ctx context.Context, in *Zero, opts ...grpc.CallOption) (*FilterItemResp, error)
|
|
//搜索经销商
|
|
//搜索经销商
|
|
Distributor(ctx context.Context, in *SearchDistributorReq, opts ...grpc.CallOption) (*CompanyResp, error)
|
|
Distributor(ctx context.Context, in *SearchDistributorReq, opts ...grpc.CallOption) (*CompanyResp, error)
|
|
|
|
+ //用户认证信息保存
|
|
|
|
+ UserAuthInfoSave(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*CommonResp, error)
|
|
|
|
+ //获取用户认证信息
|
|
|
|
+ UserAuthInfo(ctx context.Context, in *CommonReq, opts ...grpc.CallOption) (*UserInfoResp, error)
|
|
}
|
|
}
|
|
|
|
|
|
type medicalClient struct {
|
|
type medicalClient struct {
|
|
@@ -65,6 +69,24 @@ func (c *medicalClient) Distributor(ctx context.Context, in *SearchDistributorRe
|
|
return out, nil
|
|
return out, nil
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+func (c *medicalClient) UserAuthInfoSave(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
|
|
+ out := new(CommonResp)
|
|
|
|
+ err := c.cc.Invoke(ctx, "/medical.Medical/userAuthInfoSave", in, out, opts...)
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ return out, nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (c *medicalClient) UserAuthInfo(ctx context.Context, in *CommonReq, opts ...grpc.CallOption) (*UserInfoResp, error) {
|
|
|
|
+ out := new(UserInfoResp)
|
|
|
|
+ err := c.cc.Invoke(ctx, "/medical.Medical/userAuthInfo", in, out, opts...)
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ return out, nil
|
|
|
|
+}
|
|
|
|
+
|
|
// MedicalServer is the server API for Medical service.
|
|
// MedicalServer is the server API for Medical service.
|
|
// All implementations must embed UnimplementedMedicalServer
|
|
// All implementations must embed UnimplementedMedicalServer
|
|
// for forward compatibility
|
|
// for forward compatibility
|
|
@@ -75,6 +97,10 @@ type MedicalServer interface {
|
|
GetFilterItem(context.Context, *Zero) (*FilterItemResp, error)
|
|
GetFilterItem(context.Context, *Zero) (*FilterItemResp, error)
|
|
//搜索经销商
|
|
//搜索经销商
|
|
Distributor(context.Context, *SearchDistributorReq) (*CompanyResp, error)
|
|
Distributor(context.Context, *SearchDistributorReq) (*CompanyResp, error)
|
|
|
|
+ //用户认证信息保存
|
|
|
|
+ UserAuthInfoSave(context.Context, *UserInfo) (*CommonResp, error)
|
|
|
|
+ //获取用户认证信息
|
|
|
|
+ UserAuthInfo(context.Context, *CommonReq) (*UserInfoResp, error)
|
|
mustEmbedUnimplementedMedicalServer()
|
|
mustEmbedUnimplementedMedicalServer()
|
|
}
|
|
}
|
|
|
|
|
|
@@ -91,6 +117,12 @@ func (UnimplementedMedicalServer) GetFilterItem(context.Context, *Zero) (*Filter
|
|
func (UnimplementedMedicalServer) Distributor(context.Context, *SearchDistributorReq) (*CompanyResp, error) {
|
|
func (UnimplementedMedicalServer) Distributor(context.Context, *SearchDistributorReq) (*CompanyResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Distributor not implemented")
|
|
return nil, status.Errorf(codes.Unimplemented, "method Distributor not implemented")
|
|
}
|
|
}
|
|
|
|
+func (UnimplementedMedicalServer) UserAuthInfoSave(context.Context, *UserInfo) (*CommonResp, error) {
|
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method UserAuthInfoSave not implemented")
|
|
|
|
+}
|
|
|
|
+func (UnimplementedMedicalServer) UserAuthInfo(context.Context, *CommonReq) (*UserInfoResp, error) {
|
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method UserAuthInfo not implemented")
|
|
|
|
+}
|
|
func (UnimplementedMedicalServer) mustEmbedUnimplementedMedicalServer() {}
|
|
func (UnimplementedMedicalServer) mustEmbedUnimplementedMedicalServer() {}
|
|
|
|
|
|
// UnsafeMedicalServer may be embedded to opt out of forward compatibility for this service.
|
|
// UnsafeMedicalServer may be embedded to opt out of forward compatibility for this service.
|
|
@@ -158,6 +190,42 @@ func _Medical_Distributor_Handler(srv interface{}, ctx context.Context, dec func
|
|
return interceptor(ctx, in, info, handler)
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+func _Medical_UserAuthInfoSave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
+ in := new(UserInfo)
|
|
|
|
+ if err := dec(in); err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ if interceptor == nil {
|
|
|
|
+ return srv.(MedicalServer).UserAuthInfoSave(ctx, in)
|
|
|
|
+ }
|
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
|
+ Server: srv,
|
|
|
|
+ FullMethod: "/medical.Medical/userAuthInfoSave",
|
|
|
|
+ }
|
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
+ return srv.(MedicalServer).UserAuthInfoSave(ctx, req.(*UserInfo))
|
|
|
|
+ }
|
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func _Medical_UserAuthInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
+ in := new(CommonReq)
|
|
|
|
+ if err := dec(in); err != nil {
|
|
|
|
+ return nil, err
|
|
|
|
+ }
|
|
|
|
+ if interceptor == nil {
|
|
|
|
+ return srv.(MedicalServer).UserAuthInfo(ctx, in)
|
|
|
|
+ }
|
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
|
+ Server: srv,
|
|
|
|
+ FullMethod: "/medical.Medical/userAuthInfo",
|
|
|
|
+ }
|
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
+ return srv.(MedicalServer).UserAuthInfo(ctx, req.(*CommonReq))
|
|
|
|
+ }
|
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
|
+}
|
|
|
|
+
|
|
// Medical_ServiceDesc is the grpc.ServiceDesc for Medical service.
|
|
// Medical_ServiceDesc is the grpc.ServiceDesc for Medical service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
// and not to be introspected or modified (even as a copy)
|
|
@@ -177,6 +245,14 @@ var Medical_ServiceDesc = grpc.ServiceDesc{
|
|
MethodName: "Distributor",
|
|
MethodName: "Distributor",
|
|
Handler: _Medical_Distributor_Handler,
|
|
Handler: _Medical_Distributor_Handler,
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ MethodName: "userAuthInfoSave",
|
|
|
|
+ Handler: _Medical_UserAuthInfoSave_Handler,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ MethodName: "userAuthInfo",
|
|
|
|
+ Handler: _Medical_UserAuthInfo_Handler,
|
|
|
|
+ },
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "medical.proto",
|
|
Metadata: "medical.proto",
|