|
|
@ -43,7 +43,13 @@ func KickGroupMember(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "KickGroupMember args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "KickGroupMember args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
RpcResp, err := client.KickGroupMember(context.Background(), req)
|
|
|
|
RpcResp, err := client.KickGroupMember(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -88,7 +94,13 @@ func GetGroupMembersInfo(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
|
|
|
|
|
|
|
|
RpcResp, err := client.GetGroupMembersInfo(context.Background(), req)
|
|
|
|
RpcResp, err := client.GetGroupMembersInfo(context.Background(), req)
|
|
|
@ -126,7 +138,13 @@ func GetGroupMemberList(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupMemberList args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupMemberList args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
|
|
|
|
|
|
|
|
RpcResp, err := client.GetGroupMemberList(context.Background(), req)
|
|
|
|
RpcResp, err := client.GetGroupMemberList(context.Background(), req)
|
|
|
@ -165,7 +183,13 @@ func GetGroupAllMemberList(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupAllMember args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupAllMember args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
RpcResp, err := client.GetGroupAllMember(context.Background(), req)
|
|
|
|
RpcResp, err := client.GetGroupAllMember(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -202,7 +226,13 @@ func GetJoinedGroupList(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "GetJoinedGroupList args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "GetJoinedGroupList args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
RpcResp, err := client.GetJoinedGroupList(context.Background(), req)
|
|
|
|
RpcResp, err := client.GetJoinedGroupList(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -239,7 +269,13 @@ func InviteUserToGroup(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
RpcResp, err := client.InviteUserToGroup(context.Background(), req)
|
|
|
|
RpcResp, err := client.InviteUserToGroup(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -291,7 +327,13 @@ func CreateGroup(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "CreateGroup args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "CreateGroup args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
RpcResp, err := client.CreateGroup(context.Background(), req)
|
|
|
|
RpcResp, err := client.CreateGroup(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -328,7 +370,13 @@ func GetRecvGroupApplicationList(c *gin.Context) {
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupApplicationList args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupApplicationList args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
reply, err := client.GetGroupApplicationList(context.Background(), req)
|
|
|
|
reply, err := client.GetGroupApplicationList(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -359,7 +407,13 @@ func GetUserReqGroupApplicationList(c *gin.Context) {
|
|
|
|
// return
|
|
|
|
// return
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String())
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
RpcResp, err := client.GetUserReqApplicationList(context.Background(), req)
|
|
|
|
RpcResp, err := client.GetUserReqApplicationList(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -395,7 +449,13 @@ func GetGroupsInfo(c *gin.Context) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String())
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
RpcResp, err := client.GetGroupsInfo(context.Background(), req)
|
|
|
|
RpcResp, err := client.GetGroupsInfo(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -433,7 +493,13 @@ func ApplicationGroupResponse(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "ApplicationGroupResponse args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "ApplicationGroupResponse args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
reply, err := client.GroupApplicationResponse(context.Background(), req)
|
|
|
|
reply, err := client.GroupApplicationResponse(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -468,7 +534,13 @@ func JoinGroup(c *gin.Context) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "JoinGroup args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "JoinGroup args ", req.String())
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
|
|
|
|
|
|
|
|
RpcResp, err := client.JoinGroup(context.Background(), req)
|
|
|
|
RpcResp, err := client.JoinGroup(context.Background(), req)
|
|
|
@ -504,7 +576,13 @@ func QuitGroup(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "QuitGroup args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "QuitGroup args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
RpcResp, err := client.QuitGroup(context.Background(), req)
|
|
|
|
RpcResp, err := client.QuitGroup(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -540,7 +618,13 @@ func SetGroupInfo(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
RpcResp, err := client.SetGroupInfo(context.Background(), req)
|
|
|
|
RpcResp, err := client.SetGroupInfo(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -575,7 +659,13 @@ func TransferGroupOwner(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, "TransferGroupOwner args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "TransferGroupOwner args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
reply, err := client.TransferGroupOwner(context.Background(), req)
|
|
|
|
reply, err := client.TransferGroupOwner(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -611,7 +701,13 @@ func DismissGroup(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
reply, err := client.DismissGroup(context.Background(), req)
|
|
|
|
reply, err := client.DismissGroup(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -647,7 +743,13 @@ func MuteGroupMember(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
reply, err := client.MuteGroupMember(context.Background(), req)
|
|
|
|
reply, err := client.MuteGroupMember(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -683,7 +785,13 @@ func CancelMuteGroupMember(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
reply, err := client.CancelMuteGroupMember(context.Background(), req)
|
|
|
|
reply, err := client.CancelMuteGroupMember(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -719,7 +827,13 @@ func MuteGroup(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
reply, err := client.MuteGroup(context.Background(), req)
|
|
|
|
reply, err := client.MuteGroup(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -755,7 +869,13 @@ func CancelMuteGroup(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
reply, err := client.CancelMuteGroup(context.Background(), req)
|
|
|
|
reply, err := client.CancelMuteGroup(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -793,7 +913,13 @@ func SetGroupMemberNickname(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
reply, err := client.SetGroupMemberNickname(context.Background(), req)
|
|
|
|
reply, err := client.SetGroupMemberNickname(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
@ -846,7 +972,13 @@ func SetGroupMemberInfo(c *gin.Context) {
|
|
|
|
reqPb.RoleLevel = &wrappers.Int32Value{Value: *req.RoleLevel}
|
|
|
|
reqPb.RoleLevel = &wrappers.Int32Value{Value: *req.RoleLevel}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
|
|
|
|
|
|
|
if etcdConn == nil {
|
|
|
|
|
|
|
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, errMsg)
|
|
|
|
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
respPb, err := client.SetGroupMemberInfo(context.Background(), reqPb)
|
|
|
|
respPb, err := client.SetGroupMemberInfo(context.Background(), reqPb)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|