add ParseToken rpc

This commit is contained in:
skiffer-git 2022-09-21 18:44:21 +08:00
parent 2bf50bb8c2
commit 6d82c9c3db
4 changed files with 21 additions and 1 deletions

View File

@ -80,7 +80,7 @@ func SendMsg(c *gin.Context) {
}
client := pbChat.NewMsgClient(etcdConn)
log.Info("", "", "api SendMsg call, api call rpc...")
log.Info(params.OperationID, "", "api SendMsg call, api call rpc...")
reply, err := client.SendMsg(context.Background(), pbData)
if err != nil {

View File

@ -933,6 +933,7 @@ func Notification(n *NotificationMsg) {
log.NewError(req.OperationID, "SendMsg rpc failed, ", req.String(), reply.ErrCode, reply.ErrMsg)
}
}
func getOnlineAndOfflineUserIDList(memberList []string, m map[string][]string, operationID string) {
var onllUserIDList, offlUserIDList []string
var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult

View File

@ -42,6 +42,18 @@ message ForceLogoutResp {
CommonResp CommonResp = 1;
}
message ParseTokenReq{
string token = 1;
string operationID = 2;
}
message ParseTokenResp{
string userID = 1;
string operationID = 2;
CommonResp commonResp = 3;
uint32 expireTimeSeconds = 4;
}
@ -50,4 +62,7 @@ service Auth {
rpc UserRegister(UserRegisterReq) returns(UserRegisterResp);
rpc UserToken(UserTokenReq) returns(UserTokenResp);
rpc ForceLogout(ForceLogoutReq) returns(ForceLogoutResp);
rpc ParseToken(ParseTokenReq)returns(ParseTokenResp);
}

View File

@ -131,6 +131,9 @@ message DelSuperGroupMsgResp{
int32 errCode = 1;
string errMsg = 2;
}
service msg {
rpc GetMaxAndMinSeq(server_api_params.GetMaxAndMinSeqReq) returns(server_api_params.GetMaxAndMinSeqResp);
rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp);
@ -141,4 +144,5 @@ service msg {
rpc SetMsgMinSeq(SetMsgMinSeqReq) returns(SetMsgMinSeqResp);
rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp);
rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp);
}