mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
# Conflicts: # go.mod # go.sum
This commit is contained in:
commit
0565474732
@ -1375,7 +1375,7 @@ const docTemplate = `{
|
||||
"群组相关"
|
||||
],
|
||||
"summary": "获取用户加入群列表",
|
||||
"operationId": "GetJoinedGroupList",
|
||||
"operationId": "FindJoinedGroup",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
@ -118,7 +118,7 @@ func main() {
|
||||
groupRouterGroup.POST("/get_user_req_group_applicationList", group.GetUserReqGroupApplicationList)
|
||||
groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1
|
||||
groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1
|
||||
// groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) //no use
|
||||
// groupRouterGroup.POST("/get_group_member_list", group.FindGroupMemberAll) //no use
|
||||
groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMemberList) //1
|
||||
groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) //1
|
||||
groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1
|
||||
@ -214,7 +214,7 @@ func main() {
|
||||
}
|
||||
//
|
||||
|
||||
go getcdv3.RegisterConf()
|
||||
go rpc.RegisterConf()
|
||||
go apiThird.MinioInit()
|
||||
defaultPorts := config.Config.Api.GinPort
|
||||
ginPort := flag.Int("port", defaultPorts[0], "get ginServerPort from cmd,default 10002 as port")
|
||||
|
84
go.mod
84
go.mod
@ -5,6 +5,7 @@ go 1.18
|
||||
require (
|
||||
firebase.google.com/go v3.13.0+incompatible
|
||||
github.com/OpenIMSDK/getcdv3 v1.0.4
|
||||
github.com/OpenIMSDK/openKeeper v0.9.8
|
||||
github.com/OpenIMSDK/open_utils v1.0.8
|
||||
github.com/Shopify/sarama v1.32.0
|
||||
github.com/alibabacloud-go/darabonba-openapi v0.1.11
|
||||
@ -50,7 +51,7 @@ require (
|
||||
golang.org/x/image v0.3.0
|
||||
golang.org/x/net v0.5.0
|
||||
google.golang.org/api v0.103.0
|
||||
google.golang.org/grpc v1.52.0
|
||||
google.golang.org/grpc v1.52.3
|
||||
google.golang.org/protobuf v1.28.1
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
|
||||
@ -60,93 +61,13 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.105.0 // indirect
|
||||
cloud.google.com/go/compute v1.13.0 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.1 // indirect
|
||||
cloud.google.com/go/firestore v1.9.0 // indirect
|
||||
cloud.google.com/go/iam v0.8.0 // indirect
|
||||
cloud.google.com/go/longrunning v0.3.0 // indirect
|
||||
cloud.google.com/go/storage v1.27.0 // indirect
|
||||
github.com/KyleBanks/depth v1.2.1 // indirect
|
||||
github.com/OpenIMSDK/open_log v1.0.0 // indirect
|
||||
github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect
|
||||
github.com/alibabacloud-go/endpoint-util v1.1.0 // indirect
|
||||
github.com/alibabacloud-go/openapi-util v0.0.9 // indirect
|
||||
github.com/alibabacloud-go/tea-utils v1.3.9 // indirect
|
||||
github.com/aliyun/credentials-go v1.1.2 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.14 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.15 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.8 // indirect
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.11.12 // indirect
|
||||
github.com/aws/smithy-go v1.12.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||
github.com/eapache/go-resiliency v1.2.0 // indirect
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
|
||||
github.com/eapache/queue v1.1.0 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.0 // indirect
|
||||
github.com/go-openapi/spec v0.20.6 // indirect
|
||||
github.com/go-openapi/swag v0.21.1 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.0 // indirect
|
||||
github.com/go-sql-driver/mysql v1.6.0 // indirect
|
||||
github.com/go-stack/stack v1.8.0 // indirect
|
||||
github.com/goccy/go-json v0.10.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
|
||||
github.com/golang/snappy v0.0.3 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.2 // indirect
|
||||
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
|
||||
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
|
||||
github.com/jcmturner/gofork v1.0.0 // indirect
|
||||
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
|
||||
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.13.6 // indirect
|
||||
github.com/klauspost/cpuid v1.3.1 // indirect
|
||||
github.com/leodido/go-urn v1.2.1 // indirect
|
||||
github.com/lestrrat-go/strftime v1.0.6 // indirect
|
||||
github.com/lithammer/shortuuid v3.0.0+incompatible // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/minio/md5-simd v1.1.0 // indirect
|
||||
github.com/minio/sha256-simd v0.1.1 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
|
||||
github.com/pierrec/lz4 v2.6.0+incompatible // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.37.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||
github.com/rs/xid v1.2.1 // indirect
|
||||
github.com/tjfoc/gmsm v1.3.2 // indirect
|
||||
github.com/ugorji/go/codec v1.2.8 // indirect
|
||||
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
|
||||
github.com/xdg-go/scram v1.0.2 // indirect
|
||||
github.com/xdg-go/stringprep v1.0.2 // indirect
|
||||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.6 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.6 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.9.0 // indirect
|
||||
go.uber.org/zap v1.24.0 // indirect
|
||||
@ -162,7 +83,6 @@ require (
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/ini.v1 v1.66.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/Shopify/sarama => github.com/Shopify/sarama v1.29.0
|
||||
|
@ -49,7 +49,7 @@ func UserRegister(c *gin.Context) {
|
||||
//copier.Copy(req.UserInfo, ¶ms)
|
||||
req.OperationID = params.OperationID
|
||||
log.NewInfo(req.OperationID, "UserRegister args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -120,7 +120,7 @@ func UserToken(c *gin.Context) {
|
||||
}
|
||||
req := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID, LoginIp: params.LoginIp}
|
||||
log.NewInfo(req.OperationID, "UserToken args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -213,7 +213,7 @@ func ForceLogout(c *gin.Context) {
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, "ForceLogout args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -32,7 +32,7 @@ func SetConversation(c *gin.Context) {
|
||||
if err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -69,7 +69,7 @@ func ModifyConversationField(c *gin.Context) {
|
||||
if err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -104,7 +104,7 @@ func BatchSetConversations(c *gin.Context) {
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -154,7 +154,7 @@ func GetAllConversations(c *gin.Context) {
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -204,7 +204,7 @@ func GetConversation(c *gin.Context) {
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -254,7 +254,7 @@ func GetConversations(c *gin.Context) {
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -292,7 +292,7 @@ func SetRecvMsgOpt(c *gin.Context) {
|
||||
if err := utils.CopyStructFields(&reqPb, req); err != nil {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -62,7 +62,7 @@ func KickGroupMember(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, "KickGroupMember args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -72,7 +72,7 @@ func KickGroupMember(c *gin.Context) {
|
||||
client := rpc.NewGroupClient(etcdConn)
|
||||
RpcResp, err := client.KickGroupMember(context.Background(), req)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupMemberList failed ", err.Error(), req.String())
|
||||
log.NewError(req.OperationID, "FindGroupMemberAll failed ", err.Error(), req.String())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
@ -125,7 +125,7 @@ func GetGroupMembersInfo(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -136,7 +136,7 @@ func GetGroupMembersInfo(c *gin.Context) {
|
||||
|
||||
RpcResp, err := client.GetGroupMembersInfo(context.Background(), req)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupMemberList failed ", err.Error(), req.String())
|
||||
log.NewError(req.OperationID, "FindGroupMemberAll failed ", err.Error(), req.String())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
@ -167,9 +167,9 @@ func GetGroupMemberList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, "GetGroupMemberList args ", req.String())
|
||||
log.NewInfo(req.OperationID, "FindGroupMemberAll args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -180,7 +180,7 @@ func GetGroupMemberList(c *gin.Context) {
|
||||
|
||||
RpcResp, err := client.GetGroupMemberList(context.Background(), req)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupMemberList failed, ", err.Error(), req.String())
|
||||
log.NewError(req.OperationID, "FindGroupMemberAll failed, ", err.Error(), req.String())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
@ -188,7 +188,7 @@ func GetGroupMemberList(c *gin.Context) {
|
||||
memberListResp := api.GetGroupMemberListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, MemberList: RpcResp.MemberList, NextSeq: RpcResp.NextSeq}
|
||||
memberListResp.Data = jsonData.JsonDataList(memberListResp.MemberList)
|
||||
|
||||
log.NewInfo(req.OperationID, "GetGroupMemberList api return ", memberListResp)
|
||||
log.NewInfo(req.OperationID, "FindGroupMemberAll api return ", memberListResp)
|
||||
c.JSON(http.StatusOK, memberListResp)
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ func GetGroupAllMemberList(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, "GetGroupAllMember args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -280,9 +280,9 @@ func GetJoinedGroupList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, "GetJoinedGroupList args ", req.String())
|
||||
log.NewInfo(req.OperationID, "FindJoinedGroup args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -292,14 +292,14 @@ func GetJoinedGroupList(c *gin.Context) {
|
||||
client := rpc.NewGroupClient(etcdConn)
|
||||
RpcResp, err := client.GetJoinedGroupList(context.Background(), req)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetJoinedGroupList failed ", err.Error(), req.String())
|
||||
log.NewError(req.OperationID, "FindJoinedGroup failed ", err.Error(), req.String())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, GroupInfoList: RpcResp.GroupList}
|
||||
GroupListResp.Data = jsonData.JsonDataList(GroupListResp.GroupInfoList)
|
||||
log.NewInfo(req.OperationID, "GetJoinedGroupList api return ", GroupListResp)
|
||||
log.NewInfo(req.OperationID, "FindJoinedGroup api return ", GroupListResp)
|
||||
c.JSON(http.StatusOK, GroupListResp)
|
||||
}
|
||||
|
||||
@ -343,7 +343,7 @@ func InviteUserToGroup(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -480,7 +480,7 @@ func GetRecvGroupApplicationList(c *gin.Context) {
|
||||
}
|
||||
log.NewInfo(req.OperationID, "GetGroupApplicationList args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -551,7 +551,7 @@ func GetGroupsInfo(c *gin.Context) {
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -621,7 +621,7 @@ func ApplicationGroupResponse(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, "ApplicationGroupResponse args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -674,7 +674,7 @@ func JoinGroup(c *gin.Context) {
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, "JoinGroup args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -728,7 +728,7 @@ func QuitGroup(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, "QuitGroup args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -855,7 +855,7 @@ func TransferGroupOwner(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, "TransferGroupOwner args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -909,7 +909,7 @@ func DismissGroup(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -963,7 +963,7 @@ func MuteGroupMember(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -1015,7 +1015,7 @@ func CancelMuteGroupMember(c *gin.Context) {
|
||||
//}
|
||||
tracelog.SetCtxInfo(nCtx, "ParseUserIDFromToken", nil, "token", c.Request.Header.Get("token"), "OpUserID", req.OpUserID)
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
|
||||
client := rpc.NewGroupClient(etcdConn)
|
||||
reply, err := client.CancelMuteGroupMember(nCtx, req)
|
||||
@ -1063,7 +1063,7 @@ func MuteGroup(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -1117,7 +1117,7 @@ func CancelMuteGroup(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -1161,7 +1161,7 @@ func SetGroupMemberNickname(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -1232,7 +1232,7 @@ func SetGroupMemberInfo(c *gin.Context) {
|
||||
reqPb.RoleLevel = &wrappers.Int32Value{Value: *req.RoleLevel}
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", reqPb.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -31,7 +31,7 @@ func GetJoinedSuperGroupList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
reqPb := rpc.GetJoinedSuperGroupListReq{OperationID: req.OperationID, OpUserID: opUserID, UserID: req.FromUserID}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -67,7 +67,7 @@ func GetSuperGroupsInfo(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
reqPb := rpc.GetSuperGroupsInfoReq{OperationID: req.OperationID, OpUserID: opUserID, GroupIDList: req.GroupIDList}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -206,7 +206,7 @@ func ManagementSendMsg(c *gin.Context) {
|
||||
pbData := newUserSendMsgReq(¶ms)
|
||||
log.Info(params.OperationID, "", "api ManagementSendMsg call start..., [data: %s]", pbData.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := params.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(params.OperationID, errMsg)
|
||||
@ -319,7 +319,7 @@ func ManagementBatchSendMsg(c *gin.Context) {
|
||||
}
|
||||
log.NewInfo(params.OperationID, "Ws call success to ManagementSendMsgReq", params)
|
||||
var msgSendFailedFlag bool
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := params.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(params.OperationID, errMsg)
|
||||
@ -402,7 +402,7 @@ func CheckMsgIsSendSuccess(c *gin.Context) {
|
||||
log.Error(c.PostForm("operationID"), "json unmarshal err", err.Error(), c.PostForm("content"))
|
||||
return
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -55,7 +55,7 @@ func GetAllUsersUid(c *gin.Context) {
|
||||
}
|
||||
|
||||
log.NewInfo(params.OperationID, "GetAllUsersUid args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -110,7 +110,7 @@ func AccountCheck(c *gin.Context) {
|
||||
}
|
||||
|
||||
log.NewInfo(params.OperationID, "AccountCheck args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -156,7 +156,7 @@ func GetUsersOnlineStatus(c *gin.Context) {
|
||||
var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
|
||||
var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
|
||||
flag := false
|
||||
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), params.OperationID)
|
||||
grpcCons := rpc.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), params.OperationID)
|
||||
for _, v := range grpcCons {
|
||||
client := pbRelay.NewRelayClient(v)
|
||||
reply, err := client.GetUsersOnlineStatus(context.Background(), req)
|
||||
|
@ -54,7 +54,7 @@ func DelMsg(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -131,7 +131,7 @@ func DelSuperGroupMsg(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
log.Info(req.OperationID, "", "api DelSuperGroupMsg call start..., [data: %s]", pbData.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -204,7 +204,7 @@ func ClearMsg(c *gin.Context) {
|
||||
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -252,7 +252,7 @@ func SetMsgMinSeq(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -41,7 +41,7 @@ func SetMessageReactionExtensions(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -90,7 +90,7 @@ func GetMessageListReactionExtensions(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -136,7 +136,7 @@ func AddMessageReactionExtensions(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -181,7 +181,7 @@ func DeleteMessageReactionExtensions(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := req.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -35,7 +35,7 @@ func GetSeq(c *gin.Context) {
|
||||
pbData := sdk_ws.GetMaxAndMinSeqReq{}
|
||||
pbData.UserID = params.SendID
|
||||
pbData.OperationID = params.OperationID
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, pbData.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, pbData.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := pbData.OperationID + " getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(pbData.OperationID, errMsg)
|
||||
|
@ -51,7 +51,7 @@ func PullMsgBySeqList(c *gin.Context) {
|
||||
pbData.OperationID = params.OperationID
|
||||
pbData.SeqList = params.SeqList
|
||||
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, pbData.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, pbData.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := pbData.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(pbData.OperationID, errMsg)
|
||||
|
@ -71,7 +71,7 @@ func SendMsg(c *gin.Context) {
|
||||
pbData := newUserSendMsgReq(token, ¶ms)
|
||||
log.Info(params.OperationID, "", "api SendMsg call start..., [data: %s]", pbData.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, params.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := params.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(params.OperationID, errMsg)
|
||||
|
@ -54,7 +54,7 @@ func GetUserTags(c *gin.Context) {
|
||||
|
||||
reqPb.UserID = userID
|
||||
reqPb.OperationID = req.OperationID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -119,7 +119,7 @@ func CreateTag(c *gin.Context) {
|
||||
}
|
||||
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -179,7 +179,7 @@ func DeleteTag(c *gin.Context) {
|
||||
}
|
||||
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -239,7 +239,7 @@ func SetTag(c *gin.Context) {
|
||||
}
|
||||
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -299,7 +299,7 @@ func SendMsg2Tag(c *gin.Context) {
|
||||
}
|
||||
|
||||
reqPb.SendID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -361,7 +361,7 @@ func GetTagSendLogs(c *gin.Context) {
|
||||
PageNumber: req.PageNumber,
|
||||
ShowNumber: req.ShowNumber,
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -428,7 +428,7 @@ func GetUserTagByID(c *gin.Context) {
|
||||
reqPb.UserID = userID
|
||||
reqPb.OperationID = req.OperationID
|
||||
reqPb.TagID = req.TagID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -56,7 +56,7 @@ func CreateOneWorkMoment(c *gin.Context) {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.WorkMoment.UserID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -120,7 +120,7 @@ func DeleteOneWorkMoment(c *gin.Context) {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -183,7 +183,7 @@ func LikeOneWorkMoment(c *gin.Context) {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -245,7 +245,7 @@ func CommentOneWorkMoment(c *gin.Context) {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -305,7 +305,7 @@ func DeleteComment(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -366,7 +366,7 @@ func GetWorkMomentByID(c *gin.Context) {
|
||||
reqPb.OperationID = req.OperationID
|
||||
reqPb.OpUserID = userID
|
||||
reqPb.WorkMomentID = req.WorkMomentID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -436,7 +436,7 @@ func GetUserWorkMoments(c *gin.Context) {
|
||||
}
|
||||
reqPb.OpUserID = opUserID
|
||||
reqPb.UserID = req.UserID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -548,7 +548,7 @@ func GetUserFriendWorkMoments(c *gin.Context) {
|
||||
ShowNumber: req.ShowNumber,
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -649,7 +649,7 @@ func SetUserWorkMomentsLevel(c *gin.Context) {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -39,7 +39,7 @@ func GetUsersInfoFromCache(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -87,7 +87,7 @@ func GetFriendIDListFromCache(c *gin.Context) {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -129,7 +129,7 @@ func GetBlackIDListFromCache(c *gin.Context) {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||
return
|
||||
}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -182,7 +182,7 @@ func GetUsersPublicInfo(c *gin.Context) {
|
||||
|
||||
log.NewInfo(params.OperationID, "GetUserInfo args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -240,7 +240,7 @@ func UpdateUserInfo(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
log.NewInfo(params.OperationID, "UpdateUserInfo args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -291,7 +291,7 @@ func SetGlobalRecvMessageOpt(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
log.NewInfo(params.OperationID, "SetGlobalRecvMessageOpt args ", req.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -347,7 +347,7 @@ func GetSelfUserInfo(c *gin.Context) {
|
||||
req.UserIDList = append(req.UserIDList, params.UserID)
|
||||
log.NewInfo(params.OperationID, "GetUserInfo args ", req.String())
|
||||
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -416,7 +416,7 @@ func GetUsersOnlineStatus(c *gin.Context) {
|
||||
var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
|
||||
var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult
|
||||
flag := false
|
||||
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), params.OperationID)
|
||||
grpcCons := rpc.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), params.OperationID)
|
||||
for _, v := range grpcCons {
|
||||
log.Debug(params.OperationID, "get node ", *v, v.Target())
|
||||
client := pbRelay.NewRelayClient(v)
|
||||
@ -484,7 +484,7 @@ func GetUsers(c *gin.Context) {
|
||||
reqPb.UserName = req.UserName
|
||||
reqPb.Content = req.Content
|
||||
reqPb.Pagination = &open_im_sdk.RequestPagination{ShowNumber: req.ShowNumber, PageNumber: req.PageNumber}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
|
@ -27,7 +27,7 @@ func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, rpcCl
|
||||
return
|
||||
}
|
||||
tracelog.SetCtxInfo(ctx, logFuncName, nil, "apiReq", apiReq)
|
||||
etcdConn, err := getcdv3.GetConn(ctx, rpcName)
|
||||
etcdConn, err := rpc.GetConn(ctx, rpcName)
|
||||
if err != nil {
|
||||
WriteErrorResponse(ctx, "GetConn", err)
|
||||
return
|
||||
|
@ -73,7 +73,7 @@ func GetUserToken(c *gin.Context) {
|
||||
reqPb.OperationID = req.OperationID
|
||||
reqPb.UserID = req.UserID
|
||||
reqPb.PlatformID = req.PlatFormID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
@ -107,7 +107,7 @@ func AdminLogin(c *gin.Context) {
|
||||
reqPb.Secret = req.Secret
|
||||
reqPb.AdminID = req.AdminName
|
||||
reqPb.OperationID = utils.OperationIDGenerator()
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
|
@ -29,7 +29,7 @@ func GetUserFriends(c *gin.Context) {
|
||||
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
reqPb.Pagination = &pbCommon.RequestPagination{}
|
||||
utils.CopyStructFields(&reqPb.Pagination, req)
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
|
@ -31,7 +31,7 @@ func GetGroups(c *gin.Context) {
|
||||
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
reqPb.Pagination = &commonPb.RequestPagination{}
|
||||
utils.CopyStructFields(&reqPb.Pagination, req)
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
@ -80,7 +80,7 @@ func GetGroupMembers(c *gin.Context) {
|
||||
}
|
||||
reqPb.GroupID = req.GroupID
|
||||
reqPb.UserName = req.UserName
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
|
@ -32,7 +32,7 @@ func GetChatLogs(c *gin.Context) {
|
||||
}
|
||||
utils.CopyStructFields(&reqPb, &req)
|
||||
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
|
@ -30,7 +30,7 @@ func GetMessagesStatistics(c *gin.Context) {
|
||||
reqPb.OperationID = utils.OperationIDGenerator()
|
||||
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
utils.CopyStructFields(&reqPb.StatisticsReq, &req)
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
@ -86,7 +86,7 @@ func GetUserStatistics(c *gin.Context) {
|
||||
reqPb.OperationID = utils.OperationIDGenerator()
|
||||
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
utils.CopyStructFields(&reqPb.StatisticsReq, &req)
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
@ -151,7 +151,7 @@ func GetGroupStatistics(c *gin.Context) {
|
||||
reqPb.OperationID = utils.OperationIDGenerator()
|
||||
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
utils.CopyStructFields(&reqPb.StatisticsReq, &req)
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
@ -210,7 +210,7 @@ func GetActiveUser(c *gin.Context) {
|
||||
reqPb.OperationID = utils.OperationIDGenerator()
|
||||
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
utils.CopyStructFields(&reqPb.StatisticsReq, req)
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
@ -246,7 +246,7 @@ func GetActiveGroup(c *gin.Context) {
|
||||
reqPb.OperationID = utils.OperationIDGenerator()
|
||||
log.NewInfo(reqPb.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
utils.CopyStructFields(&reqPb.StatisticsReq, req)
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
|
@ -33,7 +33,7 @@ func GetUserIDByEmailAndPhoneNumber(c *gin.Context) {
|
||||
reqPb.OperationID = req.OperationID
|
||||
reqPb.Email = req.Email
|
||||
reqPb.PhoneNumber = req.PhoneNumber
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAdminCMSName, reqPb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := reqPb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(reqPb.OperationID, errMsg)
|
||||
|
@ -32,7 +32,7 @@ func ImportFriendRoutine() {
|
||||
return
|
||||
}
|
||||
req.FriendUserIDList = friendUserIDList
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -89,7 +89,7 @@ func (r *RPCServer) GetSingleUserMsg(operationID string, currentMsgSeq uint32, u
|
||||
rpcReq.SeqList = seqList
|
||||
rpcReq.UserID = userID
|
||||
rpcReq.OperationID = operationID
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, rpcReq.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, rpcReq.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(rpcReq.OperationID, errMsg)
|
||||
|
@ -87,7 +87,7 @@ func (ws *WServer) getSeqReq(conn *UserConn, m *Req) {
|
||||
rpcReq.UserID = m.SendID
|
||||
rpcReq.OperationID = m.OperationID
|
||||
log.Debug(m.OperationID, "Ws call success to getMaxAndMinSeq", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(sdk_ws.GetMaxAndMinSeqReq).GroupIDList)
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, rpcReq.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, rpcReq.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := rpcReq.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
nReply.ErrCode = 500
|
||||
@ -142,7 +142,7 @@ func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) {
|
||||
rpcReq.OperationID = m.OperationID
|
||||
rpcReq.GroupSeqList = data.(sdk_ws.PullMessageBySeqListReq).GroupSeqList
|
||||
log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq middle", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(sdk_ws.PullMessageBySeqListReq).SeqList)
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := rpcReq.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
nReply.ErrCode = 500
|
||||
@ -191,7 +191,7 @@ func (ws *WServer) userLogoutReq(conn *UserConn, m *Req) {
|
||||
rpcReq.UserID = m.SendID
|
||||
rpcReq.PlatformID = conn.PlatformID
|
||||
rpcReq.OperationID = m.OperationID
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName, m.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName, m.OperationID)
|
||||
if grpcConn == nil {
|
||||
errMsg := rpcReq.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(rpcReq.OperationID, errMsg)
|
||||
@ -236,7 +236,7 @@ func (ws *WServer) sendMsgReq(conn *UserConn, m *Req) {
|
||||
MsgData: &data,
|
||||
}
|
||||
log.NewInfo(m.OperationID, "Ws call success to sendMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, data.String())
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := m.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
nReply.ErrCode = 500
|
||||
@ -288,7 +288,7 @@ func (ws *WServer) sendSignalMsgReq(conn *UserConn, m *Req) {
|
||||
isPass, errCode, errMsg, pData := ws.argsValidate(m, constant.WSSendSignalMsg, m.OperationID)
|
||||
if isPass {
|
||||
signalResp := pbRtc.SignalResp{}
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRealTimeCommName, m.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRealTimeCommName, m.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := m.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(m.OperationID, errMsg)
|
||||
@ -318,7 +318,7 @@ func (ws *WServer) sendSignalMsgReq(conn *UserConn, m *Req) {
|
||||
}
|
||||
log.NewInfo(m.OperationID, utils.GetSelfFuncName(), "pbData: ", pbData)
|
||||
log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, msgData)
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, m.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := m.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(m.OperationID, errMsg)
|
||||
|
@ -88,12 +88,12 @@ func (r *RPCServer) run() {
|
||||
log.Error("", "GetLocalIP failed ", err.Error())
|
||||
}
|
||||
}
|
||||
err = getcdv3.RegisterEtcd4Unique(r.etcdSchema, strings.Join(r.etcdAddr, ","), rpcRegisterIP, r.rpcPort, r.rpcRegisterName, 10)
|
||||
err = rpc.RegisterEtcd4Unique(r.etcdSchema, strings.Join(r.etcdAddr, ","), rpcRegisterIP, r.rpcPort, r.rpcRegisterName, 10)
|
||||
if err != nil {
|
||||
log.Error("", "register push message rpc to etcd err", "", "err", err.Error(), r.etcdSchema, strings.Join(r.etcdAddr, ","), rpcRegisterIP, r.rpcPort, r.rpcRegisterName)
|
||||
panic(utils.Wrap(err, "register msg_gataway module rpc to etcd err"))
|
||||
}
|
||||
r.target = getcdv3.GetTarget(r.etcdSchema, rpcRegisterIP, r.rpcPort, r.rpcRegisterName)
|
||||
r.target = rpc.GetTarget(r.etcdSchema, rpcRegisterIP, r.rpcPort, r.rpcRegisterName)
|
||||
err = srv.Serve(listener)
|
||||
if err != nil {
|
||||
log.Error("", "push message rpc listening err", "", "err", err.Error())
|
||||
|
@ -160,7 +160,7 @@ func (ws *WServer) SetWriteTimeoutWriteMsg(conn *UserConn, a int, msg []byte, ti
|
||||
}
|
||||
|
||||
func (ws *WServer) MultiTerminalLoginRemoteChecker(userID string, platformID int32, token string, operationID string) {
|
||||
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
|
||||
grpcCons := rpc.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
|
||||
log.NewInfo(operationID, utils.GetSelfFuncName(), "args grpcCons: ", userID, platformID, grpcCons)
|
||||
for _, v := range grpcCons {
|
||||
if v.Target() == rpcSvr.target {
|
||||
|
@ -524,7 +524,7 @@ func sendMessageToPush(message *pbMsg.MsgDataToMQ, pushToUserID string) {
|
||||
log.Info(message.OperationID, "msg_transfer send message to push", "message", message.String())
|
||||
rpcPushMsg := pbPush.PushMsgReq{OperationID: message.OperationID, MsgData: message.MsgData, PushToUserID: pushToUserID}
|
||||
mqPushMsg := pbMsg.PushMsgDataToMQ{OperationID: message.OperationID, MsgData: message.MsgData, PushToUserID: pushToUserID}
|
||||
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName, message.OperationID)
|
||||
grpcConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName, message.OperationID)
|
||||
if grpcConn != nil {
|
||||
log.Error(rpcPushMsg.OperationID, "rpc dial failed", "push data", rpcPushMsg.String())
|
||||
pid, offset, err := producer.SendMessage(&mqPushMsg, mqPushMsg.PushToUserID, rpcPushMsg.OperationID)
|
||||
|
@ -16,12 +16,12 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
JPushClient = newGetuiClient()
|
||||
JPushClient = newJPushClient()
|
||||
}
|
||||
|
||||
type JPush struct{}
|
||||
|
||||
func newGetuiClient() *JPush {
|
||||
func newJPushClient() *JPush {
|
||||
return &JPush{}
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ func (r *RPCServer) run() {
|
||||
}
|
||||
}
|
||||
|
||||
err = getcdv3.RegisterEtcd(r.etcdSchema, strings.Join(r.etcdAddr, ","), rpcRegisterIP, r.rpcPort, r.rpcRegisterName, 10)
|
||||
err = rpc.RegisterEtcd(r.etcdSchema, strings.Join(r.etcdAddr, ","), rpcRegisterIP, r.rpcPort, r.rpcRegisterName, 10)
|
||||
if err != nil {
|
||||
log.Error("", "register push module rpc to etcd err", err.Error(), r.etcdSchema, strings.Join(r.etcdAddr, ","), rpcRegisterIP, r.rpcPort, r.rpcRegisterName)
|
||||
panic(utils.Wrap(err, "register push module rpc to etcd err"))
|
||||
|
@ -43,7 +43,7 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
||||
var wsResult []*pbRelay.SingelMsgToUserResultList
|
||||
isOfflinePush := utils.GetSwitchFromOptions(pushMsg.MsgData.Options, constant.IsOfflinePush)
|
||||
log.Debug(pushMsg.OperationID, "Get msg from msg_transfer And push msg", pushMsg.String())
|
||||
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), pushMsg.OperationID)
|
||||
grpcCons := rpc.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), pushMsg.OperationID)
|
||||
|
||||
var UIDList = []string{pushMsg.PushToUserID}
|
||||
callbackResp := callbackOnlinePush(pushMsg.OperationID, UIDList, pushMsg.MsgData)
|
||||
@ -179,7 +179,7 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
|
||||
pushToUserIDList = userIDList
|
||||
}
|
||||
|
||||
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), pushMsg.OperationID)
|
||||
grpcCons := rpc.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), pushMsg.OperationID)
|
||||
|
||||
//Online push message
|
||||
log.Debug(pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
|
||||
|
@ -99,7 +99,7 @@ func (s *adminCMSServer) Run() {
|
||||
}
|
||||
}
|
||||
log.NewInfo("", "rpcRegisterIP ", rpcRegisterIP)
|
||||
err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10, "")
|
||||
err = rpc.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10, "")
|
||||
if err != nil {
|
||||
log.NewError("0", "RegisterEtcd failed ", err.Error())
|
||||
panic(utils.Wrap(err, "register admin module rpc to etcd err"))
|
||||
@ -207,7 +207,7 @@ func (s *adminCMSServer) GetChatLogs(ctx context.Context, req *pbAdminCMS.GetCha
|
||||
pbChatLog.SenderNickname = recvUser.Nickname
|
||||
|
||||
case constant.GroupChatType, constant.SuperGroupChatType:
|
||||
group, err := s.groupInterface.TakeGroupByID(ctx, chatLog.RecvID)
|
||||
group, err := s.groupInterface.TakeGroup(ctx, chatLog.RecvID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ func (s *rpcAuth) ForceLogout(ctx context.Context, req *pbAuth.ForceLogoutReq) (
|
||||
}
|
||||
|
||||
func (s *rpcAuth) forceKickOff(ctx context.Context, userID string, platformID int32, operationID string) error {
|
||||
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
|
||||
grpcCons := rpc.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
|
||||
for _, v := range grpcCons {
|
||||
client := pbRelay.NewRelayClient(v)
|
||||
kickReq := &pbRelay.KickUserOfflineReq{OperationID: operationID, KickUserIDList: []string{userID}, PlatformID: platformID}
|
||||
@ -157,7 +157,7 @@ func (s *rpcAuth) Run() {
|
||||
}
|
||||
log.NewInfo("", "rpcRegisterIP", rpcRegisterIP)
|
||||
|
||||
err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10, "")
|
||||
err = rpc.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10, "")
|
||||
if err != nil {
|
||||
log.NewError(operationID, "RegisterEtcd failed ", err.Error(),
|
||||
s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName)
|
||||
|
@ -117,7 +117,7 @@ func (c *conversationServer) Run() {
|
||||
}
|
||||
}
|
||||
log.NewInfo("", "rpcRegisterIP", rpcRegisterIP)
|
||||
err = getcdv3.RegisterEtcd(c.etcdSchema, strings.Join(c.etcdAddr, ","), rpcRegisterIP, c.rpcPort, c.rpcRegisterName, 10, "")
|
||||
err = rpc.RegisterEtcd(c.etcdSchema, strings.Join(c.etcdAddr, ","), rpcRegisterIP, c.rpcPort, c.rpcRegisterName, 10, "")
|
||||
if err != nil {
|
||||
log.NewError("0", "RegisterEtcd failed ", err.Error(),
|
||||
c.etcdSchema, strings.Join(c.etcdAddr, ","), rpcRegisterIP, c.rpcPort, c.rpcRegisterName)
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
cbApi "Open_IM/pkg/callback_struct"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
relation "Open_IM/pkg/common/db/mysql"
|
||||
"Open_IM/pkg/common/db/table/relation"
|
||||
"Open_IM/pkg/common/http"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/common/tracelog"
|
||||
@ -77,7 +77,7 @@ func callbackBeforeCreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq)
|
||||
return err
|
||||
}
|
||||
|
||||
func CallbackBeforeMemberJoinGroup(ctx context.Context, operationID string, groupMember *relation.GroupMember, groupEx string) (err error) {
|
||||
func CallbackBeforeMemberJoinGroup(ctx context.Context, operationID string, groupMember *relation.GroupMemberModel, groupEx string) (err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxInfo(ctx, utils.GetFuncName(1), err, "groupMember", *groupMember, "groupEx", groupEx)
|
||||
}()
|
||||
|
@ -1 +1,119 @@
|
||||
package group
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/db/table/relation"
|
||||
pbGroup "Open_IM/pkg/proto/group"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"time"
|
||||
)
|
||||
|
||||
func DbToPbGroupInfo(m *relation.GroupModel, ownerUserID string, memberCount uint32) *open_im_sdk.GroupInfo {
|
||||
return &open_im_sdk.GroupInfo{
|
||||
GroupID: m.GroupID,
|
||||
GroupName: m.GroupName,
|
||||
Notification: m.Notification,
|
||||
Introduction: m.Introduction,
|
||||
FaceURL: m.FaceURL,
|
||||
OwnerUserID: ownerUserID,
|
||||
CreateTime: m.CreateTime.UnixMilli(),
|
||||
MemberCount: memberCount,
|
||||
Ex: m.Ex,
|
||||
Status: m.Status,
|
||||
CreatorUserID: m.CreatorUserID,
|
||||
GroupType: m.GroupType,
|
||||
NeedVerification: m.NeedVerification,
|
||||
LookMemberInfo: m.LookMemberInfo,
|
||||
ApplyMemberFriend: m.ApplyMemberFriend,
|
||||
NotificationUpdateTime: m.NotificationUpdateTime.UnixMilli(),
|
||||
NotificationUserID: m.NotificationUserID,
|
||||
}
|
||||
}
|
||||
|
||||
func PbToDbGroupRequest(req *pbGroup.GroupApplicationResponseReq, handleUserID string) *relation.GroupRequestModel {
|
||||
return &relation.GroupRequestModel{
|
||||
UserID: req.FromUserID,
|
||||
GroupID: req.GroupID,
|
||||
HandleResult: req.HandleResult,
|
||||
HandledMsg: req.HandledMsg,
|
||||
HandleUserID: handleUserID,
|
||||
HandledTime: time.Now(),
|
||||
}
|
||||
}
|
||||
|
||||
func DbToPbCMSGroup(m *relation.GroupModel, ownerUserID string, ownerUserName string, memberCount uint32) *pbGroup.CMSGroup {
|
||||
return &pbGroup.CMSGroup{
|
||||
GroupInfo: DbToPbGroupInfo(m, ownerUserID, memberCount),
|
||||
GroupOwnerUserID: ownerUserID,
|
||||
GroupOwnerUserName: ownerUserName,
|
||||
}
|
||||
}
|
||||
|
||||
func DbToPbGroupMembersCMSResp(m *relation.GroupMemberModel) *open_im_sdk.GroupMemberFullInfo {
|
||||
return &open_im_sdk.GroupMemberFullInfo{
|
||||
GroupID: m.GroupID,
|
||||
UserID: m.UserID,
|
||||
RoleLevel: m.RoleLevel,
|
||||
JoinTime: m.JoinTime.UnixMilli(),
|
||||
Nickname: m.Nickname,
|
||||
FaceURL: m.FaceURL,
|
||||
//AppMangerLevel: m.AppMangerLevel,
|
||||
JoinSource: m.JoinSource,
|
||||
OperatorUserID: m.OperatorUserID,
|
||||
Ex: m.Ex,
|
||||
MuteEndTime: m.MuteEndTime.UnixMilli(),
|
||||
InviterUserID: m.InviterUserID,
|
||||
}
|
||||
}
|
||||
|
||||
func DbToPbGroupRequest(m *relation.GroupRequestModel, user *open_im_sdk.PublicUserInfo, group *open_im_sdk.GroupInfo) *open_im_sdk.GroupRequest {
|
||||
return &open_im_sdk.GroupRequest{
|
||||
UserInfo: user,
|
||||
GroupInfo: group,
|
||||
HandleResult: m.HandleResult,
|
||||
ReqMsg: m.ReqMsg,
|
||||
HandleMsg: m.HandledMsg,
|
||||
ReqTime: m.ReqTime.UnixMilli(),
|
||||
HandleUserID: m.HandleUserID,
|
||||
HandleTime: m.HandledTime.UnixMilli(),
|
||||
Ex: m.Ex,
|
||||
JoinSource: m.JoinSource,
|
||||
InviterUserID: m.InviterUserID,
|
||||
}
|
||||
}
|
||||
|
||||
func DbToPbGroupAbstractInfo(groupID string, groupMemberNumber int32, groupMemberListHash uint64) *pbGroup.GroupAbstractInfo {
|
||||
return &pbGroup.GroupAbstractInfo{
|
||||
GroupID: groupID,
|
||||
GroupMemberNumber: groupMemberNumber,
|
||||
GroupMemberListHash: groupMemberListHash,
|
||||
}
|
||||
}
|
||||
|
||||
func PbToDBGroupInfo(m *open_im_sdk.GroupInfo) *relation.GroupModel {
|
||||
return &relation.GroupModel{
|
||||
GroupID: m.GroupID,
|
||||
GroupName: m.GroupName,
|
||||
Notification: m.Notification,
|
||||
Introduction: m.Introduction,
|
||||
FaceURL: m.FaceURL,
|
||||
CreateTime: time.Now(),
|
||||
Ex: m.Ex,
|
||||
Status: m.Status,
|
||||
CreatorUserID: m.CreatorUserID,
|
||||
GroupType: m.GroupType,
|
||||
NeedVerification: m.NeedVerification,
|
||||
LookMemberInfo: m.LookMemberInfo,
|
||||
ApplyMemberFriend: m.ApplyMemberFriend,
|
||||
NotificationUpdateTime: time.UnixMilli(m.NotificationUpdateTime),
|
||||
NotificationUserID: m.NotificationUserID,
|
||||
}
|
||||
}
|
||||
|
||||
func PbToDbGroupMember(m *open_im_sdk.UserInfo) *relation.GroupMemberModel {
|
||||
return &relation.GroupMemberModel{
|
||||
UserID: m.UserID,
|
||||
Nickname: m.Nickname,
|
||||
FaceURL: m.FaceURL,
|
||||
Ex: m.Ex,
|
||||
}
|
||||
}
|
||||
|
62
internal/rpc/group/db_map.go
Normal file
62
internal/rpc/group/db_map.go
Normal file
@ -0,0 +1,62 @@
|
||||
package group
|
||||
|
||||
import (
|
||||
pbGroup "Open_IM/pkg/proto/group"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"time"
|
||||
)
|
||||
|
||||
func UpdateGroupInfoMap(group *open_im_sdk.GroupInfoForSet) map[string]any {
|
||||
m := make(map[string]any)
|
||||
if group.GroupName != "" {
|
||||
m["group_name"] = group.GroupName
|
||||
}
|
||||
if group.Notification != "" {
|
||||
m["notification"] = group.Notification
|
||||
}
|
||||
if group.Introduction != "" {
|
||||
m["introduction"] = group.Introduction
|
||||
}
|
||||
if group.FaceURL != "" {
|
||||
m["face_url"] = group.FaceURL
|
||||
}
|
||||
if group.NeedVerification != nil {
|
||||
m["need_verification"] = group.NeedVerification.Value
|
||||
}
|
||||
if group.LookMemberInfo != nil {
|
||||
m["look_member_info"] = group.LookMemberInfo.Value
|
||||
}
|
||||
if group.ApplyMemberFriend != nil {
|
||||
m["apply_member_friend"] = group.ApplyMemberFriend.Value
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
func UpdateGroupStatusMap(status int) map[string]any {
|
||||
return map[string]any{
|
||||
"status": status,
|
||||
}
|
||||
}
|
||||
|
||||
func UpdateGroupMemberMutedTimeMap(t time.Time) map[string]any {
|
||||
return map[string]any{
|
||||
"mute_end_time": t,
|
||||
}
|
||||
}
|
||||
|
||||
func UpdateGroupMemberMap(req *pbGroup.SetGroupMemberInfoReq) map[string]any {
|
||||
m := make(map[string]any)
|
||||
if req.Nickname != nil {
|
||||
m["nickname"] = req.Nickname.Value
|
||||
}
|
||||
if req.FaceURL != nil {
|
||||
m["face_url"] = req.FaceURL.Value
|
||||
}
|
||||
if req.RoleLevel != nil {
|
||||
m["role_level"] = req.RoleLevel.Value
|
||||
}
|
||||
if req.Ex != nil {
|
||||
m["ex"] = req.Ex.Value
|
||||
}
|
||||
return m
|
||||
}
|
@ -1,56 +1,66 @@
|
||||
package group
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/tracelog"
|
||||
pbConversation "Open_IM/pkg/proto/conversation"
|
||||
sdk_ws "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"errors"
|
||||
"math/big"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
//func getDBGroupRequest(ctx context.Context, req *pbGroup.GroupApplicationResponseReq) (dbGroupRequest *relation.GroupRequest) {
|
||||
// dbGroupRequest = &relation.GroupRequest{}
|
||||
// utils.CopyStructFields(&dbGroupRequest, req)
|
||||
// dbGroupRequest.UserID = req.FromUserID
|
||||
// dbGroupRequest.HandleUserID = utils.OpUserID(ctx)
|
||||
// dbGroupRequest.HandledTime = time.Now()
|
||||
// return dbGroupRequest
|
||||
//}
|
||||
//
|
||||
//func getDBGroupMember(ctx context.Context, groupID, userID string) (dbGroupMember *relation.GroupMember, err error) {
|
||||
// dbGroupMember = &relation.GroupMember{}
|
||||
//
|
||||
// member := relation.GroupMember{}
|
||||
// member.GroupID = groupID
|
||||
// member.UserID = userID
|
||||
// member.RoleLevel = constant.GroupOrdinaryUsers
|
||||
// member.OperatorUserID = utils.OpUserID(ctx)
|
||||
//
|
||||
// member.FaceURL = user.FaceURL
|
||||
// member.Nickname = user.Nickname
|
||||
// member.JoinSource = request.JoinSource
|
||||
// member.InviterUserID = request.InviterUserID
|
||||
// member.MuteEndTime = time.Unix(int64(time.Now().Second()), 0)
|
||||
//
|
||||
// return dbGroupMember, nil
|
||||
//}
|
||||
|
||||
func getUsersInfo(ctx context.Context, userIDs []string) ([]*sdk_ws.UserInfo, error) {
|
||||
return nil, nil
|
||||
func GetPublicUserInfoOne(ctx context.Context, userID string) (*sdk_ws.PublicUserInfo, error) {
|
||||
return nil, errors.New("todo")
|
||||
}
|
||||
|
||||
func getUserMap(ctx context.Context, userIDs []string) (map[string]*sdk_ws.UserInfo, error) {
|
||||
users, err := getUsersInfo(ctx, userIDs)
|
||||
func GetUsersInfo(ctx context.Context, userIDs []string) ([]*sdk_ws.UserInfo, error) {
|
||||
return nil, errors.New("todo")
|
||||
}
|
||||
|
||||
func GetUserInfoMap(ctx context.Context, userIDs []string) (map[string]*sdk_ws.UserInfo, error) {
|
||||
users, err := GetUsersInfo(ctx, userIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
userMap := make(map[string]*sdk_ws.UserInfo)
|
||||
for i, user := range users {
|
||||
userMap[user.UserID] = users[i]
|
||||
return utils.SliceToMap(users, func(e *sdk_ws.UserInfo) string {
|
||||
return e.UserID
|
||||
}), nil
|
||||
}
|
||||
|
||||
func GetPublicUserInfo(ctx context.Context, userIDs []string) ([]*sdk_ws.PublicUserInfo, error) {
|
||||
return nil, errors.New("todo")
|
||||
}
|
||||
|
||||
func GetPublicUserInfoMap(ctx context.Context, userIDs []string) (map[string]*sdk_ws.PublicUserInfo, error) {
|
||||
users, err := GetPublicUserInfo(ctx, userIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return userMap, nil
|
||||
return utils.SliceToMap(users, func(e *sdk_ws.PublicUserInfo) string {
|
||||
return e.UserID
|
||||
}), nil
|
||||
}
|
||||
|
||||
func GroupNotification(ctx context.Context, groupID string) {
|
||||
var conversationReq pbConversation.ModifyConversationFieldReq
|
||||
conversation := pbConversation.Conversation{
|
||||
OwnerUserID: tracelog.GetOpUserID(ctx),
|
||||
ConversationID: utils.GetConversationIDBySessionType(groupID, constant.GroupChatType),
|
||||
ConversationType: constant.GroupChatType,
|
||||
GroupID: groupID,
|
||||
}
|
||||
conversationReq.Conversation = &conversation
|
||||
conversationReq.OperationID = tracelog.GetOperationID(ctx)
|
||||
conversationReq.FieldType = constant.FieldGroupAtType
|
||||
conversation.GroupAtType = constant.GroupNotification
|
||||
conversationReq.UserIDList = cacheResp.UserIDList
|
||||
|
||||
_, err = pbConversation.NewConversationClient(s.etcdConn.GetConn("", config.Config.RpcRegisterName.OpenImConversationName)).ModifyConversationField(ctx, &conversationReq)
|
||||
tracelog.SetCtxInfo(ctx, "ModifyConversationField", err, "req", &conversationReq, "resp", conversationReply)
|
||||
}
|
||||
|
||||
func genGroupID(ctx context.Context, groupID string) string {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,68 +1,64 @@
|
||||
package group
|
||||
|
||||
import (
|
||||
rocksCache "Open_IM/pkg/common/db/rocks_cache"
|
||||
"Open_IM/pkg/common/log"
|
||||
cp "Open_IM/pkg/common/utils"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/db/table/relation"
|
||||
pbGroup "Open_IM/pkg/proto/group"
|
||||
commonPb "Open_IM/pkg/proto/sdk_ws"
|
||||
sdk_ws "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
)
|
||||
|
||||
func (s *groupServer) GetJoinedSuperGroupList(ctx context.Context, req *pbGroup.GetJoinedSuperGroupListReq) (*pbGroup.GetJoinedSuperGroupListResp, error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp := &pbGroup.GetJoinedSuperGroupListResp{CommonResp: &commonPb.CommonResp{}}
|
||||
groupIDList, err := rocksCache.GetJoinedSuperGroupListFromCache(ctx, req.UserID)
|
||||
resp := &pbGroup.GetJoinedSuperGroupListResp{}
|
||||
total, groupIDs, err := s.GroupInterface.FindJoinSuperGroup(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber)
|
||||
if err != nil {
|
||||
if err == redis.Nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetSuperGroupByUserID nil ", err.Error(), req.UserID)
|
||||
return nil, err
|
||||
}
|
||||
resp.Total = total
|
||||
if len(groupIDs) == 0 {
|
||||
return resp, nil
|
||||
}
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetSuperGroupByUserID failed ", err.Error(), req.UserID)
|
||||
//resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
|
||||
//resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
|
||||
return resp, nil
|
||||
}
|
||||
for _, groupID := range groupIDList {
|
||||
groupInfoFromCache, err := rocksCache.GetGroupInfoFromCache(ctx, groupID)
|
||||
numMap, err := s.GroupInterface.MapSuperGroupMemberNum(ctx, groupIDs)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupInfoByGroupID failed", groupID, err.Error())
|
||||
continue
|
||||
return nil, err
|
||||
}
|
||||
groupInfo := &commonPb.GroupInfo{}
|
||||
if err := utils.CopyStructFields(groupInfo, groupInfoFromCache); err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
|
||||
}
|
||||
groupMemberIDList, err := rocksCache.GetGroupMemberIDListFromCache(ctx, groupID)
|
||||
ownerIdMap, err := s.GroupInterface.MapGroupOwnerUserID(ctx, groupIDs)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetSuperGroup failed", groupID, err.Error())
|
||||
continue
|
||||
return nil, err
|
||||
}
|
||||
groupInfo.MemberCount = uint32(len(groupMemberIDList))
|
||||
resp.GroupList = append(resp.GroupList, groupInfo)
|
||||
groups, err := s.GroupInterface.FindGroup(ctx, groupIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
groupMap := utils.SliceToMap(groups, func(e *relation.GroupModel) string {
|
||||
return e.GroupID
|
||||
})
|
||||
resp.Groups = utils.Slice(groupIDs, func(groupID string) *sdk_ws.GroupInfo {
|
||||
return DbToPbGroupInfo(groupMap[groupID], ownerIdMap[groupID], numMap[groupID])
|
||||
})
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (s *groupServer) GetSuperGroupsInfo(ctx context.Context, req *pbGroup.GetSuperGroupsInfoReq) (resp *pbGroup.GetSuperGroupsInfoResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
||||
resp = &pbGroup.GetSuperGroupsInfoResp{CommonResp: &commonPb.CommonResp{}}
|
||||
groupsInfoList := make([]*commonPb.GroupInfo, 0)
|
||||
for _, groupID := range req.GroupIDList {
|
||||
groupInfoFromRedis, err := rocksCache.GetGroupInfoFromCache(ctx, groupID)
|
||||
resp = &pbGroup.GetSuperGroupsInfoResp{}
|
||||
if len(req.GroupIDs) == 0 {
|
||||
return nil, constant.ErrArgs.Wrap("groupIDs empty")
|
||||
}
|
||||
groups, err := s.GroupInterface.FindGroup(ctx, req.GroupIDs)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupID)
|
||||
continue
|
||||
return nil, err
|
||||
}
|
||||
var groupInfo commonPb.GroupInfo
|
||||
cp.GroupDBCopyOpenIM(&groupInfo, groupInfoFromRedis)
|
||||
groupsInfoList = append(groupsInfoList, &groupInfo)
|
||||
numMap, err := s.GroupInterface.MapSuperGroupMemberNum(ctx, req.GroupIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp.GroupInfoList = groupsInfoList
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
||||
ownerIdMap, err := s.GroupInterface.MapGroupOwnerUserID(ctx, req.GroupIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp.GroupInfos = utils.Slice(groups, func(e *relation.GroupModel) *sdk_ws.GroupInfo {
|
||||
return DbToPbGroupInfo(e, ownerIdMap[e.GroupID], numMap[e.GroupID])
|
||||
})
|
||||
return resp, nil
|
||||
}
|
||||
|
13
internal/rpc/group/utils.go
Normal file
13
internal/rpc/group/utils.go
Normal file
@ -0,0 +1,13 @@
|
||||
package group
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/tracelog"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func IsNotFound(err error) bool {
|
||||
if err == nil {
|
||||
return false
|
||||
}
|
||||
return tracelog.Unwrap(err) == gorm.ErrRecordNotFound
|
||||
}
|
@ -88,7 +88,7 @@ func messageReactionSender(operationID, sendID string, sourceID string, sessionT
|
||||
case constant.GroupChatType, constant.SuperGroupChatType:
|
||||
pbData.MsgData.GroupID = sourceID
|
||||
}
|
||||
etcdConn, err := getcdv3.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImMsgName)
|
||||
etcdConn, err := rpc.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImMsgName)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ func (rpc *rpcChat) messageVerification(ctx context.Context, data *pbChat.SendMs
|
||||
}
|
||||
log.NewDebug(data.OperationID, *config.Config.MessageVerify.FriendVerify)
|
||||
reqGetBlackIDListFromCache := &cacheRpc.GetBlackIDListFromCacheReq{UserID: data.MsgData.RecvID, OperationID: data.OperationID}
|
||||
etcdConn, err := getcdv3.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImCacheName)
|
||||
etcdConn, err := rpc.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImCacheName)
|
||||
if err != nil {
|
||||
errMsg := data.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(data.OperationID, errMsg)
|
||||
@ -152,7 +152,7 @@ func (rpc *rpcChat) messageVerification(ctx context.Context, data *pbChat.SendMs
|
||||
log.NewDebug(data.OperationID, *config.Config.MessageVerify.FriendVerify)
|
||||
if *config.Config.MessageVerify.FriendVerify {
|
||||
reqGetFriendIDListFromCache := &cacheRpc.GetFriendIDListFromCacheReq{UserID: data.MsgData.RecvID, OperationID: data.OperationID}
|
||||
etcdConn, err := getcdv3.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImCacheName)
|
||||
etcdConn, err := rpc.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImCacheName)
|
||||
if err != nil {
|
||||
errMsg := data.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(data.OperationID, errMsg)
|
||||
@ -538,7 +538,7 @@ func (rpc *rpcChat) SendMsg(ctx context.Context, pb *pbChat.SendMsgReq) (*pbChat
|
||||
conversationReq.UserIDList = pb.MsgData.AtUserIDList
|
||||
conversation.GroupAtType = constant.AtMe
|
||||
}
|
||||
etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImConversationName)
|
||||
etcdConn, err := rpc.GetConn(ctx, config.Config.RpcRegisterName.OpenImConversationName)
|
||||
if err != nil {
|
||||
errMsg := pb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(pb.OperationID, errMsg)
|
||||
@ -554,7 +554,7 @@ func (rpc *rpcChat) SendMsg(ctx context.Context, pb *pbChat.SendMsgReq) (*pbChat
|
||||
if tag {
|
||||
conversationReq.UserIDList = utils.DifferenceString(atUserID, memberUserIDList)
|
||||
conversation.GroupAtType = constant.AtAll
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, pb.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, pb.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := pb.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(pb.OperationID, errMsg)
|
||||
@ -639,7 +639,7 @@ func (rpc *rpcChat) sendMsgToWriter(ctx context.Context, m *pbChat.MsgDataToMQ,
|
||||
case constant.OnlineStatus:
|
||||
if m.MsgData.ContentType == constant.SignalingNotification {
|
||||
rpcPushMsg := pbPush.PushMsgReq{OperationID: m.OperationID, MsgData: m.MsgData, PushToUserID: key}
|
||||
grpcConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImPushName)
|
||||
grpcConn, err := rpc.GetConn(ctx, config.Config.RpcRegisterName.OpenImPushName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -1029,7 +1029,7 @@ func Notification(n *NotificationMsg) {
|
||||
offlineInfo.Ex = ex
|
||||
msg.OfflinePushInfo = &offlineInfo
|
||||
req.MsgData = &msg
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
@ -1053,7 +1053,7 @@ func getOnlineAndOfflineUserIDList(memberList []string, m map[string][]string, o
|
||||
req.OperationID = operationID
|
||||
req.OpUserID = config.Config.Manager.AppManagerUid[0]
|
||||
flag := false
|
||||
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
|
||||
grpcCons := rpc.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), operationID)
|
||||
for _, v := range grpcCons {
|
||||
client := pbRelay.NewRelayClient(v)
|
||||
reply, err := client.GetUsersOnlineStatus(context.Background(), req)
|
||||
|
@ -33,7 +33,7 @@ func TagSendMessage(operationID string, user *im_mysql_model.User, recvID, conte
|
||||
msgData.SenderPlatformID = senderPlatformID
|
||||
req.MsgData = &msgData
|
||||
req.OperationID = operationID
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, operationID)
|
||||
etcdConn := rpc.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImMsgName, operationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
|
@ -102,7 +102,7 @@ func (s *userServer) Run() {
|
||||
log.Error("", "GetLocalIP failed ", err.Error())
|
||||
}
|
||||
}
|
||||
err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10, "")
|
||||
err = rpc.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10, "")
|
||||
if err != nil {
|
||||
log.NewError("", "RegisterEtcd failed ", err.Error(), s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName)
|
||||
panic(utils.Wrap(err, "register user module rpc to etcd err"))
|
||||
@ -116,7 +116,7 @@ func (s *userServer) Run() {
|
||||
}
|
||||
|
||||
func (s *userServer) SyncJoinedGroupMemberFaceURL(ctx context.Context, userID string, faceURL string, operationID string, opUserID string) {
|
||||
etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName)
|
||||
etcdConn, err := rpc.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@ -138,7 +138,7 @@ func (s *userServer) SyncJoinedGroupMemberFaceURL(ctx context.Context, userID st
|
||||
}
|
||||
|
||||
func (s *userServer) SyncJoinedGroupMemberNickname(ctx context.Context, userID string, newNickname, oldNickname string, operationID string, opUserID string) {
|
||||
etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName)
|
||||
etcdConn, err := rpc.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@ -204,7 +204,7 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName)
|
||||
etcdConn, err := rpc.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
260
pkg/common/db/cache/conversation.go
vendored
260
pkg/common/db/cache/conversation.go
vendored
@ -1,10 +1,14 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/db/table"
|
||||
"Open_IM/pkg/common/db/relation"
|
||||
"Open_IM/pkg/common/tracelog"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/dtm-labs/rockscache"
|
||||
"github.com/go-redis/redis/v8"
|
||||
"golang.org/x/tools/go/ssa/testdata/src/strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -26,61 +30,227 @@ func NewConversationRedis(rcClient *rockscache.Client) *ConversationRedis {
|
||||
return &ConversationRedis{rcClient: rcClient}
|
||||
}
|
||||
|
||||
func (c *ConversationRedis) GetUserConversationIDListFromCache(userID string, fn DBFun) ([]string, error) {
|
||||
conversationIDListStr, err := c.rcClient.Fetch(conversationIDListCache+userID, time.Second*30*60, fn)
|
||||
var conversationIDList []string
|
||||
err = json.Unmarshal([]byte(conversationIDListStr), &conversationIDList)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "")
|
||||
}
|
||||
return conversationIDList, nil
|
||||
func NewConversationCache(rdb redis.UniversalClient, conversationDB *relation.ConversationGorm, options rockscache.Options) *ConversationCache {
|
||||
return &ConversationCache{conversationDB: conversationDB, expireTime: conversationExpireTime, rcClient: rockscache.NewClient(rdb, options)}
|
||||
}
|
||||
|
||||
func (c *ConversationRedis) DelUserConversationIDListFromCache(userID string) error {
|
||||
return utils.Wrap(c.rcClient.TagAsDeleted(conversationIDListCache+userID), "DelUserConversationIDListFromCache err")
|
||||
func (c *ConversationCache) getConversationKey(ownerUserID, conversationID string) string {
|
||||
return conversationKey + ownerUserID + ":" + conversationID
|
||||
}
|
||||
|
||||
func (c *ConversationRedis) GetConversationFromCache(ownerUserID, conversationID string, fn DBFun) (*table.ConversationModel, error) {
|
||||
conversationStr, err := c.rcClient.Fetch(conversationCache+ownerUserID+":"+conversationID, time.Second*30*60, fn)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "Fetch failed")
|
||||
}
|
||||
conversation := table.ConversationModel{}
|
||||
err = json.Unmarshal([]byte(conversationStr), &conversation)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "Unmarshal failed")
|
||||
}
|
||||
return &conversation, nil
|
||||
func (c *ConversationCache) getConversationIDsKey(ownerUserID string) string {
|
||||
return conversationIDsKey + ownerUserID
|
||||
}
|
||||
|
||||
func (c *ConversationRedis) GetConversationsFromCache(ownerUserID string, conversationIDList []string, fn DBFun) ([]*table.ConversationModel, error) {
|
||||
var conversationList []*table.ConversationModel
|
||||
for _, conversationID := range conversationIDList {
|
||||
conversation, err := c.GetConversationFromCache(ownerUserID, conversationID, fn)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "GetConversationFromCache failed")
|
||||
}
|
||||
conversationList = append(conversationList, conversation)
|
||||
}
|
||||
return conversationList, nil
|
||||
func (c *ConversationCache) getRecvMsgOptKey(ownerUserID, conversationID string) string {
|
||||
return recvMsgOptKey + ownerUserID + ":" + conversationID
|
||||
}
|
||||
|
||||
func (c *ConversationRedis) GetUserAllConversationList(ownerUserID string, fn DBFun) ([]*table.ConversationModel, error) {
|
||||
IDList, err := c.GetUserConversationIDListFromCache(ownerUserID, fn)
|
||||
func (c *ConversationCache) getSuperGroupRecvNotNotifyUserIDsKey(groupID string) string {
|
||||
return superGroupRecvMsgNotNotifyUserIDsKey + groupID
|
||||
}
|
||||
|
||||
func (c *ConversationCache) GetUserConversationIDs(ctx context.Context, ownerUserID string, f func(userID string) ([]string, error)) (conversationIDs []string, err error) {
|
||||
//getConversationIDs := func() (string, error) {
|
||||
// conversationIDs, err := relation.GetConversationIDsByUserID(ownerUserID)
|
||||
// if err != nil {
|
||||
// return "", err
|
||||
// }
|
||||
// bytes, err := json.Marshal(conversationIDs)
|
||||
// if err != nil {
|
||||
// return "", utils.Wrap(err, "")
|
||||
// }
|
||||
// return string(bytes), nil
|
||||
//}
|
||||
//defer func() {
|
||||
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs)
|
||||
//}()
|
||||
//conversationIDsStr, err := c.rcClient.Fetch(c.getConversationIDsKey(ownerUserID), time.Second*30*60, getConversationIDs)
|
||||
//err = json.Unmarshal([]byte(conversationIDsStr), &conversationIDs)
|
||||
//if err != nil {
|
||||
// return nil, utils.Wrap(err, "")
|
||||
//}
|
||||
//return conversationIDs, nil
|
||||
return GetCache(c.rcClient, c.getConversationIDsKey(ownerUserID), time.Second*30*60, func() ([]string, error) {
|
||||
return f(ownerUserID)
|
||||
})
|
||||
}
|
||||
|
||||
func (c *ConversationCache) GetUserConversationIDs1(ctx context.Context, ownerUserID string) (conversationIDs []string, err error) {
|
||||
//getConversationIDs := func() (string, error) {
|
||||
// conversationIDs, err := relation.GetConversationIDsByUserID(ownerUserID)
|
||||
// if err != nil {
|
||||
// return "", err
|
||||
// }
|
||||
// bytes, err := json.Marshal(conversationIDs)
|
||||
// if err != nil {
|
||||
// return "", utils.Wrap(err, "")
|
||||
// }
|
||||
// return string(bytes), nil
|
||||
//}
|
||||
//defer func() {
|
||||
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs)
|
||||
//}()
|
||||
//conversationIDsStr, err := c.rcClient.Fetch(c.getConversationIDsKey(ownerUserID), time.Second*30*60, getConversationIDs)
|
||||
//err = json.Unmarshal([]byte(conversationIDsStr), &conversationIDs)
|
||||
//if err != nil {
|
||||
// return nil, utils.Wrap(err, "")
|
||||
//}
|
||||
//return conversationIDs, nil
|
||||
return GetCache1[[]string](c.rcClient, c.getConversationIDsKey(ownerUserID), time.Second*30*60, fn)
|
||||
}
|
||||
|
||||
func GetCache1[T any](rcClient *rockscache.Client, key string, expire time.Duration, fn func() (any, error)) (T, error) {
|
||||
v, err := rcClient.Fetch(key, expire, func() (string, error) {
|
||||
v, err := fn()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
bs, err := json.Marshal(v)
|
||||
if err != nil {
|
||||
return "", utils.Wrap(err, "")
|
||||
}
|
||||
return string(bs), nil
|
||||
})
|
||||
var t T
|
||||
if err != nil {
|
||||
return t, err
|
||||
}
|
||||
err = json.Unmarshal([]byte(v), &t)
|
||||
if err != nil {
|
||||
return t, utils.Wrap(err, "")
|
||||
}
|
||||
return t, nil
|
||||
}
|
||||
|
||||
func GetCache[T any](rcClient *rockscache.Client, key string, expire time.Duration, fn func() (T, error)) (T, error) {
|
||||
v, err := rcClient.Fetch(key, expire, func() (string, error) {
|
||||
v, err := fn()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
bs, err := json.Marshal(v)
|
||||
if err != nil {
|
||||
return "", utils.Wrap(err, "")
|
||||
}
|
||||
return string(bs), nil
|
||||
})
|
||||
var t T
|
||||
if err != nil {
|
||||
return t, err
|
||||
}
|
||||
err = json.Unmarshal([]byte(v), &t)
|
||||
if err != nil {
|
||||
return t, utils.Wrap(err, "")
|
||||
}
|
||||
return t, nil
|
||||
}
|
||||
|
||||
func (c *ConversationCache) DelUserConversationIDs(ctx context.Context, ownerUserID string) (err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID)
|
||||
}()
|
||||
return utils.Wrap(c.rcClient.TagAsDeleted(c.getConversationIDsKey(ownerUserID)), "DelUserConversationIDs err")
|
||||
}
|
||||
|
||||
func (c *ConversationCache) GetConversation(ctx context.Context, ownerUserID, conversationID string) (conversation *relation2.ConversationModel, err error) {
|
||||
getConversation := func() (string, error) {
|
||||
conversation, err := relation.GetConversation(ownerUserID, conversationID)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
bytes, err := json.Marshal(conversation)
|
||||
if err != nil {
|
||||
return "", utils.Wrap(err, "conversation Marshal failed")
|
||||
}
|
||||
return string(bytes), nil
|
||||
}
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationID", conversationID, "conversation", *conversation)
|
||||
}()
|
||||
conversationStr, err := c.rcClient.Fetch(c.getConversationKey(ownerUserID, conversationID), c.expireTime, getConversation)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var conversationList []*table.ConversationModel
|
||||
for _, conversationID := range IDList {
|
||||
conversation, err := c.GetConversationFromCache(ownerUserID, conversationID, fn)
|
||||
if err != nil {
|
||||
return nil, utils.Wrap(err, "GetConversationFromCache failed")
|
||||
}
|
||||
conversationList = append(conversationList, conversation)
|
||||
}
|
||||
return conversationList, nil
|
||||
conversation = &relation2.ConversationModel{}
|
||||
err = json.Unmarshal([]byte(conversationStr), &conversation)
|
||||
return conversation, utils.Wrap(err, "Unmarshal failed")
|
||||
}
|
||||
|
||||
func (c *ConversationRedis) DelConversationFromCache(ownerUserID, conversationID string) error {
|
||||
return utils.Wrap(c.rcClient.TagAsDeleted(conversationCache+ownerUserID+":"+conversationID), "DelConversationFromCache err")
|
||||
func (c *ConversationCache) DelConversation(ctx context.Context, ownerUserID, conversationID string) (err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationID", conversationID)
|
||||
}()
|
||||
return utils.Wrap(c.rcClient.TagAsDeleted(c.getConversationKey(ownerUserID, conversationID)), "DelConversation err")
|
||||
}
|
||||
|
||||
func (c *ConversationCache) GetConversations(ctx context.Context, ownerUserID string, conversationIDs []string) (conversations []relation2.ConversationModel, err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationIDs", conversationIDs, "conversations", conversations)
|
||||
}()
|
||||
for _, conversationID := range conversationIDs {
|
||||
conversation, err := c.GetConversation(ctx, ownerUserID, conversationID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
conversations = append(conversations, *conversation)
|
||||
}
|
||||
return conversations, nil
|
||||
}
|
||||
|
||||
func (c *ConversationCache) GetUserAllConversations(ctx context.Context, ownerUserID string) (conversations []relation2.ConversationModel, err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversations", conversations)
|
||||
}()
|
||||
IDs, err := c.GetUserConversationIDs(ctx, ownerUserID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var conversationIDs []relation2.ConversationModel
|
||||
for _, conversationID := range IDs {
|
||||
conversation, err := c.GetConversation(ctx, ownerUserID, conversationID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
conversationIDs = append(conversationIDs, *conversation)
|
||||
}
|
||||
return conversationIDs, nil
|
||||
}
|
||||
|
||||
func (c *ConversationCache) GetUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) (opt int, err error) {
|
||||
getConversation := func() (string, error) {
|
||||
conversation, err := relation.GetConversation(ownerUserID, conversationID)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return strconv.Itoa(int(conversation.RecvMsgOpt)), nil
|
||||
}
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "ownerUserID", ownerUserID, "conversationID", conversationID, "opt", opt)
|
||||
}()
|
||||
optStr, err := c.rcClient.Fetch(c.getConversationKey(ownerUserID, conversationID), c.expireTime, getConversation)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return strconv.Atoi(optStr)
|
||||
}
|
||||
|
||||
func (c *ConversationCache) DelUserRecvMsgOpt(ctx context.Context, ownerUserID, conversationID string) error {
|
||||
return utils.Wrap(c.rcClient.TagAsDeleted(c.getConversationKey(ownerUserID, conversationID)), "DelUserRecvMsgOpt failed")
|
||||
}
|
||||
|
||||
func (c *ConversationCache) GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (userIDs []string, err error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *ConversationCache) DelSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *ConversationCache) GetSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) (hash uint32, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (c *ConversationCache) DelSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) {
|
||||
return
|
||||
}
|
||||
|
13
pkg/common/db/cache/extend_msg_set.go
vendored
Normal file
13
pkg/common/db/cache/extend_msg_set.go
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/db/relation"
|
||||
"github.com/dtm-labs/rockscache"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ExtendMsgSetCache struct {
|
||||
friendDB *relation.FriendGorm
|
||||
expireTime time.Duration
|
||||
rcClient *rockscache.Client
|
||||
}
|
@ -1,10 +1,13 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/db/cache"
|
||||
"Open_IM/pkg/common/db/relation"
|
||||
relation2 "Open_IM/pkg/common/db/table/relation"
|
||||
unrelation2 "Open_IM/pkg/common/db/table/unrelation"
|
||||
"Open_IM/pkg/common/db/unrelation"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"github.com/dtm-labs/rockscache"
|
||||
_ "github.com/dtm-labs/rockscache"
|
||||
@ -14,29 +17,43 @@ import (
|
||||
)
|
||||
|
||||
type GroupInterface interface {
|
||||
FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error)
|
||||
// group
|
||||
FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error)
|
||||
SearchGroup(ctx context.Context, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error)
|
||||
TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error)
|
||||
FindJoinedGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error)
|
||||
UpdateGroup(ctx context.Context, groupID string, data map[string]any) error
|
||||
DismissGroup(ctx context.Context, groupID string) error // 解散群,并删除群成员
|
||||
// groupMember
|
||||
CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupMemberModel) error
|
||||
DeleteGroupByIDs(ctx context.Context, groupIDs []string) error
|
||||
TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error)
|
||||
TakeGroupMemberByID(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupModel, err error)
|
||||
GetJoinedGroupList(ctx context.Context, userID string) ([]*relation2.GroupModel, error)
|
||||
GetGroupMemberList(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error)
|
||||
GetGroupMemberListByUserID(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error)
|
||||
GetGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupModel, error) // relation.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30)
|
||||
FindGroupMembersByID(ctx context.Context, groupID string, userIDs []string) (groups []*relation2.GroupMemberModel, err error)
|
||||
DelGroupMember(ctx context.Context, groupID string, userIDs []string) error
|
||||
GetGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error)
|
||||
GetGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error)
|
||||
GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error)
|
||||
|
||||
TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error)
|
||||
FindGroupMember(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error)
|
||||
FindGroupMemberAll(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error)
|
||||
FindGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupMemberModel, error) // relation.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30)
|
||||
SearchGroupMember(ctx context.Context, groupID, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error)
|
||||
TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error)
|
||||
FindGroupOwnerUser(ctx context.Context, groupID []string) ([]*relation2.GroupMemberModel, error)
|
||||
CreateGroupMember(ctx context.Context, groupMember []*relation2.GroupMemberModel) error
|
||||
CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) error
|
||||
HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relation2.GroupMemberModel) error
|
||||
DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error
|
||||
MapGroupHash(ctx context.Context, groupIDs []string) (map[string]uint64, error)
|
||||
MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error)
|
||||
MapGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error)
|
||||
TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string) error // 转让群
|
||||
UpdateGroupMember(ctx context.Context, groupID, userID string, data map[string]any) error
|
||||
|
||||
//mongo
|
||||
CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) error
|
||||
GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) // ?
|
||||
TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error)
|
||||
FindUserGroupRequest(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error)
|
||||
// superGroup
|
||||
TakeSuperGroup(ctx context.Context, groupID string) (superGroup *unrelation2.SuperGroupModel, err error)
|
||||
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error
|
||||
DelSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
|
||||
DeleteSuperGroup(ctx context.Context, groupID string) error
|
||||
DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
|
||||
AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error
|
||||
GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error)
|
||||
FindJoinSuperGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (total int32, groupIDs []string, err error)
|
||||
MapSuperGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error)
|
||||
}
|
||||
|
||||
var _ GroupInterface = (*GroupController)(nil)
|
||||
@ -45,82 +62,112 @@ type GroupController struct {
|
||||
database GroupDataBaseInterface
|
||||
}
|
||||
|
||||
func (g *GroupController) TakeGroupMemberByID(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupModel, err error) {
|
||||
func (g *GroupController) FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) FindGroupMembersByID(ctx context.Context, groupID string, userIDs []string) (groups []*relation2.GroupModel, err error) {
|
||||
func (g *GroupController) SearchGroup(ctx context.Context, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) DelGroupMember(ctx context.Context, groupID string, userIDs []string) error {
|
||||
func (g *GroupController) TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) {
|
||||
/*
|
||||
var groupRequestList []db.GroupRequest
|
||||
memberList, err := GetGroupMemberListByUserID(userID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, v := range memberList {
|
||||
if v.RoleLevel > constant.GroupOrdinaryUsers {
|
||||
list, err := GetGroupRequestByGroupID(v.GroupID)
|
||||
if err != nil {
|
||||
// fmt.Println("111 GetGroupRequestByGroupID failed ", err.Error())
|
||||
continue
|
||||
}
|
||||
// fmt.Println("222 GetGroupRequestByGroupID ok ", list)
|
||||
groupRequestList = append(groupRequestList, list...)
|
||||
// fmt.Println("333 GetGroupRequestByGroupID ok ", groupRequestList)
|
||||
}
|
||||
}
|
||||
return groupRequestList, nil
|
||||
*/
|
||||
func (g *GroupController) FindJoinedGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) DelSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
|
||||
func (g *GroupController) UpdateGroup(ctx context.Context, groupID string, data map[string]any) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) GetJoinedGroupList(ctx context.Context, userID string) ([]*relation2.GroupModel, error) {
|
||||
func (g *GroupController) DismissGroup(ctx context.Context, groupID string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) GetGroupMemberList(ctx context.Context, groupID string) ([]*relation2.GroupModel, error) {
|
||||
func (g *GroupController) CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupMemberModel) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) GetGroupMemberListByUserID(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupModel, error) {
|
||||
func (g *GroupController) TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) GetGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupModel, error) {
|
||||
func (g *GroupController) FindGroupMember(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) GetGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error) {
|
||||
func (g *GroupController) FindGroupMemberAll(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) GetGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error) {
|
||||
func (g *GroupController) FindGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupMemberModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) CreateGroupMember(ctx context.Context, groupMember []*relation2.GroupModel) error {
|
||||
func (g *GroupController) SearchGroupMember(ctx context.Context, groupID, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) FindGroupOwnerUser(ctx context.Context, groupID []string) ([]*relation2.GroupMemberModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) CreateGroupMember(ctx context.Context, groupMember []*relation2.GroupMemberModel) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relation2.GroupMemberModel) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) MapGroupHash(ctx context.Context, groupIDs []string) (map[string]uint64, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) MapGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) UpdateGroupMember(ctx context.Context, groupID, userID string, data map[string]any) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
@ -130,49 +177,98 @@ func (g *GroupController) CreateGroupRequest(ctx context.Context, requests []*re
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) FindUserGroupRequest(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) TakeSuperGroup(ctx context.Context, groupID string) (superGroup *unrelation2.SuperGroupModel, err error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) DeleteSuperGroup(ctx context.Context, groupID string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func NewGroupController(db *gorm.DB, rdb redis.UniversalClient, mgoClient *mongo.Client) GroupInterface {
|
||||
groupController := &GroupController{database: newGroupDatabase(db, rdb, mgoClient)}
|
||||
return groupController
|
||||
func (g *GroupController) FindJoinSuperGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (total int32, groupIDs []string, err error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupController) FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
|
||||
return g.database.FindGroupsByID(ctx, groupIDs)
|
||||
}
|
||||
|
||||
func (g *GroupController) CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupModel) error {
|
||||
return g.database.CreateGroup(ctx, groups, groupMember)
|
||||
}
|
||||
|
||||
func (g *GroupController) DeleteGroupByIDs(ctx context.Context, groupIDs []string) error {
|
||||
return g.database.DeleteGroupByIDs(ctx, groupIDs)
|
||||
}
|
||||
|
||||
func (g *GroupController) TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
|
||||
return g.database.TakeGroupByID(ctx, groupID)
|
||||
}
|
||||
|
||||
func (g *GroupController) GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error) {
|
||||
return g.database.GetSuperGroupByID(ctx, groupID)
|
||||
}
|
||||
|
||||
func (g *GroupController) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
|
||||
return g.database.CreateSuperGroup(ctx, groupID, initMemberIDList)
|
||||
func (g *GroupController) MapSuperGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
type GroupDataBaseInterface interface {
|
||||
FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error)
|
||||
CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupModel) error
|
||||
DeleteGroupByIDs(ctx context.Context, groupIDs []string) error
|
||||
TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error)
|
||||
GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error)
|
||||
// group
|
||||
FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error)
|
||||
SearchGroup(ctx context.Context, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error)
|
||||
TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error)
|
||||
FindJoinedGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error)
|
||||
UpdateGroup(ctx context.Context, groupID string, data map[string]any) error
|
||||
DismissGroup(ctx context.Context, groupID string) error // 解散群,并删除群成员
|
||||
// groupMember
|
||||
CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMember []*relation2.GroupMemberModel) error
|
||||
TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error)
|
||||
FindGroupMember(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error)
|
||||
FindGroupMemberAll(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error)
|
||||
FindGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupMemberModel, error) // relation.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30)
|
||||
SearchGroupMember(ctx context.Context, groupID, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error)
|
||||
TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error)
|
||||
FindGroupOwnerUser(ctx context.Context, groupID []string) ([]*relation2.GroupMemberModel, error)
|
||||
CreateGroupMember(ctx context.Context, groupMember []*relation2.GroupMemberModel) error
|
||||
HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relation2.GroupMemberModel) error
|
||||
DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error
|
||||
MapGroupHash(ctx context.Context, groupIDs []string) (map[string]uint64, error)
|
||||
MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error)
|
||||
MapGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error)
|
||||
TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string) error // 转让群
|
||||
UpdateGroupMember(ctx context.Context, groupID, userID string, data map[string]any) error
|
||||
|
||||
CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) error
|
||||
GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) // ?
|
||||
TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error)
|
||||
FindUserGroupRequest(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error)
|
||||
// superGroup
|
||||
TakeSuperGroup(ctx context.Context, groupID string) (superGroup *unrelation2.SuperGroupModel, err error)
|
||||
CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error
|
||||
DeleteSuperGroup(ctx context.Context, groupID string) error
|
||||
DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error
|
||||
AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error
|
||||
FindJoinSuperGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (total int32, groupIDs []string, err error)
|
||||
MapSuperGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error)
|
||||
}
|
||||
|
||||
var _ *GroupDataBase = (GroupDataBaseInterface)(nil)
|
||||
|
||||
type GroupDataBase struct {
|
||||
groupDB *relation.GroupGorm
|
||||
groupMemberDB *relation.GroupMemberGorm
|
||||
@ -205,82 +301,270 @@ func newGroupDatabase(db *gorm.DB, rdb redis.UniversalClient, mgoClient *mongo.C
|
||||
return database
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
|
||||
return g.cache.GetGroupsInfo(ctx, groupIDs)
|
||||
//func (g *GroupDataBase) FindGroupsByID(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
|
||||
// return g.cache.GetGroupsInfo(ctx, groupIDs)
|
||||
//}
|
||||
//
|
||||
//func (g *GroupDataBase) CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMembers []*relation2.GroupMemberModel) error {
|
||||
// return g.db.Transaction(func(tx *gorm.DB) error {
|
||||
// if len(groups) > 0 {
|
||||
// if err := g.groupDB.Create(ctx, groups, tx); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// }
|
||||
// if len(groupMembers) > 0 {
|
||||
// if err := g.groupMemberDB.Create(ctx, groupMembers, tx); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// }
|
||||
// return nil
|
||||
// })
|
||||
//}
|
||||
//
|
||||
//func (g *GroupDataBase) DeleteGroupByIDs(ctx context.Context, groupIDs []string) error {
|
||||
// return g.groupDB.DB.Transaction(func(tx *gorm.DB) error {
|
||||
// if err := g.groupDB.Delete(ctx, groupIDs, tx); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// if err := g.cache.DelGroupsInfo(ctx, groupIDs); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// return nil
|
||||
// })
|
||||
//}
|
||||
//
|
||||
//func (g *GroupDataBase) TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
|
||||
// return g.cache.GetGroupInfo(ctx, groupID)
|
||||
//}
|
||||
//
|
||||
//func (g *GroupDataBase) Update(ctx context.Context, groups []*relation2.GroupModel) error {
|
||||
// return g.db.Transaction(func(tx *gorm.DB) error {
|
||||
// if err := g.groupDB.Update(ctx, groups, tx); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// var groupIDs []string
|
||||
// for _, group := range groups {
|
||||
// groupIDs = append(groupIDs, group.GroupID)
|
||||
// }
|
||||
// if err := g.cache.DelGroupsInfo(ctx, groupIDs); err != nil {
|
||||
// return err
|
||||
// }
|
||||
// return nil
|
||||
// })
|
||||
//}
|
||||
//
|
||||
//func (g *GroupDataBase) GetJoinedGroupList(ctx context.Context, userID string) ([]*relation2.GroupModel, error) {
|
||||
//
|
||||
// return nil, nil
|
||||
//}
|
||||
//
|
||||
//func (g *GroupDataBase) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
|
||||
// sess, err := g.mongoDB.MgoClient.StartSession()
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// defer sess.EndSession(ctx)
|
||||
// sCtx := mongo.NewSessionContext(ctx, sess)
|
||||
// if err = g.mongoDB.CreateSuperGroup(sCtx, groupID, initMemberIDList); err != nil {
|
||||
// _ = sess.AbortTransaction(ctx)
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// if err = g.cache.BatchDelJoinedSuperGroupIDs(ctx, initMemberIDList); err != nil {
|
||||
// _ = sess.AbortTransaction(ctx)
|
||||
// return err
|
||||
// }
|
||||
// return sess.CommitTransaction(ctx)
|
||||
//}
|
||||
//
|
||||
//func (g *GroupDataBase) GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error) {
|
||||
// return g.mongoDB.GetSuperGroup(ctx, groupID)
|
||||
//}
|
||||
|
||||
func (g *GroupDataBase) FindGroup(ctx context.Context, groupIDs []string) (groups []*relation2.GroupModel, err error) {
|
||||
return g.groupDB.Find(ctx, groupIDs)
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) SearchGroup(ctx context.Context, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) {
|
||||
return g.groupDB.Search(ctx, name, pageNumber, showNumber)
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) TakeGroup(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
|
||||
return g.groupDB.Take(ctx, groupID)
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) FindJoinedGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupModel, error) {
|
||||
total, members, err := g.groupMemberDB.PageByUser(ctx, userID, pageNumber, showNumber)
|
||||
if err != nil {
|
||||
return 0, nil, err
|
||||
}
|
||||
if len(members) == 0 {
|
||||
return total, []*relation2.GroupModel{}, nil
|
||||
}
|
||||
groupIDs := utils.Slice(members, func(e *relation2.GroupMemberModel) string {
|
||||
return e.GroupID
|
||||
})
|
||||
groups, err := g.groupDB.Find(ctx, groupIDs)
|
||||
if err != nil {
|
||||
return 0, nil, err
|
||||
}
|
||||
utils.OrderPtr(groupIDs, &groups, func(e *relation2.GroupModel) string {
|
||||
return e.GroupID
|
||||
})
|
||||
return total, groups, nil
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) UpdateGroup(ctx context.Context, groupID string, data map[string]any) error {
|
||||
return g.groupDB.UpdateMap(ctx, groupID, data)
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) DismissGroup(ctx context.Context, groupID string) error {
|
||||
return utils.Wrap(g.db.Transaction(func(tx *gorm.DB) error {
|
||||
if err := g.groupDB.UpdateStatus(ctx, groupID, constant.GroupStatusDismissed, tx); err != nil {
|
||||
return err
|
||||
}
|
||||
return g.groupMemberDB.DeleteGroup(ctx, []string{groupID}, tx)
|
||||
}), "")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) CreateGroup(ctx context.Context, groups []*relation2.GroupModel, groupMembers []*relation2.GroupMemberModel) error {
|
||||
if len(groups) > 0 && len(groupMembers) > 0 {
|
||||
return g.db.Transaction(func(tx *gorm.DB) error {
|
||||
if len(groups) > 0 {
|
||||
if err := g.groupDB.Create(ctx, groups, tx); err != nil {
|
||||
return err
|
||||
}
|
||||
return g.groupMemberDB.Create(ctx, groupMembers, tx)
|
||||
})
|
||||
}
|
||||
if len(groups) > 0 {
|
||||
return g.groupDB.Create(ctx, groups)
|
||||
}
|
||||
if len(groupMembers) > 0 {
|
||||
if err := g.groupMemberDB.Create(ctx, groupMembers, tx); err != nil {
|
||||
return err
|
||||
}
|
||||
return g.groupMemberDB.Create(ctx, groupMembers)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) DeleteGroupByIDs(ctx context.Context, groupIDs []string) error {
|
||||
return g.groupDB.DB.Transaction(func(tx *gorm.DB) error {
|
||||
if err := g.groupDB.Delete(ctx, groupIDs, tx); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := g.cache.DelGroupsInfo(ctx, groupIDs); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
func (g *GroupDataBase) TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relation2.GroupMemberModel, err error) {
|
||||
return g.groupMemberDB.Take(ctx, groupID, userID)
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) TakeGroupByID(ctx context.Context, groupID string) (group *relation2.GroupModel, err error) {
|
||||
return g.cache.GetGroupInfo(ctx, groupID)
|
||||
func (g *GroupDataBase) FindGroupMember(ctx context.Context, groupID string, userIDs []string) ([]*relation2.GroupMemberModel, error) {
|
||||
return g.groupMemberDB.FindGroupUser(ctx, []string{groupID}, userIDs, nil)
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) Update(ctx context.Context, groups []*relation2.GroupModel) error {
|
||||
return g.db.Transaction(func(tx *gorm.DB) error {
|
||||
if err := g.groupDB.Update(ctx, groups, tx); err != nil {
|
||||
return err
|
||||
}
|
||||
var groupIDs []string
|
||||
for _, group := range groups {
|
||||
groupIDs = append(groupIDs, group.GroupID)
|
||||
}
|
||||
if err := g.cache.DelGroupsInfo(ctx, groupIDs); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
func (g *GroupDataBase) FindGroupMemberAll(ctx context.Context, groupID string) ([]*relation2.GroupMemberModel, error) {
|
||||
return g.groupMemberDB.FindGroupUser(ctx, []string{groupID}, nil, nil)
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) GetJoinedGroupList(ctx context.Context, userID string) ([]*relation2.GroupModel, error) {
|
||||
func (g *GroupDataBase) FindGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation2.GroupMemberModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
func (g *GroupDataBase) SearchGroupMember(ctx context.Context, groupID string, name string, pageNumber, showNumber int32) (int32, []*relation2.GroupMemberModel, error) {
|
||||
return g.groupMemberDB.SearchMember(ctx, groupID, name, pageNumber, showNumber)
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) TakeGroupOwner(ctx context.Context, groupID string) (*relation2.GroupMemberModel, error) {
|
||||
return g.groupMemberDB.TakeOwner(ctx, groupID)
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) FindGroupOwnerUser(ctx context.Context, groupIDs []string) ([]*relation2.GroupMemberModel, error) {
|
||||
return g.groupMemberDB.FindGroupUser(ctx, groupIDs, nil, []int32{constant.GroupOwner})
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) CreateGroupMember(ctx context.Context, groupMember []*relation2.GroupMemberModel) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) HandlerGroupRequest(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32, member *relation2.GroupMemberModel) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) DeleteGroupMember(ctx context.Context, groupID string, userIDs []string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) MapGroupHash(ctx context.Context, groupIDs []string) (map[string]uint64, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) MapGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) MapGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) TransferGroupOwner(ctx context.Context, groupID string, oldOwnerUserID, newOwnerUserID string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) UpdateGroupMember(ctx context.Context, groupID, userID string, data map[string]any) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) CreateGroupRequest(ctx context.Context, requests []*relation2.GroupRequestModel) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) GetGroupRecvApplicationList(ctx context.Context, userID string) ([]*relation2.GroupRequestModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relation2.GroupRequestModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) FindUserGroupRequest(ctx context.Context, userID string, pageNumber, showNumber int32) (int32, []*relation2.GroupRequestModel, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) TakeSuperGroup(ctx context.Context, groupID string) (superGroup *unrelation2.SuperGroupModel, err error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error {
|
||||
sess, err := g.mongoDB.MgoClient.StartSession()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer sess.EndSession(ctx)
|
||||
sCtx := mongo.NewSessionContext(ctx, sess)
|
||||
if err = g.mongoDB.CreateSuperGroup(sCtx, groupID, initMemberIDList); err != nil {
|
||||
_ = sess.AbortTransaction(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
if err = g.cache.BatchDelJoinedSuperGroupIDs(ctx, initMemberIDList); err != nil {
|
||||
_ = sess.AbortTransaction(ctx)
|
||||
return err
|
||||
}
|
||||
return sess.CommitTransaction(ctx)
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error) {
|
||||
return g.mongoDB.GetSuperGroup(ctx, groupID)
|
||||
func (g *GroupDataBase) DeleteSuperGroup(ctx context.Context, groupID string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) DeleteSuperGroupMember(ctx context.Context, groupID string, userIDs []string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) FindJoinSuperGroup(ctx context.Context, userID string, pageNumber, showNumber int32) (total int32, groupIDs []string, err error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (g *GroupDataBase) MapSuperGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]uint32, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package localcache
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/proto/group"
|
||||
"context"
|
||||
"google.golang.org/grpc"
|
||||
@ -27,12 +28,31 @@ func NewGroupMemberIDsLocalCache(rpc *grpc.ClientConn) GroupLocalCache {
|
||||
}
|
||||
}
|
||||
|
||||
func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) []string {
|
||||
func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) ([]string, error) {
|
||||
g.lock.Lock()
|
||||
defer g.lock.Unlock()
|
||||
resp, err := g.group.GetGroupAbstractInfo(ctx, &group.GetGroupAbstractInfoReq{
|
||||
GroupIDs: nil,
|
||||
GroupIDs: []string{groupID},
|
||||
})
|
||||
if err != nil {
|
||||
return nil
|
||||
return nil, err
|
||||
}
|
||||
return []string{}
|
||||
if len(resp.GroupAbstractInfos) < 0 {
|
||||
return nil, constant.ErrGroupIDNotFound
|
||||
}
|
||||
localHashInfo, ok := g.cache[groupID]
|
||||
if ok && localHashInfo.memberListHash == resp.GroupAbstractInfos[0].GroupMemberListHash {
|
||||
return localHashInfo.userIDs, nil
|
||||
}
|
||||
groupMembersResp, err := g.group.GetGroupMemberList(ctx, &group.GetGroupMemberListReq{
|
||||
GroupID: groupID,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
g.cache[groupID] = GroupMemberIDsHash{
|
||||
memberListHash: resp.GroupAbstractInfos[0].GroupMemberListHash,
|
||||
userIDs: groupMembersResp.Members,
|
||||
}
|
||||
return g.cache[groupID].userIDs, nil
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ package relation
|
||||
//
|
||||
//}
|
||||
//
|
||||
//func GetGroupMemberListByUserID(userID string) ([]GroupMember, error) {
|
||||
//func FindGroupMember(userID string) ([]GroupMember, error) {
|
||||
// var groupMemberList []GroupMember
|
||||
// err := DB.DB.MysqlDB.DefaultGormDB().Table("group_members").Where("user_id=?", userID).Find(&groupMemberList).Error
|
||||
// if err != nil {
|
||||
@ -167,7 +167,7 @@ package relation
|
||||
//}
|
||||
//
|
||||
//func GetJoinedGroupIDListByUserID(userID string) ([]string, error) {
|
||||
// memberList, err := GetGroupMemberListByUserID(userID)
|
||||
// memberList, err := FindGroupMember(userID)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
|
@ -31,6 +31,13 @@ func (g *GroupMemberGorm) Delete(ctx context.Context, groupMembers []*relation.G
|
||||
return utils.Wrap(getDBConn(g.DB, tx).Delete(groupMembers).Error, "")
|
||||
}
|
||||
|
||||
func (g *GroupMemberGorm) DeleteGroup(ctx context.Context, groupIDs []string, tx ...*gorm.DB) (err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs)
|
||||
}()
|
||||
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Delete(&relation.GroupMemberModel{}).Error, "")
|
||||
}
|
||||
|
||||
func (g *GroupMemberGorm) UpdateByMap(ctx context.Context, groupID string, userID string, args map[string]interface{}, tx ...*gorm.DB) (err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "args", args)
|
||||
@ -54,6 +61,23 @@ func (g *GroupMemberGorm) Find(ctx context.Context, groupMembers []*relation.Gro
|
||||
return groupList, utils.Wrap(getDBConn(g.DB, tx).Where("(group_id, user_id) in ?", where).Find(&groupList).Error, "")
|
||||
}
|
||||
|
||||
func (g *GroupMemberGorm) FindGroupUser(ctx context.Context, groupIDs []string, userIDs []string, roleLevels []int32, tx ...*gorm.DB) (groupList []*relation.GroupMemberModel, err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "userIDs", userIDs, "groupList", groupList)
|
||||
}()
|
||||
db := getDBConn(g.DB, tx)
|
||||
if len(groupList) > 0 {
|
||||
db = db.Where("group_id in (?)", groupIDs)
|
||||
}
|
||||
if len(userIDs) > 0 {
|
||||
db = db.Where("user_id in (?)", userIDs)
|
||||
}
|
||||
if len(roleLevels) > 0 {
|
||||
db = db.Where("role_level in (?)", roleLevels)
|
||||
}
|
||||
return groupList, utils.Wrap(db.Find(&groupList).Error, "")
|
||||
}
|
||||
|
||||
func (g *GroupMemberGorm) Take(ctx context.Context, groupID string, userID string, tx ...*gorm.DB) (groupMember *relation.GroupMemberModel, err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "userID", userID, "groupMember", *groupMember)
|
||||
@ -62,7 +86,7 @@ func (g *GroupMemberGorm) Take(ctx context.Context, groupID string, userID strin
|
||||
return groupMember, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and user_id = ?", groupID, userID).Take(groupMember).Error, "")
|
||||
}
|
||||
|
||||
func (g *GroupMemberGorm) TakeOwnerInfo(ctx context.Context, groupID string, tx ...*gorm.DB) (groupMember *relation.GroupMemberModel, err error) {
|
||||
func (g *GroupMemberGorm) TakeOwner(ctx context.Context, groupID string, tx ...*gorm.DB) (groupMember *relation.GroupMemberModel, err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "groupMember", *groupMember)
|
||||
}()
|
||||
@ -70,214 +94,16 @@ func (g *GroupMemberGorm) TakeOwnerInfo(ctx context.Context, groupID string, tx
|
||||
return groupMember, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ? and role_level = ?", groupID, constant.GroupOwner).Take(groupMember).Error, "")
|
||||
}
|
||||
|
||||
//func InsertIntoGroupMember(toInsertInfo GroupMemberModel) error {
|
||||
// toInsertInfo.JoinTime = time.Now()
|
||||
// if toInsertInfo.RoleLevel == 0 {
|
||||
// toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers
|
||||
// }
|
||||
// toInsertInfo.MuteEndTime = time.Unix(int64(time.Now().Second()), 0)
|
||||
// err := GroupMemberDB.Table("group_members").Create(toInsertInfo).Error
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// return nil
|
||||
//}
|
||||
//
|
||||
//func BatchInsertIntoGroupMember(toInsertInfoList []*GroupMemberModel) error {
|
||||
// for _, toInsertInfo := range toInsertInfoList {
|
||||
// toInsertInfo.JoinTime = time.Now()
|
||||
// if toInsertInfo.RoleLevel == 0 {
|
||||
// toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers
|
||||
// }
|
||||
// toInsertInfo.MuteEndTime = time.Unix(int64(time.Now().Second()), 0)
|
||||
// }
|
||||
// return GroupMemberDB.Create(toInsertInfoList).Error
|
||||
//
|
||||
//}
|
||||
//
|
||||
//func GetGroupMemberListByUserID(userID string) ([]GroupMemberModel, error) {
|
||||
// var groupMemberList []GroupMemberModel
|
||||
// err := GroupMemberDB.Table("group_members").Where("user_id=?", userID).Find(&groupMemberList).Error
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return groupMemberList, nil
|
||||
//}
|
||||
//
|
||||
//func GetGroupMemberListByGroupID(groupID string) ([]GroupMemberModel, error) {
|
||||
// var groupMemberList []GroupMemberModel
|
||||
// err := GroupMemberDB.Table("group_members").Where("group_id=?", groupID).Find(&groupMemberList).Error
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return groupMemberList, nil
|
||||
//}
|
||||
//
|
||||
//func GetGroupMemberIDListByGroupID(groupID string) ([]string, error) {
|
||||
// var groupMemberIDList []string
|
||||
// err := GroupMemberDB.Table("group_members").Where("group_id=?", groupID).Pluck("user_id", &groupMemberIDList).Error
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return groupMemberIDList, nil
|
||||
//}
|
||||
//
|
||||
//func GetGroupMemberListByGroupIDAndRoleLevel(groupID string, roleLevel int32) ([]GroupMemberModel, error) {
|
||||
// var groupMemberList []GroupMemberModel
|
||||
// err := GroupMemberDB.Table("group_members").Where("group_id=? and role_level=?", groupID, roleLevel).Find(&groupMemberList).Error
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return groupMemberList, nil
|
||||
//}
|
||||
//
|
||||
//func GetGroupMemberInfoByGroupIDAndUserID(groupID, userID string) (*GroupMemberModel, error) {
|
||||
// var groupMember GroupMemberModel
|
||||
// err := GroupMemberDB.Table("group_members").Where("group_id=? and user_id=? ", groupID, userID).Limit(1).Take(&groupMember).Error
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return &groupMember, nil
|
||||
//}
|
||||
//
|
||||
//func DeleteGroupMemberByGroupIDAndUserID(groupID, userID string) error {
|
||||
// return GroupMemberDB.Table("group_members").Where("group_id=? and user_id=? ", groupID, userID).Delete(GroupMemberModel{}).Error
|
||||
//}
|
||||
//
|
||||
//func DeleteGroupMemberByGroupID(groupID string) error {
|
||||
// return GroupMemberDB.Table("group_members").Where("group_id=? ", groupID).Delete(GroupMemberModel{}).Error
|
||||
//}
|
||||
//
|
||||
//func UpdateGroupMemberInfo(groupMemberInfo GroupMemberModel) error {
|
||||
// return GroupMemberDB.Table("group_members").Where("group_id=? and user_id=?", groupMemberInfo.GroupID, groupMemberInfo.UserID).Updates(&groupMemberInfo).Error
|
||||
//}
|
||||
//
|
||||
//func UpdateGroupMemberInfoByMap(groupMemberInfo GroupMemberModel, m map[string]interface{}) error {
|
||||
// return GroupMemberDB.Table("group_members").Where("group_id=? and user_id=?", groupMemberInfo.GroupID, groupMemberInfo.UserID).Updates(m).Error
|
||||
//}
|
||||
//
|
||||
//func GetOwnerManagerByGroupID(groupID string) ([]GroupMemberModel, error) {
|
||||
// var groupMemberList []GroupMemberModel
|
||||
// err := GroupMemberDB.Table("group_members").Where("group_id=? and role_level>?", groupID, constant.GroupOrdinaryUsers).Find(&groupMemberList).Error
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return groupMemberList, nil
|
||||
//}
|
||||
//
|
||||
//func GetGroupMemberNumByGroupID(groupID string) (int64, error) {
|
||||
// var number int64
|
||||
// err := GroupMemberDB.Table("group_members").Where("group_id=?", groupID).Count(&number).Error
|
||||
// if err != nil {
|
||||
// return 0, utils.Wrap(err, "")
|
||||
// }
|
||||
// return number, nil
|
||||
//}
|
||||
//
|
||||
//func GetGroupOwnerInfoByGroupID(groupID string) (*GroupMemberModel, error) {
|
||||
// omList, err := GetOwnerManagerByGroupID(groupID)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// for _, v := range omList {
|
||||
// if v.RoleLevel == constant.GroupOwner {
|
||||
// return &v, nil
|
||||
// }
|
||||
// }
|
||||
// return nil, utils.Wrap(constant.ErrGroupNoOwner, "")
|
||||
//}
|
||||
//
|
||||
//func IsExistGroupMember(groupID, userID string) bool {
|
||||
// var number int64
|
||||
// err := GroupMemberDB.Table("group_members").Where("group_id = ? and user_id = ?", groupID, userID).Count(&number).Error
|
||||
// if err != nil {
|
||||
// return false
|
||||
// }
|
||||
// if number != 1 {
|
||||
// return false
|
||||
// }
|
||||
// return true
|
||||
//}
|
||||
//
|
||||
//func CheckIsExistGroupMember(ctx context.Context, groupID, userID string) error {
|
||||
// var number int64
|
||||
// err := GroupMemberDB.Table("group_members").Where("group_id = ? and user_id = ?", groupID, userID).Count(&number).Error
|
||||
// if err != nil {
|
||||
// return constant.ErrDB.Wrap()
|
||||
// }
|
||||
// if number != 1 {
|
||||
// return constant.ErrData.Wrap()
|
||||
// }
|
||||
// return nil
|
||||
//}
|
||||
//
|
||||
//func GetGroupMemberByGroupID(groupID string, filter int32, begin int32, maxNumber int32) ([]GroupMember, error) {
|
||||
// var memberList []GroupMember
|
||||
// var err error
|
||||
// if filter >= 0 {
|
||||
// memberList, err = GetGroupMemberListByGroupIDAndRoleLevel(groupID, filter) //sorted by join time
|
||||
// } else {
|
||||
// memberList, err = GetGroupMemberListByGroupID(groupID)
|
||||
// }
|
||||
//
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// if begin >= int32(len(memberList)) {
|
||||
// return nil, nil
|
||||
// }
|
||||
//
|
||||
// var end int32
|
||||
// if begin+int32(maxNumber) < int32(len(memberList)) {
|
||||
// end = begin + maxNumber
|
||||
// } else {
|
||||
// end = int32(len(memberList))
|
||||
// }
|
||||
// return memberList[begin:end], nil
|
||||
//}
|
||||
//
|
||||
//func GetJoinedGroupIDListByUserID(userID string) ([]string, error) {
|
||||
// memberList, err := GetGroupMemberListByUserID(userID)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// var groupIDList []string
|
||||
// for _, v := range memberList {
|
||||
// groupIDList = append(groupIDList, v.GroupID)
|
||||
// }
|
||||
// return groupIDList, nil
|
||||
//}
|
||||
//
|
||||
//func IsGroupOwnerAdmin(groupID, UserID string) bool {
|
||||
// groupMemberList, err := GetOwnerManagerByGroupID(groupID)
|
||||
// if err != nil {
|
||||
// return false
|
||||
// }
|
||||
// for _, v := range groupMemberList {
|
||||
// if v.UserID == UserID && v.RoleLevel > constant.GroupOrdinaryUsers {
|
||||
// return true
|
||||
// }
|
||||
// }
|
||||
// return false
|
||||
//}
|
||||
//
|
||||
//func GetGroupMembersByGroupIdCMS(groupId string, userName string, showNumber, pageNumber int32) ([]GroupMember, error) {
|
||||
// var groupMembers []GroupMember
|
||||
// err := GroupMemberDB.Table("group_members").Where("group_id=?", groupId).Where(fmt.Sprintf(" nickname like '%%%s%%' ", userName)).Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&groupMembers).Error
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return groupMembers, nil
|
||||
//}
|
||||
//
|
||||
//func GetGroupMembersCount(groupID, userName string) (int64, error) {
|
||||
// var count int64
|
||||
// if err := GroupMemberDB.Table("group_members").Where("group_id=?", groupID).Where(fmt.Sprintf(" nickname like '%%%s%%' ", userName)).Count(&count).Error; err != nil {
|
||||
// return count, err
|
||||
// }
|
||||
// return count, nil
|
||||
//}
|
||||
//
|
||||
//func UpdateGroupMemberInfoDefaultZero(groupMemberInfo GroupMember, args map[string]interface{}) error {
|
||||
// return GroupMemberDB.Model(groupMemberInfo).Updates(args).Error
|
||||
//}
|
||||
func (g *GroupMemberGorm) PageByUser(ctx context.Context, userID string, pageNumber, showNumber int32, tx ...*gorm.DB) (total int32, groupList []*relation.GroupMemberModel, err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userID", userID, "total", total, "groupList", groupList)
|
||||
}()
|
||||
return gormPage[relation.GroupMemberModel](getDBConn(g.DB, tx).Where("user_id = ?", userID), pageNumber, showNumber)
|
||||
}
|
||||
|
||||
func (g *GroupMemberGorm) SearchMember(ctx context.Context, groupID string, name string, pageNumber, showNumber int32, tx ...*gorm.DB) (total int32, groupList []*relation.GroupMemberModel, err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "name", name, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groupList", groupList)
|
||||
}()
|
||||
return gormSearch[relation.GroupMemberModel](getDBConn(g.DB, tx).Where("group_id = ?", groupID), "nickname", name, pageNumber, showNumber)
|
||||
}
|
||||
|
@ -30,20 +30,27 @@ func (g *GroupGorm) Delete(ctx context.Context, groupIDs []string, tx ...*gorm.D
|
||||
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id in (?)", groupIDs).Delete(&relation.GroupModel{}).Error, "")
|
||||
}
|
||||
|
||||
func (g *GroupGorm) UpdateByMap(ctx context.Context, groupID string, args map[string]interface{}, tx ...*gorm.DB) (err error) {
|
||||
func (g *GroupGorm) UpdateMap(ctx context.Context, groupID string, args map[string]interface{}, tx ...*gorm.DB) (err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "args", args)
|
||||
}()
|
||||
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Model(g).Updates(args).Error, "")
|
||||
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Model(&relation.GroupModel{}).Updates(args).Error, "")
|
||||
}
|
||||
|
||||
func (g *GroupGorm) Update(ctx context.Context, groups []*relation.GroupModel, tx ...*gorm.DB) (err error) {
|
||||
func (g *GroupGorm) UpdateStatus(ctx context.Context, groupID string, status int32, tx ...*gorm.DB) (err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groups", groups)
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "status", status)
|
||||
}()
|
||||
return utils.Wrap(getDBConn(g.DB, tx).Updates(&groups).Error, "")
|
||||
return utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Model(&relation.GroupModel{}).Updates(map[string]any{"status": status}).Error, "")
|
||||
}
|
||||
|
||||
//func (g *GroupGorm) Update(ctx context.Context, groups []*relation.GroupModel, tx ...*gorm.DB) (err error) {
|
||||
// defer func() {
|
||||
// tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groups", groups)
|
||||
// }()
|
||||
// return utils.Wrap(getDBConn(g.DB, tx).Updates(&groups).Error, "")
|
||||
//}
|
||||
|
||||
func (g *GroupGorm) Find(ctx context.Context, groupIDs []string, tx ...*gorm.DB) (groups []*relation.GroupModel, err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupIDs", groupIDs, "groups", groups)
|
||||
@ -54,7 +61,14 @@ func (g *GroupGorm) Find(ctx context.Context, groupIDs []string, tx ...*gorm.DB)
|
||||
func (g *GroupGorm) Take(ctx context.Context, groupID string, tx ...*gorm.DB) (group *relation.GroupModel, err error) {
|
||||
group = &relation.GroupModel{}
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "group", *group)
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "groupID", groupID, "group", group)
|
||||
}()
|
||||
return group, utils.Wrap(getDBConn(g.DB, tx).Where("group_id = ?", groupID).Take(group).Error, "")
|
||||
}
|
||||
|
||||
func (g *GroupGorm) Search(ctx context.Context, name string, pageNumber, showNumber int32, tx ...*gorm.DB) (total int32, groups []*relation.GroupModel, err error) {
|
||||
defer func() {
|
||||
tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "name", name, "pageNumber", pageNumber, "showNumber", showNumber, "total", total, "groups", groups)
|
||||
}()
|
||||
return gormSearch[relation.GroupModel](getDBConn(g.DB, tx), "name", name, pageNumber, showNumber)
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ package relation
|
||||
//received
|
||||
//func GetRecvGroupApplicationList(userID string) ([]GroupRequest, error) {
|
||||
// var groupRequestList []GroupRequest
|
||||
// memberList, err := GetGroupMemberListByUserID(userID)
|
||||
// memberList, err := FindGroupMember(userID)
|
||||
// if err != nil {
|
||||
// return nil, utils.Wrap(err, utils.GetSelfFuncName())
|
||||
// }
|
||||
|
25
pkg/common/db/relation/utils.go
Normal file
25
pkg/common/db/relation/utils.go
Normal file
@ -0,0 +1,25 @@
|
||||
package relation
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/utils"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func gormPage[E any](db *gorm.DB, pageNumber, showNumber int32) (int32, []*E, error) {
|
||||
var count int64
|
||||
if err := db.Model(new(E)).Count(&count).Error; err != nil {
|
||||
return 0, nil, utils.Wrap(err, "")
|
||||
}
|
||||
var es []*E
|
||||
if err := db.Limit(int(showNumber)).Offset(int(pageNumber * showNumber)).Find(&es).Error; err != nil {
|
||||
return 0, nil, utils.Wrap(err, "")
|
||||
}
|
||||
return int32(count), es, nil
|
||||
}
|
||||
|
||||
func gormSearch[E any](db *gorm.DB, field string, value string, pageNumber, showNumber int32) (int32, []*E, error) {
|
||||
if field != "" && value != "" {
|
||||
db = db.Where(field+" like ?", "%"+value+"%")
|
||||
}
|
||||
return gormPage[E](db, pageNumber, showNumber)
|
||||
}
|
@ -12,7 +12,7 @@ type GroupModel struct {
|
||||
Notification string `gorm:"column:notification;size:255" json:"notification"`
|
||||
Introduction string `gorm:"column:introduction;size:255" json:"introduction"`
|
||||
FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"`
|
||||
CreateTime time.Time `gorm:"column:create_time;index:create_time"`
|
||||
CreateTime time.Time `gorm:"column:create_time;index:create_time;autoCreateTime"`
|
||||
Ex string `gorm:"column:ex" json:"ex;size:1024" json:"ex"`
|
||||
Status int32 `gorm:"column:status"`
|
||||
CreatorUserID string `gorm:"column:creator_user_id;size:64"`
|
||||
|
@ -1,6 +1,8 @@
|
||||
package unrelation
|
||||
|
||||
import (
|
||||
commonPb "Open_IM/pkg/proto/sdk_ws"
|
||||
"context"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
@ -51,3 +53,17 @@ func (e *ExtendMsgSet) SplitSourceIDAndGetIndex() int32 {
|
||||
index, _ := strconv.Atoi(l[len(l)-1])
|
||||
return int32(index)
|
||||
}
|
||||
|
||||
type GetAllExtendMsgSetOpts struct {
|
||||
ExcludeExtendMsgs bool
|
||||
}
|
||||
|
||||
type ExtendMsgSetInterface interface {
|
||||
CreateExtendMsgSet(ctx context.Context, set *ExtendMsgSet) error
|
||||
GetAllExtendMsgSet(ctx context.Context, ID string, opts *GetAllExtendMsgSetOpts) (sets []*ExtendMsgSet, err error)
|
||||
GetExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, maxMsgUpdateTime int64) (*ExtendMsgSet, error)
|
||||
InsertExtendMsg(ctx context.Context, sourceID string, sessionType int32, msg *ExtendMsg) error
|
||||
InsertOrUpdateReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*commonPb.KeyValue) error
|
||||
DeleteReactionExtendMsgSet(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, msgFirstModifyTime int64, reactionExtensionList map[string]*commonPb.KeyValue) error
|
||||
GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clientMsgID string, maxMsgUpdateTime int64) (extendMsg *ExtendMsg, err error)
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package unrelation
|
||||
|
||||
import "go.mongodb.org/mongo-driver/mongo"
|
||||
|
||||
const (
|
||||
CSuperGroup = "super_group"
|
||||
CUserToSuperGroup = "user_to_super_group"
|
||||
@ -24,4 +26,5 @@ func (UserToSuperGroupModel) TableName() string {
|
||||
}
|
||||
|
||||
type SuperGroupModelInterface interface {
|
||||
CreateSuperGroup(sCtx mongo.SessionContext, groupID string, initMemberIDs []string) error
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package getcdv3
|
||||
package discoveryRegistry
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
@ -7,12 +7,18 @@ import (
|
||||
"fmt"
|
||||
"github.com/OpenIMSDK/getcdv3"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
"google.golang.org/grpc"
|
||||
"time"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type SvcDiscoveryRegistry interface {
|
||||
GetConns(serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error)
|
||||
GetConn(serviceName string, strategy func(slice []*grpc.ClientConn) int, opts ...grpc.DialOption) (*grpc.ClientConn, error)
|
||||
}
|
||||
|
||||
func registerConf(key, conf string) {
|
||||
etcdAddr := strings.Join(config.Config.Etcd.EtcdAddr, ",")
|
||||
cli, err := clientv3.New(clientv3.Config{
|
@ -39,7 +39,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} }
|
||||
func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateGroupReq) ProtoMessage() {}
|
||||
func (*CreateGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{0}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{0}
|
||||
}
|
||||
func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b)
|
||||
@ -98,7 +98,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} }
|
||||
func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateGroupResp) ProtoMessage() {}
|
||||
func (*CreateGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{1}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{1}
|
||||
}
|
||||
func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b)
|
||||
@ -136,7 +136,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} }
|
||||
func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsInfoReq) ProtoMessage() {}
|
||||
func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{2}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{2}
|
||||
}
|
||||
func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b)
|
||||
@ -174,7 +174,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} }
|
||||
func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsInfoResp) ProtoMessage() {}
|
||||
func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{3}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{3}
|
||||
}
|
||||
func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b)
|
||||
@ -212,7 +212,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} }
|
||||
func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupInfoReq) ProtoMessage() {}
|
||||
func (*SetGroupInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{4}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{4}
|
||||
}
|
||||
func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b)
|
||||
@ -249,7 +249,7 @@ func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} }
|
||||
func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupInfoResp) ProtoMessage() {}
|
||||
func (*SetGroupInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{5}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{5}
|
||||
}
|
||||
func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b)
|
||||
@ -281,7 +281,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL
|
||||
func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupApplicationListReq) ProtoMessage() {}
|
||||
func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{6}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{6}
|
||||
}
|
||||
func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b)
|
||||
@ -327,7 +327,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication
|
||||
func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupApplicationListResp) ProtoMessage() {}
|
||||
func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{7}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{7}
|
||||
}
|
||||
func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b)
|
||||
@ -373,7 +373,7 @@ func (m *GetUserReqApplicationListReq) Reset() { *m = GetUserReqApplicat
|
||||
func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserReqApplicationListReq) ProtoMessage() {}
|
||||
func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{8}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{8}
|
||||
}
|
||||
func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b)
|
||||
@ -419,7 +419,7 @@ func (m *GetUserReqApplicationListResp) Reset() { *m = GetUserReqApplica
|
||||
func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserReqApplicationListResp) ProtoMessage() {}
|
||||
func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{9}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{9}
|
||||
}
|
||||
func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b)
|
||||
@ -466,7 +466,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} }
|
||||
func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransferGroupOwnerReq) ProtoMessage() {}
|
||||
func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{10}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{10}
|
||||
}
|
||||
func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b)
|
||||
@ -517,7 +517,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{}
|
||||
func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransferGroupOwnerResp) ProtoMessage() {}
|
||||
func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{11}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{11}
|
||||
}
|
||||
func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b)
|
||||
@ -551,7 +551,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} }
|
||||
func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinGroupReq) ProtoMessage() {}
|
||||
func (*JoinGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{12}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{12}
|
||||
}
|
||||
func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b)
|
||||
@ -609,7 +609,7 @@ func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} }
|
||||
func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinGroupResp) ProtoMessage() {}
|
||||
func (*JoinGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{13}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{13}
|
||||
}
|
||||
func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b)
|
||||
@ -643,7 +643,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes
|
||||
func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupApplicationResponseReq) ProtoMessage() {}
|
||||
func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{14}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{14}
|
||||
}
|
||||
func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b)
|
||||
@ -701,7 +701,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe
|
||||
func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupApplicationResponseResp) ProtoMessage() {}
|
||||
func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{15}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{15}
|
||||
}
|
||||
func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b)
|
||||
@ -732,7 +732,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} }
|
||||
func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuitGroupReq) ProtoMessage() {}
|
||||
func (*QuitGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{16}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{16}
|
||||
}
|
||||
func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b)
|
||||
@ -769,7 +769,7 @@ func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} }
|
||||
func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuitGroupResp) ProtoMessage() {}
|
||||
func (*QuitGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{17}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{17}
|
||||
}
|
||||
func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b)
|
||||
@ -802,7 +802,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} }
|
||||
func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMemberListReq) ProtoMessage() {}
|
||||
func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{18}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{18}
|
||||
}
|
||||
func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b)
|
||||
@ -855,7 +855,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{}
|
||||
func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMemberListResp) ProtoMessage() {}
|
||||
func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{19}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{19}
|
||||
}
|
||||
func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b)
|
||||
@ -901,7 +901,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{}
|
||||
func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersInfoReq) ProtoMessage() {}
|
||||
func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{20}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{20}
|
||||
}
|
||||
func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b)
|
||||
@ -946,7 +946,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp
|
||||
func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersInfoResp) ProtoMessage() {}
|
||||
func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{21}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{21}
|
||||
}
|
||||
func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b)
|
||||
@ -986,7 +986,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} }
|
||||
func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*KickGroupMemberReq) ProtoMessage() {}
|
||||
func (*KickGroupMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{22}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{22}
|
||||
}
|
||||
func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b)
|
||||
@ -1037,7 +1037,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} }
|
||||
func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*KickGroupMemberResp) ProtoMessage() {}
|
||||
func (*KickGroupMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{23}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{23}
|
||||
}
|
||||
func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b)
|
||||
@ -1069,7 +1069,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} }
|
||||
func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetJoinedGroupListReq) ProtoMessage() {}
|
||||
func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{24}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{24}
|
||||
}
|
||||
func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b)
|
||||
@ -1115,7 +1115,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{}
|
||||
func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetJoinedGroupListResp) ProtoMessage() {}
|
||||
func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{25}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{25}
|
||||
}
|
||||
func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b)
|
||||
@ -1162,7 +1162,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} }
|
||||
func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*InviteUserToGroupReq) ProtoMessage() {}
|
||||
func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{26}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{26}
|
||||
}
|
||||
func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b)
|
||||
@ -1213,7 +1213,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} }
|
||||
func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*InviteUserToGroupResp) ProtoMessage() {}
|
||||
func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{27}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{27}
|
||||
}
|
||||
func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b)
|
||||
@ -1245,7 +1245,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} }
|
||||
func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupAllMemberReq) ProtoMessage() {}
|
||||
func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{28}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{28}
|
||||
}
|
||||
func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b)
|
||||
@ -1290,7 +1290,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} }
|
||||
func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupAllMemberResp) ProtoMessage() {}
|
||||
func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{29}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{29}
|
||||
}
|
||||
func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b)
|
||||
@ -1330,7 +1330,7 @@ func (m *CMSGroup) Reset() { *m = CMSGroup{} }
|
||||
func (m *CMSGroup) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMSGroup) ProtoMessage() {}
|
||||
func (*CMSGroup) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{30}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{30}
|
||||
}
|
||||
func (m *CMSGroup) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CMSGroup.Unmarshal(m, b)
|
||||
@ -1384,7 +1384,7 @@ func (m *GetGroupsReq) Reset() { *m = GetGroupsReq{} }
|
||||
func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsReq) ProtoMessage() {}
|
||||
func (*GetGroupsReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{31}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{31}
|
||||
}
|
||||
func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b)
|
||||
@ -1437,7 +1437,7 @@ func (m *GetGroupsResp) Reset() { *m = GetGroupsResp{} }
|
||||
func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsResp) ProtoMessage() {}
|
||||
func (*GetGroupsResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{32}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{32}
|
||||
}
|
||||
func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b)
|
||||
@ -1482,7 +1482,7 @@ func (m *GetGroupMemberReq) Reset() { *m = GetGroupMemberReq{} }
|
||||
func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMemberReq) ProtoMessage() {}
|
||||
func (*GetGroupMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{33}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{33}
|
||||
}
|
||||
func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b)
|
||||
@ -1522,7 +1522,7 @@ func (m *GetGroupMembersCMSReq) Reset() { *m = GetGroupMembersCMSReq{} }
|
||||
func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersCMSReq) ProtoMessage() {}
|
||||
func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{34}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{34}
|
||||
}
|
||||
func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b)
|
||||
@ -1565,8 +1565,7 @@ func (m *GetGroupMembersCMSReq) GetPagination() *sdk_ws.RequestPagination {
|
||||
|
||||
type GetGroupMembersCMSResp struct {
|
||||
Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"`
|
||||
Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"`
|
||||
MemberNums int32 `protobuf:"varint,3,opt,name=memberNums" json:"memberNums,omitempty"`
|
||||
MemberNums int32 `protobuf:"varint,2,opt,name=memberNums" json:"memberNums,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -1576,7 +1575,7 @@ func (m *GetGroupMembersCMSResp) Reset() { *m = GetGroupMembersCMSResp{}
|
||||
func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersCMSResp) ProtoMessage() {}
|
||||
func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{35}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{35}
|
||||
}
|
||||
func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b)
|
||||
@ -1603,13 +1602,6 @@ func (m *GetGroupMembersCMSResp) GetMembers() []*sdk_ws.GroupMemberFullInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GetGroupMembersCMSResp) GetPagination() *sdk_ws.ResponsePagination {
|
||||
if m != nil {
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GetGroupMembersCMSResp) GetMemberNums() int32 {
|
||||
if m != nil {
|
||||
return m.MemberNums
|
||||
@ -1628,7 +1620,7 @@ func (m *DismissGroupReq) Reset() { *m = DismissGroupReq{} }
|
||||
func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*DismissGroupReq) ProtoMessage() {}
|
||||
func (*DismissGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{36}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{36}
|
||||
}
|
||||
func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b)
|
||||
@ -1665,7 +1657,7 @@ func (m *DismissGroupResp) Reset() { *m = DismissGroupResp{} }
|
||||
func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*DismissGroupResp) ProtoMessage() {}
|
||||
func (*DismissGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{37}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{37}
|
||||
}
|
||||
func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b)
|
||||
@ -1698,7 +1690,7 @@ func (m *MuteGroupMemberReq) Reset() { *m = MuteGroupMemberReq{} }
|
||||
func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*MuteGroupMemberReq) ProtoMessage() {}
|
||||
func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{38}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{38}
|
||||
}
|
||||
func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b)
|
||||
@ -1749,7 +1741,7 @@ func (m *MuteGroupMemberResp) Reset() { *m = MuteGroupMemberResp{} }
|
||||
func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*MuteGroupMemberResp) ProtoMessage() {}
|
||||
func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{39}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{39}
|
||||
}
|
||||
func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b)
|
||||
@ -1781,7 +1773,7 @@ func (m *CancelMuteGroupMemberReq) Reset() { *m = CancelMuteGroupMemberR
|
||||
func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelMuteGroupMemberReq) ProtoMessage() {}
|
||||
func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{40}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{40}
|
||||
}
|
||||
func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b)
|
||||
@ -1825,7 +1817,7 @@ func (m *CancelMuteGroupMemberResp) Reset() { *m = CancelMuteGroupMember
|
||||
func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelMuteGroupMemberResp) ProtoMessage() {}
|
||||
func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{41}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{41}
|
||||
}
|
||||
func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b)
|
||||
@ -1856,7 +1848,7 @@ func (m *MuteGroupReq) Reset() { *m = MuteGroupReq{} }
|
||||
func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*MuteGroupReq) ProtoMessage() {}
|
||||
func (*MuteGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{42}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{42}
|
||||
}
|
||||
func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b)
|
||||
@ -1893,7 +1885,7 @@ func (m *MuteGroupResp) Reset() { *m = MuteGroupResp{} }
|
||||
func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*MuteGroupResp) ProtoMessage() {}
|
||||
func (*MuteGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{43}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{43}
|
||||
}
|
||||
func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b)
|
||||
@ -1924,7 +1916,7 @@ func (m *CancelMuteGroupReq) Reset() { *m = CancelMuteGroupReq{} }
|
||||
func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelMuteGroupReq) ProtoMessage() {}
|
||||
func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{44}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{44}
|
||||
}
|
||||
func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b)
|
||||
@ -1961,7 +1953,7 @@ func (m *CancelMuteGroupResp) Reset() { *m = CancelMuteGroupResp{} }
|
||||
func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CancelMuteGroupResp) ProtoMessage() {}
|
||||
func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{45}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{45}
|
||||
}
|
||||
func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b)
|
||||
@ -1994,7 +1986,7 @@ func (m *SetGroupMemberNicknameReq) Reset() { *m = SetGroupMemberNicknam
|
||||
func (m *SetGroupMemberNicknameReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupMemberNicknameReq) ProtoMessage() {}
|
||||
func (*SetGroupMemberNicknameReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{46}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{46}
|
||||
}
|
||||
func (m *SetGroupMemberNicknameReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupMemberNicknameReq.Unmarshal(m, b)
|
||||
@ -2045,7 +2037,7 @@ func (m *SetGroupMemberNicknameResp) Reset() { *m = SetGroupMemberNickna
|
||||
func (m *SetGroupMemberNicknameResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupMemberNicknameResp) ProtoMessage() {}
|
||||
func (*SetGroupMemberNicknameResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{47}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{47}
|
||||
}
|
||||
func (m *SetGroupMemberNicknameResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupMemberNicknameResp.Unmarshal(m, b)
|
||||
@ -2077,7 +2069,7 @@ func (m *GetJoinedSuperGroupListReq) Reset() { *m = GetJoinedSuperGroupL
|
||||
func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetJoinedSuperGroupListReq) ProtoMessage() {}
|
||||
func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{48}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{48}
|
||||
}
|
||||
func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b)
|
||||
@ -2123,7 +2115,7 @@ func (m *GetJoinedSuperGroupListResp) Reset() { *m = GetJoinedSuperGroup
|
||||
func (m *GetJoinedSuperGroupListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetJoinedSuperGroupListResp) ProtoMessage() {}
|
||||
func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{49}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{49}
|
||||
}
|
||||
func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b)
|
||||
@ -2168,7 +2160,7 @@ func (m *GetSuperGroupsInfoReq) Reset() { *m = GetSuperGroupsInfoReq{} }
|
||||
func (m *GetSuperGroupsInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetSuperGroupsInfoReq) ProtoMessage() {}
|
||||
func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{50}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{50}
|
||||
}
|
||||
func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b)
|
||||
@ -2206,7 +2198,7 @@ func (m *GetSuperGroupsInfoResp) Reset() { *m = GetSuperGroupsInfoResp{}
|
||||
func (m *GetSuperGroupsInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetSuperGroupsInfoResp) ProtoMessage() {}
|
||||
func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{51}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{51}
|
||||
}
|
||||
func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b)
|
||||
@ -2249,7 +2241,7 @@ func (m *SetGroupMemberInfoReq) Reset() { *m = SetGroupMemberInfoReq{} }
|
||||
func (m *SetGroupMemberInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupMemberInfoReq) ProtoMessage() {}
|
||||
func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{52}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{52}
|
||||
}
|
||||
func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b)
|
||||
@ -2321,7 +2313,7 @@ func (m *SetGroupMemberInfoResp) Reset() { *m = SetGroupMemberInfoResp{}
|
||||
func (m *SetGroupMemberInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupMemberInfoResp) ProtoMessage() {}
|
||||
func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{53}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{53}
|
||||
}
|
||||
func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b)
|
||||
@ -2352,7 +2344,7 @@ func (m *GetGroupAbstractInfoReq) Reset() { *m = GetGroupAbstractInfoReq
|
||||
func (m *GetGroupAbstractInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupAbstractInfoReq) ProtoMessage() {}
|
||||
func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{54}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{54}
|
||||
}
|
||||
func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b)
|
||||
@ -2392,7 +2384,7 @@ func (m *GroupAbstractInfo) Reset() { *m = GroupAbstractInfo{} }
|
||||
func (m *GroupAbstractInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupAbstractInfo) ProtoMessage() {}
|
||||
func (*GroupAbstractInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{55}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{55}
|
||||
}
|
||||
func (m *GroupAbstractInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupAbstractInfo.Unmarshal(m, b)
|
||||
@ -2444,7 +2436,7 @@ func (m *GetGroupAbstractInfoResp) Reset() { *m = GetGroupAbstractInfoRe
|
||||
func (m *GetGroupAbstractInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupAbstractInfoResp) ProtoMessage() {}
|
||||
func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{56}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{56}
|
||||
}
|
||||
func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b)
|
||||
@ -2483,7 +2475,7 @@ func (m *GetUserInGroupMembersReq) Reset() { *m = GetUserInGroupMembersR
|
||||
func (m *GetUserInGroupMembersReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserInGroupMembersReq) ProtoMessage() {}
|
||||
func (*GetUserInGroupMembersReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{57}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{57}
|
||||
}
|
||||
func (m *GetUserInGroupMembersReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserInGroupMembersReq.Unmarshal(m, b)
|
||||
@ -2528,7 +2520,7 @@ func (m *GetUserInGroupMembersResp) Reset() { *m = GetUserInGroupMembers
|
||||
func (m *GetUserInGroupMembersResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserInGroupMembersResp) ProtoMessage() {}
|
||||
func (*GetUserInGroupMembersResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_5c8d3aafef0e7d21, []int{58}
|
||||
return fileDescriptor_group_d88c7f5350508ce3, []int{58}
|
||||
}
|
||||
func (m *GetUserInGroupMembersResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserInGroupMembersResp.Unmarshal(m, b)
|
||||
@ -3166,7 +3158,7 @@ func _Group_GetGroupMemberList_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/group.group/GetGroupMemberList",
|
||||
FullMethod: "/group.group/FindGroupMemberAll",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServer).GetGroupMemberList(ctx, req.(*GetGroupMemberListReq))
|
||||
@ -3220,7 +3212,7 @@ func _Group_GetJoinedGroupList_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/group.group/GetJoinedGroupList",
|
||||
FullMethod: "/group.group/FindJoinedGroup",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupServer).GetJoinedGroupList(ctx, req.(*GetJoinedGroupListReq))
|
||||
@ -3597,124 +3589,123 @@ var _Group_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "group/group.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_5c8d3aafef0e7d21) }
|
||||
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_d88c7f5350508ce3) }
|
||||
|
||||
var fileDescriptor_group_5c8d3aafef0e7d21 = []byte{
|
||||
// 1851 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x53, 0xe4, 0xc6,
|
||||
0x11, 0x2f, 0x2d, 0x07, 0x77, 0xf4, 0x81, 0xe1, 0x06, 0x16, 0x74, 0x82, 0x03, 0x3c, 0x26, 0x0e,
|
||||
0x95, 0xf8, 0x96, 0xd4, 0x5d, 0xe2, 0xca, 0x1f, 0x57, 0x39, 0x36, 0xd8, 0x98, 0x84, 0x85, 0x9c,
|
||||
0x16, 0x3b, 0x15, 0xa7, 0x5c, 0x44, 0xec, 0x0e, 0xb2, 0x0e, 0xad, 0x34, 0x68, 0xb4, 0xe0, 0x72,
|
||||
0x39, 0x0f, 0xc9, 0x73, 0xfe, 0x3c, 0xe4, 0x31, 0x6f, 0xa9, 0x7c, 0x84, 0x7c, 0x81, 0x7c, 0x95,
|
||||
0x7c, 0x92, 0x94, 0x66, 0x46, 0xb3, 0x23, 0x69, 0xb4, 0xbb, 0xc1, 0x9b, 0x97, 0xad, 0x52, 0x4f,
|
||||
0xf7, 0x4c, 0x4f, 0xff, 0x9b, 0x5f, 0xf7, 0xc2, 0x13, 0x3f, 0x89, 0x07, 0x74, 0x9f, 0xff, 0xb6,
|
||||
0x68, 0x12, 0xa7, 0x31, 0x9a, 0xe5, 0x1f, 0xce, 0xde, 0x19, 0x25, 0xd1, 0xf3, 0xe3, 0xf6, 0xf3,
|
||||
0x0e, 0x49, 0x6e, 0x49, 0xb2, 0x4f, 0xaf, 0xfd, 0x7d, 0xce, 0xb0, 0xcf, 0x7a, 0xd7, 0x17, 0x77,
|
||||
0x6c, 0xff, 0x8e, 0x09, 0x01, 0xa7, 0x35, 0x96, 0x33, 0xf1, 0x28, 0x25, 0x89, 0xe4, 0xc7, 0xff,
|
||||
0xb2, 0xe0, 0x8d, 0x83, 0x84, 0x78, 0x29, 0x39, 0xca, 0x4e, 0x72, 0xc9, 0x0d, 0xda, 0x81, 0xc7,
|
||||
0x41, 0x14, 0xa4, 0x6d, 0xd2, 0xbf, 0x24, 0x09, 0xb3, 0xad, 0x9d, 0x99, 0xbd, 0x79, 0x57, 0x27,
|
||||
0xa1, 0x9f, 0xc2, 0x3c, 0xd7, 0xeb, 0x38, 0xba, 0x8a, 0xed, 0xc6, 0x8e, 0xb5, 0xf7, 0xf8, 0xc5,
|
||||
0x66, 0x8b, 0xf1, 0x03, 0x2f, 0x3c, 0x1a, 0x5c, 0x50, 0x2f, 0xf1, 0xfa, 0xac, 0x75, 0x94, 0xf3,
|
||||
0xb8, 0x43, 0x76, 0x84, 0x61, 0xc1, 0xeb, 0xf5, 0x83, 0xe8, 0x53, 0x46, 0x92, 0xe3, 0x43, 0x66,
|
||||
0xcf, 0xf0, 0xed, 0x0b, 0xb4, 0x4c, 0x83, 0xf8, 0x2e, 0x22, 0x89, 0xf8, 0xb6, 0x1f, 0xec, 0x58,
|
||||
0x99, 0x06, 0x1a, 0x09, 0xb7, 0x61, 0xa9, 0xa0, 0x35, 0xa3, 0x45, 0xa5, 0xac, 0xff, 0x49, 0x29,
|
||||
0xdc, 0x82, 0xe5, 0x23, 0x92, 0xf2, 0x25, 0xc6, 0xd7, 0xc8, 0x0d, 0x72, 0xe0, 0x91, 0x60, 0x38,
|
||||
0xcc, 0x6d, 0xa0, 0xbe, 0xf1, 0x2b, 0x78, 0x52, 0xe2, 0x67, 0x14, 0xbd, 0x07, 0xa0, 0x76, 0x14,
|
||||
0x22, 0xe3, 0x34, 0xd0, 0xf8, 0xf1, 0x05, 0x2c, 0x75, 0xe4, 0x96, 0xb9, 0x06, 0x27, 0xb0, 0xa4,
|
||||
0x18, 0x3e, 0x8e, 0x93, 0x0e, 0x49, 0xe5, 0xbd, 0xf0, 0xa8, 0x5d, 0x05, 0xa7, 0x5b, 0x16, 0xc5,
|
||||
0x08, 0x96, 0x8b, 0x07, 0x30, 0x8a, 0xff, 0x68, 0x81, 0x93, 0x5f, 0xe4, 0x03, 0x4a, 0xc3, 0xa0,
|
||||
0xeb, 0xa5, 0x41, 0x1c, 0x9d, 0x04, 0x2c, 0xcd, 0x14, 0x38, 0x04, 0xa0, 0x9e, 0x1f, 0x44, 0x9c,
|
||||
0x28, 0xcf, 0xde, 0x35, 0x9c, 0xed, 0x92, 0x9b, 0x01, 0x61, 0xe9, 0xaf, 0x14, 0xaf, 0xab, 0xc9,
|
||||
0xa1, 0x2d, 0x80, 0xab, 0x24, 0xee, 0x4b, 0x67, 0x36, 0xb8, 0x33, 0x35, 0x0a, 0xfe, 0x1a, 0x36,
|
||||
0x6a, 0x75, 0x60, 0x14, 0xad, 0xc2, 0x6c, 0x1a, 0xa7, 0x5e, 0xc8, 0xcf, 0x9f, 0x75, 0xc5, 0x07,
|
||||
0xfa, 0x08, 0x16, 0x7d, 0x19, 0xb0, 0xd9, 0xd1, 0xcc, 0x6e, 0x70, 0x7b, 0x6f, 0xd7, 0x59, 0x46,
|
||||
0xf2, 0xb9, 0x45, 0x29, 0xfc, 0x0d, 0x6c, 0x1e, 0x91, 0x34, 0x53, 0xc4, 0x25, 0x37, 0x06, 0x0b,
|
||||
0xac, 0xc1, 0xdc, 0x40, 0xe8, 0x6d, 0x71, 0xbd, 0xe5, 0x57, 0xc9, 0x32, 0x8d, 0xfb, 0x59, 0x06,
|
||||
0x7f, 0x03, 0xcf, 0x46, 0x9c, 0xfe, 0xff, 0xbe, 0xfb, 0x1f, 0x2c, 0x68, 0x9e, 0x27, 0x5e, 0xc4,
|
||||
0xae, 0x48, 0xc2, 0xf9, 0xce, 0xb2, 0x04, 0xcb, 0x6e, 0x6d, 0xc3, 0x43, 0x19, 0xea, 0xf2, 0xda,
|
||||
0xf9, 0x27, 0x7a, 0x1b, 0xde, 0x88, 0xc3, 0xde, 0x99, 0x96, 0x9c, 0xc2, 0x9f, 0x25, 0x6a, 0xc6,
|
||||
0x17, 0x91, 0x3b, 0x9d, 0x6f, 0x46, 0xf0, 0x15, 0xa9, 0xd8, 0x86, 0x35, 0x93, 0x0a, 0x8c, 0xe2,
|
||||
0xbf, 0x58, 0xb0, 0xf0, 0x8b, 0x38, 0x88, 0x54, 0x59, 0xaa, 0x57, 0x6a, 0x0b, 0x20, 0x21, 0x37,
|
||||
0x6d, 0xc2, 0x98, 0xe7, 0x93, 0x3c, 0xc0, 0x86, 0x94, 0x6c, 0xfd, 0x75, 0x1c, 0x44, 0x9d, 0x78,
|
||||
0x90, 0x74, 0x09, 0x57, 0x64, 0xd6, 0xd5, 0x28, 0x68, 0x17, 0x16, 0x83, 0xe8, 0x36, 0x48, 0x4b,
|
||||
0x05, 0xa7, 0x48, 0xc4, 0x4b, 0xb0, 0xa8, 0xe9, 0xc3, 0x28, 0xfe, 0xbb, 0x05, 0x1b, 0xe5, 0xa8,
|
||||
0xcd, 0x16, 0xe2, 0x88, 0x91, 0xb1, 0x0a, 0x8f, 0xca, 0x88, 0x6c, 0xfd, 0x4b, 0x2f, 0xea, 0x85,
|
||||
0xa4, 0xd7, 0x66, 0xbe, 0xb4, 0x9c, 0x46, 0xc9, 0x6a, 0xa8, 0xf8, 0x72, 0x09, 0x1b, 0x84, 0x29,
|
||||
0xd7, 0x77, 0xd6, 0x2d, 0xd0, 0xf0, 0x16, 0x6c, 0xd6, 0x2b, 0xc7, 0x28, 0xde, 0x83, 0x85, 0x57,
|
||||
0x83, 0x20, 0x1d, 0x6f, 0xde, 0xec, 0xe2, 0x1a, 0x27, 0xa3, 0xf8, 0xaf, 0x16, 0x34, 0xf3, 0x8c,
|
||||
0x15, 0x4f, 0x42, 0x9e, 0x2e, 0xf5, 0x57, 0x5e, 0x83, 0xb9, 0xab, 0x20, 0x4c, 0x49, 0xc2, 0xaf,
|
||||
0x3b, 0xeb, 0xca, 0xaf, 0x52, 0x22, 0x3d, 0xb8, 0x67, 0x22, 0x51, 0x58, 0x33, 0x29, 0x54, 0x9b,
|
||||
0x41, 0x3f, 0x87, 0x87, 0x7d, 0xf9, 0xbc, 0x89, 0xdc, 0x79, 0xbb, 0x2e, 0x77, 0xc4, 0x76, 0x1f,
|
||||
0x0f, 0xc2, 0x90, 0x17, 0xcd, 0x5c, 0x0c, 0x9f, 0x94, 0x4f, 0x54, 0xef, 0x46, 0xbd, 0x0d, 0xec,
|
||||
0xe2, 0xa9, 0xf3, 0xc3, 0xdd, 0x7e, 0x0b, 0xeb, 0xc6, 0xdd, 0x18, 0xd5, 0x55, 0xb5, 0xee, 0xa7,
|
||||
0x6a, 0x08, 0xe8, 0x97, 0x41, 0xf7, 0x5a, 0xe3, 0x19, 0xad, 0xe6, 0x2e, 0x2c, 0x5e, 0x07, 0xdd,
|
||||
0x6b, 0xd2, 0xcb, 0x9f, 0x68, 0xa1, 0x6c, 0x91, 0x98, 0x39, 0x34, 0x21, 0x1e, 0x8b, 0x23, 0x19,
|
||||
0x9f, 0xf2, 0x0b, 0x37, 0x61, 0xa5, 0x72, 0x1a, 0xa3, 0xf8, 0xf7, 0x3c, 0x64, 0xb2, 0x04, 0x22,
|
||||
0x3d, 0xbe, 0x96, 0x87, 0x4c, 0x31, 0x17, 0xac, 0x4a, 0x2e, 0x4c, 0xa7, 0xd2, 0xf6, 0xb8, 0xbb,
|
||||
0x2a, 0xc7, 0xd7, 0x06, 0xc8, 0x0f, 0x61, 0x8e, 0x9b, 0x23, 0x8f, 0x8f, 0xd1, 0xef, 0xb8, 0xe4,
|
||||
0xc5, 0x14, 0x56, 0x8f, 0x79, 0xcd, 0xc8, 0x74, 0x3f, 0x8f, 0x27, 0x28, 0x5d, 0x43, 0x2b, 0x36,
|
||||
0x74, 0x2b, 0x66, 0xf5, 0x53, 0x54, 0x9f, 0x5e, 0x11, 0x27, 0x95, 0xa8, 0x78, 0x1d, 0x9a, 0x86,
|
||||
0x13, 0x19, 0xc5, 0xb7, 0xb0, 0xaa, 0x1e, 0xd5, 0x30, 0x9c, 0xc4, 0xed, 0xd3, 0x31, 0xf4, 0x6f,
|
||||
0x86, 0xa5, 0x41, 0x3b, 0x77, 0x2a, 0x71, 0xfc, 0x0f, 0x0b, 0x1e, 0x1d, 0xb4, 0x3b, 0x9c, 0xe7,
|
||||
0xdb, 0xa0, 0x3d, 0xd4, 0x02, 0xe4, 0xab, 0xc7, 0x26, 0x33, 0xdc, 0xa9, 0xd7, 0xcf, 0xdf, 0x0d,
|
||||
0xc3, 0x0a, 0xfa, 0x1e, 0x2c, 0x17, 0xa9, 0xea, 0x39, 0xab, 0xd0, 0xf1, 0x9f, 0x2c, 0x58, 0x50,
|
||||
0xd0, 0x70, 0x7a, 0x18, 0x6a, 0x53, 0x5e, 0x57, 0xd3, 0x74, 0x48, 0xd0, 0x9d, 0x3a, 0x53, 0xac,
|
||||
0xdd, 0xe7, 0xb0, 0xa8, 0x69, 0xc3, 0x28, 0xfa, 0xae, 0x0a, 0x6c, 0xe1, 0x85, 0xa5, 0x96, 0x68,
|
||||
0x37, 0x72, 0xc3, 0xe6, 0xb1, 0x9c, 0xc1, 0x5f, 0x4e, 0x38, 0x1d, 0xf4, 0x65, 0xc9, 0x56, 0xdf,
|
||||
0xf8, 0xf9, 0x10, 0xfe, 0x4e, 0x10, 0x59, 0xf8, 0x6f, 0x95, 0xf7, 0x82, 0x1d, 0xb4, 0x3b, 0xa3,
|
||||
0xa3, 0xd1, 0x81, 0x47, 0x83, 0xa2, 0x67, 0xd4, 0x77, 0xc9, 0xa4, 0x33, 0xf7, 0x8c, 0xd4, 0x7f,
|
||||
0x5b, 0x95, 0x12, 0xce, 0xb5, 0x9a, 0x46, 0xac, 0xa2, 0x8f, 0x0c, 0xc9, 0xf4, 0x1d, 0xa3, 0x8a,
|
||||
0xe2, 0x49, 0xae, 0x87, 0xce, 0x62, 0xc7, 0xd3, 0x41, 0x9f, 0xe5, 0xc8, 0x65, 0x48, 0xc1, 0xdf,
|
||||
0x87, 0xa5, 0xc3, 0x80, 0xf5, 0x03, 0xc6, 0x26, 0x78, 0xc7, 0x11, 0x2c, 0x17, 0x99, 0x19, 0xc5,
|
||||
0xaf, 0x01, 0xb5, 0x07, 0xb2, 0x8b, 0x9a, 0xa4, 0x48, 0x0c, 0xf1, 0x70, 0xa3, 0x80, 0x87, 0x31,
|
||||
0x2c, 0xf4, 0x07, 0x29, 0xe9, 0x75, 0x48, 0x37, 0x8e, 0x7a, 0x42, 0xd5, 0x45, 0xb7, 0x40, 0xcb,
|
||||
0x5e, 0x86, 0xca, 0x59, 0x8c, 0xe2, 0x13, 0xb0, 0x0f, 0xbc, 0xa8, 0x4b, 0xc2, 0x69, 0x28, 0x82,
|
||||
0x37, 0xe0, 0x69, 0xcd, 0x6e, 0x02, 0xf3, 0x28, 0xf2, 0x58, 0xcc, 0xa3, 0x71, 0x32, 0x8a, 0x5b,
|
||||
0x80, 0x4a, 0xfb, 0x8e, 0xde, 0xa0, 0x09, 0x2b, 0x15, 0x7e, 0x46, 0x71, 0x00, 0x4f, 0x3b, 0x85,
|
||||
0x98, 0x3b, 0x0d, 0xba, 0xd7, 0x91, 0xd7, 0x27, 0x63, 0xb3, 0x21, 0x92, 0x8c, 0x79, 0x36, 0xe4,
|
||||
0xdf, 0x9a, 0x25, 0x66, 0x0a, 0x96, 0xd8, 0x04, 0xa7, 0xee, 0x28, 0x46, 0xf1, 0xd7, 0xbc, 0xf1,
|
||||
0x13, 0x0f, 0x62, 0x67, 0x40, 0x25, 0xfc, 0x9e, 0x6e, 0xe3, 0x57, 0xe7, 0xa3, 0x80, 0x37, 0x7c,
|
||||
0xe6, 0xb3, 0xa7, 0xfc, 0x22, 0xbf, 0xe4, 0x95, 0x67, 0x78, 0xc8, 0x44, 0xdd, 0xfd, 0x67, 0xbc,
|
||||
0x30, 0x54, 0x84, 0xbe, 0x75, 0x8b, 0xff, 0xcf, 0x06, 0x34, 0x8b, 0x2e, 0x19, 0x8f, 0x19, 0xeb,
|
||||
0x12, 0xee, 0xc7, 0x5a, 0x44, 0xcc, 0xc8, 0xe7, 0xcf, 0x8f, 0x63, 0x3f, 0x24, 0x62, 0xb0, 0x73,
|
||||
0x39, 0xb8, 0x6a, 0x75, 0xd2, 0x24, 0x88, 0xfc, 0xcf, 0xbc, 0x70, 0x40, 0xb4, 0x78, 0x79, 0x17,
|
||||
0x1e, 0x5e, 0x79, 0x5d, 0xf2, 0xa9, 0x7b, 0x22, 0xe1, 0xf6, 0x68, 0xc1, 0x9c, 0x19, 0xfd, 0x04,
|
||||
0xe6, 0x93, 0x38, 0x24, 0x27, 0xe4, 0x96, 0x84, 0xf6, 0x2c, 0x97, 0xdc, 0xa8, 0x48, 0x1e, 0x47,
|
||||
0xe9, 0xcb, 0x17, 0x42, 0x70, 0xc8, 0x8d, 0xde, 0x81, 0x06, 0xf9, 0xca, 0x9e, 0x9b, 0xe0, 0xb4,
|
||||
0x06, 0xf9, 0x2a, 0xeb, 0x09, 0x4d, 0x56, 0x62, 0x14, 0xff, 0x68, 0x08, 0x93, 0x3f, 0xb8, 0x64,
|
||||
0x69, 0xe2, 0x75, 0xd3, 0x49, 0xfc, 0xf9, 0x67, 0x0b, 0x9e, 0x54, 0x84, 0x46, 0xd8, 0xfc, 0x1d,
|
||||
0x39, 0x89, 0x6b, 0xe7, 0x85, 0xf6, 0x52, 0xb5, 0x2d, 0xd5, 0x05, 0xf4, 0x03, 0x58, 0xf1, 0x8b,
|
||||
0x8d, 0xc7, 0x27, 0x1e, 0xfb, 0x92, 0x3b, 0xe5, 0x81, 0x6b, 0x5a, 0xc2, 0x3d, 0xb0, 0xcd, 0xd7,
|
||||
0x60, 0x14, 0x7d, 0x22, 0xb1, 0x89, 0xbe, 0x90, 0x47, 0x9a, 0x2d, 0xdf, 0xea, 0xaa, 0xa4, 0x41,
|
||||
0x06, 0x9f, 0x82, 0xed, 0x8b, 0xe1, 0xc2, 0x71, 0xa4, 0x3f, 0x72, 0xa3, 0xc6, 0x1a, 0xba, 0x15,
|
||||
0x1b, 0x25, 0x2b, 0x7e, 0x01, 0x4f, 0x6b, 0xf6, 0x9b, 0xc6, 0x8b, 0xf9, 0xe2, 0x3f, 0xcb, 0x20,
|
||||
0x86, 0x9d, 0xe8, 0x3d, 0x78, 0xdc, 0x1d, 0xce, 0xf6, 0x50, 0x33, 0x47, 0x28, 0x85, 0x29, 0xa5,
|
||||
0xb3, 0x66, 0x22, 0x33, 0x8a, 0xde, 0x85, 0xf9, 0xd7, 0x79, 0x9b, 0x8e, 0x56, 0x24, 0x93, 0x3e,
|
||||
0x48, 0x70, 0x56, 0xab, 0x44, 0x21, 0x77, 0x93, 0x77, 0xb9, 0x4a, 0x4e, 0xef, 0x90, 0x95, 0x5c,
|
||||
0xa1, 0x19, 0x46, 0x1f, 0xc2, 0xa2, 0xaf, 0x8f, 0x02, 0xd1, 0x7a, 0xee, 0xa5, 0xd2, 0x40, 0xd1,
|
||||
0xb1, 0xcd, 0x0b, 0x8c, 0xa2, 0xf7, 0x61, 0x81, 0x69, 0xa3, 0x39, 0x94, 0xdf, 0xad, 0x34, 0x10,
|
||||
0x74, 0xd6, 0x8d, 0x74, 0x46, 0xd1, 0xef, 0x60, 0xdd, 0x37, 0x8f, 0xd0, 0xd0, 0x9b, 0xa5, 0x53,
|
||||
0xab, 0x43, 0x2e, 0x07, 0x8f, 0x63, 0x61, 0x14, 0x5d, 0x29, 0xef, 0x57, 0x47, 0x55, 0xe8, 0xad,
|
||||
0xe1, 0x06, 0xb5, 0xa3, 0x34, 0x67, 0x77, 0x3c, 0x13, 0xa3, 0xe8, 0x15, 0xa0, 0xb4, 0x32, 0x10,
|
||||
0x42, 0x9b, 0x52, 0xd6, 0x38, 0xae, 0x72, 0x9e, 0x8d, 0x58, 0x65, 0x14, 0x75, 0xc1, 0xf6, 0x6b,
|
||||
0x26, 0x21, 0x08, 0x17, 0x52, 0xca, 0x38, 0xc7, 0x71, 0xde, 0x1a, 0xcb, 0x23, 0xf4, 0xf6, 0x2b,
|
||||
0x13, 0x08, 0xa5, 0xb7, 0x71, 0x5a, 0xa2, 0xf4, 0xae, 0x19, 0x5d, 0x9c, 0xc3, 0x8a, 0x5f, 0x1d,
|
||||
0x0a, 0x20, 0xb3, 0x94, 0x8a, 0xb2, 0xad, 0x51, 0xcb, 0xbc, 0xc0, 0x2c, 0x5d, 0x17, 0xfb, 0x73,
|
||||
0xf4, 0x54, 0x8a, 0x54, 0xa7, 0x04, 0x8e, 0x53, 0xb7, 0xa4, 0xae, 0x5c, 0xea, 0xa9, 0xf5, 0x2b,
|
||||
0x57, 0xbb, 0x7d, 0xfd, 0xca, 0xa6, 0x66, 0xfc, 0x14, 0x9e, 0x04, 0xe5, 0x76, 0x16, 0x6d, 0x48,
|
||||
0x19, 0x53, 0x6b, 0xed, 0x6c, 0xd6, 0x2f, 0x8a, 0xa4, 0x56, 0xc9, 0xa9, 0x92, 0x5a, 0x6f, 0xcf,
|
||||
0x54, 0x52, 0x17, 0xbb, 0xa4, 0x8a, 0x37, 0xb3, 0xd6, 0xa0, 0xc6, 0x9b, 0xb2, 0x97, 0xa9, 0xf1,
|
||||
0xa6, 0xea, 0x29, 0xde, 0x87, 0x85, 0x9e, 0x86, 0xbe, 0x55, 0x8e, 0x97, 0xf0, 0xbb, 0xca, 0xf1,
|
||||
0x32, 0x54, 0xcf, 0x1c, 0xd7, 0x2f, 0x62, 0x5a, 0xe5, 0xb8, 0x2a, 0x72, 0x56, 0x8e, 0x33, 0xc0,
|
||||
0x60, 0xf4, 0x39, 0x34, 0xbb, 0x26, 0x8c, 0x8c, 0xb6, 0xf3, 0x9a, 0x5a, 0x83, 0xc7, 0x9d, 0x9d,
|
||||
0xd1, 0x0c, 0xc2, 0xe2, 0x4a, 0x4b, 0x65, 0x71, 0x1d, 0x33, 0x2b, 0x8b, 0x17, 0x80, 0x71, 0x76,
|
||||
0xbb, 0x92, 0x4e, 0xea, 0x76, 0x55, 0xdc, 0xad, 0x6e, 0x67, 0x80, 0xd8, 0xb2, 0x16, 0x9a, 0xd0,
|
||||
0xa5, 0x5e, 0x0b, 0x6b, 0x90, 0xaf, 0x5e, 0x0b, 0x6b, 0x01, 0xaa, 0x88, 0x8e, 0x12, 0x3e, 0xd4,
|
||||
0xa3, 0xa3, 0x8a, 0x37, 0xf5, 0xe8, 0x30, 0x01, 0xcb, 0x2f, 0x60, 0x8d, 0x19, 0xc1, 0x3a, 0xda,
|
||||
0x29, 0xd5, 0xfc, 0x4a, 0xdb, 0xe0, 0xbc, 0x39, 0x86, 0x43, 0x68, 0xcc, 0x2a, 0x90, 0x4a, 0x69,
|
||||
0x6c, 0xc4, 0xa4, 0x4a, 0x63, 0x33, 0x16, 0x43, 0xbf, 0x86, 0x55, 0xdf, 0x00, 0x62, 0x50, 0xb9,
|
||||
0xfe, 0x94, 0x80, 0x9a, 0xb3, 0x3d, 0x72, 0x5d, 0x44, 0xa7, 0x11, 0x67, 0xa8, 0xe8, 0xac, 0x43,
|
||||
0x35, 0x2a, 0x3a, 0x6b, 0x61, 0xca, 0x87, 0xdb, 0x9f, 0x3f, 0x3b, 0xa3, 0x24, 0xba, 0x38, 0x6e,
|
||||
0x6b, 0x7f, 0x8c, 0x72, 0xa1, 0x9f, 0xf1, 0xdf, 0xcb, 0x39, 0x4e, 0x7a, 0xf9, 0xdf, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0x4a, 0x6c, 0x49, 0xeb, 0x8b, 0x1d, 0x00, 0x00,
|
||||
var fileDescriptor_group_d88c7f5350508ce3 = []byte{
|
||||
// 1835 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x53, 0xdc, 0xc8,
|
||||
0x11, 0x2f, 0x2d, 0x06, 0x9b, 0x36, 0x1c, 0x30, 0xb0, 0x20, 0x04, 0x06, 0x6e, 0x8e, 0xba, 0x50,
|
||||
0xc9, 0x79, 0x49, 0xd9, 0xc9, 0x55, 0xfe, 0x5c, 0xd5, 0xc5, 0x86, 0x18, 0x93, 0xb0, 0x10, 0x6b,
|
||||
0xb1, 0x53, 0x71, 0xca, 0x45, 0xc4, 0xee, 0x20, 0xcb, 0x68, 0xa5, 0x41, 0xa3, 0x05, 0x97, 0xcb,
|
||||
0x79, 0x48, 0x9e, 0xf3, 0xe7, 0x21, 0x8f, 0x79, 0x4b, 0xe5, 0x23, 0xe4, 0x13, 0xe5, 0x93, 0xa4,
|
||||
0x34, 0x1a, 0xcd, 0x8e, 0xa4, 0xd1, 0xee, 0x06, 0xef, 0xbd, 0x6c, 0xa1, 0x9e, 0xee, 0x99, 0x9e,
|
||||
0xfe, 0x37, 0xbf, 0x6e, 0x60, 0xc1, 0x8d, 0xc2, 0x1e, 0xdd, 0xe5, 0xbf, 0x0d, 0x1a, 0x85, 0x71,
|
||||
0x88, 0x26, 0xf9, 0x87, 0xb5, 0x73, 0x42, 0x49, 0xf0, 0xf0, 0xb0, 0xf9, 0xb0, 0x45, 0xa2, 0x6b,
|
||||
0x12, 0xed, 0xd2, 0x4b, 0x77, 0x97, 0x33, 0xec, 0xb2, 0xce, 0xe5, 0xd9, 0x0d, 0xdb, 0xbd, 0x61,
|
||||
0xa9, 0x80, 0xd5, 0x18, 0xca, 0x19, 0x39, 0x94, 0x92, 0x48, 0xf0, 0xe3, 0xff, 0x18, 0xf0, 0xd9,
|
||||
0x5e, 0x44, 0x9c, 0x98, 0x1c, 0x24, 0x27, 0xd9, 0xe4, 0x0a, 0x6d, 0xc1, 0x7d, 0x2f, 0xf0, 0xe2,
|
||||
0x26, 0xe9, 0x9e, 0x93, 0x88, 0x99, 0xc6, 0xd6, 0xc4, 0xce, 0xb4, 0xad, 0x92, 0xd0, 0xcf, 0x60,
|
||||
0x9a, 0xeb, 0x75, 0x18, 0x5c, 0x84, 0x66, 0x6d, 0xcb, 0xd8, 0xb9, 0xff, 0x68, 0xbd, 0xc1, 0xf8,
|
||||
0x81, 0x67, 0x0e, 0xf5, 0xce, 0xa8, 0x13, 0x39, 0x5d, 0xd6, 0x38, 0xc8, 0x78, 0xec, 0x3e, 0x3b,
|
||||
0xc2, 0x30, 0xe3, 0x74, 0xba, 0x5e, 0xf0, 0x92, 0x91, 0xe8, 0x70, 0x9f, 0x99, 0x13, 0x7c, 0xfb,
|
||||
0x1c, 0x2d, 0xd1, 0x20, 0xbc, 0x09, 0x48, 0x94, 0x7e, 0x9b, 0x77, 0xb6, 0x8c, 0x44, 0x03, 0x85,
|
||||
0x84, 0x9b, 0x30, 0x97, 0xd3, 0x9a, 0xd1, 0xbc, 0x52, 0xc6, 0xff, 0xa5, 0x14, 0x6e, 0xc0, 0xfc,
|
||||
0x01, 0x89, 0xf9, 0x12, 0xe3, 0x6b, 0xe4, 0x0a, 0x59, 0x70, 0x2f, 0x65, 0xd8, 0xcf, 0x6c, 0x20,
|
||||
0xbf, 0xf1, 0x0b, 0x58, 0x28, 0xf0, 0x33, 0x8a, 0xbe, 0x01, 0x90, 0x3b, 0xa6, 0x22, 0xc3, 0x34,
|
||||
0x50, 0xf8, 0xf1, 0x19, 0xcc, 0xb5, 0xc4, 0x96, 0x99, 0x06, 0x47, 0x30, 0x27, 0x19, 0x9e, 0x85,
|
||||
0x51, 0x8b, 0xc4, 0xe2, 0x5e, 0x78, 0xd0, 0xae, 0x29, 0xa7, 0x5d, 0x14, 0xc5, 0x08, 0xe6, 0xf3,
|
||||
0x07, 0x30, 0x8a, 0xff, 0x6c, 0x80, 0x95, 0x5d, 0xe4, 0x09, 0xa5, 0xbe, 0xd7, 0x76, 0x62, 0x2f,
|
||||
0x0c, 0x8e, 0x3c, 0x16, 0x27, 0x0a, 0xec, 0x03, 0x50, 0xc7, 0xf5, 0x02, 0x4e, 0x14, 0x67, 0x6f,
|
||||
0x6b, 0xce, 0xb6, 0xc9, 0x55, 0x8f, 0xb0, 0xf8, 0x37, 0x92, 0xd7, 0x56, 0xe4, 0xd0, 0x06, 0xc0,
|
||||
0x45, 0x14, 0x76, 0x85, 0x33, 0x6b, 0xdc, 0x99, 0x0a, 0x05, 0x7f, 0x80, 0xb5, 0x4a, 0x1d, 0x18,
|
||||
0x45, 0x4b, 0x30, 0x19, 0x87, 0xb1, 0xe3, 0xf3, 0xf3, 0x27, 0xed, 0xf4, 0x03, 0xfd, 0x12, 0x66,
|
||||
0x5d, 0x11, 0xb0, 0xc9, 0xd1, 0xcc, 0xac, 0x71, 0x7b, 0x6f, 0x56, 0x59, 0x46, 0xf0, 0xd9, 0x79,
|
||||
0x29, 0xfc, 0x11, 0xd6, 0x0f, 0x48, 0x9c, 0x28, 0x62, 0x93, 0x2b, 0x8d, 0x05, 0x96, 0x61, 0xaa,
|
||||
0x97, 0xea, 0x6d, 0x70, 0xbd, 0xc5, 0x57, 0xc1, 0x32, 0xb5, 0xdb, 0x59, 0x06, 0x7f, 0x84, 0x07,
|
||||
0x03, 0x4e, 0xff, 0xae, 0xef, 0xfe, 0x27, 0x03, 0xea, 0xa7, 0x91, 0x13, 0xb0, 0x0b, 0x12, 0x71,
|
||||
0xbe, 0x93, 0x24, 0xc1, 0x92, 0x5b, 0x9b, 0x70, 0x57, 0x84, 0xba, 0xb8, 0x76, 0xf6, 0x89, 0xbe,
|
||||
0x84, 0xcf, 0x42, 0xbf, 0x73, 0xa2, 0x24, 0x67, 0xea, 0xcf, 0x02, 0x35, 0xe1, 0x0b, 0xc8, 0x8d,
|
||||
0xca, 0x37, 0x91, 0xf2, 0xe5, 0xa9, 0xd8, 0x84, 0x65, 0x9d, 0x0a, 0x8c, 0xe2, 0xbf, 0x19, 0x30,
|
||||
0xf3, 0xab, 0xd0, 0x0b, 0x64, 0x59, 0xaa, 0x56, 0x6a, 0x03, 0x20, 0x22, 0x57, 0x4d, 0xc2, 0x98,
|
||||
0xe3, 0x92, 0x2c, 0xc0, 0xfa, 0x94, 0x64, 0xfd, 0x5d, 0xe8, 0x05, 0xad, 0xb0, 0x17, 0xb5, 0x09,
|
||||
0x57, 0x64, 0xd2, 0x56, 0x28, 0x68, 0x1b, 0x66, 0xbd, 0xe0, 0xda, 0x8b, 0x0b, 0x05, 0x27, 0x4f,
|
||||
0xc4, 0x73, 0x30, 0xab, 0xe8, 0xc3, 0x28, 0xfe, 0xa7, 0x01, 0x6b, 0xc5, 0xa8, 0x4d, 0x16, 0xc2,
|
||||
0x80, 0x91, 0xa1, 0x0a, 0x0f, 0xca, 0x88, 0x64, 0xfd, 0xad, 0x13, 0x74, 0x7c, 0xd2, 0x69, 0x32,
|
||||
0x57, 0x58, 0x4e, 0xa1, 0x24, 0x35, 0x34, 0xfd, 0xb2, 0x09, 0xeb, 0xf9, 0x31, 0xd7, 0x77, 0xd2,
|
||||
0xce, 0xd1, 0xf0, 0x06, 0xac, 0x57, 0x2b, 0xc7, 0x28, 0xde, 0x81, 0x99, 0x17, 0x3d, 0x2f, 0x1e,
|
||||
0x6e, 0xde, 0xe4, 0xe2, 0x0a, 0x27, 0xa3, 0xf8, 0xef, 0x06, 0xd4, 0xb3, 0x8c, 0x4d, 0x9f, 0x84,
|
||||
0x2c, 0x5d, 0xaa, 0xaf, 0xbc, 0x0c, 0x53, 0x17, 0x9e, 0x1f, 0x93, 0x88, 0x5f, 0x77, 0xd2, 0x16,
|
||||
0x5f, 0x85, 0x44, 0xba, 0x73, 0xcb, 0x44, 0xa2, 0xb0, 0xac, 0x53, 0xa8, 0x32, 0x83, 0x7e, 0x01,
|
||||
0x77, 0xbb, 0xe2, 0x79, 0x4b, 0x73, 0xe7, 0xcb, 0xaa, 0xdc, 0x49, 0xb7, 0x7b, 0xd6, 0xf3, 0x7d,
|
||||
0x5e, 0x34, 0x33, 0x31, 0x7c, 0x54, 0x3c, 0x51, 0xbe, 0x1b, 0xd5, 0x36, 0x30, 0xf3, 0xa7, 0x4e,
|
||||
0xf7, 0x77, 0xfb, 0x3d, 0xac, 0x68, 0x77, 0x63, 0x54, 0x55, 0xd5, 0xb8, 0x9d, 0xaa, 0x3e, 0xa0,
|
||||
0x5f, 0x7b, 0xed, 0x4b, 0x85, 0x67, 0xb0, 0x9a, 0xdb, 0x30, 0x7b, 0xe9, 0xb5, 0x2f, 0x49, 0x27,
|
||||
0x7b, 0xa2, 0x53, 0x65, 0xf3, 0xc4, 0xc4, 0xa1, 0x11, 0x71, 0x58, 0x18, 0x88, 0xf8, 0x14, 0x5f,
|
||||
0xb8, 0x0e, 0x8b, 0xa5, 0xd3, 0x18, 0xc5, 0x7f, 0xe4, 0x21, 0x93, 0x24, 0x10, 0xe9, 0xf0, 0xb5,
|
||||
0x2c, 0x64, 0xf2, 0xb9, 0x60, 0x94, 0x72, 0x61, 0x3c, 0x95, 0xb6, 0xc3, 0xdd, 0x55, 0x3a, 0xbe,
|
||||
0x32, 0x40, 0x7e, 0x04, 0x53, 0xdc, 0x1c, 0x59, 0x7c, 0x0c, 0x7e, 0xc7, 0x05, 0x2f, 0xa6, 0xb0,
|
||||
0x74, 0xc8, 0x6b, 0x46, 0xa2, 0xfb, 0x69, 0x38, 0x42, 0xe9, 0xea, 0x5b, 0xb1, 0xa6, 0x5a, 0x31,
|
||||
0xa9, 0x9f, 0x69, 0xf5, 0xe9, 0xe4, 0x71, 0x52, 0x81, 0x8a, 0x57, 0xa0, 0xae, 0x39, 0x91, 0x51,
|
||||
0x7c, 0x0d, 0x4b, 0xf2, 0x51, 0xf5, 0xfd, 0x51, 0xdc, 0x3e, 0x1e, 0x43, 0xff, 0xae, 0x5f, 0x1a,
|
||||
0x94, 0x73, 0xc7, 0x12, 0xc7, 0xff, 0x32, 0xe0, 0xde, 0x5e, 0xb3, 0xc5, 0x79, 0x3e, 0x05, 0xed,
|
||||
0xa1, 0x06, 0x20, 0x57, 0x3e, 0x36, 0x89, 0xe1, 0x8e, 0x9d, 0x6e, 0xf6, 0x6e, 0x68, 0x56, 0xd0,
|
||||
0xf7, 0x61, 0x3e, 0x4f, 0x95, 0xcf, 0x59, 0x89, 0x8e, 0xff, 0x62, 0xc0, 0x8c, 0x84, 0x86, 0xe3,
|
||||
0xc3, 0x50, 0xeb, 0xe2, 0xba, 0x8a, 0xa6, 0x7d, 0x82, 0xea, 0xd4, 0x89, 0x7c, 0xed, 0x3e, 0x85,
|
||||
0x59, 0x45, 0x1b, 0x46, 0xd1, 0xf7, 0x64, 0x60, 0xa7, 0x5e, 0x98, 0x6b, 0xa4, 0xed, 0x46, 0x66,
|
||||
0xd8, 0x2c, 0x96, 0x13, 0xf8, 0xcb, 0x09, 0xc7, 0xbd, 0xae, 0x28, 0xd9, 0xf2, 0x1b, 0x3f, 0xec,
|
||||
0xc3, 0xdf, 0x11, 0x22, 0x0b, 0xff, 0xa3, 0xf4, 0x5e, 0xb0, 0xbd, 0x66, 0x6b, 0x70, 0x34, 0x5a,
|
||||
0x70, 0xaf, 0x97, 0xf7, 0x8c, 0xfc, 0x2e, 0x98, 0x74, 0xe2, 0x96, 0x91, 0xfa, 0xa1, 0x54, 0xc1,
|
||||
0xb9, 0x52, 0xe3, 0x08, 0xd5, 0xa4, 0xa8, 0xa5, 0x7f, 0x1e, 0xf7, 0xba, 0x4c, 0x98, 0x4f, 0xa1,
|
||||
0xe0, 0x1f, 0xc0, 0xdc, 0xbe, 0xc7, 0xba, 0x1e, 0x63, 0x23, 0xbc, 0xbf, 0x08, 0xe6, 0xf3, 0xcc,
|
||||
0x8c, 0xe2, 0x77, 0x80, 0x9a, 0x3d, 0xd1, 0xfd, 0x8c, 0x92, 0xdc, 0x7d, 0x1c, 0x5b, 0xcb, 0xe1,
|
||||
0x58, 0x0c, 0x33, 0xdd, 0x5e, 0x4c, 0x3a, 0x2d, 0xd2, 0x0e, 0x83, 0x0e, 0xe3, 0xc6, 0x9c, 0xb5,
|
||||
0x73, 0xb4, 0xa4, 0xa2, 0x97, 0xce, 0x62, 0x14, 0x1f, 0x81, 0xb9, 0xe7, 0x04, 0x6d, 0xe2, 0x8f,
|
||||
0x43, 0x11, 0xbc, 0x06, 0xab, 0x15, 0xbb, 0xa5, 0x58, 0x45, 0x92, 0x87, 0x62, 0x15, 0x85, 0x93,
|
||||
0x51, 0xdc, 0x00, 0x54, 0xd8, 0x77, 0xf0, 0x06, 0x75, 0x58, 0x2c, 0xf1, 0x33, 0x8a, 0x3d, 0x58,
|
||||
0x6d, 0xe5, 0x82, 0xe5, 0xd8, 0x6b, 0x5f, 0x06, 0x4e, 0x97, 0x0c, 0x8d, 0xe2, 0x40, 0x30, 0x66,
|
||||
0x51, 0x9c, 0x7d, 0x2b, 0x96, 0x98, 0xc8, 0x59, 0x62, 0x1d, 0xac, 0xaa, 0xa3, 0x18, 0xc5, 0x1f,
|
||||
0x78, 0xc3, 0x96, 0x3e, 0x64, 0xad, 0x1e, 0x15, 0xb0, 0x79, 0xbc, 0x0d, 0x5b, 0x95, 0x8f, 0x3c,
|
||||
0xde, 0xa8, 0xe9, 0xcf, 0x1e, 0xf3, 0x4b, 0xfa, 0x98, 0x57, 0x8c, 0xfe, 0x21, 0x23, 0x75, 0xe5,
|
||||
0xaf, 0x78, 0x46, 0x97, 0x84, 0x3e, 0xb9, 0x35, 0xff, 0x77, 0x0d, 0xea, 0x79, 0x97, 0x0c, 0xc7,
|
||||
0x7a, 0x55, 0x09, 0xf7, 0x13, 0x25, 0x22, 0x26, 0xc4, 0xb3, 0xe5, 0x86, 0xa1, 0xeb, 0x93, 0x74,
|
||||
0x20, 0x73, 0xde, 0xbb, 0x68, 0xb4, 0xe2, 0xc8, 0x0b, 0xdc, 0x57, 0x8e, 0xdf, 0x23, 0x4a, 0xbc,
|
||||
0x7c, 0x0d, 0x77, 0x2f, 0x9c, 0x36, 0x79, 0x69, 0x1f, 0x09, 0x98, 0x3c, 0x58, 0x30, 0x63, 0x46,
|
||||
0x3f, 0x85, 0xe9, 0x28, 0xf4, 0xc9, 0x11, 0xb9, 0x26, 0xbe, 0x39, 0xc9, 0x25, 0xd7, 0x4a, 0x92,
|
||||
0x87, 0x41, 0xfc, 0xf8, 0x51, 0x2a, 0xd8, 0xe7, 0x46, 0x5f, 0x41, 0x8d, 0xbc, 0x37, 0xa7, 0x46,
|
||||
0x38, 0xad, 0x46, 0xde, 0x27, 0xbd, 0x9c, 0xce, 0x4a, 0x8c, 0xe2, 0x1f, 0xf7, 0xe1, 0xed, 0x93,
|
||||
0x73, 0x16, 0x47, 0x4e, 0x3b, 0x1e, 0xc5, 0x9f, 0x7f, 0x35, 0x60, 0xa1, 0x24, 0x34, 0xc0, 0xe6,
|
||||
0x5f, 0x89, 0x09, 0x5a, 0x33, 0x2b, 0xb4, 0xe7, 0xb2, 0xdd, 0x28, 0x2f, 0xa0, 0x1f, 0xc2, 0xa2,
|
||||
0x9b, 0x6f, 0x18, 0x9e, 0x3b, 0xec, 0x2d, 0x77, 0xca, 0x1d, 0x5b, 0xb7, 0x84, 0x3b, 0x60, 0xea,
|
||||
0xaf, 0xc1, 0x28, 0x7a, 0x2e, 0x30, 0x85, 0xba, 0x90, 0x45, 0x9a, 0x29, 0xde, 0xd8, 0xb2, 0xa4,
|
||||
0x46, 0x06, 0x1f, 0x83, 0xe9, 0xa6, 0x43, 0x81, 0xc3, 0x40, 0x7d, 0x9d, 0x06, 0x8d, 0x23, 0x54,
|
||||
0x2b, 0xd6, 0x0a, 0x56, 0x7c, 0x03, 0xab, 0x15, 0xfb, 0x8d, 0xe3, 0xa9, 0x7b, 0xf4, 0xdf, 0x79,
|
||||
0x48, 0x87, 0x94, 0xe8, 0x1b, 0xb8, 0xdf, 0xee, 0xcf, 0xe4, 0x50, 0x3d, 0x43, 0x16, 0xb9, 0xe9,
|
||||
0xa2, 0xb5, 0xac, 0x23, 0x33, 0x8a, 0xbe, 0x86, 0xe9, 0x77, 0x59, 0x7b, 0x8d, 0x16, 0x05, 0x93,
|
||||
0x3a, 0x00, 0xb0, 0x96, 0xca, 0xc4, 0x54, 0xee, 0x2a, 0xeb, 0x4e, 0xa5, 0x9c, 0xda, 0xd9, 0x4a,
|
||||
0xb9, 0x5c, 0x13, 0x8b, 0x9e, 0xc2, 0xac, 0xab, 0x8e, 0xf0, 0xd0, 0x4a, 0xe6, 0xa5, 0xc2, 0x20,
|
||||
0xd0, 0x32, 0xf5, 0x0b, 0x8c, 0xa2, 0x6f, 0x61, 0x86, 0x29, 0x23, 0x35, 0x94, 0xdd, 0xad, 0x30,
|
||||
0xc8, 0xb3, 0x56, 0xb4, 0x74, 0x46, 0xd1, 0x1f, 0x60, 0xc5, 0xd5, 0x8f, 0xbe, 0xd0, 0xe7, 0x85,
|
||||
0x53, 0xcb, 0xc3, 0x29, 0x0b, 0x0f, 0x63, 0x61, 0x14, 0x5d, 0x48, 0xef, 0x97, 0x47, 0x4c, 0xe8,
|
||||
0x8b, 0xfe, 0x06, 0x95, 0x23, 0x30, 0x6b, 0x7b, 0x38, 0x13, 0xa3, 0xe8, 0x05, 0xa0, 0xb8, 0x34,
|
||||
0xc8, 0x41, 0xeb, 0x42, 0x56, 0x3b, 0x66, 0xb2, 0x1e, 0x0c, 0x58, 0x65, 0x14, 0xb5, 0xc1, 0x74,
|
||||
0x2b, 0x26, 0x18, 0x08, 0xe7, 0x52, 0x4a, 0x3b, 0x7f, 0xb1, 0xbe, 0x18, 0xca, 0x93, 0xea, 0xed,
|
||||
0x96, 0x26, 0x07, 0x52, 0x6f, 0xed, 0x94, 0x43, 0xea, 0x5d, 0x31, 0x72, 0x38, 0x85, 0x45, 0xb7,
|
||||
0xdc, 0xcc, 0x23, 0xbd, 0x94, 0x8c, 0xb2, 0x8d, 0x41, 0xcb, 0xbc, 0xc0, 0xcc, 0x5d, 0xe6, 0xfb,
|
||||
0x6a, 0xb4, 0x2a, 0x44, 0xca, 0xdd, 0xbd, 0x65, 0x55, 0x2d, 0xc9, 0x2b, 0x17, 0x7a, 0x61, 0xf5,
|
||||
0xca, 0xe5, 0x2e, 0x5d, 0xbd, 0xb2, 0xae, 0x89, 0x3e, 0x86, 0x05, 0xaf, 0xd8, 0x86, 0xa2, 0x35,
|
||||
0x21, 0xa3, 0x6b, 0x89, 0xad, 0xf5, 0xea, 0xc5, 0x34, 0xa9, 0x65, 0x72, 0xca, 0xa4, 0x56, 0xdb,
|
||||
0x2a, 0x99, 0xd4, 0xf9, 0xee, 0xa6, 0xe4, 0xcd, 0x04, 0xd3, 0x57, 0x78, 0x53, 0xf4, 0x20, 0x15,
|
||||
0xde, 0x94, 0xcd, 0xc0, 0xb7, 0x30, 0xd3, 0x51, 0xd0, 0xb7, 0xcc, 0xf1, 0x02, 0x7e, 0x97, 0x39,
|
||||
0x5e, 0x84, 0xea, 0x89, 0xe3, 0xba, 0x79, 0x4c, 0x2b, 0x1d, 0x57, 0x46, 0xce, 0xd2, 0x71, 0x1a,
|
||||
0x18, 0x8c, 0x5e, 0x43, 0xbd, 0xad, 0xc3, 0xc8, 0x68, 0x33, 0xab, 0xa9, 0x15, 0x78, 0xdc, 0xda,
|
||||
0x1a, 0xcc, 0x90, 0x5a, 0x5c, 0x6a, 0x29, 0x2d, 0xae, 0x62, 0x66, 0x69, 0xf1, 0x1c, 0x30, 0x4e,
|
||||
0x6e, 0x57, 0xd0, 0x49, 0xde, 0xae, 0x8c, 0xbb, 0xe5, 0xed, 0x34, 0x10, 0x5b, 0xd4, 0x42, 0x1d,
|
||||
0xba, 0x54, 0x6b, 0x61, 0x05, 0xf2, 0x55, 0x6b, 0x61, 0x25, 0x40, 0x4d, 0xa3, 0xa3, 0x80, 0x0f,
|
||||
0xd5, 0xe8, 0x28, 0xe3, 0x4d, 0x35, 0x3a, 0x74, 0xc0, 0xf2, 0x0d, 0x2c, 0x33, 0x2d, 0x58, 0x47,
|
||||
0x5b, 0x85, 0x9a, 0x5f, 0x6a, 0x1b, 0xac, 0xcf, 0x87, 0x70, 0xa4, 0x1a, 0xb3, 0x12, 0xa4, 0x92,
|
||||
0x1a, 0x6b, 0x31, 0xa9, 0xd4, 0x58, 0x8f, 0xc5, 0xd0, 0x6f, 0x61, 0xc9, 0xd5, 0x80, 0x18, 0x54,
|
||||
0xac, 0x3f, 0x05, 0xa0, 0x66, 0x6d, 0x0e, 0x5c, 0x4f, 0xa3, 0x53, 0x8b, 0x33, 0x64, 0x74, 0x56,
|
||||
0xa1, 0x1a, 0x19, 0x9d, 0x95, 0x30, 0xe5, 0xe9, 0xe6, 0xeb, 0x07, 0x27, 0x94, 0x04, 0x67, 0x87,
|
||||
0x4d, 0xe5, 0x1f, 0x9a, 0x5c, 0xe8, 0xe7, 0xfc, 0xf7, 0x7c, 0x8a, 0x93, 0x1e, 0xff, 0x2f, 0x00,
|
||||
0x00, 0xff, 0xff, 0xe8, 0xd2, 0xc8, 0xfe, 0x43, 0x1d, 0x00, 0x00,
|
||||
}
|
||||
|
@ -181,8 +181,7 @@ message GetGroupMembersCMSReq {
|
||||
|
||||
message GetGroupMembersCMSResp {
|
||||
repeated server_api_params.GroupMemberFullInfo members = 1;
|
||||
server_api_params.ResponsePagination pagination = 2;
|
||||
int32 memberNums = 3;
|
||||
int32 memberNums = 2;
|
||||
}
|
||||
|
||||
message DismissGroupReq{
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"sort"
|
||||
)
|
||||
|
||||
// DistinctAny remove duplicate elements
|
||||
// DistinctAny 去重
|
||||
func DistinctAny[E any, K comparable](es []E, fn func(e E) K) []E {
|
||||
v := make([]E, 0, len(es))
|
||||
tmp := map[K]struct{}{}
|
||||
@ -20,14 +20,14 @@ func DistinctAny[E any, K comparable](es []E, fn func(e E) K) []E {
|
||||
return v
|
||||
}
|
||||
|
||||
// Distinct remove duplicate elements
|
||||
// Distinct 去重
|
||||
func Distinct[T comparable](ts []T) []T {
|
||||
return DistinctAny(ts, func(t T) T {
|
||||
return t
|
||||
})
|
||||
}
|
||||
|
||||
// Delete delete slice element, support negative number to delete the penultimate
|
||||
// Delete 删除切片元素, 支持负数删除倒数第几个
|
||||
func Delete[E any](es []E, index ...int) []E {
|
||||
switch len(index) {
|
||||
case 0:
|
||||
@ -59,7 +59,7 @@ func Delete[E any](es []E, index ...int) []E {
|
||||
}
|
||||
}
|
||||
|
||||
// DeleteAt delete slice element, support negative number to delete the penultimate
|
||||
// DeleteAt 删除切片元素, 支持负数删除倒数第几个
|
||||
func DeleteAt[E any](es *[]E, index ...int) []E {
|
||||
v := Delete(*es, index...)
|
||||
*es = v
|
||||
@ -67,7 +67,7 @@ func DeleteAt[E any](es *[]E, index ...int) []E {
|
||||
}
|
||||
|
||||
// IndexAny get the index of the element
|
||||
func IndexAny[E any, K comparable](es []E, e E, fn func(e E) K) int {
|
||||
func IndexAny[E any, K comparable](e E, es []E, fn func(e E) K) int {
|
||||
k := fn(e)
|
||||
for i := 0; i < len(es); i++ {
|
||||
if fn(es[i]) == k {
|
||||
@ -78,18 +78,18 @@ func IndexAny[E any, K comparable](es []E, e E, fn func(e E) K) int {
|
||||
}
|
||||
|
||||
// IndexOf get the index of the element
|
||||
func IndexOf[E comparable](es []E, e E) int {
|
||||
return IndexAny(es, e, func(t E) E {
|
||||
func IndexOf[E comparable](e E, es ...E) int {
|
||||
return IndexAny(e, es, func(t E) E {
|
||||
return t
|
||||
})
|
||||
}
|
||||
|
||||
// Contain include element or not
|
||||
func Contain[E comparable](es []E, e E) bool {
|
||||
return IndexOf(es, e) >= 0
|
||||
// Contain 是否包含
|
||||
func Contain[E comparable](e E, es ...E) bool {
|
||||
return IndexOf(e, es...) >= 0
|
||||
}
|
||||
|
||||
// DuplicateAny judge whether it is repeated
|
||||
// DuplicateAny 是否有重复的
|
||||
func DuplicateAny[E any, K comparable](es []E, fn func(e E) K) bool {
|
||||
t := make(map[K]struct{})
|
||||
for _, e := range es {
|
||||
@ -102,14 +102,14 @@ func DuplicateAny[E any, K comparable](es []E, fn func(e E) K) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Duplicate judge whether it is repeated
|
||||
// Duplicate 是否有重复的
|
||||
func Duplicate[E comparable](es []E) bool {
|
||||
return DuplicateAny(es, func(e E) E {
|
||||
return e
|
||||
})
|
||||
}
|
||||
|
||||
// SliceToMapOkAny slice to map
|
||||
// SliceToMapOkAny slice to map (自定义类型, 筛选)
|
||||
func SliceToMapOkAny[E any, K comparable, V any](es []E, fn func(e E) (K, V, bool)) map[K]V {
|
||||
kv := make(map[K]V)
|
||||
for i := 0; i < len(es); i++ {
|
||||
@ -121,7 +121,7 @@ func SliceToMapOkAny[E any, K comparable, V any](es []E, fn func(e E) (K, V, boo
|
||||
return kv
|
||||
}
|
||||
|
||||
// SliceToMapAny slice to map
|
||||
// SliceToMapAny slice to map (自定义类型)
|
||||
func SliceToMapAny[E any, K comparable, V any](es []E, fn func(e E) (K, V)) map[K]V {
|
||||
return SliceToMapOkAny(es, func(e E) (K, V, bool) {
|
||||
k, v := fn(e)
|
||||
@ -144,6 +144,15 @@ func SliceSetAny[E any, K comparable](es []E, fn func(e E) K) map[K]struct{} {
|
||||
})
|
||||
}
|
||||
|
||||
// Slice 批量转换切片类型
|
||||
func Slice[E any, T any](es []E, fn func(e E) T) []T {
|
||||
v := make([]T, len(es))
|
||||
for i := 0; i < len(es); i++ {
|
||||
v = append(v, fn(es[i]))
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
// SliceSet slice to map[E]struct{}
|
||||
func SliceSet[E comparable](es []E) map[E]struct{} {
|
||||
return SliceSetAny(es, func(e E) E {
|
||||
@ -182,7 +191,7 @@ func Max[E Ordered](e ...E) E {
|
||||
return v
|
||||
}
|
||||
|
||||
// BothExistAny get elements common to multiple slices
|
||||
// BothExistAny 获取切片中共同存在的元素(交集)
|
||||
func BothExistAny[E any, K comparable](es [][]E, fn func(e E) K) []E {
|
||||
if len(es) == 0 {
|
||||
return []E{}
|
||||
@ -225,43 +234,40 @@ func BothExistAny[E any, K comparable](es [][]E, fn func(e E) K) []E {
|
||||
return v
|
||||
}
|
||||
|
||||
// BothExist get elements common to multiple slices
|
||||
// BothExist 获取切片中共同存在的元素(交集)
|
||||
func BothExist[E comparable](es ...[]E) []E {
|
||||
return BothExistAny(es, func(e E) E {
|
||||
return e
|
||||
})
|
||||
}
|
||||
|
||||
// CompleteAny complete inclusion
|
||||
func CompleteAny[K comparable, E any](ks []K, es []E, fn func(e E) K) bool {
|
||||
a := SliceSetAny(es, fn)
|
||||
for k := range SliceSet(ks) {
|
||||
if !HasKey(a, k) {
|
||||
return false
|
||||
}
|
||||
delete(a, k)
|
||||
}
|
||||
return len(a) == 0
|
||||
}
|
||||
//// CompleteAny a中存在b的所有元素, 同时b中的所有元素a
|
||||
//func CompleteAny[K comparable, E any](ks []K, es []E, fn func(e E) K) bool {
|
||||
// if len(ks) == 0 && len(es) == 0 {
|
||||
// return true
|
||||
// }
|
||||
// kn := make(map[K]uint8)
|
||||
// for _, e := range Distinct(ks) {
|
||||
// kn[e]++
|
||||
// }
|
||||
// for k := range SliceSetAny(es, fn) {
|
||||
// kn[k]++
|
||||
// }
|
||||
// for _, n := range kn {
|
||||
// if n != 2 {
|
||||
// return false
|
||||
// }
|
||||
// }
|
||||
// return true
|
||||
//}
|
||||
|
||||
// Complete a和b去重后是否相等(忽略顺序)
|
||||
func Complete[E comparable](a []E, b []E) bool {
|
||||
if len(a) == 0 && len(b) == 0 {
|
||||
return true
|
||||
}
|
||||
if (len(a) == 0 && len(b) != 0) || (len(a) != 0 && len(b) == 0) {
|
||||
return false
|
||||
}
|
||||
t := SliceSet(a)
|
||||
for _, e := range b {
|
||||
if _, ok := t[e]; !ok {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
return len(Single(a, b)) == 0
|
||||
}
|
||||
|
||||
// MapKey get map keys
|
||||
func MapKey[K comparable, V any](kv map[K]V) []K {
|
||||
// Keys get map keys
|
||||
func Keys[K comparable, V any](kv map[K]V) []K {
|
||||
ks := make([]K, 0, len(kv))
|
||||
for k := range kv {
|
||||
ks = append(ks, k)
|
||||
@ -269,8 +275,8 @@ func MapKey[K comparable, V any](kv map[K]V) []K {
|
||||
return ks
|
||||
}
|
||||
|
||||
// MapValue get map values
|
||||
func MapValue[K comparable, V any](kv map[K]V) []V {
|
||||
// Values get map values
|
||||
func Values[K comparable, V any](kv map[K]V) []V {
|
||||
vs := make([]V, 0, len(kv))
|
||||
for k := range kv {
|
||||
vs = append(vs, kv[k])
|
||||
@ -306,6 +312,7 @@ func If[T any](isa bool, a, b T) T {
|
||||
return b
|
||||
}
|
||||
|
||||
// Equal 比较切片是否相对(包括元素顺序)
|
||||
func Equal[E comparable](a []E, b []E) bool {
|
||||
if len(a) != len(b) {
|
||||
return false
|
||||
@ -318,11 +325,50 @@ func Equal[E comparable](a []E, b []E) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Single
|
||||
|
||||
// Single a中存在,b中不存在 或 b中存在,a中不存在
|
||||
func Single[E comparable](a, b []E) []E {
|
||||
kn := make(map[E]uint8)
|
||||
for _, e := range Distinct(a) {
|
||||
kn[e]++
|
||||
}
|
||||
for _, e := range Distinct(b) {
|
||||
kn[e]++
|
||||
}
|
||||
v := make([]E, 0, len(kn))
|
||||
for k, n := range kn {
|
||||
if n == 1 {
|
||||
v = append(v, k)
|
||||
}
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
return nil
|
||||
// Order 将ts按es排序
|
||||
func Order[E comparable, T any](es []E, ts []T, fn func(t T) E) []T {
|
||||
if len(es) == 0 || len(ts) == 0 {
|
||||
return ts
|
||||
}
|
||||
kv := make(map[E][]T)
|
||||
for i := 0; i < len(ts); i++ {
|
||||
t := ts[i]
|
||||
k := fn(t)
|
||||
kv[k] = append(kv[k], t)
|
||||
}
|
||||
rs := make([]T, 0, len(ts))
|
||||
for _, e := range es {
|
||||
vs := kv[e]
|
||||
delete(kv, e)
|
||||
rs = append(rs, vs...)
|
||||
}
|
||||
for k := range kv {
|
||||
rs = append(rs, kv[k]...)
|
||||
}
|
||||
return rs
|
||||
}
|
||||
|
||||
func OrderPtr[E comparable, T any](es []E, ts *[]T, fn func(t T) E) []T {
|
||||
*ts = Order(es, *ts, fn)
|
||||
return *ts
|
||||
}
|
||||
|
||||
func UniqueJoin(s ...string) string {
|
||||
|
@ -75,9 +75,9 @@ func TestCompleteAny(t *testing.T) {
|
||||
DeleteAt(&list, -1)
|
||||
DeleteAt(&ids, -1)
|
||||
|
||||
ok := CompleteAny(ids, list, func(t Item) int {
|
||||
ok := Complete(ids, Slice(list, func(t Item) int {
|
||||
return t.ID
|
||||
})
|
||||
}))
|
||||
|
||||
fmt.Printf("%+v\n", ok)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user