You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

584 lines
21 KiB
Go

3 years ago
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// source: rpc/pb/user_center.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// UserCenterClient is the client API for UserCenter service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type UserCenterClient interface {
// user
CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*CreateUserResp, error)
UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*UpdateUserResp, error)
DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*DeleteUserResp, error)
GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error)
GetUserBySocial(ctx context.Context, in *GetUserBySocialReq, opts ...grpc.CallOption) (*GetUserResp, error)
// user-biz
ModifyAccount(ctx context.Context, in *ModifyAccountReq, opts ...grpc.CallOption) (*UpdateUserResp, error)
BindSocial(ctx context.Context, in *BindSocialReq, opts ...grpc.CallOption) (*BindSocialResp, error)
// user login record
UserLoginRecord(ctx context.Context, in *UserLoginRecordReq, opts ...grpc.CallOption) (*SimpleMessage, error)
// role
CreateRole(ctx context.Context, in *CreateRoleReq, opts ...grpc.CallOption) (*CreateRoleResp, error)
UpdateRole(ctx context.Context, in *UpdateRoleReq, opts ...grpc.CallOption) (*UpdateRoleResp, error)
DeleteRole(ctx context.Context, in *DeleteRoleReq, opts ...grpc.CallOption) (*DeleteRoleResp, error)
GetRole(ctx context.Context, in *GetRoleReq, opts ...grpc.CallOption) (*GetRoleResp, error)
// relationship
BindRole(ctx context.Context, in *BindRoleReq, opts ...grpc.CallOption) (*BindRoleResp, error)
BindUser(ctx context.Context, in *BindUserReq, opts ...grpc.CallOption) (*BindUserResp, error)
}
type userCenterClient struct {
cc grpc.ClientConnInterface
}
func NewUserCenterClient(cc grpc.ClientConnInterface) UserCenterClient {
return &userCenterClient{cc}
}
func (c *userCenterClient) CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*CreateUserResp, error) {
out := new(CreateUserResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/createUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*UpdateUserResp, error) {
out := new(UpdateUserResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/updateUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*DeleteUserResp, error) {
out := new(DeleteUserResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/deleteUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserResp, error) {
out := new(GetUserResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/getUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) GetUserBySocial(ctx context.Context, in *GetUserBySocialReq, opts ...grpc.CallOption) (*GetUserResp, error) {
out := new(GetUserResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/getUserBySocial", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) ModifyAccount(ctx context.Context, in *ModifyAccountReq, opts ...grpc.CallOption) (*UpdateUserResp, error) {
out := new(UpdateUserResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/modifyAccount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) BindSocial(ctx context.Context, in *BindSocialReq, opts ...grpc.CallOption) (*BindSocialResp, error) {
out := new(BindSocialResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/bindSocial", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) UserLoginRecord(ctx context.Context, in *UserLoginRecordReq, opts ...grpc.CallOption) (*SimpleMessage, error) {
out := new(SimpleMessage)
err := c.cc.Invoke(ctx, "/pb.userCenter/userLoginRecord", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) CreateRole(ctx context.Context, in *CreateRoleReq, opts ...grpc.CallOption) (*CreateRoleResp, error) {
out := new(CreateRoleResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/createRole", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) UpdateRole(ctx context.Context, in *UpdateRoleReq, opts ...grpc.CallOption) (*UpdateRoleResp, error) {
out := new(UpdateRoleResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/updateRole", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) DeleteRole(ctx context.Context, in *DeleteRoleReq, opts ...grpc.CallOption) (*DeleteRoleResp, error) {
out := new(DeleteRoleResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/deleteRole", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) GetRole(ctx context.Context, in *GetRoleReq, opts ...grpc.CallOption) (*GetRoleResp, error) {
out := new(GetRoleResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/getRole", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) BindRole(ctx context.Context, in *BindRoleReq, opts ...grpc.CallOption) (*BindRoleResp, error) {
out := new(BindRoleResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/bindRole", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userCenterClient) BindUser(ctx context.Context, in *BindUserReq, opts ...grpc.CallOption) (*BindUserResp, error) {
out := new(BindUserResp)
err := c.cc.Invoke(ctx, "/pb.userCenter/bindUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserCenterServer is the server API for UserCenter service.
// All implementations must embed UnimplementedUserCenterServer
// for forward compatibility
type UserCenterServer interface {
// user
CreateUser(context.Context, *CreateUserReq) (*CreateUserResp, error)
UpdateUser(context.Context, *UpdateUserReq) (*UpdateUserResp, error)
DeleteUser(context.Context, *DeleteUserReq) (*DeleteUserResp, error)
GetUser(context.Context, *GetUserReq) (*GetUserResp, error)
GetUserBySocial(context.Context, *GetUserBySocialReq) (*GetUserResp, error)
// user-biz
ModifyAccount(context.Context, *ModifyAccountReq) (*UpdateUserResp, error)
BindSocial(context.Context, *BindSocialReq) (*BindSocialResp, error)
// user login record
UserLoginRecord(context.Context, *UserLoginRecordReq) (*SimpleMessage, error)
// role
CreateRole(context.Context, *CreateRoleReq) (*CreateRoleResp, error)
UpdateRole(context.Context, *UpdateRoleReq) (*UpdateRoleResp, error)
DeleteRole(context.Context, *DeleteRoleReq) (*DeleteRoleResp, error)
GetRole(context.Context, *GetRoleReq) (*GetRoleResp, error)
// relationship
BindRole(context.Context, *BindRoleReq) (*BindRoleResp, error)
BindUser(context.Context, *BindUserReq) (*BindUserResp, error)
mustEmbedUnimplementedUserCenterServer()
}
// UnimplementedUserCenterServer must be embedded to have forward compatible implementations.
type UnimplementedUserCenterServer struct {
}
func (UnimplementedUserCenterServer) CreateUser(context.Context, *CreateUserReq) (*CreateUserResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented")
}
func (UnimplementedUserCenterServer) UpdateUser(context.Context, *UpdateUserReq) (*UpdateUserResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
}
func (UnimplementedUserCenterServer) DeleteUser(context.Context, *DeleteUserReq) (*DeleteUserResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
}
func (UnimplementedUserCenterServer) GetUser(context.Context, *GetUserReq) (*GetUserResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedUserCenterServer) GetUserBySocial(context.Context, *GetUserBySocialReq) (*GetUserResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUserBySocial not implemented")
}
func (UnimplementedUserCenterServer) ModifyAccount(context.Context, *ModifyAccountReq) (*UpdateUserResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ModifyAccount not implemented")
}
func (UnimplementedUserCenterServer) BindSocial(context.Context, *BindSocialReq) (*BindSocialResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method BindSocial not implemented")
}
func (UnimplementedUserCenterServer) UserLoginRecord(context.Context, *UserLoginRecordReq) (*SimpleMessage, error) {
return nil, status.Errorf(codes.Unimplemented, "method UserLoginRecord not implemented")
}
func (UnimplementedUserCenterServer) CreateRole(context.Context, *CreateRoleReq) (*CreateRoleResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented")
}
func (UnimplementedUserCenterServer) UpdateRole(context.Context, *UpdateRoleReq) (*UpdateRoleResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented")
}
func (UnimplementedUserCenterServer) DeleteRole(context.Context, *DeleteRoleReq) (*DeleteRoleResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented")
}
func (UnimplementedUserCenterServer) GetRole(context.Context, *GetRoleReq) (*GetRoleResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented")
}
func (UnimplementedUserCenterServer) BindRole(context.Context, *BindRoleReq) (*BindRoleResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method BindRole not implemented")
}
func (UnimplementedUserCenterServer) BindUser(context.Context, *BindUserReq) (*BindUserResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method BindUser not implemented")
}
func (UnimplementedUserCenterServer) mustEmbedUnimplementedUserCenterServer() {}
// UnsafeUserCenterServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserCenterServer will
// result in compilation errors.
type UnsafeUserCenterServer interface {
mustEmbedUnimplementedUserCenterServer()
}
func RegisterUserCenterServer(s grpc.ServiceRegistrar, srv UserCenterServer) {
s.RegisterService(&UserCenter_ServiceDesc, srv)
}
func _UserCenter_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateUserReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).CreateUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/createUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).CreateUser(ctx, req.(*CreateUserReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateUserReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).UpdateUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/updateUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).UpdateUser(ctx, req.(*UpdateUserReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteUserReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).DeleteUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/deleteUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).DeleteUser(ctx, req.(*DeleteUserReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).GetUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/getUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).GetUser(ctx, req.(*GetUserReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_GetUserBySocial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserBySocialReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).GetUserBySocial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/getUserBySocial",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).GetUserBySocial(ctx, req.(*GetUserBySocialReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_ModifyAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModifyAccountReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).ModifyAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/modifyAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).ModifyAccount(ctx, req.(*ModifyAccountReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_BindSocial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BindSocialReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).BindSocial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/bindSocial",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).BindSocial(ctx, req.(*BindSocialReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_UserLoginRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UserLoginRecordReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).UserLoginRecord(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/userLoginRecord",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).UserLoginRecord(ctx, req.(*UserLoginRecordReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_CreateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateRoleReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).CreateRole(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/createRole",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).CreateRole(ctx, req.(*CreateRoleReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_UpdateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateRoleReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).UpdateRole(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/updateRole",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).UpdateRole(ctx, req.(*UpdateRoleReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_DeleteRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRoleReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).DeleteRole(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/deleteRole",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).DeleteRole(ctx, req.(*DeleteRoleReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_GetRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRoleReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).GetRole(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/getRole",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).GetRole(ctx, req.(*GetRoleReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_BindRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BindRoleReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).BindRole(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/bindRole",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).BindRole(ctx, req.(*BindRoleReq))
}
return interceptor(ctx, in, info, handler)
}
func _UserCenter_BindUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BindUserReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserCenterServer).BindUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.userCenter/bindUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserCenterServer).BindUser(ctx, req.(*BindUserReq))
}
return interceptor(ctx, in, info, handler)
}
// UserCenter_ServiceDesc is the grpc.ServiceDesc for UserCenter service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserCenter_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.userCenter",
HandlerType: (*UserCenterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "createUser",
Handler: _UserCenter_CreateUser_Handler,
},
{
MethodName: "updateUser",
Handler: _UserCenter_UpdateUser_Handler,
},
{
MethodName: "deleteUser",
Handler: _UserCenter_DeleteUser_Handler,
},
{
MethodName: "getUser",
Handler: _UserCenter_GetUser_Handler,
},
{
MethodName: "getUserBySocial",
Handler: _UserCenter_GetUserBySocial_Handler,
},
{
MethodName: "modifyAccount",
Handler: _UserCenter_ModifyAccount_Handler,
},
{
MethodName: "bindSocial",
Handler: _UserCenter_BindSocial_Handler,
},
{
MethodName: "userLoginRecord",
Handler: _UserCenter_UserLoginRecord_Handler,
},
{
MethodName: "createRole",
Handler: _UserCenter_CreateRole_Handler,
},
{
MethodName: "updateRole",
Handler: _UserCenter_UpdateRole_Handler,
},
{
MethodName: "deleteRole",
Handler: _UserCenter_DeleteRole_Handler,
},
{
MethodName: "getRole",
Handler: _UserCenter_GetRole_Handler,
},
{
MethodName: "bindRole",
Handler: _UserCenter_BindRole_Handler,
},
{
MethodName: "bindUser",
Handler: _UserCenter_BindUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "rpc/pb/user_center.proto",
}