fix: some api bug

This commit is contained in:
wwweww
2026-03-31 22:12:06 +08:00
parent c5ff4f0216
commit e7970ac25f
219 changed files with 16195 additions and 2126 deletions
+467 -45
View File
@@ -19,18 +19,29 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
Usercenter_AddUsers_FullMethodName = "/pb.usercenter/AddUsers"
Usercenter_UpdateUsers_FullMethodName = "/pb.usercenter/UpdateUsers"
Usercenter_DelUsers_FullMethodName = "/pb.usercenter/DelUsers"
Usercenter_GetUsersById_FullMethodName = "/pb.usercenter/GetUsersById"
Usercenter_GetUserByUsername_FullMethodName = "/pb.usercenter/GetUserByUsername"
Usercenter_SearchUsers_FullMethodName = "/pb.usercenter/SearchUsers"
Usercenter_Login_FullMethodName = "/pb.usercenter/Login"
Usercenter_Register_FullMethodName = "/pb.usercenter/Register"
Usercenter_ValidateToken_FullMethodName = "/pb.usercenter/ValidateToken"
Usercenter_CheckPermission_FullMethodName = "/pb.usercenter/CheckPermission"
Usercenter_Logout_FullMethodName = "/pb.usercenter/Logout"
Usercenter_ResetPassword_FullMethodName = "/pb.usercenter/ResetPassword"
Usercenter_AddUsers_FullMethodName = "/pb.usercenter/AddUsers"
Usercenter_UpdateUsers_FullMethodName = "/pb.usercenter/UpdateUsers"
Usercenter_DelUsers_FullMethodName = "/pb.usercenter/DelUsers"
Usercenter_GetUsersById_FullMethodName = "/pb.usercenter/GetUsersById"
Usercenter_SearchUsers_FullMethodName = "/pb.usercenter/SearchUsers"
Usercenter_GetUserByUsername_FullMethodName = "/pb.usercenter/GetUserByUsername"
Usercenter_Login_FullMethodName = "/pb.usercenter/Login"
Usercenter_Register_FullMethodName = "/pb.usercenter/Register"
Usercenter_ValidateToken_FullMethodName = "/pb.usercenter/ValidateToken"
Usercenter_CheckPermission_FullMethodName = "/pb.usercenter/CheckPermission"
Usercenter_Logout_FullMethodName = "/pb.usercenter/Logout"
Usercenter_ResetPassword_FullMethodName = "/pb.usercenter/ResetPassword"
Usercenter_SwitchRole_FullMethodName = "/pb.usercenter/SwitchRole"
Usercenter_AddUserFollows_FullMethodName = "/pb.usercenter/AddUserFollows"
Usercenter_UpdateUserFollows_FullMethodName = "/pb.usercenter/UpdateUserFollows"
Usercenter_DelUserFollows_FullMethodName = "/pb.usercenter/DelUserFollows"
Usercenter_GetUserFollowsById_FullMethodName = "/pb.usercenter/GetUserFollowsById"
Usercenter_SearchUserFollows_FullMethodName = "/pb.usercenter/SearchUserFollows"
Usercenter_AddUserPreferences_FullMethodName = "/pb.usercenter/AddUserPreferences"
Usercenter_UpdateUserPreferences_FullMethodName = "/pb.usercenter/UpdateUserPreferences"
Usercenter_DelUserPreferences_FullMethodName = "/pb.usercenter/DelUserPreferences"
Usercenter_GetUserPreferencesById_FullMethodName = "/pb.usercenter/GetUserPreferencesById"
Usercenter_SearchUserPreferences_FullMethodName = "/pb.usercenter/SearchUserPreferences"
)
// UsercenterClient is the client API for Usercenter service.
@@ -42,14 +53,27 @@ type UsercenterClient interface {
UpdateUsers(ctx context.Context, in *UpdateUsersReq, opts ...grpc.CallOption) (*UpdateUsersResp, error)
DelUsers(ctx context.Context, in *DelUsersReq, opts ...grpc.CallOption) (*DelUsersResp, error)
GetUsersById(ctx context.Context, in *GetUsersByIdReq, opts ...grpc.CallOption) (*GetUsersByIdResp, error)
GetUserByUsername(ctx context.Context, in *GetUserByUsernameReq, opts ...grpc.CallOption) (*GetUserByUsernameResp, error)
SearchUsers(ctx context.Context, in *SearchUsersReq, opts ...grpc.CallOption) (*SearchUsersResp, error)
GetUserByUsername(ctx context.Context, in *GetUserByUsernameReq, opts ...grpc.CallOption) (*GetUserByUsernameResp, error)
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error)
ValidateToken(ctx context.Context, in *ValidateTokenReq, opts ...grpc.CallOption) (*ValidateTokenResp, error)
CheckPermission(ctx context.Context, in *CheckPermissionReq, opts ...grpc.CallOption) (*CheckPermissionResp, error)
Logout(ctx context.Context, in *LogoutReq, opts ...grpc.CallOption) (*LogoutResp, error)
ResetPassword(ctx context.Context, in *ResetPasswordReq, opts ...grpc.CallOption) (*ResetPasswordResp, error)
SwitchRole(ctx context.Context, in *SwitchRoleReq, opts ...grpc.CallOption) (*SwitchRoleResp, error)
// -----------------------userFollows-----------------------
AddUserFollows(ctx context.Context, in *AddUserFollowsReq, opts ...grpc.CallOption) (*AddUserFollowsResp, error)
UpdateUserFollows(ctx context.Context, in *UpdateUserFollowsReq, opts ...grpc.CallOption) (*UpdateUserFollowsResp, error)
DelUserFollows(ctx context.Context, in *DelUserFollowsReq, opts ...grpc.CallOption) (*DelUserFollowsResp, error)
GetUserFollowsById(ctx context.Context, in *GetUserFollowsByIdReq, opts ...grpc.CallOption) (*GetUserFollowsByIdResp, error)
SearchUserFollows(ctx context.Context, in *SearchUserFollowsReq, opts ...grpc.CallOption) (*SearchUserFollowsResp, error)
// -----------------------userPreferences-----------------------
AddUserPreferences(ctx context.Context, in *AddUserPreferencesReq, opts ...grpc.CallOption) (*AddUserPreferencesResp, error)
UpdateUserPreferences(ctx context.Context, in *UpdateUserPreferencesReq, opts ...grpc.CallOption) (*UpdateUserPreferencesResp, error)
DelUserPreferences(ctx context.Context, in *DelUserPreferencesReq, opts ...grpc.CallOption) (*DelUserPreferencesResp, error)
GetUserPreferencesById(ctx context.Context, in *GetUserPreferencesByIdReq, opts ...grpc.CallOption) (*GetUserPreferencesByIdResp, error)
SearchUserPreferences(ctx context.Context, in *SearchUserPreferencesReq, opts ...grpc.CallOption) (*SearchUserPreferencesResp, error)
}
type usercenterClient struct {
@@ -100,20 +124,20 @@ func (c *usercenterClient) GetUsersById(ctx context.Context, in *GetUsersByIdReq
return out, nil
}
func (c *usercenterClient) GetUserByUsername(ctx context.Context, in *GetUserByUsernameReq, opts ...grpc.CallOption) (*GetUserByUsernameResp, error) {
func (c *usercenterClient) SearchUsers(ctx context.Context, in *SearchUsersReq, opts ...grpc.CallOption) (*SearchUsersResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUserByUsernameResp)
err := c.cc.Invoke(ctx, Usercenter_GetUserByUsername_FullMethodName, in, out, cOpts...)
out := new(SearchUsersResp)
err := c.cc.Invoke(ctx, Usercenter_SearchUsers_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) SearchUsers(ctx context.Context, in *SearchUsersReq, opts ...grpc.CallOption) (*SearchUsersResp, error) {
func (c *usercenterClient) GetUserByUsername(ctx context.Context, in *GetUserByUsernameReq, opts ...grpc.CallOption) (*GetUserByUsernameResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchUsersResp)
err := c.cc.Invoke(ctx, Usercenter_SearchUsers_FullMethodName, in, out, cOpts...)
out := new(GetUserByUsernameResp)
err := c.cc.Invoke(ctx, Usercenter_GetUserByUsername_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -180,6 +204,116 @@ func (c *usercenterClient) ResetPassword(ctx context.Context, in *ResetPasswordR
return out, nil
}
func (c *usercenterClient) SwitchRole(ctx context.Context, in *SwitchRoleReq, opts ...grpc.CallOption) (*SwitchRoleResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SwitchRoleResp)
err := c.cc.Invoke(ctx, Usercenter_SwitchRole_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) AddUserFollows(ctx context.Context, in *AddUserFollowsReq, opts ...grpc.CallOption) (*AddUserFollowsResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddUserFollowsResp)
err := c.cc.Invoke(ctx, Usercenter_AddUserFollows_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) UpdateUserFollows(ctx context.Context, in *UpdateUserFollowsReq, opts ...grpc.CallOption) (*UpdateUserFollowsResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpdateUserFollowsResp)
err := c.cc.Invoke(ctx, Usercenter_UpdateUserFollows_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) DelUserFollows(ctx context.Context, in *DelUserFollowsReq, opts ...grpc.CallOption) (*DelUserFollowsResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DelUserFollowsResp)
err := c.cc.Invoke(ctx, Usercenter_DelUserFollows_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) GetUserFollowsById(ctx context.Context, in *GetUserFollowsByIdReq, opts ...grpc.CallOption) (*GetUserFollowsByIdResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUserFollowsByIdResp)
err := c.cc.Invoke(ctx, Usercenter_GetUserFollowsById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) SearchUserFollows(ctx context.Context, in *SearchUserFollowsReq, opts ...grpc.CallOption) (*SearchUserFollowsResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchUserFollowsResp)
err := c.cc.Invoke(ctx, Usercenter_SearchUserFollows_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) AddUserPreferences(ctx context.Context, in *AddUserPreferencesReq, opts ...grpc.CallOption) (*AddUserPreferencesResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddUserPreferencesResp)
err := c.cc.Invoke(ctx, Usercenter_AddUserPreferences_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) UpdateUserPreferences(ctx context.Context, in *UpdateUserPreferencesReq, opts ...grpc.CallOption) (*UpdateUserPreferencesResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UpdateUserPreferencesResp)
err := c.cc.Invoke(ctx, Usercenter_UpdateUserPreferences_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) DelUserPreferences(ctx context.Context, in *DelUserPreferencesReq, opts ...grpc.CallOption) (*DelUserPreferencesResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DelUserPreferencesResp)
err := c.cc.Invoke(ctx, Usercenter_DelUserPreferences_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) GetUserPreferencesById(ctx context.Context, in *GetUserPreferencesByIdReq, opts ...grpc.CallOption) (*GetUserPreferencesByIdResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetUserPreferencesByIdResp)
err := c.cc.Invoke(ctx, Usercenter_GetUserPreferencesById_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *usercenterClient) SearchUserPreferences(ctx context.Context, in *SearchUserPreferencesReq, opts ...grpc.CallOption) (*SearchUserPreferencesResp, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchUserPreferencesResp)
err := c.cc.Invoke(ctx, Usercenter_SearchUserPreferences_FullMethodName, in, out, cOpts...)
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.
@@ -189,14 +323,27 @@ type UsercenterServer interface {
UpdateUsers(context.Context, *UpdateUsersReq) (*UpdateUsersResp, error)
DelUsers(context.Context, *DelUsersReq) (*DelUsersResp, error)
GetUsersById(context.Context, *GetUsersByIdReq) (*GetUsersByIdResp, error)
GetUserByUsername(context.Context, *GetUserByUsernameReq) (*GetUserByUsernameResp, error)
SearchUsers(context.Context, *SearchUsersReq) (*SearchUsersResp, error)
GetUserByUsername(context.Context, *GetUserByUsernameReq) (*GetUserByUsernameResp, error)
Login(context.Context, *LoginReq) (*LoginResp, error)
Register(context.Context, *RegisterReq) (*RegisterResp, error)
ValidateToken(context.Context, *ValidateTokenReq) (*ValidateTokenResp, error)
CheckPermission(context.Context, *CheckPermissionReq) (*CheckPermissionResp, error)
Logout(context.Context, *LogoutReq) (*LogoutResp, error)
ResetPassword(context.Context, *ResetPasswordReq) (*ResetPasswordResp, error)
SwitchRole(context.Context, *SwitchRoleReq) (*SwitchRoleResp, error)
// -----------------------userFollows-----------------------
AddUserFollows(context.Context, *AddUserFollowsReq) (*AddUserFollowsResp, error)
UpdateUserFollows(context.Context, *UpdateUserFollowsReq) (*UpdateUserFollowsResp, error)
DelUserFollows(context.Context, *DelUserFollowsReq) (*DelUserFollowsResp, error)
GetUserFollowsById(context.Context, *GetUserFollowsByIdReq) (*GetUserFollowsByIdResp, error)
SearchUserFollows(context.Context, *SearchUserFollowsReq) (*SearchUserFollowsResp, error)
// -----------------------userPreferences-----------------------
AddUserPreferences(context.Context, *AddUserPreferencesReq) (*AddUserPreferencesResp, error)
UpdateUserPreferences(context.Context, *UpdateUserPreferencesReq) (*UpdateUserPreferencesResp, error)
DelUserPreferences(context.Context, *DelUserPreferencesReq) (*DelUserPreferencesResp, error)
GetUserPreferencesById(context.Context, *GetUserPreferencesByIdReq) (*GetUserPreferencesByIdResp, error)
SearchUserPreferences(context.Context, *SearchUserPreferencesReq) (*SearchUserPreferencesResp, error)
mustEmbedUnimplementedUsercenterServer()
}
@@ -219,12 +366,12 @@ func (UnimplementedUsercenterServer) DelUsers(context.Context, *DelUsersReq) (*D
func (UnimplementedUsercenterServer) GetUsersById(context.Context, *GetUsersByIdReq) (*GetUsersByIdResp, error) {
return nil, status.Error(codes.Unimplemented, "method GetUsersById not implemented")
}
func (UnimplementedUsercenterServer) GetUserByUsername(context.Context, *GetUserByUsernameReq) (*GetUserByUsernameResp, error) {
return nil, status.Error(codes.Unimplemented, "method GetUserByUsername not implemented")
}
func (UnimplementedUsercenterServer) SearchUsers(context.Context, *SearchUsersReq) (*SearchUsersResp, error) {
return nil, status.Error(codes.Unimplemented, "method SearchUsers not implemented")
}
func (UnimplementedUsercenterServer) GetUserByUsername(context.Context, *GetUserByUsernameReq) (*GetUserByUsernameResp, error) {
return nil, status.Error(codes.Unimplemented, "method GetUserByUsername not implemented")
}
func (UnimplementedUsercenterServer) Login(context.Context, *LoginReq) (*LoginResp, error) {
return nil, status.Error(codes.Unimplemented, "method Login not implemented")
}
@@ -243,6 +390,39 @@ func (UnimplementedUsercenterServer) Logout(context.Context, *LogoutReq) (*Logou
func (UnimplementedUsercenterServer) ResetPassword(context.Context, *ResetPasswordReq) (*ResetPasswordResp, error) {
return nil, status.Error(codes.Unimplemented, "method ResetPassword not implemented")
}
func (UnimplementedUsercenterServer) SwitchRole(context.Context, *SwitchRoleReq) (*SwitchRoleResp, error) {
return nil, status.Error(codes.Unimplemented, "method SwitchRole not implemented")
}
func (UnimplementedUsercenterServer) AddUserFollows(context.Context, *AddUserFollowsReq) (*AddUserFollowsResp, error) {
return nil, status.Error(codes.Unimplemented, "method AddUserFollows not implemented")
}
func (UnimplementedUsercenterServer) UpdateUserFollows(context.Context, *UpdateUserFollowsReq) (*UpdateUserFollowsResp, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateUserFollows not implemented")
}
func (UnimplementedUsercenterServer) DelUserFollows(context.Context, *DelUserFollowsReq) (*DelUserFollowsResp, error) {
return nil, status.Error(codes.Unimplemented, "method DelUserFollows not implemented")
}
func (UnimplementedUsercenterServer) GetUserFollowsById(context.Context, *GetUserFollowsByIdReq) (*GetUserFollowsByIdResp, error) {
return nil, status.Error(codes.Unimplemented, "method GetUserFollowsById not implemented")
}
func (UnimplementedUsercenterServer) SearchUserFollows(context.Context, *SearchUserFollowsReq) (*SearchUserFollowsResp, error) {
return nil, status.Error(codes.Unimplemented, "method SearchUserFollows not implemented")
}
func (UnimplementedUsercenterServer) AddUserPreferences(context.Context, *AddUserPreferencesReq) (*AddUserPreferencesResp, error) {
return nil, status.Error(codes.Unimplemented, "method AddUserPreferences not implemented")
}
func (UnimplementedUsercenterServer) UpdateUserPreferences(context.Context, *UpdateUserPreferencesReq) (*UpdateUserPreferencesResp, error) {
return nil, status.Error(codes.Unimplemented, "method UpdateUserPreferences not implemented")
}
func (UnimplementedUsercenterServer) DelUserPreferences(context.Context, *DelUserPreferencesReq) (*DelUserPreferencesResp, error) {
return nil, status.Error(codes.Unimplemented, "method DelUserPreferences not implemented")
}
func (UnimplementedUsercenterServer) GetUserPreferencesById(context.Context, *GetUserPreferencesByIdReq) (*GetUserPreferencesByIdResp, error) {
return nil, status.Error(codes.Unimplemented, "method GetUserPreferencesById not implemented")
}
func (UnimplementedUsercenterServer) SearchUserPreferences(context.Context, *SearchUserPreferencesReq) (*SearchUserPreferencesResp, error) {
return nil, status.Error(codes.Unimplemented, "method SearchUserPreferences not implemented")
}
func (UnimplementedUsercenterServer) mustEmbedUnimplementedUsercenterServer() {}
func (UnimplementedUsercenterServer) testEmbeddedByValue() {}
@@ -336,24 +516,6 @@ func _Usercenter_GetUsersById_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _Usercenter_GetUserByUsername_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserByUsernameReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).GetUserByUsername(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_GetUserByUsername_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).GetUserByUsername(ctx, req.(*GetUserByUsernameReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_SearchUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchUsersReq)
if err := dec(in); err != nil {
@@ -372,6 +534,24 @@ func _Usercenter_SearchUsers_Handler(srv interface{}, ctx context.Context, dec f
return interceptor(ctx, in, info, handler)
}
func _Usercenter_GetUserByUsername_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserByUsernameReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).GetUserByUsername(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_GetUserByUsername_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).GetUserByUsername(ctx, req.(*GetUserByUsernameReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginReq)
if err := dec(in); err != nil {
@@ -480,6 +660,204 @@ func _Usercenter_ResetPassword_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _Usercenter_SwitchRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SwitchRoleReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).SwitchRole(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_SwitchRole_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).SwitchRole(ctx, req.(*SwitchRoleReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_AddUserFollows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddUserFollowsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).AddUserFollows(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_AddUserFollows_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).AddUserFollows(ctx, req.(*AddUserFollowsReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_UpdateUserFollows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateUserFollowsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).UpdateUserFollows(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_UpdateUserFollows_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).UpdateUserFollows(ctx, req.(*UpdateUserFollowsReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_DelUserFollows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DelUserFollowsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).DelUserFollows(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_DelUserFollows_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).DelUserFollows(ctx, req.(*DelUserFollowsReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_GetUserFollowsById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserFollowsByIdReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).GetUserFollowsById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_GetUserFollowsById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).GetUserFollowsById(ctx, req.(*GetUserFollowsByIdReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_SearchUserFollows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchUserFollowsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).SearchUserFollows(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_SearchUserFollows_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).SearchUserFollows(ctx, req.(*SearchUserFollowsReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_AddUserPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddUserPreferencesReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).AddUserPreferences(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_AddUserPreferences_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).AddUserPreferences(ctx, req.(*AddUserPreferencesReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_UpdateUserPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateUserPreferencesReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).UpdateUserPreferences(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_UpdateUserPreferences_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).UpdateUserPreferences(ctx, req.(*UpdateUserPreferencesReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_DelUserPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DelUserPreferencesReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).DelUserPreferences(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_DelUserPreferences_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).DelUserPreferences(ctx, req.(*DelUserPreferencesReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_GetUserPreferencesById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserPreferencesByIdReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).GetUserPreferencesById(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_GetUserPreferencesById_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).GetUserPreferencesById(ctx, req.(*GetUserPreferencesByIdReq))
}
return interceptor(ctx, in, info, handler)
}
func _Usercenter_SearchUserPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchUserPreferencesReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UsercenterServer).SearchUserPreferences(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Usercenter_SearchUserPreferences_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UsercenterServer).SearchUserPreferences(ctx, req.(*SearchUserPreferencesReq))
}
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)
@@ -503,14 +881,14 @@ var Usercenter_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetUsersById",
Handler: _Usercenter_GetUsersById_Handler,
},
{
MethodName: "GetUserByUsername",
Handler: _Usercenter_GetUserByUsername_Handler,
},
{
MethodName: "SearchUsers",
Handler: _Usercenter_SearchUsers_Handler,
},
{
MethodName: "GetUserByUsername",
Handler: _Usercenter_GetUserByUsername_Handler,
},
{
MethodName: "Login",
Handler: _Usercenter_Login_Handler,
@@ -535,6 +913,50 @@ var Usercenter_ServiceDesc = grpc.ServiceDesc{
MethodName: "ResetPassword",
Handler: _Usercenter_ResetPassword_Handler,
},
{
MethodName: "SwitchRole",
Handler: _Usercenter_SwitchRole_Handler,
},
{
MethodName: "AddUserFollows",
Handler: _Usercenter_AddUserFollows_Handler,
},
{
MethodName: "UpdateUserFollows",
Handler: _Usercenter_UpdateUserFollows_Handler,
},
{
MethodName: "DelUserFollows",
Handler: _Usercenter_DelUserFollows_Handler,
},
{
MethodName: "GetUserFollowsById",
Handler: _Usercenter_GetUserFollowsById_Handler,
},
{
MethodName: "SearchUserFollows",
Handler: _Usercenter_SearchUserFollows_Handler,
},
{
MethodName: "AddUserPreferences",
Handler: _Usercenter_AddUserPreferences_Handler,
},
{
MethodName: "UpdateUserPreferences",
Handler: _Usercenter_UpdateUserPreferences_Handler,
},
{
MethodName: "DelUserPreferences",
Handler: _Usercenter_DelUserPreferences_Handler,
},
{
MethodName: "GetUserPreferencesById",
Handler: _Usercenter_GetUserPreferencesById_Handler,
},
{
MethodName: "SearchUserPreferences",
Handler: _Usercenter_SearchUserPreferences_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "users.proto",