From 1936533244c8ba3ffb5feb99816654e950d97278 Mon Sep 17 00:00:00 2001 From: zetaloop Date: Fri, 24 Apr 2026 06:44:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20GetUsersByIds=20?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E7=94=A8=E6=88=B7=E6=9F=A5=E8=AF=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rpc/internal/logic/getUsersByIdsLogic.go | 38 ++ .../rpc/internal/server/usercenterServer.go | 7 +- app/users/rpc/pb/users.pb.go | 544 +++++++++++------- app/users/rpc/pb/users_grpc.pb.go | 40 +- app/users/rpc/usercenter/usercenter.go | 10 +- desc/rpc/users.proto | 9 + 6 files changed, 422 insertions(+), 226 deletions(-) create mode 100644 app/users/rpc/internal/logic/getUsersByIdsLogic.go diff --git a/app/users/rpc/internal/logic/getUsersByIdsLogic.go b/app/users/rpc/internal/logic/getUsersByIdsLogic.go new file mode 100644 index 0000000..9c8313a --- /dev/null +++ b/app/users/rpc/internal/logic/getUsersByIdsLogic.go @@ -0,0 +1,38 @@ +package logic + +import ( + "context" + "juwan-backend/app/users/rpc/internal/models/users" + + "juwan-backend/app/users/rpc/internal/svc" + "juwan-backend/app/users/rpc/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetUsersByIdsLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetUsersByIdsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUsersByIdsLogic { + return &GetUsersByIdsLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GetUsersByIdsLogic) GetUsersByIds(in *pb.GetUsersByIdsReq) (*pb.GetUsersByIdsResp, error) { + if len(in.Ids) == 0 { + return &pb.GetUsersByIdsResp{}, nil + } + + userList, err := l.svcCtx.UsersModelRO.Users.Query().Where(users.IDIn(in.Ids...)).All(l.ctx) + if err != nil { + return nil, err + } + + return &pb.GetUsersByIdsResp{Users: ConvertEntUsersToProto(userList)}, nil +} diff --git a/app/users/rpc/internal/server/usercenterServer.go b/app/users/rpc/internal/server/usercenterServer.go index 6472954..802165b 100644 --- a/app/users/rpc/internal/server/usercenterServer.go +++ b/app/users/rpc/internal/server/usercenterServer.go @@ -1,5 +1,5 @@ // Code generated by goctl. DO NOT EDIT. -// goctl 1.9.2 +// goctl 1.10.1 // Source: users.proto package server @@ -44,6 +44,11 @@ func (s *UsercenterServer) GetUsersById(ctx context.Context, in *pb.GetUsersById return l.GetUsersById(in) } +func (s *UsercenterServer) GetUsersByIds(ctx context.Context, in *pb.GetUsersByIdsReq) (*pb.GetUsersByIdsResp, error) { + l := logic.NewGetUsersByIdsLogic(ctx, s.svcCtx) + return l.GetUsersByIds(in) +} + func (s *UsercenterServer) SearchUsers(ctx context.Context, in *pb.SearchUsersReq) (*pb.SearchUsersResp, error) { l := logic.NewSearchUsersLogic(ctx, s.svcCtx) return l.SearchUsers(in) diff --git a/app/users/rpc/pb/users.pb.go b/app/users/rpc/pb/users.pb.go index c1bf7cb..a60a37d 100644 --- a/app/users/rpc/pb/users.pb.go +++ b/app/users/rpc/pb/users.pb.go @@ -723,6 +723,94 @@ func (x *GetUsersByIdResp) GetUsers() *Users { return nil } +type GetUsersByIdsReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` //ids + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUsersByIdsReq) Reset() { + *x = GetUsersByIdsReq{} + mi := &file_users_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUsersByIdsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersByIdsReq) ProtoMessage() {} + +func (x *GetUsersByIdsReq) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUsersByIdsReq.ProtoReflect.Descriptor instead. +func (*GetUsersByIdsReq) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{9} +} + +func (x *GetUsersByIdsReq) GetIds() []int64 { + if x != nil { + return x.Ids + } + return nil +} + +type GetUsersByIdsResp struct { + state protoimpl.MessageState `protogen:"open.v1"` + Users []*Users `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` //users + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUsersByIdsResp) Reset() { + *x = GetUsersByIdsResp{} + mi := &file_users_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUsersByIdsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersByIdsResp) ProtoMessage() {} + +func (x *GetUsersByIdsResp) ProtoReflect() protoreflect.Message { + mi := &file_users_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUsersByIdsResp.ProtoReflect.Descriptor instead. +func (*GetUsersByIdsResp) Descriptor() ([]byte, []int) { + return file_users_proto_rawDescGZIP(), []int{10} +} + +func (x *GetUsersByIdsResp) GetUsers() []*Users { + if x != nil { + return x.Users + } + return nil +} + type SearchUsersReq struct { state protoimpl.MessageState `protogen:"open.v1"` Offset *int64 `protobuf:"varint,1,opt,name=offset,proto3,oneof" json:"offset,omitempty"` //offset @@ -748,7 +836,7 @@ type SearchUsersReq struct { func (x *SearchUsersReq) Reset() { *x = SearchUsersReq{} - mi := &file_users_proto_msgTypes[9] + mi := &file_users_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -760,7 +848,7 @@ func (x *SearchUsersReq) String() string { func (*SearchUsersReq) ProtoMessage() {} func (x *SearchUsersReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[9] + mi := &file_users_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -773,7 +861,7 @@ func (x *SearchUsersReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchUsersReq.ProtoReflect.Descriptor instead. func (*SearchUsersReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{9} + return file_users_proto_rawDescGZIP(), []int{11} } func (x *SearchUsersReq) GetOffset() int64 { @@ -904,7 +992,7 @@ type SearchUsersResp struct { func (x *SearchUsersResp) Reset() { *x = SearchUsersResp{} - mi := &file_users_proto_msgTypes[10] + mi := &file_users_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -916,7 +1004,7 @@ func (x *SearchUsersResp) String() string { func (*SearchUsersResp) ProtoMessage() {} func (x *SearchUsersResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[10] + mi := &file_users_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -929,7 +1017,7 @@ func (x *SearchUsersResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchUsersResp.ProtoReflect.Descriptor instead. func (*SearchUsersResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{10} + return file_users_proto_rawDescGZIP(), []int{12} } func (x *SearchUsersResp) GetUsers() []*Users { @@ -948,7 +1036,7 @@ type GetUserByUsernameReq struct { func (x *GetUserByUsernameReq) Reset() { *x = GetUserByUsernameReq{} - mi := &file_users_proto_msgTypes[11] + mi := &file_users_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -960,7 +1048,7 @@ func (x *GetUserByUsernameReq) String() string { func (*GetUserByUsernameReq) ProtoMessage() {} func (x *GetUserByUsernameReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[11] + mi := &file_users_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -973,7 +1061,7 @@ func (x *GetUserByUsernameReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserByUsernameReq.ProtoReflect.Descriptor instead. func (*GetUserByUsernameReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{11} + return file_users_proto_rawDescGZIP(), []int{13} } func (x *GetUserByUsernameReq) GetUsername() string { @@ -992,7 +1080,7 @@ type GetUserByUsernameResp struct { func (x *GetUserByUsernameResp) Reset() { *x = GetUserByUsernameResp{} - mi := &file_users_proto_msgTypes[12] + mi := &file_users_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1004,7 +1092,7 @@ func (x *GetUserByUsernameResp) String() string { func (*GetUserByUsernameResp) ProtoMessage() {} func (x *GetUserByUsernameResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[12] + mi := &file_users_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1017,7 +1105,7 @@ func (x *GetUserByUsernameResp) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserByUsernameResp.ProtoReflect.Descriptor instead. func (*GetUserByUsernameResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{12} + return file_users_proto_rawDescGZIP(), []int{14} } func (x *GetUserByUsernameResp) GetUsers() *Users { @@ -1037,7 +1125,7 @@ type LoginReq struct { func (x *LoginReq) Reset() { *x = LoginReq{} - mi := &file_users_proto_msgTypes[13] + mi := &file_users_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1049,7 +1137,7 @@ func (x *LoginReq) String() string { func (*LoginReq) ProtoMessage() {} func (x *LoginReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[13] + mi := &file_users_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1062,7 +1150,7 @@ func (x *LoginReq) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginReq.ProtoReflect.Descriptor instead. func (*LoginReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{13} + return file_users_proto_rawDescGZIP(), []int{15} } func (x *LoginReq) GetUsername() string { @@ -1091,7 +1179,7 @@ type LoginResp struct { func (x *LoginResp) Reset() { *x = LoginResp{} - mi := &file_users_proto_msgTypes[14] + mi := &file_users_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1103,7 +1191,7 @@ func (x *LoginResp) String() string { func (*LoginResp) ProtoMessage() {} func (x *LoginResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[14] + mi := &file_users_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1116,7 +1204,7 @@ func (x *LoginResp) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginResp.ProtoReflect.Descriptor instead. func (*LoginResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{14} + return file_users_proto_rawDescGZIP(), []int{16} } func (x *LoginResp) GetToken() string { @@ -1157,7 +1245,7 @@ type ValidateTokenReq struct { func (x *ValidateTokenReq) Reset() { *x = ValidateTokenReq{} - mi := &file_users_proto_msgTypes[15] + mi := &file_users_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1169,7 +1257,7 @@ func (x *ValidateTokenReq) String() string { func (*ValidateTokenReq) ProtoMessage() {} func (x *ValidateTokenReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[15] + mi := &file_users_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1182,7 +1270,7 @@ func (x *ValidateTokenReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateTokenReq.ProtoReflect.Descriptor instead. func (*ValidateTokenReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{15} + return file_users_proto_rawDescGZIP(), []int{17} } func (x *ValidateTokenReq) GetToken() string { @@ -1211,7 +1299,7 @@ type ValidateTokenResp struct { func (x *ValidateTokenResp) Reset() { *x = ValidateTokenResp{} - mi := &file_users_proto_msgTypes[16] + mi := &file_users_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1223,7 +1311,7 @@ func (x *ValidateTokenResp) String() string { func (*ValidateTokenResp) ProtoMessage() {} func (x *ValidateTokenResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[16] + mi := &file_users_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1236,7 +1324,7 @@ func (x *ValidateTokenResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateTokenResp.ProtoReflect.Descriptor instead. func (*ValidateTokenResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{16} + return file_users_proto_rawDescGZIP(), []int{18} } func (x *ValidateTokenResp) GetValid() bool { @@ -1278,7 +1366,7 @@ type CheckPermissionReq struct { func (x *CheckPermissionReq) Reset() { *x = CheckPermissionReq{} - mi := &file_users_proto_msgTypes[17] + mi := &file_users_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1290,7 +1378,7 @@ func (x *CheckPermissionReq) String() string { func (*CheckPermissionReq) ProtoMessage() {} func (x *CheckPermissionReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[17] + mi := &file_users_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1303,7 +1391,7 @@ func (x *CheckPermissionReq) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckPermissionReq.ProtoReflect.Descriptor instead. func (*CheckPermissionReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{17} + return file_users_proto_rawDescGZIP(), []int{19} } func (x *CheckPermissionReq) GetUserId() int64 { @@ -1337,7 +1425,7 @@ type CheckPermissionResp struct { func (x *CheckPermissionResp) Reset() { *x = CheckPermissionResp{} - mi := &file_users_proto_msgTypes[18] + mi := &file_users_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1349,7 +1437,7 @@ func (x *CheckPermissionResp) String() string { func (*CheckPermissionResp) ProtoMessage() {} func (x *CheckPermissionResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[18] + mi := &file_users_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1362,7 +1450,7 @@ func (x *CheckPermissionResp) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckPermissionResp.ProtoReflect.Descriptor instead. func (*CheckPermissionResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{18} + return file_users_proto_rawDescGZIP(), []int{20} } func (x *CheckPermissionResp) GetAllowed() bool { @@ -1393,7 +1481,7 @@ type RegisterReq struct { func (x *RegisterReq) Reset() { *x = RegisterReq{} - mi := &file_users_proto_msgTypes[19] + mi := &file_users_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1405,7 +1493,7 @@ func (x *RegisterReq) String() string { func (*RegisterReq) ProtoMessage() {} func (x *RegisterReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[19] + mi := &file_users_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1418,7 +1506,7 @@ func (x *RegisterReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead. func (*RegisterReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{19} + return file_users_proto_rawDescGZIP(), []int{21} } func (x *RegisterReq) GetUsername() string { @@ -1472,7 +1560,7 @@ type RegisterResp struct { func (x *RegisterResp) Reset() { *x = RegisterResp{} - mi := &file_users_proto_msgTypes[20] + mi := &file_users_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1484,7 +1572,7 @@ func (x *RegisterResp) String() string { func (*RegisterResp) ProtoMessage() {} func (x *RegisterResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[20] + mi := &file_users_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1497,7 +1585,7 @@ func (x *RegisterResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead. func (*RegisterResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{20} + return file_users_proto_rawDescGZIP(), []int{22} } func (x *RegisterResp) GetRes() string { @@ -1516,7 +1604,7 @@ type LogoutReq struct { func (x *LogoutReq) Reset() { *x = LogoutReq{} - mi := &file_users_proto_msgTypes[21] + mi := &file_users_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1528,7 +1616,7 @@ func (x *LogoutReq) String() string { func (*LogoutReq) ProtoMessage() {} func (x *LogoutReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[21] + mi := &file_users_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1541,7 +1629,7 @@ func (x *LogoutReq) ProtoReflect() protoreflect.Message { // Deprecated: Use LogoutReq.ProtoReflect.Descriptor instead. func (*LogoutReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{21} + return file_users_proto_rawDescGZIP(), []int{23} } func (x *LogoutReq) GetUserId() int64 { @@ -1559,7 +1647,7 @@ type LogoutResp struct { func (x *LogoutResp) Reset() { *x = LogoutResp{} - mi := &file_users_proto_msgTypes[22] + mi := &file_users_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1571,7 +1659,7 @@ func (x *LogoutResp) String() string { func (*LogoutResp) ProtoMessage() {} func (x *LogoutResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[22] + mi := &file_users_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1584,7 +1672,7 @@ func (x *LogoutResp) ProtoReflect() protoreflect.Message { // Deprecated: Use LogoutResp.ProtoReflect.Descriptor instead. func (*LogoutResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{22} + return file_users_proto_rawDescGZIP(), []int{24} } type ResetPasswordReq struct { @@ -1599,7 +1687,7 @@ type ResetPasswordReq struct { func (x *ResetPasswordReq) Reset() { *x = ResetPasswordReq{} - mi := &file_users_proto_msgTypes[23] + mi := &file_users_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1611,7 +1699,7 @@ func (x *ResetPasswordReq) String() string { func (*ResetPasswordReq) ProtoMessage() {} func (x *ResetPasswordReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[23] + mi := &file_users_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1624,7 +1712,7 @@ func (x *ResetPasswordReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetPasswordReq.ProtoReflect.Descriptor instead. func (*ResetPasswordReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{23} + return file_users_proto_rawDescGZIP(), []int{25} } func (x *ResetPasswordReq) GetNewPassword() string { @@ -1663,7 +1751,7 @@ type ResetPasswordResp struct { func (x *ResetPasswordResp) Reset() { *x = ResetPasswordResp{} - mi := &file_users_proto_msgTypes[24] + mi := &file_users_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1675,7 +1763,7 @@ func (x *ResetPasswordResp) String() string { func (*ResetPasswordResp) ProtoMessage() {} func (x *ResetPasswordResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[24] + mi := &file_users_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1688,7 +1776,7 @@ func (x *ResetPasswordResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetPasswordResp.ProtoReflect.Descriptor instead. func (*ResetPasswordResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{24} + return file_users_proto_rawDescGZIP(), []int{26} } type SwitchRoleReq struct { @@ -1701,7 +1789,7 @@ type SwitchRoleReq struct { func (x *SwitchRoleReq) Reset() { *x = SwitchRoleReq{} - mi := &file_users_proto_msgTypes[25] + mi := &file_users_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1713,7 +1801,7 @@ func (x *SwitchRoleReq) String() string { func (*SwitchRoleReq) ProtoMessage() {} func (x *SwitchRoleReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[25] + mi := &file_users_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1726,7 +1814,7 @@ func (x *SwitchRoleReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SwitchRoleReq.ProtoReflect.Descriptor instead. func (*SwitchRoleReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{25} + return file_users_proto_rawDescGZIP(), []int{27} } func (x *SwitchRoleReq) GetUserId() int64 { @@ -1752,7 +1840,7 @@ type SwitchRoleResp struct { func (x *SwitchRoleResp) Reset() { *x = SwitchRoleResp{} - mi := &file_users_proto_msgTypes[26] + mi := &file_users_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1764,7 +1852,7 @@ func (x *SwitchRoleResp) String() string { func (*SwitchRoleResp) ProtoMessage() {} func (x *SwitchRoleResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[26] + mi := &file_users_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1777,7 +1865,7 @@ func (x *SwitchRoleResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SwitchRoleResp.ProtoReflect.Descriptor instead. func (*SwitchRoleResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{26} + return file_users_proto_rawDescGZIP(), []int{28} } func (x *SwitchRoleResp) GetSuccess() bool { @@ -1800,7 +1888,7 @@ type UserFollows struct { func (x *UserFollows) Reset() { *x = UserFollows{} - mi := &file_users_proto_msgTypes[27] + mi := &file_users_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1812,7 +1900,7 @@ func (x *UserFollows) String() string { func (*UserFollows) ProtoMessage() {} func (x *UserFollows) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[27] + mi := &file_users_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1825,7 +1913,7 @@ func (x *UserFollows) ProtoReflect() protoreflect.Message { // Deprecated: Use UserFollows.ProtoReflect.Descriptor instead. func (*UserFollows) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{27} + return file_users_proto_rawDescGZIP(), []int{29} } func (x *UserFollows) GetId() int64 { @@ -1867,7 +1955,7 @@ type AddUserFollowsReq struct { func (x *AddUserFollowsReq) Reset() { *x = AddUserFollowsReq{} - mi := &file_users_proto_msgTypes[28] + mi := &file_users_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1879,7 +1967,7 @@ func (x *AddUserFollowsReq) String() string { func (*AddUserFollowsReq) ProtoMessage() {} func (x *AddUserFollowsReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[28] + mi := &file_users_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1892,7 +1980,7 @@ func (x *AddUserFollowsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use AddUserFollowsReq.ProtoReflect.Descriptor instead. func (*AddUserFollowsReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{28} + return file_users_proto_rawDescGZIP(), []int{30} } func (x *AddUserFollowsReq) GetFollowerId() int64 { @@ -1924,7 +2012,7 @@ type AddUserFollowsResp struct { func (x *AddUserFollowsResp) Reset() { *x = AddUserFollowsResp{} - mi := &file_users_proto_msgTypes[29] + mi := &file_users_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1936,7 +2024,7 @@ func (x *AddUserFollowsResp) String() string { func (*AddUserFollowsResp) ProtoMessage() {} func (x *AddUserFollowsResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[29] + mi := &file_users_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1949,7 +2037,7 @@ func (x *AddUserFollowsResp) ProtoReflect() protoreflect.Message { // Deprecated: Use AddUserFollowsResp.ProtoReflect.Descriptor instead. func (*AddUserFollowsResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{29} + return file_users_proto_rawDescGZIP(), []int{31} } type UpdateUserFollowsReq struct { @@ -1964,7 +2052,7 @@ type UpdateUserFollowsReq struct { func (x *UpdateUserFollowsReq) Reset() { *x = UpdateUserFollowsReq{} - mi := &file_users_proto_msgTypes[30] + mi := &file_users_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1976,7 +2064,7 @@ func (x *UpdateUserFollowsReq) String() string { func (*UpdateUserFollowsReq) ProtoMessage() {} func (x *UpdateUserFollowsReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[30] + mi := &file_users_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1989,7 +2077,7 @@ func (x *UpdateUserFollowsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserFollowsReq.ProtoReflect.Descriptor instead. func (*UpdateUserFollowsReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{30} + return file_users_proto_rawDescGZIP(), []int{32} } func (x *UpdateUserFollowsReq) GetId() int64 { @@ -2028,7 +2116,7 @@ type UpdateUserFollowsResp struct { func (x *UpdateUserFollowsResp) Reset() { *x = UpdateUserFollowsResp{} - mi := &file_users_proto_msgTypes[31] + mi := &file_users_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2040,7 +2128,7 @@ func (x *UpdateUserFollowsResp) String() string { func (*UpdateUserFollowsResp) ProtoMessage() {} func (x *UpdateUserFollowsResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[31] + mi := &file_users_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2053,7 +2141,7 @@ func (x *UpdateUserFollowsResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserFollowsResp.ProtoReflect.Descriptor instead. func (*UpdateUserFollowsResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{31} + return file_users_proto_rawDescGZIP(), []int{33} } type DelUserFollowsReq struct { @@ -2066,7 +2154,7 @@ type DelUserFollowsReq struct { func (x *DelUserFollowsReq) Reset() { *x = DelUserFollowsReq{} - mi := &file_users_proto_msgTypes[32] + mi := &file_users_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2078,7 +2166,7 @@ func (x *DelUserFollowsReq) String() string { func (*DelUserFollowsReq) ProtoMessage() {} func (x *DelUserFollowsReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[32] + mi := &file_users_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2091,7 +2179,7 @@ func (x *DelUserFollowsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use DelUserFollowsReq.ProtoReflect.Descriptor instead. func (*DelUserFollowsReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{32} + return file_users_proto_rawDescGZIP(), []int{34} } func (x *DelUserFollowsReq) GetId() int64 { @@ -2116,7 +2204,7 @@ type DelUserFollowsResp struct { func (x *DelUserFollowsResp) Reset() { *x = DelUserFollowsResp{} - mi := &file_users_proto_msgTypes[33] + mi := &file_users_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2128,7 +2216,7 @@ func (x *DelUserFollowsResp) String() string { func (*DelUserFollowsResp) ProtoMessage() {} func (x *DelUserFollowsResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[33] + mi := &file_users_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2141,7 +2229,7 @@ func (x *DelUserFollowsResp) ProtoReflect() protoreflect.Message { // Deprecated: Use DelUserFollowsResp.ProtoReflect.Descriptor instead. func (*DelUserFollowsResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{33} + return file_users_proto_rawDescGZIP(), []int{35} } type GetUserFollowsByIdReq struct { @@ -2153,7 +2241,7 @@ type GetUserFollowsByIdReq struct { func (x *GetUserFollowsByIdReq) Reset() { *x = GetUserFollowsByIdReq{} - mi := &file_users_proto_msgTypes[34] + mi := &file_users_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2165,7 +2253,7 @@ func (x *GetUserFollowsByIdReq) String() string { func (*GetUserFollowsByIdReq) ProtoMessage() {} func (x *GetUserFollowsByIdReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[34] + mi := &file_users_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2178,7 +2266,7 @@ func (x *GetUserFollowsByIdReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserFollowsByIdReq.ProtoReflect.Descriptor instead. func (*GetUserFollowsByIdReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{34} + return file_users_proto_rawDescGZIP(), []int{36} } func (x *GetUserFollowsByIdReq) GetId() int64 { @@ -2197,7 +2285,7 @@ type GetUserFollowsByIdResp struct { func (x *GetUserFollowsByIdResp) Reset() { *x = GetUserFollowsByIdResp{} - mi := &file_users_proto_msgTypes[35] + mi := &file_users_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2209,7 +2297,7 @@ func (x *GetUserFollowsByIdResp) String() string { func (*GetUserFollowsByIdResp) ProtoMessage() {} func (x *GetUserFollowsByIdResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[35] + mi := &file_users_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2222,7 +2310,7 @@ func (x *GetUserFollowsByIdResp) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserFollowsByIdResp.ProtoReflect.Descriptor instead. func (*GetUserFollowsByIdResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{35} + return file_users_proto_rawDescGZIP(), []int{37} } func (x *GetUserFollowsByIdResp) GetUserFollows() *UserFollows { @@ -2246,7 +2334,7 @@ type SearchUserFollowsReq struct { func (x *SearchUserFollowsReq) Reset() { *x = SearchUserFollowsReq{} - mi := &file_users_proto_msgTypes[36] + mi := &file_users_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2258,7 +2346,7 @@ func (x *SearchUserFollowsReq) String() string { func (*SearchUserFollowsReq) ProtoMessage() {} func (x *SearchUserFollowsReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[36] + mi := &file_users_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2271,7 +2359,7 @@ func (x *SearchUserFollowsReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchUserFollowsReq.ProtoReflect.Descriptor instead. func (*SearchUserFollowsReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{36} + return file_users_proto_rawDescGZIP(), []int{38} } func (x *SearchUserFollowsReq) GetOffset() int64 { @@ -2325,7 +2413,7 @@ type SearchUserFollowsResp struct { func (x *SearchUserFollowsResp) Reset() { *x = SearchUserFollowsResp{} - mi := &file_users_proto_msgTypes[37] + mi := &file_users_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2337,7 +2425,7 @@ func (x *SearchUserFollowsResp) String() string { func (*SearchUserFollowsResp) ProtoMessage() {} func (x *SearchUserFollowsResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[37] + mi := &file_users_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2350,7 +2438,7 @@ func (x *SearchUserFollowsResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchUserFollowsResp.ProtoReflect.Descriptor instead. func (*SearchUserFollowsResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{37} + return file_users_proto_rawDescGZIP(), []int{39} } func (x *SearchUserFollowsResp) GetUserFollows() []*UserFollows { @@ -2376,7 +2464,7 @@ type UserPreferences struct { func (x *UserPreferences) Reset() { *x = UserPreferences{} - mi := &file_users_proto_msgTypes[38] + mi := &file_users_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2388,7 +2476,7 @@ func (x *UserPreferences) String() string { func (*UserPreferences) ProtoMessage() {} func (x *UserPreferences) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[38] + mi := &file_users_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2401,7 +2489,7 @@ func (x *UserPreferences) ProtoReflect() protoreflect.Message { // Deprecated: Use UserPreferences.ProtoReflect.Descriptor instead. func (*UserPreferences) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{38} + return file_users_proto_rawDescGZIP(), []int{40} } func (x *UserPreferences) GetUserId() int64 { @@ -2468,7 +2556,7 @@ type AddUserPreferencesReq struct { func (x *AddUserPreferencesReq) Reset() { *x = AddUserPreferencesReq{} - mi := &file_users_proto_msgTypes[39] + mi := &file_users_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2480,7 +2568,7 @@ func (x *AddUserPreferencesReq) String() string { func (*AddUserPreferencesReq) ProtoMessage() {} func (x *AddUserPreferencesReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[39] + mi := &file_users_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2493,7 +2581,7 @@ func (x *AddUserPreferencesReq) ProtoReflect() protoreflect.Message { // Deprecated: Use AddUserPreferencesReq.ProtoReflect.Descriptor instead. func (*AddUserPreferencesReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{39} + return file_users_proto_rawDescGZIP(), []int{41} } func (x *AddUserPreferencesReq) GetUserId() int64 { @@ -2553,7 +2641,7 @@ type AddUserPreferencesResp struct { func (x *AddUserPreferencesResp) Reset() { *x = AddUserPreferencesResp{} - mi := &file_users_proto_msgTypes[40] + mi := &file_users_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2565,7 +2653,7 @@ func (x *AddUserPreferencesResp) String() string { func (*AddUserPreferencesResp) ProtoMessage() {} func (x *AddUserPreferencesResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[40] + mi := &file_users_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2578,7 +2666,7 @@ func (x *AddUserPreferencesResp) ProtoReflect() protoreflect.Message { // Deprecated: Use AddUserPreferencesResp.ProtoReflect.Descriptor instead. func (*AddUserPreferencesResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{40} + return file_users_proto_rawDescGZIP(), []int{42} } type UpdateUserPreferencesReq struct { @@ -2596,7 +2684,7 @@ type UpdateUserPreferencesReq struct { func (x *UpdateUserPreferencesReq) Reset() { *x = UpdateUserPreferencesReq{} - mi := &file_users_proto_msgTypes[41] + mi := &file_users_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2608,7 +2696,7 @@ func (x *UpdateUserPreferencesReq) String() string { func (*UpdateUserPreferencesReq) ProtoMessage() {} func (x *UpdateUserPreferencesReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[41] + mi := &file_users_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2621,7 +2709,7 @@ func (x *UpdateUserPreferencesReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserPreferencesReq.ProtoReflect.Descriptor instead. func (*UpdateUserPreferencesReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{41} + return file_users_proto_rawDescGZIP(), []int{43} } func (x *UpdateUserPreferencesReq) GetUserId() int64 { @@ -2681,7 +2769,7 @@ type UpdateUserPreferencesResp struct { func (x *UpdateUserPreferencesResp) Reset() { *x = UpdateUserPreferencesResp{} - mi := &file_users_proto_msgTypes[42] + mi := &file_users_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2693,7 +2781,7 @@ func (x *UpdateUserPreferencesResp) String() string { func (*UpdateUserPreferencesResp) ProtoMessage() {} func (x *UpdateUserPreferencesResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[42] + mi := &file_users_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2706,7 +2794,7 @@ func (x *UpdateUserPreferencesResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserPreferencesResp.ProtoReflect.Descriptor instead. func (*UpdateUserPreferencesResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{42} + return file_users_proto_rawDescGZIP(), []int{44} } type DelUserPreferencesReq struct { @@ -2718,7 +2806,7 @@ type DelUserPreferencesReq struct { func (x *DelUserPreferencesReq) Reset() { *x = DelUserPreferencesReq{} - mi := &file_users_proto_msgTypes[43] + mi := &file_users_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2730,7 +2818,7 @@ func (x *DelUserPreferencesReq) String() string { func (*DelUserPreferencesReq) ProtoMessage() {} func (x *DelUserPreferencesReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[43] + mi := &file_users_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2743,7 +2831,7 @@ func (x *DelUserPreferencesReq) ProtoReflect() protoreflect.Message { // Deprecated: Use DelUserPreferencesReq.ProtoReflect.Descriptor instead. func (*DelUserPreferencesReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{43} + return file_users_proto_rawDescGZIP(), []int{45} } func (x *DelUserPreferencesReq) GetId() int64 { @@ -2761,7 +2849,7 @@ type DelUserPreferencesResp struct { func (x *DelUserPreferencesResp) Reset() { *x = DelUserPreferencesResp{} - mi := &file_users_proto_msgTypes[44] + mi := &file_users_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2773,7 +2861,7 @@ func (x *DelUserPreferencesResp) String() string { func (*DelUserPreferencesResp) ProtoMessage() {} func (x *DelUserPreferencesResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[44] + mi := &file_users_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2786,7 +2874,7 @@ func (x *DelUserPreferencesResp) ProtoReflect() protoreflect.Message { // Deprecated: Use DelUserPreferencesResp.ProtoReflect.Descriptor instead. func (*DelUserPreferencesResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{44} + return file_users_proto_rawDescGZIP(), []int{46} } type GetUserPreferencesByIdReq struct { @@ -2798,7 +2886,7 @@ type GetUserPreferencesByIdReq struct { func (x *GetUserPreferencesByIdReq) Reset() { *x = GetUserPreferencesByIdReq{} - mi := &file_users_proto_msgTypes[45] + mi := &file_users_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2810,7 +2898,7 @@ func (x *GetUserPreferencesByIdReq) String() string { func (*GetUserPreferencesByIdReq) ProtoMessage() {} func (x *GetUserPreferencesByIdReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[45] + mi := &file_users_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2823,7 +2911,7 @@ func (x *GetUserPreferencesByIdReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserPreferencesByIdReq.ProtoReflect.Descriptor instead. func (*GetUserPreferencesByIdReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{45} + return file_users_proto_rawDescGZIP(), []int{47} } func (x *GetUserPreferencesByIdReq) GetId() int64 { @@ -2842,7 +2930,7 @@ type GetUserPreferencesByIdResp struct { func (x *GetUserPreferencesByIdResp) Reset() { *x = GetUserPreferencesByIdResp{} - mi := &file_users_proto_msgTypes[46] + mi := &file_users_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2854,7 +2942,7 @@ func (x *GetUserPreferencesByIdResp) String() string { func (*GetUserPreferencesByIdResp) ProtoMessage() {} func (x *GetUserPreferencesByIdResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[46] + mi := &file_users_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2867,7 +2955,7 @@ func (x *GetUserPreferencesByIdResp) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserPreferencesByIdResp.ProtoReflect.Descriptor instead. func (*GetUserPreferencesByIdResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{46} + return file_users_proto_rawDescGZIP(), []int{48} } func (x *GetUserPreferencesByIdResp) GetUserPreferences() *UserPreferences { @@ -2894,7 +2982,7 @@ type SearchUserPreferencesReq struct { func (x *SearchUserPreferencesReq) Reset() { *x = SearchUserPreferencesReq{} - mi := &file_users_proto_msgTypes[47] + mi := &file_users_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2906,7 +2994,7 @@ func (x *SearchUserPreferencesReq) String() string { func (*SearchUserPreferencesReq) ProtoMessage() {} func (x *SearchUserPreferencesReq) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[47] + mi := &file_users_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2919,7 +3007,7 @@ func (x *SearchUserPreferencesReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchUserPreferencesReq.ProtoReflect.Descriptor instead. func (*SearchUserPreferencesReq) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{47} + return file_users_proto_rawDescGZIP(), []int{49} } func (x *SearchUserPreferencesReq) GetOffset() int64 { @@ -2994,7 +3082,7 @@ type SearchUserPreferencesResp struct { func (x *SearchUserPreferencesResp) Reset() { *x = SearchUserPreferencesResp{} - mi := &file_users_proto_msgTypes[48] + mi := &file_users_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3006,7 +3094,7 @@ func (x *SearchUserPreferencesResp) String() string { func (*SearchUserPreferencesResp) ProtoMessage() {} func (x *SearchUserPreferencesResp) ProtoReflect() protoreflect.Message { - mi := &file_users_proto_msgTypes[48] + mi := &file_users_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3019,7 +3107,7 @@ func (x *SearchUserPreferencesResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchUserPreferencesResp.ProtoReflect.Descriptor instead. func (*SearchUserPreferencesResp) Descriptor() ([]byte, []int) { - return file_users_proto_rawDescGZIP(), []int{48} + return file_users_proto_rawDescGZIP(), []int{50} } func (x *SearchUserPreferencesResp) GetUserPreferences() []*UserPreferences { @@ -3110,7 +3198,11 @@ const file_users_proto_rawDesc = "" + "\x0fGetUsersByIdReq\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\"3\n" + "\x10GetUsersByIdResp\x12\x1f\n" + - "\x05users\x18\x01 \x01(\v2\t.pb.UsersR\x05users\"\x87\x06\n" + + "\x05users\x18\x01 \x01(\v2\t.pb.UsersR\x05users\"$\n" + + "\x10GetUsersByIdsReq\x12\x10\n" + + "\x03ids\x18\x01 \x03(\x03R\x03ids\"4\n" + + "\x11GetUsersByIdsResp\x12\x1f\n" + + "\x05users\x18\x01 \x03(\v2\t.pb.UsersR\x05users\"\x87\x06\n" + "\x0eSearchUsersReq\x12\x1b\n" + "\x06offset\x18\x01 \x01(\x03H\x00R\x06offset\x88\x01\x01\x12\x19\n" + "\x05limit\x18\x02 \x01(\x03H\x01R\x05limit\x88\x01\x01\x12\x13\n" + @@ -3297,13 +3389,14 @@ const file_users_proto_rawDesc = "" + "\blanguage\x18\b \x01(\tR\blanguage\x12\x1c\n" + "\tupdatedAt\x18\t \x01(\x03R\tupdatedAt\"Z\n" + "\x19SearchUserPreferencesResp\x12=\n" + - "\x0fuserPreferences\x18\x01 \x03(\v2\x13.pb.UserPreferencesR\x0fuserPreferences2\xd4\v\n" + + "\x0fuserPreferences\x18\x01 \x03(\v2\x13.pb.UserPreferencesR\x0fuserPreferences2\x92\f\n" + "\n" + "usercenter\x12-\n" + "\bAddUsers\x12\x0f.pb.AddUsersReq\x1a\x10.pb.AddUsersResp\x126\n" + "\vUpdateUsers\x12\x12.pb.UpdateUsersReq\x1a\x13.pb.UpdateUsersResp\x12-\n" + "\bDelUsers\x12\x0f.pb.DelUsersReq\x1a\x10.pb.DelUsersResp\x129\n" + - "\fGetUsersById\x12\x13.pb.GetUsersByIdReq\x1a\x14.pb.GetUsersByIdResp\x126\n" + + "\fGetUsersById\x12\x13.pb.GetUsersByIdReq\x1a\x14.pb.GetUsersByIdResp\x12<\n" + + "\rGetUsersByIds\x12\x14.pb.GetUsersByIdsReq\x1a\x15.pb.GetUsersByIdsResp\x126\n" + "\vSearchUsers\x12\x12.pb.SearchUsersReq\x1a\x13.pb.SearchUsersResp\x12H\n" + "\x11GetUserByUsername\x12\x18.pb.GetUserByUsernameReq\x1a\x19.pb.GetUserByUsernameResp\x12$\n" + "\x05Login\x12\f.pb.LoginReq\x1a\r.pb.LoginResp\x12-\n" + @@ -3337,7 +3430,7 @@ func file_users_proto_rawDescGZIP() []byte { return file_users_proto_rawDescData } -var file_users_proto_msgTypes = make([]protoimpl.MessageInfo, 49) +var file_users_proto_msgTypes = make([]protoimpl.MessageInfo, 51) var file_users_proto_goTypes = []any{ (*Users)(nil), // 0: pb.Users (*AddUsersReq)(nil), // 1: pb.AddUsersReq @@ -3348,106 +3441,111 @@ var file_users_proto_goTypes = []any{ (*DelUsersResp)(nil), // 6: pb.DelUsersResp (*GetUsersByIdReq)(nil), // 7: pb.GetUsersByIdReq (*GetUsersByIdResp)(nil), // 8: pb.GetUsersByIdResp - (*SearchUsersReq)(nil), // 9: pb.SearchUsersReq - (*SearchUsersResp)(nil), // 10: pb.SearchUsersResp - (*GetUserByUsernameReq)(nil), // 11: pb.GetUserByUsernameReq - (*GetUserByUsernameResp)(nil), // 12: pb.GetUserByUsernameResp - (*LoginReq)(nil), // 13: pb.LoginReq - (*LoginResp)(nil), // 14: pb.LoginResp - (*ValidateTokenReq)(nil), // 15: pb.ValidateTokenReq - (*ValidateTokenResp)(nil), // 16: pb.ValidateTokenResp - (*CheckPermissionReq)(nil), // 17: pb.CheckPermissionReq - (*CheckPermissionResp)(nil), // 18: pb.CheckPermissionResp - (*RegisterReq)(nil), // 19: pb.RegisterReq - (*RegisterResp)(nil), // 20: pb.RegisterResp - (*LogoutReq)(nil), // 21: pb.LogoutReq - (*LogoutResp)(nil), // 22: pb.LogoutResp - (*ResetPasswordReq)(nil), // 23: pb.ResetPasswordReq - (*ResetPasswordResp)(nil), // 24: pb.ResetPasswordResp - (*SwitchRoleReq)(nil), // 25: pb.SwitchRoleReq - (*SwitchRoleResp)(nil), // 26: pb.SwitchRoleResp - (*UserFollows)(nil), // 27: pb.UserFollows - (*AddUserFollowsReq)(nil), // 28: pb.AddUserFollowsReq - (*AddUserFollowsResp)(nil), // 29: pb.AddUserFollowsResp - (*UpdateUserFollowsReq)(nil), // 30: pb.UpdateUserFollowsReq - (*UpdateUserFollowsResp)(nil), // 31: pb.UpdateUserFollowsResp - (*DelUserFollowsReq)(nil), // 32: pb.DelUserFollowsReq - (*DelUserFollowsResp)(nil), // 33: pb.DelUserFollowsResp - (*GetUserFollowsByIdReq)(nil), // 34: pb.GetUserFollowsByIdReq - (*GetUserFollowsByIdResp)(nil), // 35: pb.GetUserFollowsByIdResp - (*SearchUserFollowsReq)(nil), // 36: pb.SearchUserFollowsReq - (*SearchUserFollowsResp)(nil), // 37: pb.SearchUserFollowsResp - (*UserPreferences)(nil), // 38: pb.UserPreferences - (*AddUserPreferencesReq)(nil), // 39: pb.AddUserPreferencesReq - (*AddUserPreferencesResp)(nil), // 40: pb.AddUserPreferencesResp - (*UpdateUserPreferencesReq)(nil), // 41: pb.UpdateUserPreferencesReq - (*UpdateUserPreferencesResp)(nil), // 42: pb.UpdateUserPreferencesResp - (*DelUserPreferencesReq)(nil), // 43: pb.DelUserPreferencesReq - (*DelUserPreferencesResp)(nil), // 44: pb.DelUserPreferencesResp - (*GetUserPreferencesByIdReq)(nil), // 45: pb.GetUserPreferencesByIdReq - (*GetUserPreferencesByIdResp)(nil), // 46: pb.GetUserPreferencesByIdResp - (*SearchUserPreferencesReq)(nil), // 47: pb.SearchUserPreferencesReq - (*SearchUserPreferencesResp)(nil), // 48: pb.SearchUserPreferencesResp + (*GetUsersByIdsReq)(nil), // 9: pb.GetUsersByIdsReq + (*GetUsersByIdsResp)(nil), // 10: pb.GetUsersByIdsResp + (*SearchUsersReq)(nil), // 11: pb.SearchUsersReq + (*SearchUsersResp)(nil), // 12: pb.SearchUsersResp + (*GetUserByUsernameReq)(nil), // 13: pb.GetUserByUsernameReq + (*GetUserByUsernameResp)(nil), // 14: pb.GetUserByUsernameResp + (*LoginReq)(nil), // 15: pb.LoginReq + (*LoginResp)(nil), // 16: pb.LoginResp + (*ValidateTokenReq)(nil), // 17: pb.ValidateTokenReq + (*ValidateTokenResp)(nil), // 18: pb.ValidateTokenResp + (*CheckPermissionReq)(nil), // 19: pb.CheckPermissionReq + (*CheckPermissionResp)(nil), // 20: pb.CheckPermissionResp + (*RegisterReq)(nil), // 21: pb.RegisterReq + (*RegisterResp)(nil), // 22: pb.RegisterResp + (*LogoutReq)(nil), // 23: pb.LogoutReq + (*LogoutResp)(nil), // 24: pb.LogoutResp + (*ResetPasswordReq)(nil), // 25: pb.ResetPasswordReq + (*ResetPasswordResp)(nil), // 26: pb.ResetPasswordResp + (*SwitchRoleReq)(nil), // 27: pb.SwitchRoleReq + (*SwitchRoleResp)(nil), // 28: pb.SwitchRoleResp + (*UserFollows)(nil), // 29: pb.UserFollows + (*AddUserFollowsReq)(nil), // 30: pb.AddUserFollowsReq + (*AddUserFollowsResp)(nil), // 31: pb.AddUserFollowsResp + (*UpdateUserFollowsReq)(nil), // 32: pb.UpdateUserFollowsReq + (*UpdateUserFollowsResp)(nil), // 33: pb.UpdateUserFollowsResp + (*DelUserFollowsReq)(nil), // 34: pb.DelUserFollowsReq + (*DelUserFollowsResp)(nil), // 35: pb.DelUserFollowsResp + (*GetUserFollowsByIdReq)(nil), // 36: pb.GetUserFollowsByIdReq + (*GetUserFollowsByIdResp)(nil), // 37: pb.GetUserFollowsByIdResp + (*SearchUserFollowsReq)(nil), // 38: pb.SearchUserFollowsReq + (*SearchUserFollowsResp)(nil), // 39: pb.SearchUserFollowsResp + (*UserPreferences)(nil), // 40: pb.UserPreferences + (*AddUserPreferencesReq)(nil), // 41: pb.AddUserPreferencesReq + (*AddUserPreferencesResp)(nil), // 42: pb.AddUserPreferencesResp + (*UpdateUserPreferencesReq)(nil), // 43: pb.UpdateUserPreferencesReq + (*UpdateUserPreferencesResp)(nil), // 44: pb.UpdateUserPreferencesResp + (*DelUserPreferencesReq)(nil), // 45: pb.DelUserPreferencesReq + (*DelUserPreferencesResp)(nil), // 46: pb.DelUserPreferencesResp + (*GetUserPreferencesByIdReq)(nil), // 47: pb.GetUserPreferencesByIdReq + (*GetUserPreferencesByIdResp)(nil), // 48: pb.GetUserPreferencesByIdResp + (*SearchUserPreferencesReq)(nil), // 49: pb.SearchUserPreferencesReq + (*SearchUserPreferencesResp)(nil), // 50: pb.SearchUserPreferencesResp } var file_users_proto_depIdxs = []int32{ 0, // 0: pb.GetUsersByIdResp.users:type_name -> pb.Users - 0, // 1: pb.SearchUsersResp.users:type_name -> pb.Users - 0, // 2: pb.GetUserByUsernameResp.users:type_name -> pb.Users - 27, // 3: pb.GetUserFollowsByIdResp.userFollows:type_name -> pb.UserFollows - 27, // 4: pb.SearchUserFollowsResp.userFollows:type_name -> pb.UserFollows - 38, // 5: pb.GetUserPreferencesByIdResp.userPreferences:type_name -> pb.UserPreferences - 38, // 6: pb.SearchUserPreferencesResp.userPreferences:type_name -> pb.UserPreferences - 1, // 7: pb.usercenter.AddUsers:input_type -> pb.AddUsersReq - 3, // 8: pb.usercenter.UpdateUsers:input_type -> pb.UpdateUsersReq - 5, // 9: pb.usercenter.DelUsers:input_type -> pb.DelUsersReq - 7, // 10: pb.usercenter.GetUsersById:input_type -> pb.GetUsersByIdReq - 9, // 11: pb.usercenter.SearchUsers:input_type -> pb.SearchUsersReq - 11, // 12: pb.usercenter.GetUserByUsername:input_type -> pb.GetUserByUsernameReq - 13, // 13: pb.usercenter.Login:input_type -> pb.LoginReq - 19, // 14: pb.usercenter.Register:input_type -> pb.RegisterReq - 15, // 15: pb.usercenter.ValidateToken:input_type -> pb.ValidateTokenReq - 17, // 16: pb.usercenter.CheckPermission:input_type -> pb.CheckPermissionReq - 21, // 17: pb.usercenter.Logout:input_type -> pb.LogoutReq - 23, // 18: pb.usercenter.ResetPassword:input_type -> pb.ResetPasswordReq - 25, // 19: pb.usercenter.SwitchRole:input_type -> pb.SwitchRoleReq - 28, // 20: pb.usercenter.AddUserFollows:input_type -> pb.AddUserFollowsReq - 30, // 21: pb.usercenter.UpdateUserFollows:input_type -> pb.UpdateUserFollowsReq - 32, // 22: pb.usercenter.DelUserFollows:input_type -> pb.DelUserFollowsReq - 34, // 23: pb.usercenter.GetUserFollowsById:input_type -> pb.GetUserFollowsByIdReq - 36, // 24: pb.usercenter.SearchUserFollows:input_type -> pb.SearchUserFollowsReq - 39, // 25: pb.usercenter.AddUserPreferences:input_type -> pb.AddUserPreferencesReq - 41, // 26: pb.usercenter.UpdateUserPreferences:input_type -> pb.UpdateUserPreferencesReq - 43, // 27: pb.usercenter.DelUserPreferences:input_type -> pb.DelUserPreferencesReq - 45, // 28: pb.usercenter.GetUserPreferencesById:input_type -> pb.GetUserPreferencesByIdReq - 47, // 29: pb.usercenter.SearchUserPreferences:input_type -> pb.SearchUserPreferencesReq - 2, // 30: pb.usercenter.AddUsers:output_type -> pb.AddUsersResp - 4, // 31: pb.usercenter.UpdateUsers:output_type -> pb.UpdateUsersResp - 6, // 32: pb.usercenter.DelUsers:output_type -> pb.DelUsersResp - 8, // 33: pb.usercenter.GetUsersById:output_type -> pb.GetUsersByIdResp - 10, // 34: pb.usercenter.SearchUsers:output_type -> pb.SearchUsersResp - 12, // 35: pb.usercenter.GetUserByUsername:output_type -> pb.GetUserByUsernameResp - 14, // 36: pb.usercenter.Login:output_type -> pb.LoginResp - 20, // 37: pb.usercenter.Register:output_type -> pb.RegisterResp - 16, // 38: pb.usercenter.ValidateToken:output_type -> pb.ValidateTokenResp - 18, // 39: pb.usercenter.CheckPermission:output_type -> pb.CheckPermissionResp - 22, // 40: pb.usercenter.Logout:output_type -> pb.LogoutResp - 24, // 41: pb.usercenter.ResetPassword:output_type -> pb.ResetPasswordResp - 26, // 42: pb.usercenter.SwitchRole:output_type -> pb.SwitchRoleResp - 29, // 43: pb.usercenter.AddUserFollows:output_type -> pb.AddUserFollowsResp - 31, // 44: pb.usercenter.UpdateUserFollows:output_type -> pb.UpdateUserFollowsResp - 33, // 45: pb.usercenter.DelUserFollows:output_type -> pb.DelUserFollowsResp - 35, // 46: pb.usercenter.GetUserFollowsById:output_type -> pb.GetUserFollowsByIdResp - 37, // 47: pb.usercenter.SearchUserFollows:output_type -> pb.SearchUserFollowsResp - 40, // 48: pb.usercenter.AddUserPreferences:output_type -> pb.AddUserPreferencesResp - 42, // 49: pb.usercenter.UpdateUserPreferences:output_type -> pb.UpdateUserPreferencesResp - 44, // 50: pb.usercenter.DelUserPreferences:output_type -> pb.DelUserPreferencesResp - 46, // 51: pb.usercenter.GetUserPreferencesById:output_type -> pb.GetUserPreferencesByIdResp - 48, // 52: pb.usercenter.SearchUserPreferences:output_type -> pb.SearchUserPreferencesResp - 30, // [30:53] is the sub-list for method output_type - 7, // [7:30] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 0, // 1: pb.GetUsersByIdsResp.users:type_name -> pb.Users + 0, // 2: pb.SearchUsersResp.users:type_name -> pb.Users + 0, // 3: pb.GetUserByUsernameResp.users:type_name -> pb.Users + 29, // 4: pb.GetUserFollowsByIdResp.userFollows:type_name -> pb.UserFollows + 29, // 5: pb.SearchUserFollowsResp.userFollows:type_name -> pb.UserFollows + 40, // 6: pb.GetUserPreferencesByIdResp.userPreferences:type_name -> pb.UserPreferences + 40, // 7: pb.SearchUserPreferencesResp.userPreferences:type_name -> pb.UserPreferences + 1, // 8: pb.usercenter.AddUsers:input_type -> pb.AddUsersReq + 3, // 9: pb.usercenter.UpdateUsers:input_type -> pb.UpdateUsersReq + 5, // 10: pb.usercenter.DelUsers:input_type -> pb.DelUsersReq + 7, // 11: pb.usercenter.GetUsersById:input_type -> pb.GetUsersByIdReq + 9, // 12: pb.usercenter.GetUsersByIds:input_type -> pb.GetUsersByIdsReq + 11, // 13: pb.usercenter.SearchUsers:input_type -> pb.SearchUsersReq + 13, // 14: pb.usercenter.GetUserByUsername:input_type -> pb.GetUserByUsernameReq + 15, // 15: pb.usercenter.Login:input_type -> pb.LoginReq + 21, // 16: pb.usercenter.Register:input_type -> pb.RegisterReq + 17, // 17: pb.usercenter.ValidateToken:input_type -> pb.ValidateTokenReq + 19, // 18: pb.usercenter.CheckPermission:input_type -> pb.CheckPermissionReq + 23, // 19: pb.usercenter.Logout:input_type -> pb.LogoutReq + 25, // 20: pb.usercenter.ResetPassword:input_type -> pb.ResetPasswordReq + 27, // 21: pb.usercenter.SwitchRole:input_type -> pb.SwitchRoleReq + 30, // 22: pb.usercenter.AddUserFollows:input_type -> pb.AddUserFollowsReq + 32, // 23: pb.usercenter.UpdateUserFollows:input_type -> pb.UpdateUserFollowsReq + 34, // 24: pb.usercenter.DelUserFollows:input_type -> pb.DelUserFollowsReq + 36, // 25: pb.usercenter.GetUserFollowsById:input_type -> pb.GetUserFollowsByIdReq + 38, // 26: pb.usercenter.SearchUserFollows:input_type -> pb.SearchUserFollowsReq + 41, // 27: pb.usercenter.AddUserPreferences:input_type -> pb.AddUserPreferencesReq + 43, // 28: pb.usercenter.UpdateUserPreferences:input_type -> pb.UpdateUserPreferencesReq + 45, // 29: pb.usercenter.DelUserPreferences:input_type -> pb.DelUserPreferencesReq + 47, // 30: pb.usercenter.GetUserPreferencesById:input_type -> pb.GetUserPreferencesByIdReq + 49, // 31: pb.usercenter.SearchUserPreferences:input_type -> pb.SearchUserPreferencesReq + 2, // 32: pb.usercenter.AddUsers:output_type -> pb.AddUsersResp + 4, // 33: pb.usercenter.UpdateUsers:output_type -> pb.UpdateUsersResp + 6, // 34: pb.usercenter.DelUsers:output_type -> pb.DelUsersResp + 8, // 35: pb.usercenter.GetUsersById:output_type -> pb.GetUsersByIdResp + 10, // 36: pb.usercenter.GetUsersByIds:output_type -> pb.GetUsersByIdsResp + 12, // 37: pb.usercenter.SearchUsers:output_type -> pb.SearchUsersResp + 14, // 38: pb.usercenter.GetUserByUsername:output_type -> pb.GetUserByUsernameResp + 16, // 39: pb.usercenter.Login:output_type -> pb.LoginResp + 22, // 40: pb.usercenter.Register:output_type -> pb.RegisterResp + 18, // 41: pb.usercenter.ValidateToken:output_type -> pb.ValidateTokenResp + 20, // 42: pb.usercenter.CheckPermission:output_type -> pb.CheckPermissionResp + 24, // 43: pb.usercenter.Logout:output_type -> pb.LogoutResp + 26, // 44: pb.usercenter.ResetPassword:output_type -> pb.ResetPasswordResp + 28, // 45: pb.usercenter.SwitchRole:output_type -> pb.SwitchRoleResp + 31, // 46: pb.usercenter.AddUserFollows:output_type -> pb.AddUserFollowsResp + 33, // 47: pb.usercenter.UpdateUserFollows:output_type -> pb.UpdateUserFollowsResp + 35, // 48: pb.usercenter.DelUserFollows:output_type -> pb.DelUserFollowsResp + 37, // 49: pb.usercenter.GetUserFollowsById:output_type -> pb.GetUserFollowsByIdResp + 39, // 50: pb.usercenter.SearchUserFollows:output_type -> pb.SearchUserFollowsResp + 42, // 51: pb.usercenter.AddUserPreferences:output_type -> pb.AddUserPreferencesResp + 44, // 52: pb.usercenter.UpdateUserPreferences:output_type -> pb.UpdateUserPreferencesResp + 46, // 53: pb.usercenter.DelUserPreferences:output_type -> pb.DelUserPreferencesResp + 48, // 54: pb.usercenter.GetUserPreferencesById:output_type -> pb.GetUserPreferencesByIdResp + 50, // 55: pb.usercenter.SearchUserPreferences:output_type -> pb.SearchUserPreferencesResp + 32, // [32:56] is the sub-list for method output_type + 8, // [8:32] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_users_proto_init() } @@ -3456,14 +3554,14 @@ func file_users_proto_init() { return } file_users_proto_msgTypes[3].OneofWrappers = []any{} - file_users_proto_msgTypes[9].OneofWrappers = []any{} + file_users_proto_msgTypes[11].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_users_proto_rawDesc), len(file_users_proto_rawDesc)), NumEnums: 0, - NumMessages: 49, + NumMessages: 51, NumExtensions: 0, NumServices: 1, }, diff --git a/app/users/rpc/pb/users_grpc.pb.go b/app/users/rpc/pb/users_grpc.pb.go index f09e093..7475683 100644 --- a/app/users/rpc/pb/users_grpc.pb.go +++ b/app/users/rpc/pb/users_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.1 -// - protoc v5.29.6 +// - protoc v7.34.1 // source: users.proto package pb @@ -23,6 +23,7 @@ const ( Usercenter_UpdateUsers_FullMethodName = "/pb.usercenter/UpdateUsers" Usercenter_DelUsers_FullMethodName = "/pb.usercenter/DelUsers" Usercenter_GetUsersById_FullMethodName = "/pb.usercenter/GetUsersById" + Usercenter_GetUsersByIds_FullMethodName = "/pb.usercenter/GetUsersByIds" Usercenter_SearchUsers_FullMethodName = "/pb.usercenter/SearchUsers" Usercenter_GetUserByUsername_FullMethodName = "/pb.usercenter/GetUserByUsername" Usercenter_Login_FullMethodName = "/pb.usercenter/Login" @@ -53,6 +54,7 @@ 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) + GetUsersByIds(ctx context.Context, in *GetUsersByIdsReq, opts ...grpc.CallOption) (*GetUsersByIdsResp, 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) @@ -124,6 +126,16 @@ func (c *usercenterClient) GetUsersById(ctx context.Context, in *GetUsersByIdReq return out, nil } +func (c *usercenterClient) GetUsersByIds(ctx context.Context, in *GetUsersByIdsReq, opts ...grpc.CallOption) (*GetUsersByIdsResp, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetUsersByIdsResp) + err := c.cc.Invoke(ctx, Usercenter_GetUsersByIds_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) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SearchUsersResp) @@ -323,6 +335,7 @@ type UsercenterServer interface { UpdateUsers(context.Context, *UpdateUsersReq) (*UpdateUsersResp, error) DelUsers(context.Context, *DelUsersReq) (*DelUsersResp, error) GetUsersById(context.Context, *GetUsersByIdReq) (*GetUsersByIdResp, error) + GetUsersByIds(context.Context, *GetUsersByIdsReq) (*GetUsersByIdsResp, error) SearchUsers(context.Context, *SearchUsersReq) (*SearchUsersResp, error) GetUserByUsername(context.Context, *GetUserByUsernameReq) (*GetUserByUsernameResp, error) Login(context.Context, *LoginReq) (*LoginResp, error) @@ -366,6 +379,9 @@ 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) GetUsersByIds(context.Context, *GetUsersByIdsReq) (*GetUsersByIdsResp, error) { + return nil, status.Error(codes.Unimplemented, "method GetUsersByIds not implemented") +} func (UnimplementedUsercenterServer) SearchUsers(context.Context, *SearchUsersReq) (*SearchUsersResp, error) { return nil, status.Error(codes.Unimplemented, "method SearchUsers not implemented") } @@ -516,6 +532,24 @@ func _Usercenter_GetUsersById_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Usercenter_GetUsersByIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUsersByIdsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsercenterServer).GetUsersByIds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Usercenter_GetUsersByIds_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsercenterServer).GetUsersByIds(ctx, req.(*GetUsersByIdsReq)) + } + 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 { @@ -881,6 +915,10 @@ var Usercenter_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetUsersById", Handler: _Usercenter_GetUsersById_Handler, }, + { + MethodName: "GetUsersByIds", + Handler: _Usercenter_GetUsersByIds_Handler, + }, { MethodName: "SearchUsers", Handler: _Usercenter_SearchUsers_Handler, diff --git a/app/users/rpc/usercenter/usercenter.go b/app/users/rpc/usercenter/usercenter.go index 925127a..c672f08 100644 --- a/app/users/rpc/usercenter/usercenter.go +++ b/app/users/rpc/usercenter/usercenter.go @@ -1,5 +1,5 @@ // Code generated by goctl. DO NOT EDIT. -// goctl 1.9.2 +// goctl 1.10.1 // Source: users.proto package usercenter @@ -36,6 +36,8 @@ type ( GetUserPreferencesByIdResp = pb.GetUserPreferencesByIdResp GetUsersByIdReq = pb.GetUsersByIdReq GetUsersByIdResp = pb.GetUsersByIdResp + GetUsersByIdsReq = pb.GetUsersByIdsReq + GetUsersByIdsResp = pb.GetUsersByIdsResp LoginReq = pb.LoginReq LoginResp = pb.LoginResp LogoutReq = pb.LogoutReq @@ -70,6 +72,7 @@ type ( 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) + GetUsersByIds(ctx context.Context, in *GetUsersByIdsReq, opts ...grpc.CallOption) (*GetUsersByIdsResp, 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) @@ -125,6 +128,11 @@ func (m *defaultUsercenter) GetUsersById(ctx context.Context, in *GetUsersByIdRe return client.GetUsersById(ctx, in, opts...) } +func (m *defaultUsercenter) GetUsersByIds(ctx context.Context, in *GetUsersByIdsReq, opts ...grpc.CallOption) (*GetUsersByIdsResp, error) { + client := pb.NewUsercenterClient(m.cli.Conn()) + return client.GetUsersByIds(ctx, in, opts...) +} + func (m *defaultUsercenter) SearchUsers(ctx context.Context, in *SearchUsersReq, opts ...grpc.CallOption) (*SearchUsersResp, error) { client := pb.NewUsercenterClient(m.cli.Conn()) return client.SearchUsers(ctx, in, opts...) diff --git a/desc/rpc/users.proto b/desc/rpc/users.proto index 8109b92..3bc64ad 100644 --- a/desc/rpc/users.proto +++ b/desc/rpc/users.proto @@ -84,6 +84,14 @@ message GetUsersByIdResp { Users users = 1; //users } +message GetUsersByIdsReq { + repeated int64 ids = 1; //ids +} + +message GetUsersByIdsResp { + repeated Users users = 1; //users +} + message SearchUsersReq { optional int64 offset = 1; //offset optional int64 limit = 2; //limit @@ -327,6 +335,7 @@ service usercenter { rpc UpdateUsers(UpdateUsersReq) returns (UpdateUsersResp); rpc DelUsers(DelUsersReq) returns (DelUsersResp); rpc GetUsersById(GetUsersByIdReq) returns (GetUsersByIdResp); + rpc GetUsersByIds(GetUsersByIdsReq) returns (GetUsersByIdsResp); rpc SearchUsers(SearchUsersReq) returns (SearchUsersResp); rpc GetUserByUsername(GetUserByUsernameReq) returns (GetUserByUsernameResp);