feat: user info
This commit is contained in:
@@ -24,6 +24,7 @@ const (
|
||||
User_QrcodeScan_FullMethodName = "/user.User/QrcodeScan"
|
||||
User_QrcodeLogin_FullMethodName = "/user.User/QrcodeLogin"
|
||||
User_Info_FullMethodName = "/user.User/Info"
|
||||
User_Update_FullMethodName = "/user.User/Update"
|
||||
User_Password_FullMethodName = "/user.User/Password"
|
||||
User_GetOpenid_FullMethodName = "/user.User/GetOpenid"
|
||||
User_Client_FullMethodName = "/user.User/Client"
|
||||
@@ -38,6 +39,7 @@ const (
|
||||
User_InternalRevokeBizClient_FullMethodName = "/user.User/InternalRevokeBizClient"
|
||||
User_InternalGetUserInfo_FullMethodName = "/user.User/InternalGetUserInfo"
|
||||
User_InternalVerifyPassword_FullMethodName = "/user.User/InternalVerifyPassword"
|
||||
User_InternalUsersByBiz_FullMethodName = "/user.User/InternalUsersByBiz"
|
||||
)
|
||||
|
||||
// UserClient is the client API for User service.
|
||||
@@ -49,6 +51,7 @@ type UserClient interface {
|
||||
QrcodeScan(ctx context.Context, in *QrcodeScanReq, opts ...grpc.CallOption) (*Response, error)
|
||||
QrcodeLogin(ctx context.Context, in *QrcodeLoginReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Password(ctx context.Context, in *PasswordReq, opts ...grpc.CallOption) (*Response, error)
|
||||
GetOpenid(ctx context.Context, in *GetOpenidReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Client(ctx context.Context, in *ClientReq, opts ...grpc.CallOption) (*Response, error)
|
||||
@@ -63,6 +66,7 @@ type UserClient interface {
|
||||
InternalRevokeBizClient(ctx context.Context, in *InternalRevokeBizClientReq, opts ...grpc.CallOption) (*InternalRevokeBizClientData, error)
|
||||
InternalGetUserInfo(ctx context.Context, in *InternalGetUserInfoReq, opts ...grpc.CallOption) (*InternalGetUserInfoData, error)
|
||||
InternalVerifyPassword(ctx context.Context, in *InternalVerifyPasswordReq, opts ...grpc.CallOption) (*InternalVerifyPasswordData, error)
|
||||
InternalUsersByBiz(ctx context.Context, in *InternalUsersByBizReq, opts ...grpc.CallOption) (*InternalUsersByBizData, error)
|
||||
}
|
||||
|
||||
type userClient struct {
|
||||
@@ -123,6 +127,16 @@ func (c *userClient) Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOpt
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, User_Update_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) Password(ctx context.Context, in *PasswordReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
@@ -263,6 +277,16 @@ func (c *userClient) InternalVerifyPassword(ctx context.Context, in *InternalVer
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) InternalUsersByBiz(ctx context.Context, in *InternalUsersByBizReq, opts ...grpc.CallOption) (*InternalUsersByBizData, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(InternalUsersByBizData)
|
||||
err := c.cc.Invoke(ctx, User_InternalUsersByBiz_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UserServer is the server API for User service.
|
||||
// All implementations must embed UnimplementedUserServer
|
||||
// for forward compatibility.
|
||||
@@ -272,6 +296,7 @@ type UserServer interface {
|
||||
QrcodeScan(context.Context, *QrcodeScanReq) (*Response, error)
|
||||
QrcodeLogin(context.Context, *QrcodeLoginReq) (*Response, error)
|
||||
Info(context.Context, *InfoReq) (*Response, error)
|
||||
Update(context.Context, *UpdateReq) (*Response, error)
|
||||
Password(context.Context, *PasswordReq) (*Response, error)
|
||||
GetOpenid(context.Context, *GetOpenidReq) (*Response, error)
|
||||
Client(context.Context, *ClientReq) (*Response, error)
|
||||
@@ -286,6 +311,7 @@ type UserServer interface {
|
||||
InternalRevokeBizClient(context.Context, *InternalRevokeBizClientReq) (*InternalRevokeBizClientData, error)
|
||||
InternalGetUserInfo(context.Context, *InternalGetUserInfoReq) (*InternalGetUserInfoData, error)
|
||||
InternalVerifyPassword(context.Context, *InternalVerifyPasswordReq) (*InternalVerifyPasswordData, error)
|
||||
InternalUsersByBiz(context.Context, *InternalUsersByBizReq) (*InternalUsersByBizData, error)
|
||||
mustEmbedUnimplementedUserServer()
|
||||
}
|
||||
|
||||
@@ -311,6 +337,9 @@ func (UnimplementedUserServer) QrcodeLogin(context.Context, *QrcodeLoginReq) (*R
|
||||
func (UnimplementedUserServer) Info(context.Context, *InfoReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Info not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) Update(context.Context, *UpdateReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Update not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) Password(context.Context, *PasswordReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Password not implemented")
|
||||
}
|
||||
@@ -353,6 +382,9 @@ func (UnimplementedUserServer) InternalGetUserInfo(context.Context, *InternalGet
|
||||
func (UnimplementedUserServer) InternalVerifyPassword(context.Context, *InternalVerifyPasswordReq) (*InternalVerifyPasswordData, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method InternalVerifyPassword not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) InternalUsersByBiz(context.Context, *InternalUsersByBizReq) (*InternalUsersByBizData, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method InternalUsersByBiz not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
|
||||
func (UnimplementedUserServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -464,6 +496,24 @@ func _User_Info_Handler(srv interface{}, ctx context.Context, dec func(interface
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).Update(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_Update_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).Update(ctx, req.(*UpdateReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_Password_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PasswordReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -716,6 +766,24 @@ func _User_InternalVerifyPassword_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_InternalUsersByBiz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(InternalUsersByBizReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).InternalUsersByBiz(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_InternalUsersByBiz_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).InternalUsersByBiz(ctx, req.(*InternalUsersByBizReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// User_ServiceDesc is the grpc.ServiceDesc for User service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -743,6 +811,10 @@ var User_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Info",
|
||||
Handler: _User_Info_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Update",
|
||||
Handler: _User_Update_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Password",
|
||||
Handler: _User_Password_Handler,
|
||||
@@ -799,6 +871,10 @@ var User_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "InternalVerifyPassword",
|
||||
Handler: _User_InternalVerifyPassword_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "InternalUsersByBiz",
|
||||
Handler: _User_InternalUsersByBiz_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "user/user.proto",
|
||||
|
||||
Reference in New Issue
Block a user