mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-06 10:05:58 +08:00
1
This commit is contained in:
+676
-676
File diff suppressed because it is too large
Load Diff
@@ -5,27 +5,53 @@ import (
|
||||
api "Open_IM/pkg/base_info"
|
||||
"Open_IM/pkg/common/config"
|
||||
rpc "Open_IM/pkg/proto/friend"
|
||||
"Open_IM/pkg/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// 不一致
|
||||
func AddBlacklist(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.AddBlacklistReq{}, &api.AddBlacklistResp{},
|
||||
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
|
||||
func AddBlack(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.AddBlacklistReq{}, &api.AddBlacklistResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func ImportFriend1(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.ImportFriendReq{}, &api.ImportFriendResp{},
|
||||
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
|
||||
func ImportFriend(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.ImportFriendReq{}, &api.ImportFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func AddFriend1(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.AddFriendReq{}, &api.AddFriendResp{},
|
||||
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
|
||||
func AddFriend(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.AddFriendReq{}, &api.AddFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func AddFriendResponse1(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.AddFriendResponseReq{}, &api.AddFriendResponseResp{},
|
||||
config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, utils.GetSelfFuncName())
|
||||
func AddFriendResponse(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.AddFriendResponseReq{}, &api.AddFriendResponseResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func DeleteFriend(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.DeleteFriendReq{}, &api.DeleteFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func GetBlacklist(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.GetBlackListReq{}, &api.GetBlackListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func SetFriendRemark(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.SetFriendRemarkReq{}, &api.SetFriendRemarkResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func RemoveBlacklist(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.RemoveBlacklistReq{}, &api.RemoveBlacklistResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func IsFriend(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.IsFriendReq{}, &api.IsFriendResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func GetFriendList(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.GetFriendListReq{}, &api.GetFriendListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func GetFriendApplyList(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.GetFriendApplyListReq{}, &api.GetFriendApplyListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
func GetSelfApplyList(c *gin.Context) {
|
||||
common.ApiToRpc(c, &api.GetSelfApplyListReq{}, &api.GetSelfApplyListResp{}, config.Config.RpcRegisterName.OpenImFriendName, rpc.NewFriendClient, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user