diff --git a/internal/common/convert/convert.go b/internal/common/convert/convert.go index 8313b2798..e31a9c76a 100644 --- a/internal/common/convert/convert.go +++ b/internal/common/convert/convert.go @@ -269,6 +269,28 @@ func NewPBUser(userInfo *sdk.UserInfo) *PBUser { return &PBUser{UserInfo: userInfo} } +func (*PBUser) PB2DB(users []*sdk.UserInfo) (DBUsers []*relation.User, err error) { + for _, v := range users { + u, err := NewPBUser(v).Convert() + if err != nil { + return nil, err + } + DBUsers = append(DBUsers, u) + } + return +} + +func (*DBUser) DB2PB(users []*relation.User) (PBUsers []*sdk.UserInfo, err error) { + for _, v := range users { + u, err := NewDBUser(v).Convert() + if err != nil { + return nil, err + } + PBUsers = append(PBUsers, u) + } + return +} + func (pb *PBUser) Convert() (*relation.User, error) { dst := &relation.User{} utils.CopyStructFields(dst, pb) diff --git a/internal/msg_gateway/gate/ws_server.go b/internal/msg_gateway/gate/ws_server.go index bd33541d8..f480cb99c 100644 --- a/internal/msg_gateway/gate/ws_server.go +++ b/internal/msg_gateway/gate/ws_server.go @@ -435,6 +435,11 @@ func (ws *WServer) getUserAllCons(uid string) map[int]*UserConn { // } // return "", 0 // } + +func WsVerifyToken(token, uid string, platformID string, operationID string) (bool, error, string) { + +} + func (ws *WServer) headerCheck(w http.ResponseWriter, r *http.Request, operationID string) (isPass, compression bool) { status := http.StatusUnauthorized query := r.URL.Query() diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index 02d6a0ffb..16237256b 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -1,17 +1,18 @@ package auth import ( + "Open_IM/internal/common/check" "Open_IM/pkg/common/constant" - imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/db/controller" "Open_IM/pkg/common/log" promePkg "Open_IM/pkg/common/prometheus" "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/common/tracelog" "Open_IM/pkg/getcdv3" pbAuth "Open_IM/pkg/proto/auth" pbRelay "Open_IM/pkg/proto/relay" "Open_IM/pkg/utils" "context" - "errors" "net" "strconv" "strings" @@ -23,93 +24,76 @@ import ( "google.golang.org/grpc" ) -func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq) (*pbAuth.UserRegisterResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String()) - var user imdb.User - utils.CopyStructFields(&user, req.UserInfo) - if req.UserInfo.BirthStr != "" { - time, err := utils.TimeStringToTime(req.UserInfo.BirthStr) - if err != nil { - log.NewError(req.OperationID, "TimeStringToTime failed ", err.Error(), req.UserInfo.BirthStr) - return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: "TimeStringToTime failed:" + err.Error()}}, nil - } - user.Birth = time +func (s *rpcAuth) UserToken(ctx context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) { + resp := pbAuth.UserTokenResp{} + if _, err := check.GetUsersInfo(ctx, req.UserID); err != nil { + return nil, err } - log.Debug(req.OperationID, "copy ", user, req.UserInfo) - err := imdb.UserRegister(user) + token, expTime, err := token_verify.CreateToken(req.UserID, int(req.PlatformID)) if err != nil { - errMsg := req.OperationID + " imdb.UserRegister failed " + err.Error() + user.UserID - log.NewError(req.OperationID, errMsg, user) - return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil + return nil, err } - promePkg.PromeInc(promePkg.UserRegisterCounter) - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{}}) - return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{}}, nil -} - -func (rpc *rpcAuth) UserToken(_ context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String()) - _, err := imdb.GetUserByUserID(req.FromUserID) - if err != nil { - log.NewError(req.OperationID, "not this user:", req.FromUserID, req.String()) - return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}}, nil - } - tokens, expTime, err := token_verify.CreateToken(req.FromUserID, int(req.Platform)) - if err != nil { - errMsg := req.OperationID + " token_verify.CreateToken failed " + err.Error() + req.FromUserID + utils.Int32ToString(req.Platform) - log.NewError(req.OperationID, errMsg) - return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil - } - promePkg.PromeInc(promePkg.UserLoginCounter) - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{}, Token: tokens, ExpiredTime: expTime}) - return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{}, Token: tokens, ExpiredTime: expTime}, nil -} - -func (rpc *rpcAuth) ParseToken(_ context.Context, req *pbAuth.ParseTokenReq) (*pbAuth.ParseTokenResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String()) - claims, err := token_verify.ParseToken(req.Token, req.OperationID) - if err != nil { - errMsg := "ParseToken failed " + err.Error() + req.OperationID + " token " + req.Token - log.Error(req.OperationID, errMsg, "token:", req.Token) - return &pbAuth.ParseTokenResp{CommonResp: &pbAuth.CommonResp{ErrCode: 4001, ErrMsg: errMsg}}, nil - } - resp := pbAuth.ParseTokenResp{CommonResp: &pbAuth.CommonResp{}, UserID: claims.UID, Platform: claims.Platform, ExpireTimeSeconds: uint32(claims.ExpiresAt.Unix())} - log.Info(req.OperationID, utils.GetSelfFuncName(), " rpc return ", resp.String()) + resp.Token = token + resp.ExpireTimeSeconds = expTime return &resp, nil } -func (rpc *rpcAuth) ForceLogout(_ context.Context, req *pbAuth.ForceLogoutReq) (*pbAuth.ForceLogoutResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String()) - if !token_verify.IsManagerUserID(req.OpUserID) { - errMsg := req.OperationID + " IsManagerUserID false " + req.OpUserID - log.NewError(req.OperationID, errMsg) - return &pbAuth.ForceLogoutResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}}, nil +func (s *rpcAuth) parseToken(ctx context.Context, tokensString, operationID string) (claims *token_verify.Claims, err error) { + claims, err = token_verify.GetClaimFromToken(tokensString) + if err != nil { + return nil, utils.Wrap(err, "") } - //if err := token_verify.DeleteToken(req.FromUserID, int(req.Platform)); err != nil { - // errMsg := req.OperationID + " DeleteToken failed " + err.Error() + req.FromUserID + utils.Int32ToString(req.Platform) - // log.NewError(req.OperationID, errMsg) - // return &pbAuth.ForceLogoutResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil - //} - if err := rpc.forceKickOff(req.FromUserID, req.Platform, req.OperationID); err != nil { - errMsg := req.OperationID + " forceKickOff failed " + err.Error() + req.FromUserID + utils.Int32ToString(req.Platform) - log.NewError(req.OperationID, errMsg) - return &pbAuth.ForceLogoutResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil + m, err := s.GetTokens(ctx, claims.UID, claims.Platform) + if err != nil { + return nil, err } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{}}) - return &pbAuth.ForceLogoutResp{CommonResp: &pbAuth.CommonResp{}}, nil + + if v, ok := m[tokensString]; ok { + switch v { + case constant.NormalToken: + return claims, nil + case constant.KickedToken: + return nil, utils.Wrap(constant.ErrTokenKicked, "this token has been kicked by other same terminal ") + default: + return nil, utils.Wrap(constant.ErrTokenUnknown, "") + } + } + return nil, utils.Wrap(constant.ErrTokenNotExist, "redis token map not find") } -func (rpc *rpcAuth) forceKickOff(userID string, platformID int32, operationID string) error { - log.NewInfo(operationID, utils.GetSelfFuncName(), " args ", userID, platformID) +func (s *rpcAuth) ParseToken(ctx context.Context, req *pbAuth.ParseTokenReq) (*pbAuth.ParseTokenResp, error) { + resp := pbAuth.ParseTokenResp{} + claims, err := s.parseToken(ctx, req.Token, req.OperationID) + if err != nil { + return nil, err + } + resp.UserID = claims.UID + resp.Platform = claims.Platform + resp.ExpireTimeSeconds = claims.ExpiresAt.Unix() + return &resp, nil +} + +func (s *rpcAuth) ForceLogout(ctx context.Context, req *pbAuth.ForceLogoutReq) (*pbAuth.ForceLogoutResp, error) { + resp := pbAuth.ForceLogoutResp{} + if err := token_verify.CheckManagerUserID(ctx, tracelog.GetOpUserID(ctx)); err != nil { + return nil, err + } + if err := s.forceKickOff(ctx, req.UserID, req.PlatformID, tracelog.GetOperationID(ctx)); err != nil { + return nil, err + } + return &resp, nil +} + +func (s *rpcAuth) forceKickOff(ctx context.Context, userID string, platformID int32, operationID string) error { grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID) for _, v := range grpcCons { client := pbRelay.NewRelayClient(v) kickReq := &pbRelay.KickUserOfflineReq{OperationID: operationID, KickUserIDList: []string{userID}, PlatformID: platformID} log.NewInfo(operationID, "KickUserOffline ", client, kickReq.String()) - _, err := client.KickUserOffline(context.Background(), kickReq) + _, err := client.KickUserOffline(ctx, kickReq) return utils.Wrap(err, "") } - return errors.New("no rpc node ") + return constant.ErrInternalServer.Wrap() } type rpcAuth struct { @@ -117,6 +101,7 @@ type rpcAuth struct { rpcRegisterName string etcdSchema string etcdAddr []string + controller.AuthInterface } func NewRpcAuthServer(port int) *rpcAuth { @@ -129,7 +114,7 @@ func NewRpcAuthServer(port int) *rpcAuth { } } -func (rpc *rpcAuth) Run() { +func (s *rpcAuth) Run() { operationID := utils.OperationIDGenerator() log.NewInfo(operationID, "rpc auth start...") @@ -139,10 +124,10 @@ func (rpc *rpcAuth) Run() { } else { listenIP = config.Config.ListenIP } - address := listenIP + ":" + strconv.Itoa(rpc.rpcPort) + address := listenIP + ":" + strconv.Itoa(s.rpcPort) listener, err := net.Listen("tcp", address) if err != nil { - panic("listening err:" + err.Error() + rpc.rpcRegisterName) + panic("listening err:" + err.Error() + s.rpcRegisterName) } log.NewInfo(operationID, "listen network success, ", address, listener) var grpcOpts []grpc.ServerOption @@ -162,7 +147,7 @@ func (rpc *rpcAuth) Run() { defer srv.GracefulStop() //service registers with etcd - pbAuth.RegisterAuthServer(srv, rpc) + pbAuth.RegisterAuthServer(srv, s) rpcRegisterIP := config.Config.RpcRegisterIP if config.Config.RpcRegisterIP == "" { rpcRegisterIP, err = utils.GetLocalIP() @@ -172,14 +157,14 @@ func (rpc *rpcAuth) Run() { } log.NewInfo("", "rpcRegisterIP", rpcRegisterIP) - err = getcdv3.RegisterEtcd(rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), rpcRegisterIP, rpc.rpcPort, rpc.rpcRegisterName, 10) + err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10, "") if err != nil { log.NewError(operationID, "RegisterEtcd failed ", err.Error(), - rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), rpcRegisterIP, rpc.rpcPort, rpc.rpcRegisterName) + s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName) panic(utils.Wrap(err, "register auth module rpc to etcd err")) } - log.NewInfo(operationID, "RegisterAuthServer ok ", rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), rpcRegisterIP, rpc.rpcPort, rpc.rpcRegisterName) + log.NewInfo(operationID, "RegisterAuthServer ok ", s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName) err = srv.Serve(listener) if err != nil { log.NewError(operationID, "Serve failed ", err.Error()) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index ccb6795c6..98fb5bdd0 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -172,12 +172,9 @@ func (s *userServer) GetUsersInfo(ctx context.Context, req *pbUser.GetUsersInfoR if err != nil { return nil, err } - for _, v := range users { - n, err := convert.NewDBUser(v).Convert() - if err != nil { - return nil, err - } - resp.UsersInfo = append(resp.UsersInfo, n) + resp.UsersInfo, err = (*convert.DBUser)(nil).DB2PB(users) + if err != nil { + return nil, err } return resp, nil } @@ -256,9 +253,9 @@ func (s *userServer) AccountCheck(ctx context.Context, req *pbUser.AccountCheckR for _, v := range user { uidList = append(uidList, v.UserID) } - var r []*pbUser.AccountCheckResp_SingleUserStatus + var r []*pbUser.AccountCheckRespSingleUserStatus for _, v := range req.CheckUserIDs { - temp := new(pbUser.AccountCheckResp_SingleUserStatus) + temp := new(pbUser.AccountCheckRespSingleUserStatus) temp.UserID = v if utils.IsContain(v, uidList) { temp.AccountStatus = constant.Registered @@ -333,3 +330,27 @@ func (s *userServer) GetUsers(ctx context.Context, req *pbUser.GetUsersReq) (*pb } return &resp, nil } + +func (s *userServer) UserRegister(ctx context.Context, req *pbUser.UserRegisterReq) (*pbUser.UserRegisterResp, error) { + resp := pbUser.UserRegisterResp{} + userIDs := make([]string, 0) + for _, v := range req.Users { + userIDs = append(userIDs, v.UserID) + } + exist, err := s.IsExist(ctx, userIDs) + if err != nil { + return nil, err + } + if exist { + return nil, constant.ErrRegisteredAlready.Wrap("exist") + } + users, err := (*convert.PBUser)(nil).PB2DB(req.Users) + if err != nil { + return nil, err + } + err = s.Create(ctx, users) + if err != nil { + return nil, err + } + return &resp, nil +} diff --git a/pkg/common/db/controller/auth.go b/pkg/common/db/controller/auth.go new file mode 100644 index 000000000..b6f604a84 --- /dev/null +++ b/pkg/common/db/controller/auth.go @@ -0,0 +1,8 @@ +package controller + +import "context" + +type AuthInterface interface { + GetTokens(ctx context.Context, userID, platform string) (map[string]int, error) + DeleteToken(ctx context.Context, userID, platform string) error +} diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go index 115f7ba45..abb0a660b 100644 --- a/pkg/common/db/controller/user.go +++ b/pkg/common/db/controller/user.go @@ -15,6 +15,8 @@ type UserInterface interface { GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) GetByNameAndID(ctx context.Context, content string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) Get(ctx context.Context, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) + //userIDs是否存在 只要有一个存在就为true + IsExist(ctx context.Context, userIDs []string) (exist bool, err error) } type UserController struct { diff --git a/pkg/common/token_verify/jwt_token.go b/pkg/common/token_verify/jwt_token.go index 9ee1b38e3..b347191a6 100644 --- a/pkg/common/token_verify/jwt_token.go +++ b/pkg/common/token_verify/jwt_token.go @@ -3,25 +3,13 @@ package token_verify import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" - commonDB "Open_IM/pkg/common/db" - "Open_IM/pkg/common/log" "Open_IM/pkg/common/tracelog" "Open_IM/pkg/utils" "context" - "time" - - go_redis "github.com/go-redis/redis/v8" "github.com/golang-jwt/jwt/v4" + "time" ) -//var ( -// TokenExpired = errors.New("token is timed out, please log in again") -// TokenInvalid = errors.New("token has been invalidated") -// TokenNotValidYet = errors.New("token not active yet") -// TokenMalformed = errors.New("that's not even a token") -// TokenUnknown = errors.New("couldn't handle this token") -//) - type Claims struct { UID string Platform string //login platform @@ -41,57 +29,6 @@ func BuildClaims(uid, platform string, ttl int64) Claims { }} } -func DeleteToken(userID string, platformID int) error { - m, err := commonDB.DB.GetTokenMapByUidPid(userID, constant.PlatformIDToName(platformID)) - if err != nil && err != go_redis.Nil { - return utils.Wrap(err, "") - } - var deleteTokenKey []string - for k, v := range m { - _, err = GetClaimFromToken(k) - if err != nil || v != constant.NormalToken { - deleteTokenKey = append(deleteTokenKey, k) - } - } - if len(deleteTokenKey) != 0 { - err = commonDB.DB.DeleteTokenByUidPid(userID, platformID, deleteTokenKey) - return utils.Wrap(err, "") - } - return nil -} - -func CreateToken(userID string, platformID int) (string, int64, error) { - claims := BuildClaims(userID, constant.PlatformIDToName(platformID), config.Config.TokenPolicy.AccessExpire) - token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) - tokenString, err := token.SignedString([]byte(config.Config.TokenPolicy.AccessSecret)) - if err != nil { - return "", 0, err - } - //remove Invalid token - m, err := commonDB.DB.GetTokenMapByUidPid(userID, constant.PlatformIDToName(platformID)) - if err != nil && err != go_redis.Nil { - return "", 0, err - } - var deleteTokenKey []string - for k, v := range m { - _, err = GetClaimFromToken(k) - if err != nil || v != constant.NormalToken { - deleteTokenKey = append(deleteTokenKey, k) - } - } - if len(deleteTokenKey) != 0 { - err = commonDB.DB.DeleteTokenByUidPid(userID, platformID, deleteTokenKey) - if err != nil { - return "", 0, err - } - } - err = commonDB.DB.AddTokenFlag(userID, platformID, tokenString, constant.NormalToken) - if err != nil { - return "", 0, err - } - return tokenString, claims.ExpiresAt.Time.Unix(), err -} - func secret() jwt.Keyfunc { return func(token *jwt.Token) (interface{}, error) { return []byte(config.Config.TokenPolicy.AccessSecret), nil @@ -122,44 +59,8 @@ func GetClaimFromToken(tokensString string) (*Claims, error) { } } -func IsAppManagerAccess(token string, OpUserID string) bool { - claims, err := ParseToken(token, "") - if err != nil { - return false - } - if utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) && claims.UID == OpUserID { - return true - } - return false -} - -func IsManagerUserID(OpUserID string) bool { - if utils.IsContain(OpUserID, config.Config.Manager.AppManagerUid) { - return true - } else { - return false - } -} - -func CheckManagerUserID(ctx context.Context, userID string) error { - if utils.IsContain(userID, config.Config.Manager.AppManagerUid) { - return nil - } - return constant.ErrNoPermission.Wrap() -} - -func CheckAccess(ctx context.Context, OpUserID string, OwnerUserID string) bool { - if utils.IsContain(OpUserID, config.Config.Manager.AppManagerUid) { - return true - } - if OpUserID == OwnerUserID { - return true - } - return false -} - func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) { - opUserID := utils.OpUserID(ctx) + opUserID := tracelog.GetOpUserID(ctx) defer func() { tracelog.SetCtxInfo(ctx, utils.GetFuncName(1), err, "OpUserID", opUserID, "ownerUserID", ownerUserID) }() @@ -172,144 +73,13 @@ func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) { return constant.ErrIdentity.Wrap(utils.GetSelfFuncName()) } -func IsAppManagerUid(ctx context.Context) bool { - return utils.IsContain(utils.OpUserID(ctx), config.Config.Manager.AppManagerUid) -} - func CheckAdmin(ctx context.Context) error { - if utils.IsContain(utils.OpUserID(ctx), config.Config.Manager.AppManagerUid) { + if utils.IsContain(tracelog.GetOpUserID(ctx), config.Config.Manager.AppManagerUid) { return nil } return constant.ErrIdentity.Wrap() } -func GetUserIDFromToken(token string, operationID string) (bool, string, string) { - claims, err := ParseToken(token, operationID) - if err != nil { - log.Error(operationID, "ParseToken failed, ", err.Error(), token) - return false, "", err.Error() - } - log.Debug(operationID, "token claims.ExpiresAt.Second() ", claims.ExpiresAt.Unix()) - return true, claims.UID, "" -} - -func ParseUserIDFromToken(token string, operationID string) (string, error) { - claims, err := ParseToken(token, operationID) - if err != nil { - log.Error(operationID, "ParseToken failed, ", err.Error(), token) - return "", err - } - log.Debug(operationID, "token claims.ExpiresAt.Second() ", claims.ExpiresAt.Unix()) - return claims.UID, nil -} - -func GetUserIDFromTokenExpireTime(token string, operationID string) (bool, string, string, int64) { - claims, err := ParseToken(token, operationID) - if err != nil { - log.Error(operationID, "ParseToken failed, ", err.Error(), token) - return false, "", err.Error(), 0 - } - return true, claims.UID, "", claims.ExpiresAt.Unix() -} - -func ParseTokenGetUserID(token string, operationID string) (error, string) { - claims, err := ParseToken(token, operationID) - if err != nil { - return utils.Wrap(err, ""), "" - } - return nil, claims.UID -} - -func ParseToken(tokensString, operationID string) (claims *Claims, err error) { - claims, err = GetClaimFromToken(tokensString) - if err != nil { - return nil, utils.Wrap(err, "") - } - - m, err := commonDB.DB.GetTokenMapByUidPid(claims.UID, claims.Platform) - if err != nil { - log.NewError(operationID, "get token from redis err", err.Error(), claims.UID, claims.Platform) - return nil, utils.Wrap(constant.ErrTokenNotExist, "get token from redis err") - } - if m == nil { - log.NewError(operationID, "get token from redis err, not in redis ", "m is nil ", claims.UID, claims.Platform) - return nil, utils.Wrap(constant.ErrTokenNotExist, "get token from redis err") - } - if v, ok := m[tokensString]; ok { - switch v { - case constant.NormalToken: - log.NewDebug(operationID, "this is normal return ", *claims) - return claims, nil - case constant.KickedToken: - log.Error(operationID, "this token has been kicked by other same terminal ", constant.ErrTokenKicked) - return nil, utils.Wrap(constant.ErrTokenKicked, "this token has been kicked by other same terminal ") - default: - return nil, utils.Wrap(constant.ErrTokenUnknown, "") - } - } - log.NewError(operationID, "redis token map not find ", constant.ErrTokenNotExist, tokensString) - return nil, utils.Wrap(constant.ErrTokenNotExist, "redis token map not find") -} - -//func MakeTheTokenInvalid(currentClaims *Claims, platformClass string) (bool, error) { -// storedRedisTokenInterface, err := db.DB.GetPlatformToken(currentClaims.UID, platformClass) -// if err != nil { -// return false, err -// } -// storedRedisPlatformClaims, err := ParseRedisInterfaceToken(storedRedisTokenInterface) -// if err != nil { -// return false, err -// } -// //if issue time less than redis token then make this token invalid -// if currentClaims.IssuedAt.Time.Unix() < storedRedisPlatformClaims.IssuedAt.Time.Unix() { -// return true, constant.TokenInvalid -// } -// return false, nil -//} - func ParseRedisInterfaceToken(redisToken interface{}) (*Claims, error) { return GetClaimFromToken(string(redisToken.([]uint8))) } - -// Validation token, false means failure, true means successful verification -func VerifyToken(token, uid string) (bool, error) { - claims, err := ParseToken(token, "") - if err != nil { - return false, utils.Wrap(err, "ParseToken failed") - } - if claims.UID != uid { - return false, constant.ErrTokenUnknown - } - - log.NewDebug("", claims.UID, claims.Platform) - return true, nil -} - -func WsVerifyToken(token, uid string, platformID string, operationID string) (bool, error, string) { - argMsg := "args: token: " + token + " operationID: " + operationID + " userID: " + uid + " platformID: " + constant.PlatformIDToName(utils.StringToInt(platformID)) - claims, err := ParseToken(token, operationID) - if err != nil { - //if errors.Is(err, constant.ErrTokenUnknown) { - // errMsg := "ParseToken failed ErrTokenUnknown " + err.Error() - // log.Error(operationID, errMsg) - //} - //e := errors.Unwrap(err) - //if errors.Is(e, constant.ErrTokenUnknown) { - // errMsg := "ParseToken failed ErrTokenUnknown " + e.Error() - // log.Error(operationID, errMsg) - //} - - errMsg := "parse token err " + err.Error() + argMsg - return false, utils.Wrap(err, errMsg), errMsg - } - if claims.UID != uid { - errMsg := " uid is not same to token uid " + argMsg + " claims.UID: " + claims.UID - return false, utils.Wrap(constant.ErrTokenDifferentUserID, errMsg), errMsg - } - if claims.Platform != constant.PlatformIDToName(utils.StringToInt(platformID)) { - errMsg := " platform is not same to token platform " + argMsg + " claims platformID: " + claims.Platform - return false, utils.Wrap(constant.ErrTokenDifferentPlatformID, errMsg), errMsg - } - log.NewDebug(operationID, utils.GetSelfFuncName(), " check ok ", claims.UID, uid, claims.Platform) - return true, nil, "" -} diff --git a/pkg/proto/auth/auth.pb.go b/pkg/proto/auth/auth.pb.go index e96a232d9..5316943c5 100644 --- a/pkg/proto/auth/auth.pb.go +++ b/pkg/proto/auth/auth.pb.go @@ -1,882 +1,333 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.15.5 // source: auth/auth.proto -package pbAuth +package pbAuth // import "Open_IM/pkg/proto/auth" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "Open_IM/pkg/proto/sdk_ws" import ( - sdk_ws "Open_IM/pkg/proto/sdk_ws" - context "context" + context "golang.org/x/net/context" grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf -type CommonResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ErrCode int32 `protobuf:"varint,1,opt,name=errCode,proto3" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg,proto3" json:"errMsg,omitempty"` -} - -func (x *CommonResp) Reset() { - *x = CommonResp{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonResp) ProtoMessage() {} - -func (x *CommonResp) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonResp.ProtoReflect.Descriptor instead. -func (*CommonResp) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{0} -} - -func (x *CommonResp) GetErrCode() int32 { - if x != nil { - return x.ErrCode - } - return 0 -} - -func (x *CommonResp) GetErrMsg() string { - if x != nil { - return x.ErrMsg - } - return "" -} - -type UserRegisterReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserInfo *sdk_ws.UserInfo `protobuf:"bytes,1,opt,name=UserInfo,proto3" json:"UserInfo,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` -} - -func (x *UserRegisterReq) Reset() { - *x = UserRegisterReq{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserRegisterReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRegisterReq) ProtoMessage() {} - -func (x *UserRegisterReq) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserRegisterReq.ProtoReflect.Descriptor instead. -func (*UserRegisterReq) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{1} -} - -func (x *UserRegisterReq) GetUserInfo() *sdk_ws.UserInfo { - if x != nil { - return x.UserInfo - } - return nil -} - -func (x *UserRegisterReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -type UserRegisterResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp,proto3" json:"CommonResp,omitempty"` -} - -func (x *UserRegisterResp) Reset() { - *x = UserRegisterResp{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserRegisterResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRegisterResp) ProtoMessage() {} - -func (x *UserRegisterResp) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserRegisterResp.ProtoReflect.Descriptor instead. -func (*UserRegisterResp) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{2} -} - -func (x *UserRegisterResp) GetCommonResp() *CommonResp { - if x != nil { - return x.CommonResp - } - return nil -} +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type UserTokenReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Platform int32 `protobuf:"varint,1,opt,name=Platform,proto3" json:"Platform,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID,proto3" json:"FromUserID,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=OpUserID,proto3" json:"OpUserID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID,omitempty"` - LoginIp string `protobuf:"bytes,5,opt,name=LoginIp,proto3" json:"LoginIp,omitempty"` + PlatformID int32 `protobuf:"varint,1,opt,name=platformID" json:"platformID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *UserTokenReq) Reset() { - *x = UserTokenReq{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserTokenReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserTokenReq) ProtoMessage() {} - -func (x *UserTokenReq) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserTokenReq.ProtoReflect.Descriptor instead. +func (m *UserTokenReq) Reset() { *m = UserTokenReq{} } +func (m *UserTokenReq) String() string { return proto.CompactTextString(m) } +func (*UserTokenReq) ProtoMessage() {} func (*UserTokenReq) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{3} + return fileDescriptor_auth_ffdf6e1278396193, []int{0} +} +func (m *UserTokenReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserTokenReq.Unmarshal(m, b) +} +func (m *UserTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserTokenReq.Marshal(b, m, deterministic) +} +func (dst *UserTokenReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserTokenReq.Merge(dst, src) +} +func (m *UserTokenReq) XXX_Size() int { + return xxx_messageInfo_UserTokenReq.Size(m) +} +func (m *UserTokenReq) XXX_DiscardUnknown() { + xxx_messageInfo_UserTokenReq.DiscardUnknown(m) } -func (x *UserTokenReq) GetPlatform() int32 { - if x != nil { - return x.Platform +var xxx_messageInfo_UserTokenReq proto.InternalMessageInfo + +func (m *UserTokenReq) GetPlatformID() int32 { + if m != nil { + return m.PlatformID } return 0 } -func (x *UserTokenReq) GetFromUserID() string { - if x != nil { - return x.FromUserID - } - return "" -} - -func (x *UserTokenReq) GetOpUserID() string { - if x != nil { - return x.OpUserID - } - return "" -} - -func (x *UserTokenReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -func (x *UserTokenReq) GetLoginIp() string { - if x != nil { - return x.LoginIp +func (m *UserTokenReq) GetUserID() string { + if m != nil { + return m.UserID } return "" } type UserTokenResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp,proto3" json:"CommonResp,omitempty"` - Token string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"` - ExpiredTime int64 `protobuf:"varint,3,opt,name=ExpiredTime,proto3" json:"ExpiredTime,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` + ExpireTimeSeconds int64 `protobuf:"varint,3,opt,name=expireTimeSeconds" json:"expireTimeSeconds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *UserTokenResp) Reset() { - *x = UserTokenResp{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserTokenResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserTokenResp) ProtoMessage() {} - -func (x *UserTokenResp) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserTokenResp.ProtoReflect.Descriptor instead. +func (m *UserTokenResp) Reset() { *m = UserTokenResp{} } +func (m *UserTokenResp) String() string { return proto.CompactTextString(m) } +func (*UserTokenResp) ProtoMessage() {} func (*UserTokenResp) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{4} + return fileDescriptor_auth_ffdf6e1278396193, []int{1} +} +func (m *UserTokenResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserTokenResp.Unmarshal(m, b) +} +func (m *UserTokenResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserTokenResp.Marshal(b, m, deterministic) +} +func (dst *UserTokenResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserTokenResp.Merge(dst, src) +} +func (m *UserTokenResp) XXX_Size() int { + return xxx_messageInfo_UserTokenResp.Size(m) +} +func (m *UserTokenResp) XXX_DiscardUnknown() { + xxx_messageInfo_UserTokenResp.DiscardUnknown(m) } -func (x *UserTokenResp) GetCommonResp() *CommonResp { - if x != nil { - return x.CommonResp - } - return nil -} +var xxx_messageInfo_UserTokenResp proto.InternalMessageInfo -func (x *UserTokenResp) GetToken() string { - if x != nil { - return x.Token +func (m *UserTokenResp) GetToken() string { + if m != nil { + return m.Token } return "" } -func (x *UserTokenResp) GetExpiredTime() int64 { - if x != nil { - return x.ExpiredTime +func (m *UserTokenResp) GetExpireTimeSeconds() int64 { + if m != nil { + return m.ExpireTimeSeconds } return 0 } type ForceLogoutReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Platform int32 `protobuf:"varint,1,opt,name=Platform,proto3" json:"Platform,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID,proto3" json:"FromUserID,omitempty"` - OpUserID string `protobuf:"bytes,3,opt,name=OpUserID,proto3" json:"OpUserID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + PlatformID int32 `protobuf:"varint,1,opt,name=platformID" json:"platformID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *ForceLogoutReq) Reset() { - *x = ForceLogoutReq{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ForceLogoutReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ForceLogoutReq) ProtoMessage() {} - -func (x *ForceLogoutReq) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ForceLogoutReq.ProtoReflect.Descriptor instead. +func (m *ForceLogoutReq) Reset() { *m = ForceLogoutReq{} } +func (m *ForceLogoutReq) String() string { return proto.CompactTextString(m) } +func (*ForceLogoutReq) ProtoMessage() {} func (*ForceLogoutReq) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{5} + return fileDescriptor_auth_ffdf6e1278396193, []int{2} +} +func (m *ForceLogoutReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ForceLogoutReq.Unmarshal(m, b) +} +func (m *ForceLogoutReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ForceLogoutReq.Marshal(b, m, deterministic) +} +func (dst *ForceLogoutReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForceLogoutReq.Merge(dst, src) +} +func (m *ForceLogoutReq) XXX_Size() int { + return xxx_messageInfo_ForceLogoutReq.Size(m) +} +func (m *ForceLogoutReq) XXX_DiscardUnknown() { + xxx_messageInfo_ForceLogoutReq.DiscardUnknown(m) } -func (x *ForceLogoutReq) GetPlatform() int32 { - if x != nil { - return x.Platform +var xxx_messageInfo_ForceLogoutReq proto.InternalMessageInfo + +func (m *ForceLogoutReq) GetPlatformID() int32 { + if m != nil { + return m.PlatformID } return 0 } -func (x *ForceLogoutReq) GetFromUserID() string { - if x != nil { - return x.FromUserID - } - return "" -} - -func (x *ForceLogoutReq) GetOpUserID() string { - if x != nil { - return x.OpUserID - } - return "" -} - -func (x *ForceLogoutReq) GetOperationID() string { - if x != nil { - return x.OperationID +func (m *ForceLogoutReq) GetUserID() string { + if m != nil { + return m.UserID } return "" } type ForceLogoutResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp,proto3" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *ForceLogoutResp) Reset() { - *x = ForceLogoutResp{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ForceLogoutResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ForceLogoutResp) ProtoMessage() {} - -func (x *ForceLogoutResp) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ForceLogoutResp.ProtoReflect.Descriptor instead. +func (m *ForceLogoutResp) Reset() { *m = ForceLogoutResp{} } +func (m *ForceLogoutResp) String() string { return proto.CompactTextString(m) } +func (*ForceLogoutResp) ProtoMessage() {} func (*ForceLogoutResp) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{6} + return fileDescriptor_auth_ffdf6e1278396193, []int{3} +} +func (m *ForceLogoutResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ForceLogoutResp.Unmarshal(m, b) +} +func (m *ForceLogoutResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ForceLogoutResp.Marshal(b, m, deterministic) +} +func (dst *ForceLogoutResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForceLogoutResp.Merge(dst, src) +} +func (m *ForceLogoutResp) XXX_Size() int { + return xxx_messageInfo_ForceLogoutResp.Size(m) +} +func (m *ForceLogoutResp) XXX_DiscardUnknown() { + xxx_messageInfo_ForceLogoutResp.DiscardUnknown(m) } -func (x *ForceLogoutResp) GetCommonResp() *CommonResp { - if x != nil { - return x.CommonResp - } - return nil -} +var xxx_messageInfo_ForceLogoutResp proto.InternalMessageInfo type ParseTokenReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"` + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *ParseTokenReq) Reset() { - *x = ParseTokenReq{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParseTokenReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParseTokenReq) ProtoMessage() {} - -func (x *ParseTokenReq) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParseTokenReq.ProtoReflect.Descriptor instead. +func (m *ParseTokenReq) Reset() { *m = ParseTokenReq{} } +func (m *ParseTokenReq) String() string { return proto.CompactTextString(m) } +func (*ParseTokenReq) ProtoMessage() {} func (*ParseTokenReq) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{7} + return fileDescriptor_auth_ffdf6e1278396193, []int{4} +} +func (m *ParseTokenReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ParseTokenReq.Unmarshal(m, b) +} +func (m *ParseTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ParseTokenReq.Marshal(b, m, deterministic) +} +func (dst *ParseTokenReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParseTokenReq.Merge(dst, src) +} +func (m *ParseTokenReq) XXX_Size() int { + return xxx_messageInfo_ParseTokenReq.Size(m) +} +func (m *ParseTokenReq) XXX_DiscardUnknown() { + xxx_messageInfo_ParseTokenReq.DiscardUnknown(m) } -func (x *ParseTokenReq) GetToken() string { - if x != nil { - return x.Token +var xxx_messageInfo_ParseTokenReq proto.InternalMessageInfo + +func (m *ParseTokenReq) GetToken() string { + if m != nil { + return m.Token } return "" } -func (x *ParseTokenReq) GetOperationID() string { - if x != nil { - return x.OperationID +func (m *ParseTokenReq) GetOperationID() string { + if m != nil { + return m.OperationID } return "" } type ParseTokenResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` - Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform,omitempty"` - CommonResp *CommonResp `protobuf:"bytes,3,opt,name=commonResp,proto3" json:"commonResp,omitempty"` - ExpireTimeSeconds uint32 `protobuf:"varint,4,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds,omitempty"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Platform string `protobuf:"bytes,2,opt,name=platform" json:"platform,omitempty"` + ExpireTimeSeconds int64 `protobuf:"varint,4,opt,name=expireTimeSeconds" json:"expireTimeSeconds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *ParseTokenResp) Reset() { - *x = ParseTokenResp{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParseTokenResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParseTokenResp) ProtoMessage() {} - -func (x *ParseTokenResp) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ParseTokenResp.ProtoReflect.Descriptor instead. +func (m *ParseTokenResp) Reset() { *m = ParseTokenResp{} } +func (m *ParseTokenResp) String() string { return proto.CompactTextString(m) } +func (*ParseTokenResp) ProtoMessage() {} func (*ParseTokenResp) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{8} + return fileDescriptor_auth_ffdf6e1278396193, []int{5} +} +func (m *ParseTokenResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ParseTokenResp.Unmarshal(m, b) +} +func (m *ParseTokenResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ParseTokenResp.Marshal(b, m, deterministic) +} +func (dst *ParseTokenResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParseTokenResp.Merge(dst, src) +} +func (m *ParseTokenResp) XXX_Size() int { + return xxx_messageInfo_ParseTokenResp.Size(m) +} +func (m *ParseTokenResp) XXX_DiscardUnknown() { + xxx_messageInfo_ParseTokenResp.DiscardUnknown(m) } -func (x *ParseTokenResp) GetUserID() string { - if x != nil { - return x.UserID +var xxx_messageInfo_ParseTokenResp proto.InternalMessageInfo + +func (m *ParseTokenResp) GetUserID() string { + if m != nil { + return m.UserID } return "" } -func (x *ParseTokenResp) GetPlatform() string { - if x != nil { - return x.Platform +func (m *ParseTokenResp) GetPlatform() string { + if m != nil { + return m.Platform } return "" } -func (x *ParseTokenResp) GetCommonResp() *CommonResp { - if x != nil { - return x.CommonResp - } - return nil -} - -func (x *ParseTokenResp) GetExpireTimeSeconds() uint32 { - if x != nil { - return x.ExpireTimeSeconds +func (m *ParseTokenResp) GetExpireTimeSeconds() int64 { + if m != nil { + return m.ExpireTimeSeconds } return 0 } -var File_auth_auth_proto protoreflect.FileDescriptor - -var file_auth_auth_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x06, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x1a, 0x28, 0x4f, 0x70, 0x65, 0x6e, 0x2d, - 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x64, 0x6b, 0x5f, 0x77, 0x73, 0x2f, 0x77, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, - 0x72, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, - 0x4d, 0x73, 0x67, 0x22, 0x6c, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x37, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x22, 0x46, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x41, 0x75, - 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x55, 0x73, - 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x46, 0x72, 0x6f, 0x6d, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x70, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x49, 0x70, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x49, 0x70, 0x22, 0x7b, - 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x32, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x70, - 0x69, 0x72, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, - 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x0e, - 0x46, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, - 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x46, 0x72, - 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4f, 0x70, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x45, 0x0a, 0x0f, 0x46, 0x6f, 0x72, 0x63, - 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x0a, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x47, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xa6, 0x01, 0x0a, 0x0e, 0x50, 0x61, 0x72, - 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, - 0x32, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, - 0x73, 0x32, 0x80, 0x02, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x41, 0x0a, 0x0c, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x41, - 0x75, 0x74, 0x68, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, - 0x09, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x41, - 0x75, 0x74, 0x68, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, - 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0b, 0x46, 0x6f, 0x72, 0x63, 0x65, - 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, - 0x46, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x17, - 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, - 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x50, - 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, - 0x62, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x42, 0x1f, 0x5a, 0x1d, 0x4f, 0x70, 0x65, 0x6e, 0x5f, 0x49, 0x4d, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x3b, 0x70, - 0x62, 0x41, 0x75, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_auth_auth_proto_rawDescOnce sync.Once - file_auth_auth_proto_rawDescData = file_auth_auth_proto_rawDesc -) - -func file_auth_auth_proto_rawDescGZIP() []byte { - file_auth_auth_proto_rawDescOnce.Do(func() { - file_auth_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_auth_proto_rawDescData) - }) - return file_auth_auth_proto_rawDescData -} - -var file_auth_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_auth_auth_proto_goTypes = []interface{}{ - (*CommonResp)(nil), // 0: pbAuth.CommonResp - (*UserRegisterReq)(nil), // 1: pbAuth.UserRegisterReq - (*UserRegisterResp)(nil), // 2: pbAuth.UserRegisterResp - (*UserTokenReq)(nil), // 3: pbAuth.UserTokenReq - (*UserTokenResp)(nil), // 4: pbAuth.UserTokenResp - (*ForceLogoutReq)(nil), // 5: pbAuth.ForceLogoutReq - (*ForceLogoutResp)(nil), // 6: pbAuth.ForceLogoutResp - (*ParseTokenReq)(nil), // 7: pbAuth.ParseTokenReq - (*ParseTokenResp)(nil), // 8: pbAuth.ParseTokenResp - (*sdk_ws.UserInfo)(nil), // 9: server_api_params.UserInfo -} -var file_auth_auth_proto_depIdxs = []int32{ - 9, // 0: pbAuth.UserRegisterReq.UserInfo:type_name -> server_api_params.UserInfo - 0, // 1: pbAuth.UserRegisterResp.CommonResp:type_name -> pbAuth.CommonResp - 0, // 2: pbAuth.UserTokenResp.CommonResp:type_name -> pbAuth.CommonResp - 0, // 3: pbAuth.ForceLogoutResp.CommonResp:type_name -> pbAuth.CommonResp - 0, // 4: pbAuth.ParseTokenResp.commonResp:type_name -> pbAuth.CommonResp - 1, // 5: pbAuth.Auth.UserRegister:input_type -> pbAuth.UserRegisterReq - 3, // 6: pbAuth.Auth.UserToken:input_type -> pbAuth.UserTokenReq - 5, // 7: pbAuth.Auth.ForceLogout:input_type -> pbAuth.ForceLogoutReq - 7, // 8: pbAuth.Auth.ParseToken:input_type -> pbAuth.ParseTokenReq - 2, // 9: pbAuth.Auth.UserRegister:output_type -> pbAuth.UserRegisterResp - 4, // 10: pbAuth.Auth.UserToken:output_type -> pbAuth.UserTokenResp - 6, // 11: pbAuth.Auth.ForceLogout:output_type -> pbAuth.ForceLogoutResp - 8, // 12: pbAuth.Auth.ParseToken:output_type -> pbAuth.ParseTokenResp - 9, // [9:13] is the sub-list for method output_type - 5, // [5:9] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_auth_auth_proto_init() } -func file_auth_auth_proto_init() { - if File_auth_auth_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_auth_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRegisterReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRegisterResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserTokenReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserTokenResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ForceLogoutReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ForceLogoutResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParseTokenReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParseTokenResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_auth_auth_proto_rawDesc, - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_auth_auth_proto_goTypes, - DependencyIndexes: file_auth_auth_proto_depIdxs, - MessageInfos: file_auth_auth_proto_msgTypes, - }.Build() - File_auth_auth_proto = out.File - file_auth_auth_proto_rawDesc = nil - file_auth_auth_proto_goTypes = nil - file_auth_auth_proto_depIdxs = nil +func init() { + proto.RegisterType((*UserTokenReq)(nil), "pbAuth.userTokenReq") + proto.RegisterType((*UserTokenResp)(nil), "pbAuth.userTokenResp") + proto.RegisterType((*ForceLogoutReq)(nil), "pbAuth.forceLogoutReq") + proto.RegisterType((*ForceLogoutResp)(nil), "pbAuth.forceLogoutResp") + proto.RegisterType((*ParseTokenReq)(nil), "pbAuth.parseTokenReq") + proto.RegisterType((*ParseTokenResp)(nil), "pbAuth.parseTokenResp") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConnInterface +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 +const _ = grpc.SupportPackageIsVersion4 + +// Client API for Auth service -// AuthClient is the client API for Auth service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type AuthClient interface { - UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error) ForceLogout(ctx context.Context, in *ForceLogoutReq, opts ...grpc.CallOption) (*ForceLogoutResp, error) ParseToken(ctx context.Context, in *ParseTokenReq, opts ...grpc.CallOption) (*ParseTokenResp, error) } type authClient struct { - cc grpc.ClientConnInterface + cc *grpc.ClientConn } -func NewAuthClient(cc grpc.ClientConnInterface) AuthClient { +func NewAuthClient(cc *grpc.ClientConn) AuthClient { return &authClient{cc} } -func (c *authClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) { - out := new(UserRegisterResp) - err := c.cc.Invoke(ctx, "/pbAuth.Auth/UserRegister", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *authClient) UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error) { out := new(UserTokenResp) - err := c.cc.Invoke(ctx, "/pbAuth.Auth/UserToken", in, out, opts...) + err := grpc.Invoke(ctx, "/pbAuth.Auth/userToken", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -885,7 +336,7 @@ func (c *authClient) UserToken(ctx context.Context, in *UserTokenReq, opts ...gr func (c *authClient) ForceLogout(ctx context.Context, in *ForceLogoutReq, opts ...grpc.CallOption) (*ForceLogoutResp, error) { out := new(ForceLogoutResp) - err := c.cc.Invoke(ctx, "/pbAuth.Auth/ForceLogout", in, out, opts...) + err := grpc.Invoke(ctx, "/pbAuth.Auth/forceLogout", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -894,60 +345,25 @@ func (c *authClient) ForceLogout(ctx context.Context, in *ForceLogoutReq, opts . func (c *authClient) ParseToken(ctx context.Context, in *ParseTokenReq, opts ...grpc.CallOption) (*ParseTokenResp, error) { out := new(ParseTokenResp) - err := c.cc.Invoke(ctx, "/pbAuth.Auth/ParseToken", in, out, opts...) + err := grpc.Invoke(ctx, "/pbAuth.Auth/parseToken", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -// AuthServer is the server API for Auth service. +// Server API for Auth service + type AuthServer interface { - UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error) ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error) ParseToken(context.Context, *ParseTokenReq) (*ParseTokenResp, error) } -// UnimplementedAuthServer can be embedded to have forward compatible implementations. -type UnimplementedAuthServer struct { -} - -func (*UnimplementedAuthServer) UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRegister not implemented") -} -func (*UnimplementedAuthServer) UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserToken not implemented") -} -func (*UnimplementedAuthServer) ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ForceLogout not implemented") -} -func (*UnimplementedAuthServer) ParseToken(context.Context, *ParseTokenReq) (*ParseTokenResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParseToken not implemented") -} - func RegisterAuthServer(s *grpc.Server, srv AuthServer) { s.RegisterService(&_Auth_serviceDesc, srv) } -func _Auth_UserRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserRegisterReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).UserRegister(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pbAuth.Auth/UserRegister", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).UserRegister(ctx, req.(*UserRegisterReq)) - } - return interceptor(ctx, in, info, handler) -} - func _Auth_UserToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserTokenReq) if err := dec(in); err != nil { @@ -1007,22 +423,46 @@ var _Auth_serviceDesc = grpc.ServiceDesc{ HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "UserRegister", - Handler: _Auth_UserRegister_Handler, - }, - { - MethodName: "UserToken", + MethodName: "userToken", Handler: _Auth_UserToken_Handler, }, { - MethodName: "ForceLogout", + MethodName: "forceLogout", Handler: _Auth_ForceLogout_Handler, }, { - MethodName: "ParseToken", + MethodName: "parseToken", Handler: _Auth_ParseToken_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth/auth.proto", } + +func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_ffdf6e1278396193) } + +var fileDescriptor_auth_ffdf6e1278396193 = []byte{ + // 350 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0x4f, 0x4f, 0xfa, 0x40, + 0x10, 0x4d, 0x7f, 0xfc, 0xc9, 0x8f, 0x41, 0x20, 0x6c, 0x10, 0x49, 0x13, 0xb5, 0xe9, 0xa9, 0x07, + 0xa1, 0x89, 0x5e, 0x4c, 0x48, 0x4c, 0x34, 0x44, 0x6d, 0x22, 0x31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c4, 0x86, 0x9e, 0xd8, 0x82, 0x32, 0x27, 0x14, 0x81, 0x5a, 0xf2, 0x30, 0xb5, 0xd5, 0x29, 0x5b, + 0x40, 0x55, 0x37, 0x92, 0xa4, 0xa5, 0x30, 0xf4, 0x14, 0xcc, 0x84, 0xff, 0xfb, 0xac, 0x3b, 0xa3, + 0x14, 0x67, 0x37, 0x93, 0xff, 0xa5, 0x99, 0xcb, 0x4f, 0x03, 0xf2, 0xf1, 0xa6, 0xd9, 0x35, 0x94, + 0xd2, 0xde, 0x59, 0xa3, 0x93, 0xec, 0xbf, 0xa3, 0xaf, 0xd4, 0x3c, 0xce, 0x60, 0x25, 0xb1, 0x1b, + 0x28, 0x6b, 0x95, 0xb0, 0xe6, 0x5e, 0x75, 0xd8, 0xb8, 0x79, 0x92, 0xc9, 0x4b, 0x62, 0x5d, 0x80, + 0xef, 0xb1, 0x59, 0xfa, 0x93, 0x83, 0x4e, 0xcd, 0x66, 0x16, 0x2d, 0xe9, 0xee, 0xfc, 0xe5, 0x34, + 0x3e, 0xd1, 0x91, 0xd7, 0xd7, 0x6e, 0x33, 0x3e, 0xe4, 0x6e, 0xa2, 0x1f, 0x17, 0xb7, 0xd4, 0xd5, + 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x41, 0xd0, 0x40, 0x58, 0xe3, 0x02, 0x00, 0x00, +} diff --git a/pkg/proto/auth/auth.proto b/pkg/proto/auth/auth.proto index 9370ef916..6c2edecfd 100644 --- a/pkg/proto/auth/auth.proto +++ b/pkg/proto/auth/auth.proto @@ -3,63 +3,36 @@ import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; package pbAuth; option go_package = "Open_IM/pkg/proto/auth;pbAuth"; -message CommonResp{ - int32 errCode = 1; - string errMsg = 2; + +message userTokenReq { + int32 platformID = 1; + string userID = 2; +} +message userTokenResp { + string token = 2; + int64 expireTimeSeconds = 3; } -message UserRegisterReq { - server_api_params.UserInfo UserInfo = 1; - string OperationID = 2; +message forceLogoutReq { + int32 platformID = 1; + string userID = 2; } -message UserRegisterResp { - CommonResp CommonResp = 1; +message forceLogoutResp { } - -message UserTokenReq { - int32 Platform = 1; - string FromUserID = 2; - string OpUserID = 3; - string OperationID = 4; - string LoginIp = 5; -} -message UserTokenResp { - CommonResp CommonResp = 1; - string Token = 2; - int64 ExpiredTime = 3; -} - - -message ForceLogoutReq { - int32 Platform = 1; - string FromUserID = 2; - string OpUserID = 3; - string OperationID = 4; -} -message ForceLogoutResp { - CommonResp CommonResp = 1; -} - -message ParseTokenReq{ +message parseTokenReq{ string token = 1; - string operationID = 2; } - - -message ParseTokenResp{ +message parseTokenResp{ string userID = 1; string platform = 2; - CommonResp commonResp = 3; - uint32 expireTimeSeconds = 4; + int64 expireTimeSeconds = 4; } - service Auth { - rpc UserRegister(UserRegisterReq) returns(UserRegisterResp); - rpc UserToken(UserTokenReq) returns(UserTokenResp); - rpc ForceLogout(ForceLogoutReq) returns(ForceLogoutResp); - rpc ParseToken(ParseTokenReq)returns(ParseTokenResp); + rpc userToken(userTokenReq) returns(userTokenResp); + rpc forceLogout(forceLogoutReq) returns(forceLogoutResp); + rpc parseToken(parseTokenReq)returns(parseTokenResp); } diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index a6ef3a894..c4ffc22aa 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -36,7 +36,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} } func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDReq) ProtoMessage() {} func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{0} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{0} } func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b) @@ -65,7 +65,7 @@ func (m *GetAllUserIDReq) GetPagination() *sdk_ws.RequestPagination { type GetAllUserIDResp struct { Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - UserIDList []string `protobuf:"bytes,2,rep,name=UserIDList" json:"UserIDList,omitempty"` + UserIDList []string `protobuf:"bytes,2,rep,name=userIDList" json:"userIDList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -75,7 +75,7 @@ func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} } func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDResp) ProtoMessage() {} func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{1} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{1} } func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b) @@ -120,7 +120,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} } func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) } func (*AccountCheckReq) ProtoMessage() {} func (*AccountCheckReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{2} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{2} } func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b) @@ -148,17 +148,17 @@ func (m *AccountCheckReq) GetCheckUserIDs() []string { } type AccountCheckResp struct { - Results []*AccountCheckResp_SingleUserStatus `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Results []*AccountCheckRespSingleUserStatus `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} } func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp) ProtoMessage() {} func (*AccountCheckResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{3} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{3} } func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b) @@ -178,14 +178,14 @@ func (m *AccountCheckResp) XXX_DiscardUnknown() { var xxx_messageInfo_AccountCheckResp proto.InternalMessageInfo -func (m *AccountCheckResp) GetResults() []*AccountCheckResp_SingleUserStatus { +func (m *AccountCheckResp) GetResults() []*AccountCheckRespSingleUserStatus { if m != nil { return m.Results } return nil } -type AccountCheckResp_SingleUserStatus struct { +type AccountCheckRespSingleUserStatus struct { UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` AccountStatus string `protobuf:"bytes,2,opt,name=accountStatus" json:"accountStatus,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -193,38 +193,38 @@ type AccountCheckResp_SingleUserStatus struct { XXX_sizecache int32 `json:"-"` } -func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckResp_SingleUserStatus{} } -func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) } -func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} -func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{3, 0} +func (m *AccountCheckRespSingleUserStatus) Reset() { *m = AccountCheckRespSingleUserStatus{} } +func (m *AccountCheckRespSingleUserStatus) String() string { return proto.CompactTextString(m) } +func (*AccountCheckRespSingleUserStatus) ProtoMessage() {} +func (*AccountCheckRespSingleUserStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{3, 0} } -func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b) +func (m *AccountCheckRespSingleUserStatus) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AccountCheckRespSingleUserStatus.Unmarshal(m, b) } -func (m *AccountCheckResp_SingleUserStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Marshal(b, m, deterministic) +func (m *AccountCheckRespSingleUserStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AccountCheckRespSingleUserStatus.Marshal(b, m, deterministic) } -func (dst *AccountCheckResp_SingleUserStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccountCheckResp_SingleUserStatus.Merge(dst, src) +func (dst *AccountCheckRespSingleUserStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountCheckRespSingleUserStatus.Merge(dst, src) } -func (m *AccountCheckResp_SingleUserStatus) XXX_Size() int { - return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Size(m) +func (m *AccountCheckRespSingleUserStatus) XXX_Size() int { + return xxx_messageInfo_AccountCheckRespSingleUserStatus.Size(m) } -func (m *AccountCheckResp_SingleUserStatus) XXX_DiscardUnknown() { - xxx_messageInfo_AccountCheckResp_SingleUserStatus.DiscardUnknown(m) +func (m *AccountCheckRespSingleUserStatus) XXX_DiscardUnknown() { + xxx_messageInfo_AccountCheckRespSingleUserStatus.DiscardUnknown(m) } -var xxx_messageInfo_AccountCheckResp_SingleUserStatus proto.InternalMessageInfo +var xxx_messageInfo_AccountCheckRespSingleUserStatus proto.InternalMessageInfo -func (m *AccountCheckResp_SingleUserStatus) GetUserID() string { +func (m *AccountCheckRespSingleUserStatus) GetUserID() string { if m != nil { return m.UserID } return "" } -func (m *AccountCheckResp_SingleUserStatus) GetAccountStatus() string { +func (m *AccountCheckRespSingleUserStatus) GetAccountStatus() string { if m != nil { return m.AccountStatus } @@ -242,7 +242,7 @@ func (m *GetUsersInfoReq) Reset() { *m = GetUsersInfoReq{} } func (m *GetUsersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetUsersInfoReq) ProtoMessage() {} func (*GetUsersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{4} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{4} } func (m *GetUsersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersInfoReq.Unmarshal(m, b) @@ -280,7 +280,7 @@ func (m *GetUsersInfoResp) Reset() { *m = GetUsersInfoResp{} } func (m *GetUsersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetUsersInfoResp) ProtoMessage() {} func (*GetUsersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{5} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{5} } func (m *GetUsersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersInfoResp.Unmarshal(m, b) @@ -318,7 +318,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{6} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{6} } func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) @@ -355,7 +355,7 @@ func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} } func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoResp) ProtoMessage() {} func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{7} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{7} } func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b) @@ -387,7 +387,7 @@ func (m *SetGlobalRecvMessageOptReq) Reset() { *m = SetGlobalRecvMessage func (m *SetGlobalRecvMessageOptReq) String() string { return proto.CompactTextString(m) } func (*SetGlobalRecvMessageOptReq) ProtoMessage() {} func (*SetGlobalRecvMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{8} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{8} } func (m *SetGlobalRecvMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGlobalRecvMessageOptReq.Unmarshal(m, b) @@ -431,7 +431,7 @@ func (m *SetGlobalRecvMessageOptResp) Reset() { *m = SetGlobalRecvMessag func (m *SetGlobalRecvMessageOptResp) String() string { return proto.CompactTextString(m) } func (*SetGlobalRecvMessageOptResp) ProtoMessage() {} func (*SetGlobalRecvMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{9} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{9} } func (m *SetGlobalRecvMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGlobalRecvMessageOptResp.Unmarshal(m, b) @@ -452,9 +452,9 @@ func (m *SetGlobalRecvMessageOptResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetGlobalRecvMessageOptResp proto.InternalMessageInfo type SetConversationReq struct { - Conversation *conversation.Conversation `protobuf:"bytes,1,opt,name=Conversation" json:"Conversation,omitempty"` + Conversation *conversation.Conversation `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"` NotificationType int32 `protobuf:"varint,2,opt,name=notificationType" json:"notificationType,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -464,7 +464,7 @@ func (m *SetConversationReq) Reset() { *m = SetConversationReq{} } func (m *SetConversationReq) String() string { return proto.CompactTextString(m) } func (*SetConversationReq) ProtoMessage() {} func (*SetConversationReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{10} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{10} } func (m *SetConversationReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetConversationReq.Unmarshal(m, b) @@ -515,7 +515,7 @@ func (m *SetConversationResp) Reset() { *m = SetConversationResp{} } func (m *SetConversationResp) String() string { return proto.CompactTextString(m) } func (*SetConversationResp) ProtoMessage() {} func (*SetConversationResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{11} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{11} } func (m *SetConversationResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetConversationResp.Unmarshal(m, b) @@ -536,11 +536,11 @@ func (m *SetConversationResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetConversationResp proto.InternalMessageInfo type SetRecvMsgOptReq struct { - OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - ConversationID string `protobuf:"bytes,2,opt,name=ConversationID" json:"ConversationID,omitempty"` - RecvMsgOpt int32 `protobuf:"varint,3,opt,name=RecvMsgOpt" json:"RecvMsgOpt,omitempty"` + OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + ConversationID string `protobuf:"bytes,2,opt,name=conversationID" json:"conversationID,omitempty"` + RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt" json:"recvMsgOpt,omitempty"` NotificationType int32 `protobuf:"varint,4,opt,name=notificationType" json:"notificationType,omitempty"` - OperationID string `protobuf:"bytes,5,opt,name=OperationID" json:"OperationID,omitempty"` + OperationID string `protobuf:"bytes,5,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -550,7 +550,7 @@ func (m *SetRecvMsgOptReq) Reset() { *m = SetRecvMsgOptReq{} } func (m *SetRecvMsgOptReq) String() string { return proto.CompactTextString(m) } func (*SetRecvMsgOptReq) ProtoMessage() {} func (*SetRecvMsgOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{12} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{12} } func (m *SetRecvMsgOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetRecvMsgOptReq.Unmarshal(m, b) @@ -615,7 +615,7 @@ func (m *SetRecvMsgOptResp) Reset() { *m = SetRecvMsgOptResp{} } func (m *SetRecvMsgOptResp) String() string { return proto.CompactTextString(m) } func (*SetRecvMsgOptResp) ProtoMessage() {} func (*SetRecvMsgOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{13} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{13} } func (m *SetRecvMsgOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetRecvMsgOptResp.Unmarshal(m, b) @@ -636,9 +636,9 @@ func (m *SetRecvMsgOptResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetRecvMsgOptResp proto.InternalMessageInfo type GetConversationReq struct { - ConversationID string `protobuf:"bytes,1,opt,name=ConversationID" json:"ConversationID,omitempty"` - OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` + ConversationID string `protobuf:"bytes,1,opt,name=conversationID" json:"conversationID,omitempty"` + OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -648,7 +648,7 @@ func (m *GetConversationReq) Reset() { *m = GetConversationReq{} } func (m *GetConversationReq) String() string { return proto.CompactTextString(m) } func (*GetConversationReq) ProtoMessage() {} func (*GetConversationReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{14} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{14} } func (m *GetConversationReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetConversationReq.Unmarshal(m, b) @@ -690,7 +690,7 @@ func (m *GetConversationReq) GetOperationID() string { } type GetConversationResp struct { - Conversation *conversation.Conversation `protobuf:"bytes,2,opt,name=Conversation" json:"Conversation,omitempty"` + Conversation *conversation.Conversation `protobuf:"bytes,2,opt,name=conversation" json:"conversation,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -700,7 +700,7 @@ func (m *GetConversationResp) Reset() { *m = GetConversationResp{} } func (m *GetConversationResp) String() string { return proto.CompactTextString(m) } func (*GetConversationResp) ProtoMessage() {} func (*GetConversationResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{15} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{15} } func (m *GetConversationResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetConversationResp.Unmarshal(m, b) @@ -728,9 +728,9 @@ func (m *GetConversationResp) GetConversation() *conversation.Conversation { } type GetConversationsReq struct { - OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - ConversationIDs []string `protobuf:"bytes,2,rep,name=ConversationIDs" json:"ConversationIDs,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` + OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs" json:"conversationIDs,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -740,7 +740,7 @@ func (m *GetConversationsReq) Reset() { *m = GetConversationsReq{} } func (m *GetConversationsReq) String() string { return proto.CompactTextString(m) } func (*GetConversationsReq) ProtoMessage() {} func (*GetConversationsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{16} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{16} } func (m *GetConversationsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetConversationsReq.Unmarshal(m, b) @@ -782,7 +782,7 @@ func (m *GetConversationsReq) GetOperationID() string { } type GetConversationsResp struct { - Conversations []*conversation.Conversation `protobuf:"bytes,2,rep,name=Conversations" json:"Conversations,omitempty"` + Conversations []*conversation.Conversation `protobuf:"bytes,2,rep,name=conversations" json:"conversations,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -792,7 +792,7 @@ func (m *GetConversationsResp) Reset() { *m = GetConversationsResp{} } func (m *GetConversationsResp) String() string { return proto.CompactTextString(m) } func (*GetConversationsResp) ProtoMessage() {} func (*GetConversationsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{17} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{17} } func (m *GetConversationsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetConversationsResp.Unmarshal(m, b) @@ -820,8 +820,8 @@ func (m *GetConversationsResp) GetConversations() []*conversation.Conversation { } type GetAllConversationsReq struct { - OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` + OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -831,7 +831,7 @@ func (m *GetAllConversationsReq) Reset() { *m = GetAllConversationsReq{} func (m *GetAllConversationsReq) String() string { return proto.CompactTextString(m) } func (*GetAllConversationsReq) ProtoMessage() {} func (*GetAllConversationsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{18} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{18} } func (m *GetAllConversationsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationsReq.Unmarshal(m, b) @@ -866,7 +866,7 @@ func (m *GetAllConversationsReq) GetOperationID() string { } type GetAllConversationsResp struct { - Conversations []*conversation.Conversation `protobuf:"bytes,2,rep,name=Conversations" json:"Conversations,omitempty"` + Conversations []*conversation.Conversation `protobuf:"bytes,2,rep,name=conversations" json:"conversations,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -876,7 +876,7 @@ func (m *GetAllConversationsResp) Reset() { *m = GetAllConversationsResp func (m *GetAllConversationsResp) String() string { return proto.CompactTextString(m) } func (*GetAllConversationsResp) ProtoMessage() {} func (*GetAllConversationsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{19} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{19} } func (m *GetAllConversationsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationsResp.Unmarshal(m, b) @@ -904,7 +904,7 @@ func (m *GetAllConversationsResp) GetConversations() []*conversation.Conversatio } type BatchSetConversationsReq struct { - Conversations []*conversation.Conversation `protobuf:"bytes,1,rep,name=Conversations" json:"Conversations,omitempty"` + Conversations []*conversation.Conversation `protobuf:"bytes,1,rep,name=conversations" json:"conversations,omitempty"` OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` NotificationType int32 `protobuf:"varint,3,opt,name=notificationType" json:"notificationType,omitempty"` OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` @@ -917,7 +917,7 @@ func (m *BatchSetConversationsReq) Reset() { *m = BatchSetConversationsR func (m *BatchSetConversationsReq) String() string { return proto.CompactTextString(m) } func (*BatchSetConversationsReq) ProtoMessage() {} func (*BatchSetConversationsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{20} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{20} } func (m *BatchSetConversationsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BatchSetConversationsReq.Unmarshal(m, b) @@ -977,7 +977,7 @@ func (m *BatchSetConversationsResp) Reset() { *m = BatchSetConversations func (m *BatchSetConversationsResp) String() string { return proto.CompactTextString(m) } func (*BatchSetConversationsResp) ProtoMessage() {} func (*BatchSetConversationsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{21} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{21} } func (m *BatchSetConversationsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BatchSetConversationsResp.Unmarshal(m, b) @@ -1025,7 +1025,7 @@ func (m *GetUsersReq) Reset() { *m = GetUsersReq{} } func (m *GetUsersReq) String() string { return proto.CompactTextString(m) } func (*GetUsersReq) ProtoMessage() {} func (*GetUsersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{22} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{22} } func (m *GetUsersReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersReq.Unmarshal(m, b) @@ -1085,7 +1085,7 @@ func (m *GetUsersResp) Reset() { *m = GetUsersResp{} } func (m *GetUsersResp) String() string { return proto.CompactTextString(m) } func (*GetUsersResp) ProtoMessage() {} func (*GetUsersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_d0f4cea05d456d6d, []int{23} + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{23} } func (m *GetUsersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersResp.Unmarshal(m, b) @@ -1119,32 +1119,102 @@ func (m *GetUsersResp) GetUsers() []*sdk_ws.UserInfo { return nil } +type UserRegisterReq struct { + Users []*sdk_ws.UserInfo `protobuf:"bytes,1,rep,name=users" json:"users,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserRegisterReq) Reset() { *m = UserRegisterReq{} } +func (m *UserRegisterReq) String() string { return proto.CompactTextString(m) } +func (*UserRegisterReq) ProtoMessage() {} +func (*UserRegisterReq) Descriptor() ([]byte, []int) { + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{24} +} +func (m *UserRegisterReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserRegisterReq.Unmarshal(m, b) +} +func (m *UserRegisterReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserRegisterReq.Marshal(b, m, deterministic) +} +func (dst *UserRegisterReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserRegisterReq.Merge(dst, src) +} +func (m *UserRegisterReq) XXX_Size() int { + return xxx_messageInfo_UserRegisterReq.Size(m) +} +func (m *UserRegisterReq) XXX_DiscardUnknown() { + xxx_messageInfo_UserRegisterReq.DiscardUnknown(m) +} + +var xxx_messageInfo_UserRegisterReq proto.InternalMessageInfo + +func (m *UserRegisterReq) GetUsers() []*sdk_ws.UserInfo { + if m != nil { + return m.Users + } + return nil +} + +type UserRegisterResp struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserRegisterResp) Reset() { *m = UserRegisterResp{} } +func (m *UserRegisterResp) String() string { return proto.CompactTextString(m) } +func (*UserRegisterResp) ProtoMessage() {} +func (*UserRegisterResp) Descriptor() ([]byte, []int) { + return fileDescriptor_user_ca0d4cfbb41aa43a, []int{25} +} +func (m *UserRegisterResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserRegisterResp.Unmarshal(m, b) +} +func (m *UserRegisterResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserRegisterResp.Marshal(b, m, deterministic) +} +func (dst *UserRegisterResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserRegisterResp.Merge(dst, src) +} +func (m *UserRegisterResp) XXX_Size() int { + return xxx_messageInfo_UserRegisterResp.Size(m) +} +func (m *UserRegisterResp) XXX_DiscardUnknown() { + xxx_messageInfo_UserRegisterResp.DiscardUnknown(m) +} + +var xxx_messageInfo_UserRegisterResp proto.InternalMessageInfo + func init() { - proto.RegisterType((*GetAllUserIDReq)(nil), "user.GetAllUserIDReq") - proto.RegisterType((*GetAllUserIDResp)(nil), "user.GetAllUserIDResp") - proto.RegisterType((*AccountCheckReq)(nil), "user.AccountCheckReq") - proto.RegisterType((*AccountCheckResp)(nil), "user.AccountCheckResp") - proto.RegisterType((*AccountCheckResp_SingleUserStatus)(nil), "user.AccountCheckResp.SingleUserStatus") - proto.RegisterType((*GetUsersInfoReq)(nil), "user.GetUsersInfoReq") - proto.RegisterType((*GetUsersInfoResp)(nil), "user.GetUsersInfoResp") - proto.RegisterType((*UpdateUserInfoReq)(nil), "user.UpdateUserInfoReq") - proto.RegisterType((*UpdateUserInfoResp)(nil), "user.UpdateUserInfoResp") - proto.RegisterType((*SetGlobalRecvMessageOptReq)(nil), "user.SetGlobalRecvMessageOptReq") - proto.RegisterType((*SetGlobalRecvMessageOptResp)(nil), "user.SetGlobalRecvMessageOptResp") - proto.RegisterType((*SetConversationReq)(nil), "user.SetConversationReq") - proto.RegisterType((*SetConversationResp)(nil), "user.SetConversationResp") - proto.RegisterType((*SetRecvMsgOptReq)(nil), "user.SetRecvMsgOptReq") - proto.RegisterType((*SetRecvMsgOptResp)(nil), "user.SetRecvMsgOptResp") - proto.RegisterType((*GetConversationReq)(nil), "user.GetConversationReq") - proto.RegisterType((*GetConversationResp)(nil), "user.GetConversationResp") - proto.RegisterType((*GetConversationsReq)(nil), "user.GetConversationsReq") - proto.RegisterType((*GetConversationsResp)(nil), "user.GetConversationsResp") - proto.RegisterType((*GetAllConversationsReq)(nil), "user.GetAllConversationsReq") - proto.RegisterType((*GetAllConversationsResp)(nil), "user.GetAllConversationsResp") - proto.RegisterType((*BatchSetConversationsReq)(nil), "user.BatchSetConversationsReq") - proto.RegisterType((*BatchSetConversationsResp)(nil), "user.BatchSetConversationsResp") - proto.RegisterType((*GetUsersReq)(nil), "user.GetUsersReq") - proto.RegisterType((*GetUsersResp)(nil), "user.GetUsersResp") + proto.RegisterType((*GetAllUserIDReq)(nil), "user.getAllUserIDReq") + proto.RegisterType((*GetAllUserIDResp)(nil), "user.getAllUserIDResp") + proto.RegisterType((*AccountCheckReq)(nil), "user.accountCheckReq") + proto.RegisterType((*AccountCheckResp)(nil), "user.accountCheckResp") + proto.RegisterType((*AccountCheckRespSingleUserStatus)(nil), "user.accountCheckResp.singleUserStatus") + proto.RegisterType((*GetUsersInfoReq)(nil), "user.getUsersInfoReq") + proto.RegisterType((*GetUsersInfoResp)(nil), "user.getUsersInfoResp") + proto.RegisterType((*UpdateUserInfoReq)(nil), "user.updateUserInfoReq") + proto.RegisterType((*UpdateUserInfoResp)(nil), "user.updateUserInfoResp") + proto.RegisterType((*SetGlobalRecvMessageOptReq)(nil), "user.setGlobalRecvMessageOptReq") + proto.RegisterType((*SetGlobalRecvMessageOptResp)(nil), "user.setGlobalRecvMessageOptResp") + proto.RegisterType((*SetConversationReq)(nil), "user.setConversationReq") + proto.RegisterType((*SetConversationResp)(nil), "user.setConversationResp") + proto.RegisterType((*SetRecvMsgOptReq)(nil), "user.setRecvMsgOptReq") + proto.RegisterType((*SetRecvMsgOptResp)(nil), "user.setRecvMsgOptResp") + proto.RegisterType((*GetConversationReq)(nil), "user.getConversationReq") + proto.RegisterType((*GetConversationResp)(nil), "user.getConversationResp") + proto.RegisterType((*GetConversationsReq)(nil), "user.getConversationsReq") + proto.RegisterType((*GetConversationsResp)(nil), "user.getConversationsResp") + proto.RegisterType((*GetAllConversationsReq)(nil), "user.getAllConversationsReq") + proto.RegisterType((*GetAllConversationsResp)(nil), "user.getAllConversationsResp") + proto.RegisterType((*BatchSetConversationsReq)(nil), "user.batchSetConversationsReq") + proto.RegisterType((*BatchSetConversationsResp)(nil), "user.batchSetConversationsResp") + proto.RegisterType((*GetUsersReq)(nil), "user.getUsersReq") + proto.RegisterType((*GetUsersResp)(nil), "user.getUsersResp") + proto.RegisterType((*UserRegisterReq)(nil), "user.userRegisterReq") + proto.RegisterType((*UserRegisterResp)(nil), "user.userRegisterResp") } // Reference imports to suppress errors if they are not otherwise used. @@ -1168,6 +1238,8 @@ type UserClient interface { AccountCheck(ctx context.Context, in *AccountCheckReq, opts ...grpc.CallOption) (*AccountCheckResp, error) // 翻页(或指定userID,昵称)拉取用户信息 全字段 GetUsers(ctx context.Context, in *GetUsersReq, opts ...grpc.CallOption) (*GetUsersResp, error) + // 用户注册 + UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) } type userClient struct { @@ -1180,7 +1252,7 @@ func NewUserClient(cc *grpc.ClientConn) UserClient { func (c *userClient) GetUsersInfo(ctx context.Context, in *GetUsersInfoReq, opts ...grpc.CallOption) (*GetUsersInfoResp, error) { out := new(GetUsersInfoResp) - err := grpc.Invoke(ctx, "/user.user/GetUsersInfo", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/user.user/getUsersInfo", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1189,7 +1261,7 @@ func (c *userClient) GetUsersInfo(ctx context.Context, in *GetUsersInfoReq, opts func (c *userClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*UpdateUserInfoResp, error) { out := new(UpdateUserInfoResp) - err := grpc.Invoke(ctx, "/user.user/UpdateUserInfo", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/user.user/updateUserInfo", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1198,7 +1270,7 @@ func (c *userClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, func (c *userClient) SetGlobalRecvMessageOpt(ctx context.Context, in *SetGlobalRecvMessageOptReq, opts ...grpc.CallOption) (*SetGlobalRecvMessageOptResp, error) { out := new(SetGlobalRecvMessageOptResp) - err := grpc.Invoke(ctx, "/user.user/SetGlobalRecvMessageOpt", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/user.user/setGlobalRecvMessageOpt", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1207,7 +1279,7 @@ func (c *userClient) SetGlobalRecvMessageOpt(ctx context.Context, in *SetGlobalR func (c *userClient) AccountCheck(ctx context.Context, in *AccountCheckReq, opts ...grpc.CallOption) (*AccountCheckResp, error) { out := new(AccountCheckResp) - err := grpc.Invoke(ctx, "/user.user/AccountCheck", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/user.user/accountCheck", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1216,7 +1288,16 @@ func (c *userClient) AccountCheck(ctx context.Context, in *AccountCheckReq, opts func (c *userClient) GetUsers(ctx context.Context, in *GetUsersReq, opts ...grpc.CallOption) (*GetUsersResp, error) { out := new(GetUsersResp) - err := grpc.Invoke(ctx, "/user.user/GetUsers", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/user.user/getUsers", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) { + out := new(UserRegisterResp) + err := grpc.Invoke(ctx, "/user.user/userRegister", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1236,6 +1317,8 @@ type UserServer interface { AccountCheck(context.Context, *AccountCheckReq) (*AccountCheckResp, error) // 翻页(或指定userID,昵称)拉取用户信息 全字段 GetUsers(context.Context, *GetUsersReq) (*GetUsersResp, error) + // 用户注册 + UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) } func RegisterUserServer(s *grpc.Server, srv UserServer) { @@ -1332,93 +1415,117 @@ func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _User_UserRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserRegisterReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).UserRegister(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/user.user/UserRegister", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).UserRegister(ctx, req.(*UserRegisterReq)) + } + return interceptor(ctx, in, info, handler) +} + var _User_serviceDesc = grpc.ServiceDesc{ ServiceName: "user.user", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "GetUsersInfo", + MethodName: "getUsersInfo", Handler: _User_GetUsersInfo_Handler, }, { - MethodName: "UpdateUserInfo", + MethodName: "updateUserInfo", Handler: _User_UpdateUserInfo_Handler, }, { - MethodName: "SetGlobalRecvMessageOpt", + MethodName: "setGlobalRecvMessageOpt", Handler: _User_SetGlobalRecvMessageOpt_Handler, }, { - MethodName: "AccountCheck", + MethodName: "accountCheck", Handler: _User_AccountCheck_Handler, }, { - MethodName: "GetUsers", + MethodName: "getUsers", Handler: _User_GetUsers_Handler, }, + { + MethodName: "userRegister", + Handler: _User_UserRegister_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/user.proto", } -func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_d0f4cea05d456d6d) } +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_ca0d4cfbb41aa43a) } -var fileDescriptor_user_d0f4cea05d456d6d = []byte{ - // 887 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xe1, 0x6e, 0xdc, 0x44, - 0x10, 0x96, 0x2f, 0xb9, 0xa6, 0x99, 0xa4, 0xcd, 0x65, 0x93, 0x26, 0xc6, 0x51, 0xd1, 0xb1, 0xaa, - 0xe0, 0x04, 0xea, 0x9d, 0x1a, 0x84, 0x00, 0x21, 0x10, 0x69, 0x4e, 0x1c, 0x27, 0xf5, 0xb8, 0xca, - 0xe6, 0x54, 0x04, 0x88, 0xc3, 0x75, 0xb6, 0x57, 0x2b, 0xae, 0xbd, 0xf1, 0xac, 0x13, 0xf1, 0x0f, - 0x89, 0x27, 0x81, 0x3f, 0xbc, 0x0b, 0xe2, 0x11, 0x78, 0x18, 0xb4, 0x6b, 0xfb, 0xce, 0xf6, 0xfa, - 0xd2, 0x6b, 0xd4, 0x3f, 0x96, 0xe7, 0xdb, 0x99, 0xd9, 0xf9, 0x66, 0x67, 0x77, 0x06, 0x76, 0x12, - 0x64, 0x71, 0x4f, 0x7e, 0xba, 0x3c, 0x8e, 0x44, 0x44, 0xd6, 0xe5, 0xbf, 0xd5, 0x19, 0x73, 0x16, - 0x3e, 0x1c, 0x8e, 0x1e, 0x3a, 0x2c, 0xbe, 0x64, 0x71, 0x8f, 0x9f, 0xcf, 0x7a, 0x6a, 0xbd, 0x87, - 0x67, 0xe7, 0xd3, 0x2b, 0xec, 0x5d, 0x61, 0xaa, 0x6f, 0x7d, 0xb6, 0x54, 0xd3, 0x8b, 0xc2, 0x4b, - 0x16, 0xa3, 0x2b, 0xfc, 0x28, 0x2c, 0x09, 0xa9, 0x25, 0x7d, 0x06, 0x3b, 0x03, 0x26, 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0x44, 0xff, 0x34, 0x60, 0x2b, 0xef, 0x32, 0xfa, 0x48, 0xd0, 0xb8, 0xd9, 0x48, 0x40, - 0xac, 0xb4, 0xad, 0x7c, 0xe7, 0xbe, 0x62, 0x59, 0x9d, 0xce, 0xe5, 0x42, 0x17, 0x58, 0x2f, 0x75, - 0x01, 0x13, 0x36, 0xbc, 0x28, 0x14, 0x2c, 0x14, 0xd9, 0x7b, 0x92, 0x8b, 0xf4, 0x19, 0x6c, 0x2f, - 0x42, 0x5c, 0x3a, 0x5c, 0x3c, 0x82, 0xa6, 0x6a, 0x76, 0x59, 0x85, 0x5c, 0xdb, 0xc7, 0x52, 0xcd, - 0xe3, 0xff, 0x1a, 0xa0, 0xe6, 0x2f, 0xf2, 0xe5, 0x62, 0x07, 0xb9, 0x4e, 0xee, 0xa5, 0xb3, 0x42, - 0xa5, 0x57, 0x5b, 0x07, 0x75, 0x30, 0x72, 0x72, 0x0a, 0x77, 0xcb, 0xcd, 0x90, 0x1c, 0xa6, 0x9a, - 0x5a, 0xc3, 0xb5, 0xcc, 0xfa, 0x05, 0xe4, 0xe4, 0x17, 0x38, 0x5c, 0xd2, 0xd9, 0x48, 0x3b, 0x35, - 0x5a, 0xde, 0x5a, 0xad, 0xf7, 0x5e, 0xa3, 0x81, 0x5c, 0x72, 0x2c, 0xce, 0x3e, 0x39, 0xc7, 0xca, - 0xc0, 0x95, 0x73, 0xd4, 0xe6, 0xa9, 0x47, 0x70, 0x3b, 0xe7, 0x4d, 0x76, 0xcb, 0x79, 0x90, 0x66, - 0xa4, 0x0a, 0x21, 0x7f, 0x7c, 0xff, 0xc7, 0x23, 0x39, 0xad, 0x4e, 0x87, 0xa3, 0xc2, 0x98, 0x2a, - 0xd5, 0xbe, 0x90, 0x9f, 0xe7, 0xb7, 0x14, 0xf0, 0xf1, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x37, - 0x21, 0xab, 0xd2, 0x14, 0x0b, 0x00, 0x00, +var fileDescriptor_user_ca0d4cfbb41aa43a = []byte{ + // 926 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x51, 0x6f, 0xdc, 0x44, + 0x10, 0x96, 0xef, 0x72, 0x4d, 0x33, 0x49, 0x9b, 0xcb, 0x26, 0x4d, 0x8c, 0xa3, 0xa2, 0xb0, 0xaa, + 0x20, 0x02, 0xf5, 0x4e, 0x0d, 0x42, 0x80, 0x10, 0x88, 0x92, 0x13, 0x70, 0x52, 0x8f, 0xab, 0x1c, + 0xa2, 0x22, 0x40, 0x04, 0xc7, 0xd9, 0xba, 0x56, 0xae, 0xf6, 0xc6, 0xb3, 0x4e, 0xc4, 0x1b, 0x12, + 0x3f, 0x83, 0x27, 0x78, 0xe1, 0xbf, 0x20, 0x7e, 0x14, 0xda, 0x5d, 0x3b, 0xb7, 0xf6, 0xda, 0x69, + 0x1a, 0xf5, 0x25, 0xb9, 0x99, 0x9d, 0xf9, 0x76, 0xbe, 0x99, 0x59, 0xcf, 0xc0, 0x6a, 0x8e, 0x2c, + 0x1b, 0xca, 0x3f, 0x03, 0x9e, 0xa5, 0x22, 0x25, 0x0b, 0xf2, 0xb7, 0xb7, 0x3b, 0xe5, 0x2c, 0x79, + 0x38, 0x9e, 0x3c, 0x3c, 0x60, 0xd9, 0x39, 0xcb, 0x86, 0xfc, 0x34, 0x1a, 0xaa, 0xf3, 0x21, 0x9e, + 0x9c, 0x1e, 0x5d, 0xe0, 0xf0, 0x02, 0xb5, 0xbd, 0xf7, 0x49, 0xab, 0x65, 0x98, 0x26, 0xe7, 0x2c, + 0xc3, 0x40, 0xc4, 0x69, 0x52, 0x11, 0xb4, 0x27, 0x7d, 0x06, 0xab, 0x11, 0x13, 0x8f, 0x67, 0xb3, + 0x43, 0x64, 0xd9, 0x78, 0xe4, 0xb3, 0x33, 0x32, 0x02, 0xe0, 0x41, 0x14, 0x27, 0xca, 0xcc, 0x75, + 0x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0xf8, 0x96, 0x52, 0x7c, 0xf8, + 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x20, 0xab, 0x70, 0x2d, 0xad, 0x0b, 0x00, 0x00, } diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index 07cb48256..fc78a3902 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -124,10 +124,10 @@ message getUsersResp{ repeated server_api_params.UserInfo users = 2; } -message UserRegisterReq { +message userRegisterReq { repeated server_api_params.UserInfo users = 1; } -message UserRegisterResp { +message userRegisterResp { } @@ -144,5 +144,7 @@ service user { rpc accountCheck(accountCheckReq)returns(accountCheckResp); //翻页(或指定userID,昵称)拉取用户信息 全字段 rpc getUsers(getUsersReq) returns (getUsersResp); + //用户注册 + rpc userRegister(userRegisterReq) returns (userRegisterResp); }