mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 06:19:20 +08:00
refactor: Refactor rpc call && auto gen rpc_call code (#2969)
* refactor: rpcclient * chore: err * fix: err * fix: err * fix: err * feat: change api
This commit is contained in:
@@ -16,29 +16,28 @@ package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/protocol/auth"
|
||||
"github.com/openimsdk/tools/a2r"
|
||||
)
|
||||
|
||||
type AuthApi rpcclient.Auth
|
||||
type AuthApi struct{}
|
||||
|
||||
func NewAuthApi(client rpcclient.Auth) AuthApi {
|
||||
return AuthApi(client)
|
||||
func NewAuthApi() AuthApi {
|
||||
return AuthApi{}
|
||||
}
|
||||
|
||||
func (o *AuthApi) GetAdminToken(c *gin.Context) {
|
||||
a2r.Call(auth.AuthClient.GetAdminToken, o.Client, c)
|
||||
a2r.CallV2(c, auth.GetAdminTokenCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *AuthApi) GetUserToken(c *gin.Context) {
|
||||
a2r.Call(auth.AuthClient.GetUserToken, o.Client, c)
|
||||
a2r.CallV2(c, auth.GetUserTokenCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *AuthApi) ParseToken(c *gin.Context) {
|
||||
a2r.Call(auth.AuthClient.ParseToken, o.Client, c)
|
||||
a2r.CallV2(c, auth.ParseTokenCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *AuthApi) ForceLogout(c *gin.Context) {
|
||||
a2r.Call(auth.AuthClient.ForceLogout, o.Client, c)
|
||||
a2r.CallV2(c, auth.ForceLogoutCaller.Invoke)
|
||||
}
|
||||
|
||||
@@ -16,57 +16,56 @@ package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/protocol/conversation"
|
||||
"github.com/openimsdk/tools/a2r"
|
||||
)
|
||||
|
||||
type ConversationApi rpcclient.Conversation
|
||||
type ConversationApi struct{}
|
||||
|
||||
func NewConversationApi(client rpcclient.Conversation) ConversationApi {
|
||||
return ConversationApi(client)
|
||||
func NewConversationApi() ConversationApi {
|
||||
return ConversationApi{}
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetAllConversations(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetAllConversations, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetAllConversationsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetSortedConversationList(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetSortedConversationList, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetSortedConversationListCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetConversation(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetConversation, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetConversationCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetConversations(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetConversations, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetConversationsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) SetConversations(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.SetConversations, o.Client, c)
|
||||
a2r.CallV2(c, conversation.SetConversationsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetConversationOfflinePushUserIDs(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetConversationOfflinePushUserIDs, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetConversationOfflinePushUserIDsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetFullOwnerConversationIDs(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetFullOwnerConversationIDs, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetFullOwnerConversationIDsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetIncrementalConversation(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetIncrementalConversation, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetIncrementalConversationCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetOwnerConversation(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetOwnerConversation, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetOwnerConversationCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetNotNotifyConversationIDs(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetNotNotifyConversationIDs, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetNotNotifyConversationIDsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ConversationApi) GetPinnedConversationIDs(c *gin.Context) {
|
||||
a2r.Call(conversation.ConversationClient.GetPinnedConversationIDs, o.Client, c)
|
||||
a2r.CallV2(c, conversation.GetPinnedConversationIDsCaller.Invoke)
|
||||
}
|
||||
|
||||
+24
-25
@@ -17,99 +17,98 @@ package api
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/protocol/relation"
|
||||
"github.com/openimsdk/tools/a2r"
|
||||
)
|
||||
|
||||
type FriendApi rpcclient.Friend
|
||||
type FriendApi struct{}
|
||||
|
||||
func NewFriendApi(client rpcclient.Friend) FriendApi {
|
||||
return FriendApi(client)
|
||||
func NewFriendApi() FriendApi {
|
||||
return FriendApi{}
|
||||
}
|
||||
|
||||
func (o *FriendApi) ApplyToAddFriend(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.ApplyToAddFriend, o.Client, c)
|
||||
a2r.CallV2(c, relation.ApplyToAddFriendCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) RespondFriendApply(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.RespondFriendApply, o.Client, c)
|
||||
a2r.CallV2(c, relation.RespondFriendApplyCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) DeleteFriend(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.DeleteFriend, o.Client, c)
|
||||
a2r.CallV2(c, relation.DeleteFriendCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetFriendApplyList(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetPaginationFriendsApplyTo, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetPaginationFriendsApplyToCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetDesignatedFriendsApply(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetDesignatedFriendsApply, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetDesignatedFriendsApplyCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetSelfApplyList(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetPaginationFriendsApplyFrom, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetPaginationFriendsApplyFromCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetFriendList(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetPaginationFriends, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetPaginationFriendsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetDesignatedFriends(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetDesignatedFriends, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetDesignatedFriendsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) SetFriendRemark(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.SetFriendRemark, o.Client, c)
|
||||
a2r.CallV2(c, relation.SetFriendRemarkCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) AddBlack(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.AddBlack, o.Client, c)
|
||||
a2r.CallV2(c, relation.AddBlackCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetPaginationBlacks(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetPaginationBlacks, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetPaginationBlacksCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetSpecifiedBlacks(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetSpecifiedBlacks, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetSpecifiedBlacksCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) RemoveBlack(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.RemoveBlack, o.Client, c)
|
||||
a2r.CallV2(c, relation.RemoveBlackCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) ImportFriends(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.ImportFriends, o.Client, c)
|
||||
a2r.CallV2(c, relation.ImportFriendsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) IsFriend(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.IsFriend, o.Client, c)
|
||||
a2r.CallV2(c, relation.IsFriendCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetFriendIDs(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetFriendIDs, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetFriendIDsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetSpecifiedFriendsInfo(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetSpecifiedFriendsInfo, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetSpecifiedFriendsInfoCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) UpdateFriends(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.UpdateFriends, o.Client, c)
|
||||
a2r.CallV2(c, relation.UpdateFriendsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetIncrementalFriends(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetIncrementalFriends, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetIncrementalFriendsCaller.Invoke)
|
||||
}
|
||||
|
||||
// GetIncrementalBlacks is temporarily unused.
|
||||
// Deprecated: This function is currently unused and may be removed in future versions.
|
||||
func (o *FriendApi) GetIncrementalBlacks(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetIncrementalBlacks, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetIncrementalBlacksCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *FriendApi) GetFullFriendUserIDs(c *gin.Context) {
|
||||
a2r.Call(relation.FriendClient.GetFullFriendUserIDs, o.Client, c)
|
||||
a2r.CallV2(c, relation.GetFullFriendUserIDsCaller.Invoke)
|
||||
}
|
||||
|
||||
+35
-36
@@ -16,113 +16,112 @@ package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/protocol/group"
|
||||
"github.com/openimsdk/tools/a2r"
|
||||
)
|
||||
|
||||
type GroupApi rpcclient.Group
|
||||
type GroupApi struct{}
|
||||
|
||||
func NewGroupApi(client rpcclient.Group) GroupApi {
|
||||
return GroupApi(client)
|
||||
func NewGroupApi() GroupApi {
|
||||
return GroupApi{}
|
||||
}
|
||||
|
||||
func (o *GroupApi) CreateGroup(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.CreateGroup, o.Client, c)
|
||||
a2r.CallV2(c, group.CreateGroupCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) SetGroupInfo(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.SetGroupInfo, o.Client, c)
|
||||
a2r.CallV2(c, group.SetGroupInfoCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) SetGroupInfoEx(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.SetGroupInfoEx, o.Client, c)
|
||||
a2r.CallV2(c, group.SetGroupInfoExCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) JoinGroup(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.JoinGroup, o.Client, c)
|
||||
a2r.CallV2(c, group.JoinGroupCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) QuitGroup(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.QuitGroup, o.Client, c)
|
||||
a2r.CallV2(c, group.QuitGroupCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) ApplicationGroupResponse(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GroupApplicationResponse, o.Client, c)
|
||||
a2r.CallV2(c, group.GroupApplicationResponseCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) TransferGroupOwner(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.TransferGroupOwner, o.Client, c)
|
||||
a2r.CallV2(c, group.TransferGroupOwnerCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetRecvGroupApplicationList(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetGroupApplicationList, o.Client, c)
|
||||
a2r.CallV2(c, group.GetGroupApplicationListCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetUserReqGroupApplicationList(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetUserReqApplicationList, o.Client, c)
|
||||
a2r.CallV2(c, group.GetUserReqApplicationListCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetGroupUsersReqApplicationList(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetGroupUsersReqApplicationList, o.Client, c)
|
||||
a2r.CallV2(c, group.GetGroupUsersReqApplicationListCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetSpecifiedUserGroupRequestInfo(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetSpecifiedUserGroupRequestInfo, o.Client, c)
|
||||
a2r.CallV2(c, group.GetSpecifiedUserGroupRequestInfoCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetGroupsInfo(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetGroupsInfo, o.Client, c)
|
||||
a2r.CallV2(c, group.GetGroupsInfoCaller.Invoke)
|
||||
//a2r.Call(group.GroupClient.GetGroupsInfo, o.Client, c, a2r.NewNilReplaceOption(group.GroupClient.GetGroupsInfo))
|
||||
}
|
||||
|
||||
func (o *GroupApi) KickGroupMember(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.KickGroupMember, o.Client, c)
|
||||
a2r.CallV2(c, group.KickGroupMemberCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetGroupMembersInfo(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetGroupMembersInfo, o.Client, c)
|
||||
a2r.CallV2(c, group.GetGroupMembersInfoCaller.Invoke)
|
||||
//a2r.Call(group.GroupClient.GetGroupMembersInfo, o.Client, c, a2r.NewNilReplaceOption(group.GroupClient.GetGroupMembersInfo))
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetGroupMemberList(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetGroupMemberList, o.Client, c)
|
||||
a2r.CallV2(c, group.GetGroupMemberListCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) InviteUserToGroup(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.InviteUserToGroup, o.Client, c)
|
||||
a2r.CallV2(c, group.InviteUserToGroupCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetJoinedGroupList(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetJoinedGroupList, o.Client, c)
|
||||
a2r.CallV2(c, group.GetJoinedGroupListCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) DismissGroup(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.DismissGroup, o.Client, c)
|
||||
a2r.CallV2(c, group.DismissGroupCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) MuteGroupMember(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.MuteGroupMember, o.Client, c)
|
||||
a2r.CallV2(c, group.MuteGroupMemberCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) CancelMuteGroupMember(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.CancelMuteGroupMember, o.Client, c)
|
||||
a2r.CallV2(c, group.CancelMuteGroupMemberCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) MuteGroup(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.MuteGroup, o.Client, c)
|
||||
a2r.CallV2(c, group.MuteGroupCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) CancelMuteGroup(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.CancelMuteGroup, o.Client, c)
|
||||
a2r.CallV2(c, group.CancelMuteGroupCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) SetGroupMemberInfo(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.SetGroupMemberInfo, o.Client, c)
|
||||
a2r.CallV2(c, group.SetGroupMemberInfoCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetGroupAbstractInfo(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetGroupAbstractInfo, o.Client, c)
|
||||
a2r.CallV2(c, group.GetGroupAbstractInfoCaller.Invoke)
|
||||
}
|
||||
|
||||
// func (g *Group) SetGroupMemberNickname(c *gin.Context) {
|
||||
@@ -134,33 +133,33 @@ func (o *GroupApi) GetGroupAbstractInfo(c *gin.Context) {
|
||||
//}
|
||||
|
||||
func (o *GroupApi) GroupCreateCount(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GroupCreateCount, o.Client, c)
|
||||
a2r.CallV2(c, group.GroupCreateCountCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetGroups(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetGroups, o.Client, c)
|
||||
a2r.CallV2(c, group.GetGroupsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetGroupMemberUserIDs(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetGroupMemberUserIDs, o.Client, c)
|
||||
a2r.CallV2(c, group.GetGroupMemberUserIDsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetIncrementalJoinGroup(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetIncrementalJoinGroup, o.Client, c)
|
||||
a2r.CallV2(c, group.GetIncrementalJoinGroupCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetIncrementalGroupMember(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetIncrementalGroupMember, o.Client, c)
|
||||
a2r.CallV2(c, group.GetIncrementalGroupMemberCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetIncrementalGroupMemberBatch(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.BatchGetIncrementalGroupMember, o.Client, c)
|
||||
a2r.CallV2(c, group.BatchGetIncrementalGroupMemberCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetFullGroupMemberUserIDs(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetFullGroupMemberUserIDs, o.Client, c)
|
||||
a2r.CallV2(c, group.GetFullGroupMemberUserIDsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *GroupApi) GetFullJoinGroupIDs(c *gin.Context) {
|
||||
a2r.Call(group.GroupClient.GetFullJoinGroupIDs, o.Client, c)
|
||||
a2r.CallV2(c, group.GetFullJoinGroupIDsCaller.Invoke)
|
||||
}
|
||||
|
||||
+10
-6
@@ -29,15 +29,18 @@ import (
|
||||
conf "github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
kdisc "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
|
||||
"github.com/openimsdk/tools/discovery"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/tools/discovery/etcd"
|
||||
"github.com/openimsdk/tools/errs"
|
||||
"github.com/openimsdk/tools/log"
|
||||
"github.com/openimsdk/tools/mw"
|
||||
"github.com/openimsdk/tools/system/program"
|
||||
"github.com/openimsdk/tools/utils/datautil"
|
||||
"github.com/openimsdk/tools/utils/jsonutil"
|
||||
"github.com/openimsdk/tools/utils/network"
|
||||
"github.com/openimsdk/tools/utils/runtimeenv"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@@ -56,13 +59,14 @@ func Start(ctx context.Context, index int, config *Config) error {
|
||||
|
||||
config.RuntimeEnv = runtimeenv.PrintRuntimeEnvironment()
|
||||
|
||||
var client discovery.SvcDiscoveryRegistry
|
||||
|
||||
// Determine whether zk is passed according to whether it is a clustered deployment
|
||||
client, err = kdisc.NewDiscoveryRegister(&config.Discovery, config.RuntimeEnv)
|
||||
client, err := kdisc.NewDiscoveryRegister(&config.Discovery, config.RuntimeEnv)
|
||||
if err != nil {
|
||||
return errs.WrapMsg(err, "failed to register discovery service")
|
||||
}
|
||||
client.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, "round_robin")))
|
||||
if err = rpcclient.InitRpcCaller(client, config.Discovery.RpcService); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var (
|
||||
netDone = make(chan struct{}, 1)
|
||||
@@ -90,7 +94,7 @@ func Start(ctx context.Context, index int, config *Config) error {
|
||||
return errs.New("only etcd support autoSetPorts", "RegisterName", "api").Wrap()
|
||||
}
|
||||
|
||||
router := newGinRouter(client, config, client)
|
||||
router := newGinRouter(client, config)
|
||||
if config.API.Prometheus.Enable {
|
||||
var (
|
||||
listener net.Listener
|
||||
|
||||
+17
-27
@@ -2,6 +2,8 @@ package jssdk
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sort"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/openimsdk/protocol/conversation"
|
||||
"github.com/openimsdk/protocol/group"
|
||||
@@ -12,7 +14,6 @@ import (
|
||||
"github.com/openimsdk/protocol/user"
|
||||
"github.com/openimsdk/tools/mcontext"
|
||||
"github.com/openimsdk/tools/utils/datautil"
|
||||
"sort"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -20,22 +21,11 @@ const (
|
||||
defaultGetActiveConversation = 100
|
||||
)
|
||||
|
||||
func NewJSSdkApi(user user.UserClient, friend relation.FriendClient, group group.GroupClient, msg msg.MsgClient, conv conversation.ConversationClient) *JSSdk {
|
||||
return &JSSdk{
|
||||
user: user,
|
||||
friend: friend,
|
||||
group: group,
|
||||
msg: msg,
|
||||
conv: conv,
|
||||
}
|
||||
func NewJSSdkApi() *JSSdk {
|
||||
return &JSSdk{}
|
||||
}
|
||||
|
||||
type JSSdk struct {
|
||||
user user.UserClient
|
||||
friend relation.FriendClient
|
||||
group group.GroupClient
|
||||
msg msg.MsgClient
|
||||
conv conversation.ConversationClient
|
||||
}
|
||||
|
||||
func (x *JSSdk) GetActiveConversations(c *gin.Context) {
|
||||
@@ -67,11 +57,11 @@ func (x *JSSdk) fillConversations(ctx context.Context, conversations []*jssdk.Co
|
||||
groupMap map[string]*sdkws.GroupInfo
|
||||
)
|
||||
if len(userIDs) > 0 {
|
||||
users, err := field(ctx, x.user.GetDesignateUsers, &user.GetDesignateUsersReq{UserIDs: userIDs}, (*user.GetDesignateUsersResp).GetUsersInfo)
|
||||
users, err := field(ctx, user.GetDesignateUsersCaller.Invoke, &user.GetDesignateUsersReq{UserIDs: userIDs}, (*user.GetDesignateUsersResp).GetUsersInfo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
friends, err := field(ctx, x.friend.GetFriendInfo, &relation.GetFriendInfoReq{OwnerUserID: conversations[0].Conversation.OwnerUserID, FriendUserIDs: userIDs}, (*relation.GetFriendInfoResp).GetFriendInfos)
|
||||
friends, err := field(ctx, relation.GetFriendInfoCaller.Invoke, &relation.GetFriendInfoReq{OwnerUserID: conversations[0].Conversation.OwnerUserID, FriendUserIDs: userIDs}, (*relation.GetFriendInfoResp).GetFriendInfos)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -79,7 +69,7 @@ func (x *JSSdk) fillConversations(ctx context.Context, conversations []*jssdk.Co
|
||||
friendMap = datautil.SliceToMap(friends, (*relation.FriendInfoOnly).GetFriendUserID)
|
||||
}
|
||||
if len(groupIDs) > 0 {
|
||||
resp, err := x.group.GetGroupsInfo(ctx, &group.GetGroupsInfoReq{GroupIDs: groupIDs})
|
||||
resp, err := group.GetGroupsInfoCaller.Invoke(ctx, &group.GetGroupsInfoReq{GroupIDs: groupIDs})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -101,7 +91,7 @@ func (x *JSSdk) getActiveConversations(ctx context.Context, req *jssdk.GetActive
|
||||
req.Count = defaultGetActiveConversation
|
||||
}
|
||||
req.OwnerUserID = mcontext.GetOpUserID(ctx)
|
||||
conversationIDs, err := field(ctx, x.conv.GetConversationIDs,
|
||||
conversationIDs, err := field(ctx, conversation.GetConversationIDsCaller.Invoke,
|
||||
&conversation.GetConversationIDsReq{UserID: req.OwnerUserID}, (*conversation.GetConversationIDsResp).GetConversationIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -109,12 +99,12 @@ func (x *JSSdk) getActiveConversations(ctx context.Context, req *jssdk.GetActive
|
||||
if len(conversationIDs) == 0 {
|
||||
return &jssdk.GetActiveConversationsResp{}, nil
|
||||
}
|
||||
readSeq, err := field(ctx, x.msg.GetHasReadSeqs,
|
||||
readSeq, err := field(ctx, msg.GetHasReadSeqsCaller.Invoke,
|
||||
&msg.GetHasReadSeqsReq{UserID: req.OwnerUserID, ConversationIDs: conversationIDs}, (*msg.SeqsInfoResp).GetMaxSeqs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
activeConversation, err := field(ctx, x.msg.GetActiveConversation,
|
||||
activeConversation, err := field(ctx, msg.GetActiveConversationCaller.Invoke,
|
||||
&msg.GetActiveConversationReq{ConversationIDs: conversationIDs}, (*msg.GetActiveConversationResp).GetConversations)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -126,7 +116,7 @@ func (x *JSSdk) getActiveConversations(ctx context.Context, req *jssdk.GetActive
|
||||
Conversation: activeConversation,
|
||||
}
|
||||
if len(activeConversation) > 1 {
|
||||
pinnedConversationIDs, err := field(ctx, x.conv.GetPinnedConversationIDs,
|
||||
pinnedConversationIDs, err := field(ctx, conversation.GetPinnedConversationIDsCaller.Invoke,
|
||||
&conversation.GetPinnedConversationIDsReq{UserID: req.OwnerUserID}, (*conversation.GetPinnedConversationIDsResp).GetConversationIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -135,7 +125,7 @@ func (x *JSSdk) getActiveConversations(ctx context.Context, req *jssdk.GetActive
|
||||
}
|
||||
sort.Sort(&sortConversations)
|
||||
sortList := sortConversations.Top(int(req.Count))
|
||||
conversations, err := field(ctx, x.conv.GetConversations,
|
||||
conversations, err := field(ctx, conversation.GetConversationsCaller.Invoke,
|
||||
&conversation.GetConversationsReq{
|
||||
OwnerUserID: req.OwnerUserID,
|
||||
ConversationIDs: datautil.Slice(sortList, func(c *msg.ActiveConversation) string {
|
||||
@@ -144,7 +134,7 @@ func (x *JSSdk) getActiveConversations(ctx context.Context, req *jssdk.GetActive
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
msgs, err := field(ctx, x.msg.GetSeqMessage,
|
||||
msgs, err := field(ctx, msg.GetSeqMessageCaller.Invoke,
|
||||
&msg.GetSeqMessageReq{
|
||||
UserID: req.OwnerUserID,
|
||||
Conversations: datautil.Slice(sortList, func(c *msg.ActiveConversation) *msg.ConversationSeqs {
|
||||
@@ -195,7 +185,7 @@ func (x *JSSdk) getActiveConversations(ctx context.Context, req *jssdk.GetActive
|
||||
|
||||
func (x *JSSdk) getConversations(ctx context.Context, req *jssdk.GetConversationsReq) (*jssdk.GetConversationsResp, error) {
|
||||
req.OwnerUserID = mcontext.GetOpUserID(ctx)
|
||||
conversations, err := field(ctx, x.conv.GetConversations, &conversation.GetConversationsReq{OwnerUserID: req.OwnerUserID, ConversationIDs: req.ConversationIDs}, (*conversation.GetConversationsResp).GetConversations)
|
||||
conversations, err := field(ctx, conversation.GetConversationsCaller.Invoke, &conversation.GetConversationsReq{OwnerUserID: req.OwnerUserID, ConversationIDs: req.ConversationIDs}, (*conversation.GetConversationsResp).GetConversations)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -205,12 +195,12 @@ func (x *JSSdk) getConversations(ctx context.Context, req *jssdk.GetConversation
|
||||
req.ConversationIDs = datautil.Slice(conversations, func(c *conversation.Conversation) string {
|
||||
return c.ConversationID
|
||||
})
|
||||
maxSeqs, err := field(ctx, x.msg.GetMaxSeqs,
|
||||
maxSeqs, err := field(ctx, msg.GetMaxSeqsCaller.Invoke,
|
||||
&msg.GetMaxSeqsReq{ConversationIDs: req.ConversationIDs}, (*msg.SeqsInfoResp).GetMaxSeqs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
readSeqs, err := field(ctx, x.msg.GetHasReadSeqs,
|
||||
readSeqs, err := field(ctx, msg.GetHasReadSeqsCaller.Invoke,
|
||||
&msg.GetHasReadSeqsReq{UserID: req.OwnerUserID, ConversationIDs: req.ConversationIDs}, (*msg.SeqsInfoResp).GetMaxSeqs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -226,7 +216,7 @@ func (x *JSSdk) getConversations(ctx context.Context, req *jssdk.GetConversation
|
||||
}
|
||||
var msgs map[string]*sdkws.PullMsgs
|
||||
if len(conversationSeqs) > 0 {
|
||||
msgs, err = field(ctx, x.msg.GetSeqMessage,
|
||||
msgs, err = field(ctx, msg.GetSeqMessageCaller.Invoke,
|
||||
&msg.GetSeqMessageReq{UserID: req.OwnerUserID, Conversations: conversationSeqs}, (*msg.GetSeqMessageResp).GetMsgs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
+33
-33
@@ -21,10 +21,11 @@ import (
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/apistruct"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/protocol/constant"
|
||||
"github.com/openimsdk/protocol/msg"
|
||||
"github.com/openimsdk/protocol/rpccall"
|
||||
"github.com/openimsdk/protocol/sdkws"
|
||||
"github.com/openimsdk/protocol/user"
|
||||
"github.com/openimsdk/tools/a2r"
|
||||
"github.com/openimsdk/tools/apiresp"
|
||||
"github.com/openimsdk/tools/errs"
|
||||
@@ -37,16 +38,12 @@ import (
|
||||
)
|
||||
|
||||
type MessageApi struct {
|
||||
*rpcclient.Message
|
||||
validate *validator.Validate
|
||||
userRpcClient *rpcclient.UserRpcClient
|
||||
imAdminUserID []string
|
||||
}
|
||||
|
||||
func NewMessageApi(msgRpcClient *rpcclient.Message, userRpcClient *rpcclient.User,
|
||||
imAdminUserID []string) MessageApi {
|
||||
return MessageApi{Message: msgRpcClient, validate: validator.New(),
|
||||
userRpcClient: rpcclient.NewUserRpcClientByUser(userRpcClient), imAdminUserID: imAdminUserID}
|
||||
func NewMessageApi(imAdminUserID []string) MessageApi {
|
||||
return MessageApi{validate: validator.New(), imAdminUserID: imAdminUserID}
|
||||
}
|
||||
|
||||
func (*MessageApi) SetOptions(options map[string]bool, value bool) {
|
||||
@@ -108,51 +105,51 @@ func (m *MessageApi) newUserSendMsgReq(_ *gin.Context, params *apistruct.SendMsg
|
||||
}
|
||||
|
||||
func (m *MessageApi) GetSeq(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.GetMaxSeq, m.Client, c)
|
||||
a2r.CallV2(c, msg.GetMaxSeqCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) PullMsgBySeqs(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.PullMessageBySeqs, m.Client, c)
|
||||
a2r.CallV2(c, msg.PullMessageBySeqsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) RevokeMsg(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.RevokeMsg, m.Client, c)
|
||||
a2r.CallV2(c, msg.RevokeMsgCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) MarkMsgsAsRead(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.MarkMsgsAsRead, m.Client, c)
|
||||
a2r.CallV2(c, msg.MarkMsgsAsReadCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) MarkConversationAsRead(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.MarkConversationAsRead, m.Client, c)
|
||||
a2r.CallV2(c, msg.MarkConversationAsReadCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) GetConversationsHasReadAndMaxSeq(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.GetConversationsHasReadAndMaxSeq, m.Client, c)
|
||||
a2r.CallV2(c, msg.GetConversationsHasReadAndMaxSeqCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) SetConversationHasReadSeq(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.SetConversationHasReadSeq, m.Client, c)
|
||||
a2r.CallV2(c, msg.SetConversationHasReadSeqCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) ClearConversationsMsg(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.ClearConversationsMsg, m.Client, c)
|
||||
a2r.CallV2(c, msg.ClearConversationsMsgCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) UserClearAllMsg(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.UserClearAllMsg, m.Client, c)
|
||||
a2r.CallV2(c, msg.UserClearAllMsgCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) DeleteMsgs(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.DeleteMsgs, m.Client, c)
|
||||
a2r.CallV2(c, msg.DeleteMsgsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) DeleteMsgPhysicalBySeq(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.DeleteMsgPhysicalBySeq, m.Client, c)
|
||||
a2r.CallV2(c, msg.DeleteMsgPhysicalBySeqCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) DeleteMsgPhysical(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.DeleteMsgPhysical, m.Client, c)
|
||||
a2r.CallV2(c, msg.DeleteMsgPhysicalCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) getSendMsgReq(c *gin.Context, req apistruct.SendMsg) (sendMsgReq *msg.SendMsgReq, err error) {
|
||||
@@ -180,7 +177,7 @@ func (m *MessageApi) getSendMsgReq(c *gin.Context, req apistruct.SendMsg) (sendM
|
||||
case constant.OANotification:
|
||||
data = apistruct.OANotificationElem{}
|
||||
req.SessionType = constant.NotificationChatType
|
||||
if err = m.userRpcClient.GetNotificationByID(c, req.SendID); err != nil {
|
||||
if err = user.GetNotificationAccountCaller.Execute(c, &user.GetNotificationAccountReq{UserID: req.SendID}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
default:
|
||||
@@ -227,7 +224,7 @@ func (m *MessageApi) SendMessage(c *gin.Context) {
|
||||
sendMsgReq.MsgData.RecvID = req.RecvID
|
||||
|
||||
// Attempt to send the message using the client.
|
||||
respPb, err := m.Client.SendMsg(c, sendMsgReq)
|
||||
respPb, err := msg.SendMsgCaller.Invoke(c, sendMsgReq)
|
||||
if err != nil {
|
||||
// Set the status to failed and respond with an error if sending fails.
|
||||
apiresp.GinError(c, err)
|
||||
@@ -238,7 +235,7 @@ func (m *MessageApi) SendMessage(c *gin.Context) {
|
||||
var status = constant.MsgSendSuccessed
|
||||
|
||||
// Attempt to update the message sending status in the system.
|
||||
_, err = m.Client.SetSendMsgStatus(c, &msg.SetSendMsgStatusReq{
|
||||
err = msg.SetSendMsgStatusCaller.Execute(c, &msg.SetSendMsgStatusReq{
|
||||
Status: int32(status),
|
||||
})
|
||||
|
||||
@@ -290,7 +287,7 @@ func (m *MessageApi) SendBusinessNotification(c *gin.Context) {
|
||||
}),
|
||||
},
|
||||
}
|
||||
respPb, err := m.Client.SendMsg(c, &sendMsgReq)
|
||||
respPb, err := msg.SendMsgCaller.Invoke(c, &sendMsgReq)
|
||||
if err != nil {
|
||||
apiresp.GinError(c, err)
|
||||
return
|
||||
@@ -317,7 +314,10 @@ func (m *MessageApi) BatchSendMsg(c *gin.Context) {
|
||||
pageNumber := 1
|
||||
showNumber := 500
|
||||
for {
|
||||
recvIDsPart, err := m.userRpcClient.GetAllUserIDs(c, int32(pageNumber), int32(showNumber))
|
||||
recvIDsPart, err := rpccall.ExtractField(c, user.GetAllUserIDCaller.Invoke, &user.GetAllUserIDReq{Pagination: &sdkws.RequestPagination{
|
||||
PageNumber: int32(pageNumber),
|
||||
ShowNumber: int32(showNumber),
|
||||
}}, (*user.GetAllUserIDResp).GetUserIDs)
|
||||
if err != nil {
|
||||
apiresp.GinError(c, err)
|
||||
return
|
||||
@@ -339,7 +339,7 @@ func (m *MessageApi) BatchSendMsg(c *gin.Context) {
|
||||
}
|
||||
for _, recvID := range recvIDs {
|
||||
sendMsgReq.MsgData.RecvID = recvID
|
||||
rpcResp, err := m.Client.SendMsg(c, sendMsgReq)
|
||||
rpcResp, err := msg.SendMsgCaller.Invoke(c, sendMsgReq)
|
||||
if err != nil {
|
||||
resp.FailedIDs = append(resp.FailedIDs, recvID)
|
||||
continue
|
||||
@@ -355,33 +355,33 @@ func (m *MessageApi) BatchSendMsg(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (m *MessageApi) CheckMsgIsSendSuccess(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.GetSendMsgStatus, m.Client, c)
|
||||
a2r.CallV2(c, msg.GetSendMsgStatusCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) GetUsersOnlineStatus(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.GetSendMsgStatus, m.Client, c)
|
||||
a2r.CallV2(c, msg.GetSendMsgStatusCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) GetActiveUser(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.GetActiveUser, m.Client, c)
|
||||
a2r.CallV2(c, msg.GetActiveUserCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) GetActiveGroup(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.GetActiveGroup, m.Client, c)
|
||||
a2r.CallV2(c, msg.GetActiveGroupCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) SearchMsg(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.SearchMessage, m.Client, c)
|
||||
a2r.CallV2(c, msg.SearchMessageCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) GetServerTime(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.GetServerTime, m.Client, c)
|
||||
a2r.CallV2(c, msg.GetServerTimeCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) GetStreamMsg(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.GetStreamMsg, m.Client, c)
|
||||
a2r.CallV2(c, msg.GetStreamMsgCaller.Invoke)
|
||||
}
|
||||
|
||||
func (m *MessageApi) AppendStreamMsg(c *gin.Context) {
|
||||
a2r.Call(msg.MsgClient.AppendStreamMsg, m.Client, c)
|
||||
a2r.CallV2(c, msg.AppendStreamMsgCaller.Invoke)
|
||||
}
|
||||
|
||||
+16
-26
@@ -2,8 +2,11 @@ package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/openimsdk/open-im-server/v3/internal/api/jssdk"
|
||||
pbAuth "github.com/openimsdk/protocol/auth"
|
||||
|
||||
"github.com/gin-contrib/gzip"
|
||||
|
||||
@@ -13,12 +16,8 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/servererrs"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/protocol/constant"
|
||||
"github.com/openimsdk/tools/apiresp"
|
||||
"github.com/openimsdk/tools/discovery"
|
||||
@@ -48,7 +47,7 @@ func prommetricsGin() gin.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config, client discovery.SvcDiscoveryRegistry) *gin.Engine {
|
||||
func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config) *gin.Engine {
|
||||
disCov.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, "round_robin")))
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
@@ -56,15 +55,6 @@ func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config, client
|
||||
if v, ok := binding.Validator.Engine().(*validator.Validate); ok {
|
||||
_ = v.RegisterValidation("required_if", RequiredIf)
|
||||
}
|
||||
// init rpc client here
|
||||
userRpc := rpcclient.NewUser(disCov, config.Discovery.RpcService.User, config.Discovery.RpcService.MessageGateway,
|
||||
config.Share.IMAdminUserID)
|
||||
groupRpc := rpcclient.NewGroup(disCov, config.Discovery.RpcService.Group)
|
||||
friendRpc := rpcclient.NewFriend(disCov, config.Discovery.RpcService.Friend)
|
||||
messageRpc := rpcclient.NewMessage(disCov, config.Discovery.RpcService.Msg)
|
||||
conversationRpc := rpcclient.NewConversation(disCov, config.Discovery.RpcService.Conversation)
|
||||
authRpc := rpcclient.NewAuth(disCov, config.Discovery.RpcService.Auth)
|
||||
thirdRpc := rpcclient.NewThird(disCov, config.Discovery.RpcService.Third, config.API.Prometheus.GrafanaURL)
|
||||
switch config.API.Api.CompressionLevel {
|
||||
case NoCompression:
|
||||
case DefaultCompression:
|
||||
@@ -74,11 +64,11 @@ func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config, client
|
||||
case BestSpeed:
|
||||
r.Use(gzip.Gzip(gzip.BestSpeed))
|
||||
}
|
||||
r.Use(prommetricsGin(), gin.RecoveryWithWriter(gin.DefaultErrorWriter, mw.GinPanicErr), mw.CorsHandler(), mw.GinParseOperationID(), GinParseToken(authRpc))
|
||||
u := NewUserApi(*userRpc)
|
||||
m := NewMessageApi(messageRpc, userRpc, config.Share.IMAdminUserID)
|
||||
j := jssdk.NewJSSdkApi(userRpc.Client, friendRpc.Client, groupRpc.Client, messageRpc.Client, conversationRpc.Client)
|
||||
pd := NewPrometheusDiscoveryApi(config, client)
|
||||
r.Use(prommetricsGin(), gin.RecoveryWithWriter(gin.DefaultErrorWriter, mw.GinPanicErr), mw.CorsHandler(), mw.GinParseOperationID(), GinParseToken())
|
||||
u := NewUserApi(disCov, config.Discovery.RpcService.MessageGateway)
|
||||
m := NewMessageApi(config.Share.IMAdminUserID)
|
||||
j := jssdk.NewJSSdkApi()
|
||||
pd := NewPrometheusDiscoveryApi(config, disCov)
|
||||
userRouterGroup := r.Group("/user")
|
||||
{
|
||||
userRouterGroup.POST("/user_register", u.UserRegister)
|
||||
@@ -108,7 +98,7 @@ func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config, client
|
||||
// friend routing group
|
||||
friendRouterGroup := r.Group("/friend")
|
||||
{
|
||||
f := NewFriendApi(*friendRpc)
|
||||
f := NewFriendApi()
|
||||
friendRouterGroup.POST("/delete_friend", f.DeleteFriend)
|
||||
friendRouterGroup.POST("/get_friend_apply_list", f.GetFriendApplyList)
|
||||
friendRouterGroup.POST("/get_designated_friend_apply", f.GetDesignatedFriendsApply)
|
||||
@@ -131,7 +121,7 @@ func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config, client
|
||||
friendRouterGroup.POST("/get_incremental_friends", f.GetIncrementalFriends)
|
||||
friendRouterGroup.POST("/get_full_friend_user_ids", f.GetFullFriendUserIDs)
|
||||
}
|
||||
g := NewGroupApi(*groupRpc)
|
||||
g := NewGroupApi()
|
||||
groupRouterGroup := r.Group("/group")
|
||||
{
|
||||
groupRouterGroup.POST("/create_group", g.CreateGroup)
|
||||
@@ -169,7 +159,7 @@ func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config, client
|
||||
// certificate
|
||||
authRouterGroup := r.Group("/auth")
|
||||
{
|
||||
a := NewAuthApi(*authRpc)
|
||||
a := NewAuthApi()
|
||||
authRouterGroup.POST("/get_admin_token", a.GetAdminToken)
|
||||
authRouterGroup.POST("/get_user_token", a.GetUserToken)
|
||||
authRouterGroup.POST("/parse_token", a.ParseToken)
|
||||
@@ -178,7 +168,7 @@ func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config, client
|
||||
// Third service
|
||||
thirdGroup := r.Group("/third")
|
||||
{
|
||||
t := NewThirdApi(*thirdRpc)
|
||||
t := NewThirdApi(config.API.Prometheus.GrafanaURL)
|
||||
thirdGroup.GET("/prometheus", t.GetPrometheus)
|
||||
thirdGroup.POST("/fcm_update_token", t.FcmUpdateToken)
|
||||
thirdGroup.POST("/set_app_badge", t.SetAppBadge)
|
||||
@@ -229,7 +219,7 @@ func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config, client
|
||||
// Conversation
|
||||
conversationGroup := r.Group("/conversation")
|
||||
{
|
||||
c := NewConversationApi(*conversationRpc)
|
||||
c := NewConversationApi()
|
||||
conversationGroup.POST("/get_sorted_conversation_list", c.GetSortedConversationList)
|
||||
conversationGroup.POST("/get_all_conversations", c.GetAllConversations)
|
||||
conversationGroup.POST("/get_conversation", c.GetConversation)
|
||||
@@ -271,7 +261,7 @@ func newGinRouter(disCov discovery.SvcDiscoveryRegistry, config *Config, client
|
||||
return r
|
||||
}
|
||||
|
||||
func GinParseToken(authRPC *rpcclient.Auth) gin.HandlerFunc {
|
||||
func GinParseToken() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
switch c.Request.Method {
|
||||
case http.MethodPost:
|
||||
@@ -289,7 +279,7 @@ func GinParseToken(authRPC *rpcclient.Auth) gin.HandlerFunc {
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
resp, err := authRPC.ParseToken(c, token)
|
||||
resp, err := pbAuth.ParseTokenCaller.Invoke(c, &pbAuth.ParseTokenReq{Token: token})
|
||||
if err != nil {
|
||||
apiresp.GinError(c, err)
|
||||
c.Abort()
|
||||
|
||||
@@ -16,17 +16,16 @@ package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/protocol/user"
|
||||
"github.com/openimsdk/tools/a2r"
|
||||
)
|
||||
|
||||
type StatisticsApi rpcclient.User
|
||||
type StatisticsApi struct{}
|
||||
|
||||
func NewStatisticsApi(client rpcclient.User) StatisticsApi {
|
||||
return StatisticsApi(client)
|
||||
func NewStatisticsApi() StatisticsApi {
|
||||
return StatisticsApi{}
|
||||
}
|
||||
|
||||
func (s *StatisticsApi) UserRegister(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.UserRegisterCount, s.Client, c)
|
||||
a2r.CallV2(c, user.UserRegisterCountCaller.Invoke)
|
||||
}
|
||||
|
||||
+21
-19
@@ -16,33 +16,35 @@ package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"google.golang.org/grpc"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/protocol/third"
|
||||
"github.com/openimsdk/tools/a2r"
|
||||
"github.com/openimsdk/tools/errs"
|
||||
"github.com/openimsdk/tools/mcontext"
|
||||
)
|
||||
|
||||
type ThirdApi rpcclient.Third
|
||||
type ThirdApi struct {
|
||||
GrafanaUrl string
|
||||
}
|
||||
|
||||
func NewThirdApi(client rpcclient.Third) ThirdApi {
|
||||
return ThirdApi(client)
|
||||
func NewThirdApi(grafanaUrl string) ThirdApi {
|
||||
return ThirdApi{GrafanaUrl: grafanaUrl}
|
||||
}
|
||||
|
||||
func (o *ThirdApi) FcmUpdateToken(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.FcmUpdateToken, o.Client, c)
|
||||
a2r.CallV2(c, third.FcmUpdateTokenCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) SetAppBadge(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.SetAppBadge, o.Client, c)
|
||||
a2r.CallV2(c, third.SetAppBadgeCaller.Invoke)
|
||||
}
|
||||
|
||||
// #################### s3 ####################
|
||||
@@ -77,44 +79,44 @@ func setURLPrefix(c *gin.Context, urlPrefix *string) error {
|
||||
}
|
||||
|
||||
func (o *ThirdApi) PartLimit(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.PartLimit, o.Client, c)
|
||||
a2r.CallV2(c, third.PartLimitCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) PartSize(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.PartSize, o.Client, c)
|
||||
a2r.CallV2(c, third.PartSizeCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) InitiateMultipartUpload(c *gin.Context) {
|
||||
opt := setURLPrefixOption(third.ThirdClient.InitiateMultipartUpload, func(req *third.InitiateMultipartUploadReq) error {
|
||||
return setURLPrefix(c, &req.UrlPrefix)
|
||||
})
|
||||
a2r.Call(third.ThirdClient.InitiateMultipartUpload, o.Client, c, opt)
|
||||
a2r.CallV2(c, third.InitiateMultipartUploadCaller.Invoke, opt)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) AuthSign(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.AuthSign, o.Client, c)
|
||||
a2r.CallV2(c, third.AuthSignCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) CompleteMultipartUpload(c *gin.Context) {
|
||||
opt := setURLPrefixOption(third.ThirdClient.CompleteMultipartUpload, func(req *third.CompleteMultipartUploadReq) error {
|
||||
return setURLPrefix(c, &req.UrlPrefix)
|
||||
})
|
||||
a2r.Call(third.ThirdClient.CompleteMultipartUpload, o.Client, c, opt)
|
||||
a2r.CallV2(c, third.CompleteMultipartUploadCaller.Invoke, opt)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) AccessURL(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.AccessURL, o.Client, c)
|
||||
a2r.CallV2(c, third.AccessURLCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) InitiateFormData(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.InitiateFormData, o.Client, c)
|
||||
a2r.CallV2(c, third.InitiateFormDataCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) CompleteFormData(c *gin.Context) {
|
||||
opt := setURLPrefixOption(third.ThirdClient.CompleteFormData, func(req *third.CompleteFormDataReq) error {
|
||||
return setURLPrefix(c, &req.UrlPrefix)
|
||||
})
|
||||
a2r.Call(third.ThirdClient.CompleteFormData, o.Client, c, opt)
|
||||
a2r.CallV2(c, third.CompleteFormDataCaller.Invoke, opt)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) ObjectRedirect(c *gin.Context) {
|
||||
@@ -138,7 +140,7 @@ func (o *ThirdApi) ObjectRedirect(c *gin.Context) {
|
||||
}
|
||||
query[key] = values[0]
|
||||
}
|
||||
resp, err := o.Client.AccessURL(ctx, &third.AccessURLReq{Name: name, Query: query})
|
||||
resp, err := third.AccessURLCaller.Invoke(ctx, &third.AccessURLReq{Name: name, Query: query})
|
||||
if err != nil {
|
||||
if errs.ErrArgs.Is(err) {
|
||||
c.String(http.StatusBadRequest, err.Error())
|
||||
@@ -156,15 +158,15 @@ func (o *ThirdApi) ObjectRedirect(c *gin.Context) {
|
||||
|
||||
// #################### logs ####################.
|
||||
func (o *ThirdApi) UploadLogs(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.UploadLogs, o.Client, c)
|
||||
a2r.CallV2(c, third.UploadLogsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) DeleteLogs(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.DeleteLogs, o.Client, c)
|
||||
a2r.CallV2(c, third.DeleteLogsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) SearchLogs(c *gin.Context) {
|
||||
a2r.Call(third.ThirdClient.SearchLogs, o.Client, c)
|
||||
a2r.CallV2(c, third.SearchLogsCaller.Invoke)
|
||||
}
|
||||
|
||||
func (o *ThirdApi) GetPrometheus(c *gin.Context) {
|
||||
|
||||
+30
-24
@@ -16,52 +16,58 @@ package api
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||
"github.com/openimsdk/protocol/constant"
|
||||
"github.com/openimsdk/protocol/msggateway"
|
||||
"github.com/openimsdk/protocol/user"
|
||||
"github.com/openimsdk/tools/a2r"
|
||||
"github.com/openimsdk/tools/apiresp"
|
||||
"github.com/openimsdk/tools/discovery"
|
||||
"github.com/openimsdk/tools/errs"
|
||||
"github.com/openimsdk/tools/log"
|
||||
)
|
||||
|
||||
type UserApi rpcclient.User
|
||||
type UserApi struct {
|
||||
Discov discovery.SvcDiscoveryRegistry
|
||||
MessageGateWayRpcName string
|
||||
}
|
||||
|
||||
func NewUserApi(client rpcclient.User) UserApi {
|
||||
return UserApi(client)
|
||||
func NewUserApi(discov discovery.SvcDiscoveryRegistry, messageGateWayRpcName string) UserApi {
|
||||
return UserApi{
|
||||
Discov: discov,
|
||||
MessageGateWayRpcName: messageGateWayRpcName,
|
||||
}
|
||||
}
|
||||
|
||||
func (u *UserApi) UserRegister(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.UserRegister, u.Client, c)
|
||||
a2r.CallV2(c, user.UserRegisterCaller.Invoke)
|
||||
}
|
||||
|
||||
// UpdateUserInfo is deprecated. Use UpdateUserInfoEx
|
||||
func (u *UserApi) UpdateUserInfo(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.UpdateUserInfo, u.Client, c)
|
||||
a2r.CallV2(c, user.UpdateUserInfoCaller.Invoke)
|
||||
}
|
||||
|
||||
func (u *UserApi) UpdateUserInfoEx(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.UpdateUserInfoEx, u.Client, c)
|
||||
a2r.CallV2(c, user.UpdateUserInfoExCaller.Invoke)
|
||||
}
|
||||
func (u *UserApi) SetGlobalRecvMessageOpt(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.SetGlobalRecvMessageOpt, u.Client, c)
|
||||
a2r.CallV2(c, user.SetGlobalRecvMessageOptCaller.Invoke)
|
||||
}
|
||||
|
||||
func (u *UserApi) GetUsersPublicInfo(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.GetDesignateUsers, u.Client, c)
|
||||
a2r.CallV2(c, user.GetDesignateUsersCaller.Invoke)
|
||||
}
|
||||
|
||||
func (u *UserApi) GetAllUsersID(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.GetAllUserID, u.Client, c)
|
||||
a2r.CallV2(c, user.GetAllUserIDCaller.Invoke)
|
||||
}
|
||||
|
||||
func (u *UserApi) AccountCheck(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.AccountCheck, u.Client, c)
|
||||
a2r.CallV2(c, user.AccountCheckCaller.Invoke)
|
||||
}
|
||||
|
||||
func (u *UserApi) GetUsers(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.GetPaginationUsers, u.Client, c)
|
||||
a2r.CallV2(c, user.GetPaginationUsersCaller.Invoke)
|
||||
}
|
||||
|
||||
// GetUsersOnlineStatus Get user online status.
|
||||
@@ -122,7 +128,7 @@ func (u *UserApi) GetUsersOnlineStatus(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (u *UserApi) UserRegisterCount(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.UserRegisterCount, u.Client, c)
|
||||
a2r.CallV2(c, user.UserRegisterCountCaller.Invoke)
|
||||
}
|
||||
|
||||
// GetUsersOnlineTokenDetail Get user online token details.
|
||||
@@ -188,52 +194,52 @@ func (u *UserApi) GetUsersOnlineTokenDetail(c *gin.Context) {
|
||||
|
||||
// SubscriberStatus Presence status of subscribed users.
|
||||
func (u *UserApi) SubscriberStatus(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.SubscribeOrCancelUsersStatus, u.Client, c)
|
||||
a2r.CallV2(c, user.SubscribeOrCancelUsersStatusCaller.Invoke)
|
||||
}
|
||||
|
||||
// GetUserStatus Get the online status of the user.
|
||||
func (u *UserApi) GetUserStatus(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.GetUserStatus, u.Client, c)
|
||||
a2r.CallV2(c, user.GetUserStatusCaller.Invoke)
|
||||
}
|
||||
|
||||
// GetSubscribeUsersStatus Get the online status of subscribers.
|
||||
func (u *UserApi) GetSubscribeUsersStatus(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.GetSubscribeUsersStatus, u.Client, c)
|
||||
a2r.CallV2(c, user.GetSubscribeUsersStatusCaller.Invoke)
|
||||
}
|
||||
|
||||
// ProcessUserCommandAdd user general function add.
|
||||
func (u *UserApi) ProcessUserCommandAdd(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.ProcessUserCommandAdd, u.Client, c)
|
||||
a2r.CallV2(c, user.ProcessUserCommandAddCaller.Invoke)
|
||||
}
|
||||
|
||||
// ProcessUserCommandDelete user general function delete.
|
||||
func (u *UserApi) ProcessUserCommandDelete(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.ProcessUserCommandDelete, u.Client, c)
|
||||
a2r.CallV2(c, user.ProcessUserCommandDeleteCaller.Invoke)
|
||||
}
|
||||
|
||||
// ProcessUserCommandUpdate user general function update.
|
||||
func (u *UserApi) ProcessUserCommandUpdate(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.ProcessUserCommandUpdate, u.Client, c)
|
||||
a2r.CallV2(c, user.ProcessUserCommandUpdateCaller.Invoke)
|
||||
}
|
||||
|
||||
// ProcessUserCommandGet user general function get.
|
||||
func (u *UserApi) ProcessUserCommandGet(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.ProcessUserCommandGet, u.Client, c)
|
||||
a2r.CallV2(c, user.ProcessUserCommandGetCaller.Invoke)
|
||||
}
|
||||
|
||||
// ProcessUserCommandGet user general function get all.
|
||||
func (u *UserApi) ProcessUserCommandGetAll(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.ProcessUserCommandGetAll, u.Client, c)
|
||||
a2r.CallV2(c, user.ProcessUserCommandGetAllCaller.Invoke)
|
||||
}
|
||||
|
||||
func (u *UserApi) AddNotificationAccount(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.AddNotificationAccount, u.Client, c)
|
||||
a2r.CallV2(c, user.AddNotificationAccountCaller.Invoke)
|
||||
}
|
||||
|
||||
func (u *UserApi) UpdateNotificationAccountInfo(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.UpdateNotificationAccountInfo, u.Client, c)
|
||||
a2r.CallV2(c, user.UpdateNotificationAccountInfoCaller.Invoke)
|
||||
}
|
||||
|
||||
func (u *UserApi) SearchNotificationAccount(c *gin.Context) {
|
||||
a2r.Call(user.UserClient.SearchNotificationAccount, u.Client, c)
|
||||
a2r.CallV2(c, user.SearchNotificationAccountCaller.Invoke)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user