Error code standardization

test-errcode
skiffer-git 2 years ago
parent d6b5a5278e
commit b3e141a3ce

@ -269,6 +269,28 @@ func NewPBUser(userInfo *sdk.UserInfo) *PBUser {
return &PBUser{UserInfo: userInfo} 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) { func (pb *PBUser) Convert() (*relation.User, error) {
dst := &relation.User{} dst := &relation.User{}
utils.CopyStructFields(dst, pb) utils.CopyStructFields(dst, pb)

@ -435,6 +435,11 @@ func (ws *WServer) getUserAllCons(uid string) map[int]*UserConn {
// } // }
// return "", 0 // 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) { func (ws *WServer) headerCheck(w http.ResponseWriter, r *http.Request, operationID string) (isPass, compression bool) {
status := http.StatusUnauthorized status := http.StatusUnauthorized
query := r.URL.Query() query := r.URL.Query()

@ -1,17 +1,18 @@
package auth package auth
import ( import (
"Open_IM/internal/common/check"
"Open_IM/pkg/common/constant" "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" "Open_IM/pkg/common/log"
promePkg "Open_IM/pkg/common/prometheus" promePkg "Open_IM/pkg/common/prometheus"
"Open_IM/pkg/common/token_verify" "Open_IM/pkg/common/token_verify"
"Open_IM/pkg/common/tracelog"
"Open_IM/pkg/getcdv3" "Open_IM/pkg/getcdv3"
pbAuth "Open_IM/pkg/proto/auth" pbAuth "Open_IM/pkg/proto/auth"
pbRelay "Open_IM/pkg/proto/relay" pbRelay "Open_IM/pkg/proto/relay"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"errors"
"net" "net"
"strconv" "strconv"
"strings" "strings"
@ -23,93 +24,76 @@ import (
"google.golang.org/grpc" "google.golang.org/grpc"
) )
func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq) (*pbAuth.UserRegisterResp, error) { func (s *rpcAuth) UserToken(ctx context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String()) resp := pbAuth.UserTokenResp{}
var user imdb.User if _, err := check.GetUsersInfo(ctx, req.UserID); err != nil {
utils.CopyStructFields(&user, req.UserInfo) return nil, err
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
} }
log.Debug(req.OperationID, "copy ", user, req.UserInfo) token, expTime, err := token_verify.CreateToken(req.UserID, int(req.PlatformID))
err := imdb.UserRegister(user)
if err != nil { if err != nil {
errMsg := req.OperationID + " imdb.UserRegister failed " + err.Error() + user.UserID return nil, err
log.NewError(req.OperationID, errMsg, user)
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil
} }
promePkg.PromeInc(promePkg.UserRegisterCounter) resp.Token = token
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{}}) resp.ExpireTimeSeconds = expTime
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{}}, nil return &resp, nil
} }
func (rpc *rpcAuth) UserToken(_ context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) { func (s *rpcAuth) parseToken(ctx context.Context, tokensString, operationID string) (claims *token_verify.Claims, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String()) claims, err = token_verify.GetClaimFromToken(tokensString)
_, err := imdb.GetUserByUserID(req.FromUserID)
if err != nil { if err != nil {
log.NewError(req.OperationID, "not this user:", req.FromUserID, req.String()) return nil, utils.Wrap(err, "")
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)) m, err := s.GetTokens(ctx, claims.UID, claims.Platform)
if err != nil { if err != nil {
errMsg := req.OperationID + " token_verify.CreateToken failed " + err.Error() + req.FromUserID + utils.Int32ToString(req.Platform) return nil, err
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}) if v, ok := m[tokensString]; ok {
return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{}, Token: tokens, ExpiredTime: expTime}, nil 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) ParseToken(_ context.Context, req *pbAuth.ParseTokenReq) (*pbAuth.ParseTokenResp, error) { func (s *rpcAuth) ParseToken(ctx context.Context, req *pbAuth.ParseTokenReq) (*pbAuth.ParseTokenResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String()) resp := pbAuth.ParseTokenResp{}
claims, err := token_verify.ParseToken(req.Token, req.OperationID) claims, err := s.parseToken(ctx, req.Token, req.OperationID)
if err != nil { if err != nil {
errMsg := "ParseToken failed " + err.Error() + req.OperationID + " token " + req.Token return nil, err
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())} resp.UserID = claims.UID
log.Info(req.OperationID, utils.GetSelfFuncName(), " rpc return ", resp.String()) resp.Platform = claims.Platform
resp.ExpireTimeSeconds = claims.ExpiresAt.Unix()
return &resp, nil return &resp, nil
} }
func (rpc *rpcAuth) ForceLogout(_ context.Context, req *pbAuth.ForceLogoutReq) (*pbAuth.ForceLogoutResp, error) { func (s *rpcAuth) ForceLogout(ctx context.Context, req *pbAuth.ForceLogoutReq) (*pbAuth.ForceLogoutResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String()) resp := pbAuth.ForceLogoutResp{}
if !token_verify.IsManagerUserID(req.OpUserID) { if err := token_verify.CheckManagerUserID(ctx, tracelog.GetOpUserID(ctx)); err != nil {
errMsg := req.OperationID + " IsManagerUserID false " + req.OpUserID return nil, err
log.NewError(req.OperationID, errMsg) }
return &pbAuth.ForceLogoutResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: errMsg}}, nil if err := s.forceKickOff(ctx, req.UserID, req.PlatformID, tracelog.GetOperationID(ctx)); err != nil {
} return nil, 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) return &resp, nil
// 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
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{}})
return &pbAuth.ForceLogoutResp{CommonResp: &pbAuth.CommonResp{}}, nil
} }
func (rpc *rpcAuth) forceKickOff(userID string, platformID int32, operationID string) error { func (s *rpcAuth) forceKickOff(ctx context.Context, userID string, platformID int32, operationID string) error {
log.NewInfo(operationID, utils.GetSelfFuncName(), " args ", userID, platformID)
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID) grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
for _, v := range grpcCons { for _, v := range grpcCons {
client := pbRelay.NewRelayClient(v) client := pbRelay.NewRelayClient(v)
kickReq := &pbRelay.KickUserOfflineReq{OperationID: operationID, KickUserIDList: []string{userID}, PlatformID: platformID} kickReq := &pbRelay.KickUserOfflineReq{OperationID: operationID, KickUserIDList: []string{userID}, PlatformID: platformID}
log.NewInfo(operationID, "KickUserOffline ", client, kickReq.String()) log.NewInfo(operationID, "KickUserOffline ", client, kickReq.String())
_, err := client.KickUserOffline(context.Background(), kickReq) _, err := client.KickUserOffline(ctx, kickReq)
return utils.Wrap(err, "") return utils.Wrap(err, "")
} }
return errors.New("no rpc node ") return constant.ErrInternalServer.Wrap()
} }
type rpcAuth struct { type rpcAuth struct {
@ -117,6 +101,7 @@ type rpcAuth struct {
rpcRegisterName string rpcRegisterName string
etcdSchema string etcdSchema string
etcdAddr []string etcdAddr []string
controller.AuthInterface
} }
func NewRpcAuthServer(port int) *rpcAuth { 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() operationID := utils.OperationIDGenerator()
log.NewInfo(operationID, "rpc auth start...") log.NewInfo(operationID, "rpc auth start...")
@ -139,10 +124,10 @@ func (rpc *rpcAuth) Run() {
} else { } else {
listenIP = config.Config.ListenIP listenIP = config.Config.ListenIP
} }
address := listenIP + ":" + strconv.Itoa(rpc.rpcPort) address := listenIP + ":" + strconv.Itoa(s.rpcPort)
listener, err := net.Listen("tcp", address) listener, err := net.Listen("tcp", address)
if err != nil { 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) log.NewInfo(operationID, "listen network success, ", address, listener)
var grpcOpts []grpc.ServerOption var grpcOpts []grpc.ServerOption
@ -162,7 +147,7 @@ func (rpc *rpcAuth) Run() {
defer srv.GracefulStop() defer srv.GracefulStop()
//service registers with etcd //service registers with etcd
pbAuth.RegisterAuthServer(srv, rpc) pbAuth.RegisterAuthServer(srv, s)
rpcRegisterIP := config.Config.RpcRegisterIP rpcRegisterIP := config.Config.RpcRegisterIP
if config.Config.RpcRegisterIP == "" { if config.Config.RpcRegisterIP == "" {
rpcRegisterIP, err = utils.GetLocalIP() rpcRegisterIP, err = utils.GetLocalIP()
@ -172,14 +157,14 @@ func (rpc *rpcAuth) Run() {
} }
log.NewInfo("", "rpcRegisterIP", rpcRegisterIP) 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 { if err != nil {
log.NewError(operationID, "RegisterEtcd failed ", err.Error(), 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")) 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) err = srv.Serve(listener)
if err != nil { if err != nil {
log.NewError(operationID, "Serve failed ", err.Error()) log.NewError(operationID, "Serve failed ", err.Error())

@ -172,12 +172,9 @@ func (s *userServer) GetUsersInfo(ctx context.Context, req *pbUser.GetUsersInfoR
if err != nil { if err != nil {
return nil, err return nil, err
} }
for _, v := range users { resp.UsersInfo, err = (*convert.DBUser)(nil).DB2PB(users)
n, err := convert.NewDBUser(v).Convert() if err != nil {
if err != nil { return nil, err
return nil, err
}
resp.UsersInfo = append(resp.UsersInfo, n)
} }
return resp, nil return resp, nil
} }
@ -256,9 +253,9 @@ func (s *userServer) AccountCheck(ctx context.Context, req *pbUser.AccountCheckR
for _, v := range user { for _, v := range user {
uidList = append(uidList, v.UserID) uidList = append(uidList, v.UserID)
} }
var r []*pbUser.AccountCheckResp_SingleUserStatus var r []*pbUser.AccountCheckRespSingleUserStatus
for _, v := range req.CheckUserIDs { for _, v := range req.CheckUserIDs {
temp := new(pbUser.AccountCheckResp_SingleUserStatus) temp := new(pbUser.AccountCheckRespSingleUserStatus)
temp.UserID = v temp.UserID = v
if utils.IsContain(v, uidList) { if utils.IsContain(v, uidList) {
temp.AccountStatus = constant.Registered temp.AccountStatus = constant.Registered
@ -333,3 +330,27 @@ func (s *userServer) GetUsers(ctx context.Context, req *pbUser.GetUsersReq) (*pb
} }
return &resp, nil 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
}

@ -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
}

@ -15,6 +15,8 @@ type UserInterface interface {
GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) 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) 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) 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 { type UserController struct {

@ -3,25 +3,13 @@ package token_verify
import ( import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
commonDB "Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/tracelog" "Open_IM/pkg/common/tracelog"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"time"
go_redis "github.com/go-redis/redis/v8"
"github.com/golang-jwt/jwt/v4" "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 { type Claims struct {
UID string UID string
Platform string //login platform 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 { func secret() jwt.Keyfunc {
return func(token *jwt.Token) (interface{}, error) { return func(token *jwt.Token) (interface{}, error) {
return []byte(config.Config.TokenPolicy.AccessSecret), nil 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) { func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) {
opUserID := utils.OpUserID(ctx) opUserID := tracelog.GetOpUserID(ctx)
defer func() { defer func() {
tracelog.SetCtxInfo(ctx, utils.GetFuncName(1), err, "OpUserID", opUserID, "ownerUserID", ownerUserID) 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()) 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 { 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 nil
} }
return constant.ErrIdentity.Wrap() 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) { func ParseRedisInterfaceToken(redisToken interface{}) (*Claims, error) {
return GetClaimFromToken(string(redisToken.([]uint8))) 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, ""
}

File diff suppressed because it is too large Load Diff

@ -3,63 +3,36 @@ import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
package pbAuth; package pbAuth;
option go_package = "Open_IM/pkg/proto/auth;pbAuth"; option go_package = "Open_IM/pkg/proto/auth;pbAuth";
message CommonResp{
int32 errCode = 1;
string errMsg = 2;
}
message UserRegisterReq { message userTokenReq {
server_api_params.UserInfo UserInfo = 1; int32 platformID = 1;
string OperationID = 2; string userID = 2;
} }
message UserRegisterResp { message userTokenResp {
CommonResp CommonResp = 1; string token = 2;
int64 expireTimeSeconds = 3;
} }
message forceLogoutReq {
message UserTokenReq { int32 platformID = 1;
int32 Platform = 1; string userID = 2;
string FromUserID = 2;
string OpUserID = 3;
string OperationID = 4;
string LoginIp = 5;
} }
message UserTokenResp { message forceLogoutResp {
CommonResp CommonResp = 1;
string Token = 2;
int64 ExpiredTime = 3;
} }
message parseTokenReq{
message ForceLogoutReq {
int32 Platform = 1;
string FromUserID = 2;
string OpUserID = 3;
string OperationID = 4;
}
message ForceLogoutResp {
CommonResp CommonResp = 1;
}
message ParseTokenReq{
string token = 1; string token = 1;
string operationID = 2;
} }
message parseTokenResp{
message ParseTokenResp{
string userID = 1; string userID = 1;
string platform = 2; string platform = 2;
CommonResp commonResp = 3; int64 expireTimeSeconds = 4;
uint32 expireTimeSeconds = 4;
} }
service Auth { service Auth {
rpc UserRegister(UserRegisterReq) returns(UserRegisterResp); rpc userToken(userTokenReq) returns(userTokenResp);
rpc UserToken(UserTokenReq) returns(UserTokenResp); rpc forceLogout(forceLogoutReq) returns(forceLogoutResp);
rpc ForceLogout(ForceLogoutReq) returns(ForceLogoutResp); rpc parseToken(parseTokenReq)returns(parseTokenResp);
rpc ParseToken(ParseTokenReq)returns(ParseTokenResp);
} }

@ -36,7 +36,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} }
func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) } func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) }
func (*GetAllUserIDReq) ProtoMessage() {} func (*GetAllUserIDReq) ProtoMessage() {}
func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { 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 { func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b) return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b)
@ -65,7 +65,7 @@ func (m *GetAllUserIDReq) GetPagination() *sdk_ws.RequestPagination {
type GetAllUserIDResp struct { type GetAllUserIDResp struct {
Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` 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_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) }
func (*GetAllUserIDResp) ProtoMessage() {} func (*GetAllUserIDResp) ProtoMessage() {}
func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { 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 { func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b) 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 (m *AccountCheckReq) String() string { return proto.CompactTextString(m) }
func (*AccountCheckReq) ProtoMessage() {} func (*AccountCheckReq) ProtoMessage() {}
func (*AccountCheckReq) Descriptor() ([]byte, []int) { 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 { func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b) return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b)
@ -148,17 +148,17 @@ func (m *AccountCheckReq) GetCheckUserIDs() []string {
} }
type AccountCheckResp struct { type AccountCheckResp struct {
Results []*AccountCheckResp_SingleUserStatus `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` Results []*AccountCheckRespSingleUserStatus `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
} }
func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} } func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} }
func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) } func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) }
func (*AccountCheckResp) ProtoMessage() {} func (*AccountCheckResp) ProtoMessage() {}
func (*AccountCheckResp) Descriptor() ([]byte, []int) { 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 { func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b) return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b)
@ -178,14 +178,14 @@ func (m *AccountCheckResp) XXX_DiscardUnknown() {
var xxx_messageInfo_AccountCheckResp proto.InternalMessageInfo var xxx_messageInfo_AccountCheckResp proto.InternalMessageInfo
func (m *AccountCheckResp) GetResults() []*AccountCheckResp_SingleUserStatus { func (m *AccountCheckResp) GetResults() []*AccountCheckRespSingleUserStatus {
if m != nil { if m != nil {
return m.Results return m.Results
} }
return nil return nil
} }
type AccountCheckResp_SingleUserStatus struct { type AccountCheckRespSingleUserStatus struct {
UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"`
AccountStatus string `protobuf:"bytes,2,opt,name=accountStatus" json:"accountStatus,omitempty"` AccountStatus string `protobuf:"bytes,2,opt,name=accountStatus" json:"accountStatus,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
@ -193,38 +193,38 @@ type AccountCheckResp_SingleUserStatus struct {
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
} }
func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckResp_SingleUserStatus{} } func (m *AccountCheckRespSingleUserStatus) Reset() { *m = AccountCheckRespSingleUserStatus{} }
func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) } func (m *AccountCheckRespSingleUserStatus) String() string { return proto.CompactTextString(m) }
func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} func (*AccountCheckRespSingleUserStatus) ProtoMessage() {}
func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) { func (*AccountCheckRespSingleUserStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_user_d0f4cea05d456d6d, []int{3, 0} return fileDescriptor_user_ca0d4cfbb41aa43a, []int{3, 0}
} }
func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error { func (m *AccountCheckRespSingleUserStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b) return xxx_messageInfo_AccountCheckRespSingleUserStatus.Unmarshal(m, b)
} }
func (m *AccountCheckResp_SingleUserStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *AccountCheckRespSingleUserStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Marshal(b, m, deterministic) return xxx_messageInfo_AccountCheckRespSingleUserStatus.Marshal(b, m, deterministic)
} }
func (dst *AccountCheckResp_SingleUserStatus) XXX_Merge(src proto.Message) { func (dst *AccountCheckRespSingleUserStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_AccountCheckResp_SingleUserStatus.Merge(dst, src) xxx_messageInfo_AccountCheckRespSingleUserStatus.Merge(dst, src)
} }
func (m *AccountCheckResp_SingleUserStatus) XXX_Size() int { func (m *AccountCheckRespSingleUserStatus) XXX_Size() int {
return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Size(m) return xxx_messageInfo_AccountCheckRespSingleUserStatus.Size(m)
} }
func (m *AccountCheckResp_SingleUserStatus) XXX_DiscardUnknown() { func (m *AccountCheckRespSingleUserStatus) XXX_DiscardUnknown() {
xxx_messageInfo_AccountCheckResp_SingleUserStatus.DiscardUnknown(m) 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 { if m != nil {
return m.UserID return m.UserID
} }
return "" return ""
} }
func (m *AccountCheckResp_SingleUserStatus) GetAccountStatus() string { func (m *AccountCheckRespSingleUserStatus) GetAccountStatus() string {
if m != nil { if m != nil {
return m.AccountStatus return m.AccountStatus
} }
@ -242,7 +242,7 @@ func (m *GetUsersInfoReq) Reset() { *m = GetUsersInfoReq{} }
func (m *GetUsersInfoReq) String() string { return proto.CompactTextString(m) } func (m *GetUsersInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetUsersInfoReq) ProtoMessage() {} func (*GetUsersInfoReq) ProtoMessage() {}
func (*GetUsersInfoReq) Descriptor() ([]byte, []int) { 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 { func (m *GetUsersInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersInfoReq.Unmarshal(m, b) 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 (m *GetUsersInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetUsersInfoResp) ProtoMessage() {} func (*GetUsersInfoResp) ProtoMessage() {}
func (*GetUsersInfoResp) Descriptor() ([]byte, []int) { 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 { func (m *GetUsersInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersInfoResp.Unmarshal(m, b) 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 (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) }
func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) ProtoMessage() {}
func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { 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 { func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) 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 (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) }
func (*UpdateUserInfoResp) ProtoMessage() {} func (*UpdateUserInfoResp) ProtoMessage() {}
func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { 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 { func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b) 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 (m *SetGlobalRecvMessageOptReq) String() string { return proto.CompactTextString(m) }
func (*SetGlobalRecvMessageOptReq) ProtoMessage() {} func (*SetGlobalRecvMessageOptReq) ProtoMessage() {}
func (*SetGlobalRecvMessageOptReq) Descriptor() ([]byte, []int) { 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 { func (m *SetGlobalRecvMessageOptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGlobalRecvMessageOptReq.Unmarshal(m, b) 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 (m *SetGlobalRecvMessageOptResp) String() string { return proto.CompactTextString(m) }
func (*SetGlobalRecvMessageOptResp) ProtoMessage() {} func (*SetGlobalRecvMessageOptResp) ProtoMessage() {}
func (*SetGlobalRecvMessageOptResp) Descriptor() ([]byte, []int) { 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 { func (m *SetGlobalRecvMessageOptResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetGlobalRecvMessageOptResp.Unmarshal(m, b) return xxx_messageInfo_SetGlobalRecvMessageOptResp.Unmarshal(m, b)
@ -452,9 +452,9 @@ func (m *SetGlobalRecvMessageOptResp) XXX_DiscardUnknown() {
var xxx_messageInfo_SetGlobalRecvMessageOptResp proto.InternalMessageInfo var xxx_messageInfo_SetGlobalRecvMessageOptResp proto.InternalMessageInfo
type SetConversationReq struct { 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"` 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_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 (m *SetConversationReq) String() string { return proto.CompactTextString(m) }
func (*SetConversationReq) ProtoMessage() {} func (*SetConversationReq) ProtoMessage() {}
func (*SetConversationReq) Descriptor() ([]byte, []int) { 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 { func (m *SetConversationReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetConversationReq.Unmarshal(m, b) 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 (m *SetConversationResp) String() string { return proto.CompactTextString(m) }
func (*SetConversationResp) ProtoMessage() {} func (*SetConversationResp) ProtoMessage() {}
func (*SetConversationResp) Descriptor() ([]byte, []int) { 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 { func (m *SetConversationResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetConversationResp.Unmarshal(m, b) return xxx_messageInfo_SetConversationResp.Unmarshal(m, b)
@ -536,11 +536,11 @@ func (m *SetConversationResp) XXX_DiscardUnknown() {
var xxx_messageInfo_SetConversationResp proto.InternalMessageInfo var xxx_messageInfo_SetConversationResp proto.InternalMessageInfo
type SetRecvMsgOptReq struct { type SetRecvMsgOptReq struct {
OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
ConversationID string `protobuf:"bytes,2,opt,name=ConversationID" json:"ConversationID,omitempty"` ConversationID string `protobuf:"bytes,2,opt,name=conversationID" json:"conversationID,omitempty"`
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=RecvMsgOpt" json:"RecvMsgOpt,omitempty"` RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt" json:"recvMsgOpt,omitempty"`
NotificationType int32 `protobuf:"varint,4,opt,name=notificationType" json:"notificationType,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_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 (m *SetRecvMsgOptReq) String() string { return proto.CompactTextString(m) }
func (*SetRecvMsgOptReq) ProtoMessage() {} func (*SetRecvMsgOptReq) ProtoMessage() {}
func (*SetRecvMsgOptReq) Descriptor() ([]byte, []int) { 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 { func (m *SetRecvMsgOptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetRecvMsgOptReq.Unmarshal(m, b) 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 (m *SetRecvMsgOptResp) String() string { return proto.CompactTextString(m) }
func (*SetRecvMsgOptResp) ProtoMessage() {} func (*SetRecvMsgOptResp) ProtoMessage() {}
func (*SetRecvMsgOptResp) Descriptor() ([]byte, []int) { 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 { func (m *SetRecvMsgOptResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetRecvMsgOptResp.Unmarshal(m, b) return xxx_messageInfo_SetRecvMsgOptResp.Unmarshal(m, b)
@ -636,9 +636,9 @@ func (m *SetRecvMsgOptResp) XXX_DiscardUnknown() {
var xxx_messageInfo_SetRecvMsgOptResp proto.InternalMessageInfo var xxx_messageInfo_SetRecvMsgOptResp proto.InternalMessageInfo
type GetConversationReq struct { type GetConversationReq struct {
ConversationID string `protobuf:"bytes,1,opt,name=ConversationID" json:"ConversationID,omitempty"` ConversationID string `protobuf:"bytes,1,opt,name=conversationID" json:"conversationID,omitempty"`
OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID" json:"ownerUserID,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_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 (m *GetConversationReq) String() string { return proto.CompactTextString(m) }
func (*GetConversationReq) ProtoMessage() {} func (*GetConversationReq) ProtoMessage() {}
func (*GetConversationReq) Descriptor() ([]byte, []int) { 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 { func (m *GetConversationReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationReq.Unmarshal(m, b) return xxx_messageInfo_GetConversationReq.Unmarshal(m, b)
@ -690,7 +690,7 @@ func (m *GetConversationReq) GetOperationID() string {
} }
type GetConversationResp struct { 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_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 (m *GetConversationResp) String() string { return proto.CompactTextString(m) }
func (*GetConversationResp) ProtoMessage() {} func (*GetConversationResp) ProtoMessage() {}
func (*GetConversationResp) Descriptor() ([]byte, []int) { 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 { func (m *GetConversationResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationResp.Unmarshal(m, b) return xxx_messageInfo_GetConversationResp.Unmarshal(m, b)
@ -728,9 +728,9 @@ func (m *GetConversationResp) GetConversation() *conversation.Conversation {
} }
type GetConversationsReq struct { type GetConversationsReq struct {
OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
ConversationIDs []string `protobuf:"bytes,2,rep,name=ConversationIDs" json:"ConversationIDs,omitempty"` ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs" json:"conversationIDs,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_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 (m *GetConversationsReq) String() string { return proto.CompactTextString(m) }
func (*GetConversationsReq) ProtoMessage() {} func (*GetConversationsReq) ProtoMessage() {}
func (*GetConversationsReq) Descriptor() ([]byte, []int) { 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 { func (m *GetConversationsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationsReq.Unmarshal(m, b) return xxx_messageInfo_GetConversationsReq.Unmarshal(m, b)
@ -782,7 +782,7 @@ func (m *GetConversationsReq) GetOperationID() string {
} }
type GetConversationsResp struct { 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_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 (m *GetConversationsResp) String() string { return proto.CompactTextString(m) }
func (*GetConversationsResp) ProtoMessage() {} func (*GetConversationsResp) ProtoMessage() {}
func (*GetConversationsResp) Descriptor() ([]byte, []int) { 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 { func (m *GetConversationsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConversationsResp.Unmarshal(m, b) return xxx_messageInfo_GetConversationsResp.Unmarshal(m, b)
@ -820,8 +820,8 @@ func (m *GetConversationsResp) GetConversations() []*conversation.Conversation {
} }
type GetAllConversationsReq struct { type GetAllConversationsReq struct {
OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 (m *GetAllConversationsReq) String() string { return proto.CompactTextString(m) }
func (*GetAllConversationsReq) ProtoMessage() {} func (*GetAllConversationsReq) ProtoMessage() {}
func (*GetAllConversationsReq) Descriptor() ([]byte, []int) { 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 { func (m *GetAllConversationsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllConversationsReq.Unmarshal(m, b) return xxx_messageInfo_GetAllConversationsReq.Unmarshal(m, b)
@ -866,7 +866,7 @@ func (m *GetAllConversationsReq) GetOperationID() string {
} }
type GetAllConversationsResp struct { 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_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `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 (m *GetAllConversationsResp) String() string { return proto.CompactTextString(m) }
func (*GetAllConversationsResp) ProtoMessage() {} func (*GetAllConversationsResp) ProtoMessage() {}
func (*GetAllConversationsResp) Descriptor() ([]byte, []int) { 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 { func (m *GetAllConversationsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetAllConversationsResp.Unmarshal(m, b) return xxx_messageInfo_GetAllConversationsResp.Unmarshal(m, b)
@ -904,7 +904,7 @@ func (m *GetAllConversationsResp) GetConversations() []*conversation.Conversatio
} }
type BatchSetConversationsReq struct { 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"` OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"`
NotificationType int32 `protobuf:"varint,3,opt,name=notificationType" json:"notificationType,omitempty"` NotificationType int32 `protobuf:"varint,3,opt,name=notificationType" json:"notificationType,omitempty"`
OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,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 (m *BatchSetConversationsReq) String() string { return proto.CompactTextString(m) }
func (*BatchSetConversationsReq) ProtoMessage() {} func (*BatchSetConversationsReq) ProtoMessage() {}
func (*BatchSetConversationsReq) Descriptor() ([]byte, []int) { 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 { func (m *BatchSetConversationsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchSetConversationsReq.Unmarshal(m, b) 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 (m *BatchSetConversationsResp) String() string { return proto.CompactTextString(m) }
func (*BatchSetConversationsResp) ProtoMessage() {} func (*BatchSetConversationsResp) ProtoMessage() {}
func (*BatchSetConversationsResp) Descriptor() ([]byte, []int) { 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 { func (m *BatchSetConversationsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchSetConversationsResp.Unmarshal(m, b) 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 (m *GetUsersReq) String() string { return proto.CompactTextString(m) }
func (*GetUsersReq) ProtoMessage() {} func (*GetUsersReq) ProtoMessage() {}
func (*GetUsersReq) Descriptor() ([]byte, []int) { 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 { func (m *GetUsersReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersReq.Unmarshal(m, b) 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 (m *GetUsersResp) String() string { return proto.CompactTextString(m) }
func (*GetUsersResp) ProtoMessage() {} func (*GetUsersResp) ProtoMessage() {}
func (*GetUsersResp) Descriptor() ([]byte, []int) { 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 { func (m *GetUsersResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersResp.Unmarshal(m, b) return xxx_messageInfo_GetUsersResp.Unmarshal(m, b)
@ -1119,32 +1119,102 @@ func (m *GetUsersResp) GetUsers() []*sdk_ws.UserInfo {
return nil 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() { func init() {
proto.RegisterType((*GetAllUserIDReq)(nil), "user.GetAllUserIDReq") proto.RegisterType((*GetAllUserIDReq)(nil), "user.getAllUserIDReq")
proto.RegisterType((*GetAllUserIDResp)(nil), "user.GetAllUserIDResp") proto.RegisterType((*GetAllUserIDResp)(nil), "user.getAllUserIDResp")
proto.RegisterType((*AccountCheckReq)(nil), "user.AccountCheckReq") proto.RegisterType((*AccountCheckReq)(nil), "user.accountCheckReq")
proto.RegisterType((*AccountCheckResp)(nil), "user.AccountCheckResp") proto.RegisterType((*AccountCheckResp)(nil), "user.accountCheckResp")
proto.RegisterType((*AccountCheckResp_SingleUserStatus)(nil), "user.AccountCheckResp.SingleUserStatus") proto.RegisterType((*AccountCheckRespSingleUserStatus)(nil), "user.accountCheckResp.singleUserStatus")
proto.RegisterType((*GetUsersInfoReq)(nil), "user.GetUsersInfoReq") proto.RegisterType((*GetUsersInfoReq)(nil), "user.getUsersInfoReq")
proto.RegisterType((*GetUsersInfoResp)(nil), "user.GetUsersInfoResp") proto.RegisterType((*GetUsersInfoResp)(nil), "user.getUsersInfoResp")
proto.RegisterType((*UpdateUserInfoReq)(nil), "user.UpdateUserInfoReq") proto.RegisterType((*UpdateUserInfoReq)(nil), "user.updateUserInfoReq")
proto.RegisterType((*UpdateUserInfoResp)(nil), "user.UpdateUserInfoResp") proto.RegisterType((*UpdateUserInfoResp)(nil), "user.updateUserInfoResp")
proto.RegisterType((*SetGlobalRecvMessageOptReq)(nil), "user.SetGlobalRecvMessageOptReq") proto.RegisterType((*SetGlobalRecvMessageOptReq)(nil), "user.setGlobalRecvMessageOptReq")
proto.RegisterType((*SetGlobalRecvMessageOptResp)(nil), "user.SetGlobalRecvMessageOptResp") proto.RegisterType((*SetGlobalRecvMessageOptResp)(nil), "user.setGlobalRecvMessageOptResp")
proto.RegisterType((*SetConversationReq)(nil), "user.SetConversationReq") proto.RegisterType((*SetConversationReq)(nil), "user.setConversationReq")
proto.RegisterType((*SetConversationResp)(nil), "user.SetConversationResp") proto.RegisterType((*SetConversationResp)(nil), "user.setConversationResp")
proto.RegisterType((*SetRecvMsgOptReq)(nil), "user.SetRecvMsgOptReq") proto.RegisterType((*SetRecvMsgOptReq)(nil), "user.setRecvMsgOptReq")
proto.RegisterType((*SetRecvMsgOptResp)(nil), "user.SetRecvMsgOptResp") proto.RegisterType((*SetRecvMsgOptResp)(nil), "user.setRecvMsgOptResp")
proto.RegisterType((*GetConversationReq)(nil), "user.GetConversationReq") proto.RegisterType((*GetConversationReq)(nil), "user.getConversationReq")
proto.RegisterType((*GetConversationResp)(nil), "user.GetConversationResp") proto.RegisterType((*GetConversationResp)(nil), "user.getConversationResp")
proto.RegisterType((*GetConversationsReq)(nil), "user.GetConversationsReq") proto.RegisterType((*GetConversationsReq)(nil), "user.getConversationsReq")
proto.RegisterType((*GetConversationsResp)(nil), "user.GetConversationsResp") proto.RegisterType((*GetConversationsResp)(nil), "user.getConversationsResp")
proto.RegisterType((*GetAllConversationsReq)(nil), "user.GetAllConversationsReq") proto.RegisterType((*GetAllConversationsReq)(nil), "user.getAllConversationsReq")
proto.RegisterType((*GetAllConversationsResp)(nil), "user.GetAllConversationsResp") proto.RegisterType((*GetAllConversationsResp)(nil), "user.getAllConversationsResp")
proto.RegisterType((*BatchSetConversationsReq)(nil), "user.BatchSetConversationsReq") proto.RegisterType((*BatchSetConversationsReq)(nil), "user.batchSetConversationsReq")
proto.RegisterType((*BatchSetConversationsResp)(nil), "user.BatchSetConversationsResp") proto.RegisterType((*BatchSetConversationsResp)(nil), "user.batchSetConversationsResp")
proto.RegisterType((*GetUsersReq)(nil), "user.GetUsersReq") proto.RegisterType((*GetUsersReq)(nil), "user.getUsersReq")
proto.RegisterType((*GetUsersResp)(nil), "user.GetUsersResp") 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. // 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) AccountCheck(ctx context.Context, in *AccountCheckReq, opts ...grpc.CallOption) (*AccountCheckResp, error)
// 翻页或指定userID昵称拉取用户信息 全字段 // 翻页或指定userID昵称拉取用户信息 全字段
GetUsers(ctx context.Context, in *GetUsersReq, opts ...grpc.CallOption) (*GetUsersResp, error) 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 { 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) { func (c *userClient) GetUsersInfo(ctx context.Context, in *GetUsersInfoReq, opts ...grpc.CallOption) (*GetUsersInfoResp, error) {
out := new(GetUsersInfoResp) 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 { if err != nil {
return nil, err 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) { func (c *userClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*UpdateUserInfoResp, error) {
out := new(UpdateUserInfoResp) 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 { if err != nil {
return nil, err 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) { func (c *userClient) SetGlobalRecvMessageOpt(ctx context.Context, in *SetGlobalRecvMessageOptReq, opts ...grpc.CallOption) (*SetGlobalRecvMessageOptResp, error) {
out := new(SetGlobalRecvMessageOptResp) 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 { if err != nil {
return nil, err 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) { func (c *userClient) AccountCheck(ctx context.Context, in *AccountCheckReq, opts ...grpc.CallOption) (*AccountCheckResp, error) {
out := new(AccountCheckResp) 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 { if err != nil {
return nil, err 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) { func (c *userClient) GetUsers(ctx context.Context, in *GetUsersReq, opts ...grpc.CallOption) (*GetUsersResp, error) {
out := new(GetUsersResp) 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 { if err != nil {
return nil, err return nil, err
} }
@ -1236,6 +1317,8 @@ type UserServer interface {
AccountCheck(context.Context, *AccountCheckReq) (*AccountCheckResp, error) AccountCheck(context.Context, *AccountCheckReq) (*AccountCheckResp, error)
// 翻页或指定userID昵称拉取用户信息 全字段 // 翻页或指定userID昵称拉取用户信息 全字段
GetUsers(context.Context, *GetUsersReq) (*GetUsersResp, error) GetUsers(context.Context, *GetUsersReq) (*GetUsersResp, error)
// 用户注册
UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error)
} }
func RegisterUserServer(s *grpc.Server, srv UserServer) { 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) 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{ var _User_serviceDesc = grpc.ServiceDesc{
ServiceName: "user.user", ServiceName: "user.user",
HandlerType: (*UserServer)(nil), HandlerType: (*UserServer)(nil),
Methods: []grpc.MethodDesc{ Methods: []grpc.MethodDesc{
{ {
MethodName: "GetUsersInfo", MethodName: "getUsersInfo",
Handler: _User_GetUsersInfo_Handler, Handler: _User_GetUsersInfo_Handler,
}, },
{ {
MethodName: "UpdateUserInfo", MethodName: "updateUserInfo",
Handler: _User_UpdateUserInfo_Handler, Handler: _User_UpdateUserInfo_Handler,
}, },
{ {
MethodName: "SetGlobalRecvMessageOpt", MethodName: "setGlobalRecvMessageOpt",
Handler: _User_SetGlobalRecvMessageOpt_Handler, Handler: _User_SetGlobalRecvMessageOpt_Handler,
}, },
{ {
MethodName: "AccountCheck", MethodName: "accountCheck",
Handler: _User_AccountCheck_Handler, Handler: _User_AccountCheck_Handler,
}, },
{ {
MethodName: "GetUsers", MethodName: "getUsers",
Handler: _User_GetUsers_Handler, Handler: _User_GetUsers_Handler,
}, },
{
MethodName: "userRegister",
Handler: _User_UserRegister_Handler,
},
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "user/user.proto", 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{ var fileDescriptor_user_ca0d4cfbb41aa43a = []byte{
// 887 bytes of a gzipped FileDescriptorProto // 926 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xe1, 0x6e, 0xdc,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x79, 0x90, 0x66, 0x0f, 0x90, 0x93, 0x5f, 0x60, 0xab, 0x65, 0x66, 0x92, 0x1d, 0xed, 0xd4, 0x3e, 0xb4, 0xbd, 0x77,
0xa4, 0x0a, 0x21, 0x7f, 0x7c, 0xff, 0xc7, 0x23, 0x39, 0xad, 0x4e, 0x87, 0xa3, 0xc2, 0x98, 0x2a, 0x5e, 0x61, 0x81, 0x5c, 0x72, 0x34, 0xb7, 0xaa, 0x92, 0x63, 0x6d, 0x95, 0x2b, 0x39, 0x5a, 0x9b,
0xd5, 0xbe, 0x90, 0x9f, 0xe7, 0xb7, 0x14, 0xf0, 0xf1, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x37, 0xda, 0x23, 0xb8, 0x5d, 0xf2, 0x26, 0x6b, 0xd5, 0x3c, 0x48, 0x37, 0x52, 0x57, 0xe9, 0x1b, 0xcd,
0x21, 0xab, 0xd2, 0x14, 0x0b, 0x00, 0x00, 0x94, 0x97, 0x37, 0xd6, 0x8a, 0x59, 0xde, 0x58, 0xaf, 0xce, 0x57, 0xf7, 0x7f, 0xdc, 0x96, 0x6b,
0xf4, 0xd1, 0x78, 0x62, 0xec, 0xcf, 0xd2, 0xea, 0x33, 0xf9, 0xe7, 0xf8, 0x96, 0x52, 0x7c, 0xf8,
0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x20, 0xab, 0x70, 0x2d, 0xad, 0x0b, 0x00, 0x00,
} }

@ -124,10 +124,10 @@ message getUsersResp{
repeated server_api_params.UserInfo users = 2; repeated server_api_params.UserInfo users = 2;
} }
message UserRegisterReq { message userRegisterReq {
repeated server_api_params.UserInfo users = 1; repeated server_api_params.UserInfo users = 1;
} }
message UserRegisterResp { message userRegisterResp {
} }
@ -144,5 +144,7 @@ service user {
rpc accountCheck(accountCheckReq)returns(accountCheckResp); rpc accountCheck(accountCheckReq)returns(accountCheckResp);
//userID //userID
rpc getUsers(getUsersReq) returns (getUsersResp); rpc getUsers(getUsersReq) returns (getUsersResp);
//
rpc userRegister(userRegisterReq) returns (userRegisterResp);
} }

Loading…
Cancel
Save