From e8377d9c2c248dd94a30bc317c4ebdb4dd75bc19 Mon Sep 17 00:00:00 2001
From: OpenIM Bot <124379614+kubbot@users.noreply.github.com>
Date: Tue, 5 Mar 2024 10:51:55 +0800
Subject: [PATCH] cicd: bump League Patch (#1998)
---
CHANGELOG/CHANGELOG-3.5.md | 16 +-----
cmd/openim-api/main.go | 1 -
internal/api/auth.go | 1 -
internal/api/conversation.go | 1 -
internal/api/friend.go | 1 -
internal/api/group.go | 1 -
internal/api/msg.go | 1 -
internal/api/route.go | 13 +++--
internal/api/statistics.go | 1 -
internal/api/third.go | 1 -
internal/api/user.go | 1 -
internal/msggateway/callback.go | 1 -
internal/msggateway/client.go | 3 +-
internal/msggateway/compressor_test.go | 2 +-
internal/msggateway/hub_server.go | 3 +-
internal/msggateway/message_handler.go | 3 +-
internal/msggateway/n_ws_server.go | 5 +-
internal/msgtransfer/init.go | 11 ++--
.../msgtransfer/online_history_msg_handler.go | 3 +-
.../online_msg_to_mongo_handler.go | 3 +-
internal/push/callback.go | 1 -
internal/push/offlinepush/fcm/push.go | 5 +-
internal/push/offlinepush/getui/push.go | 3 +-
internal/push/push_handler.go | 3 +-
internal/push/push_rpc_server.go | 3 +-
internal/push/push_to_client.go | 5 +-
internal/rpc/auth/auth.go | 3 +-
internal/rpc/conversation/conversaion.go | 3 +-
internal/rpc/friend/black.go | 1 -
internal/rpc/friend/callback.go | 1 -
internal/rpc/friend/friend.go | 3 +-
internal/rpc/group/cache.go | 1 -
internal/rpc/group/callback.go | 1 -
internal/rpc/group/convert.go | 1 -
internal/rpc/group/group.go | 3 +-
internal/rpc/msg/as_read.go | 3 +-
internal/rpc/msg/callback.go | 3 +-
internal/rpc/msg/delete.go | 1 -
internal/rpc/msg/message_interceptor.go | 1 -
internal/rpc/msg/revoke.go | 1 -
internal/rpc/msg/send.go | 1 -
internal/rpc/msg/server.go | 3 +-
internal/rpc/msg/statistics.go | 1 -
internal/rpc/msg/sync_msg.go | 1 -
internal/rpc/msg/utils.go | 3 +-
internal/rpc/msg/verify.go | 1 -
internal/rpc/third/log.go | 1 -
internal/rpc/third/s3.go | 1 -
internal/rpc/third/third.go | 3 +-
internal/rpc/third/tool.go | 1 -
internal/rpc/user/callback.go | 1 -
internal/rpc/user/user.go | 3 +-
internal/tools/conversation.go | 1 -
internal/tools/cron_task.go | 5 +-
internal/tools/msg.go | 7 +--
internal/tools/msg_doc_convert.go | 1 -
pkg/authverify/token.go | 1 -
pkg/callbackstruct/group.go | 1 -
pkg/common/cmd/api.go | 3 +-
pkg/common/cmd/msg_gateway.go | 3 +-
pkg/common/cmd/msg_transfer.go | 3 +-
pkg/common/cmd/msg_utils.go | 3 +-
pkg/common/cmd/root.go | 3 +-
pkg/common/cmd/rpc.go | 5 +-
pkg/common/config/parse.go | 3 +-
pkg/common/convert/black.go | 1 -
pkg/common/convert/conversation.go | 1 -
pkg/common/convert/friend.go | 7 ++-
pkg/common/convert/group.go | 1 -
pkg/common/convert/msg.go | 1 -
pkg/common/convert/user.go | 1 -
pkg/common/db/cache/black.go | 3 +-
pkg/common/db/cache/conversation.go | 3 +-
pkg/common/db/cache/friend.go | 3 +-
pkg/common/db/cache/group.go | 3 +-
pkg/common/db/cache/init_redis.go | 3 +-
pkg/common/db/cache/meta_cache.go | 9 ++-
pkg/common/db/cache/msg.go | 5 +-
pkg/common/db/cache/s3.go | 3 +-
pkg/common/db/cache/user.go | 3 +-
pkg/common/db/controller/auth.go | 1 -
pkg/common/db/controller/black.go | 1 -
pkg/common/db/controller/conversation.go | 4 +-
pkg/common/db/controller/friend.go | 1 -
pkg/common/db/controller/group.go | 3 +-
pkg/common/db/controller/msg.go | 8 +--
pkg/common/db/controller/s3.go | 3 +-
pkg/common/db/controller/third.go | 1 -
pkg/common/db/controller/user.go | 1 -
pkg/common/db/localcache/conversation.go | 1 -
pkg/common/db/localcache/group.go | 1 -
pkg/common/db/mgo/black.go | 3 +-
pkg/common/db/mgo/conversation.go | 3 +-
pkg/common/db/mgo/friend.go | 3 +-
pkg/common/db/mgo/friend_request.go | 3 +-
pkg/common/db/mgo/group.go | 3 +-
pkg/common/db/mgo/group_member.go | 3 +-
pkg/common/db/mgo/group_request.go | 3 +-
pkg/common/db/mgo/log.go | 3 +-
pkg/common/db/mgo/object.go | 3 +-
pkg/common/db/mgo/user.go | 3 +-
pkg/common/db/s3/aws/aws.go | 1 -
pkg/common/db/s3/cont/controller.go | 1 -
pkg/common/db/s3/cos/cos.go | 3 +-
pkg/common/db/s3/minio/minio.go | 1 -
pkg/common/db/s3/minio/thumbnail.go | 1 -
pkg/common/db/s3/oss/oss.go | 1 -
pkg/common/db/unrelation/mongo.go | 5 +-
pkg/common/db/unrelation/msg.go | 3 +-
pkg/common/db/unrelation/msg_convert.go | 3 +-
pkg/common/db/unrelation/user.go | 3 +-
.../discoveryregister/direct/directconn.go | 3 +-
.../discoveryregister/discoveryregister.go | 1 -
.../kubernetes/kubernetes.go | 3 +-
.../discoveryregister/zookeeper/zookeeper.go | 1 -
pkg/common/http/http_client.go | 1 -
pkg/common/kafka/consumer_group.go | 1 -
pkg/common/kafka/producer.go | 3 +-
pkg/common/kafka/util.go | 1 -
pkg/common/prommetrics/prommetrics.go | 5 +-
pkg/common/startrpc/start.go | 9 ++-
pkg/common/tls/tls.go | 1 -
pkg/rpcclient/auth.go | 3 +-
pkg/rpcclient/conversation.go | 3 +-
pkg/rpcclient/friend.go | 3 +-
pkg/rpcclient/group.go | 3 +-
pkg/rpcclient/msg.go | 3 +-
pkg/rpcclient/notification/conversation.go | 1 -
pkg/rpcclient/notification/friend.go | 1 -
pkg/rpcclient/notification/group.go | 1 -
pkg/rpcclient/notification/msg.go | 1 -
pkg/rpcclient/notification/user.go | 1 -
pkg/rpcclient/push.go | 3 +-
pkg/rpcclient/third.go | 3 +-
pkg/rpcclient/user.go | 3 +-
test/e2e/page/chat_page.go | 14 +++++
test/e2e/page/login_page.go | 14 +++++
tools/codescan/checker/checker.go | 14 +++++
tools/codescan/codescan.go | 14 +++++
tools/codescan/config.yaml | 14 +++++
tools/codescan/config/config.go | 14 +++++
tools/formitychecker/checker/checker.go | 1 +
tools/url2im/main.go | 56 +++++++++----------
143 files changed, 229 insertions(+), 271 deletions(-)
diff --git a/CHANGELOG/CHANGELOG-3.5.md b/CHANGELOG/CHANGELOG-3.5.md
index 0a7f5bfa3..b929922f1 100644
--- a/CHANGELOG/CHANGELOG-3.5.md
+++ b/CHANGELOG/CHANGELOG-3.5.md
@@ -11,18 +11,9 @@
## [v3.5.1-alpha.2] - 2024-01-26
-
-## [v3.5.0+15.d356f7a] - 2024-01-26
-
## [v3.5.1-rc.1] - 2024-01-23
-
-## [v3.5.0+2.e0bd54f-3-g52f9fc209] - 2024-01-12
-
-
-## [v3.5.0+2.e0bd54f-1-g4ce6a0fa6] - 2024-01-12
-
## [v3.5.1-alpha.1] - 2024-01-09
@@ -75,11 +66,8 @@
[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v3.5.1-alpha.2...HEAD
-[v3.5.1-alpha.2]: https://github.com/openimsdk/open-im-server/compare/v3.5.0+15.d356f7a...v3.5.1-alpha.2
-[v3.5.0+15.d356f7a]: https://github.com/openimsdk/open-im-server/compare/v3.5.1-rc.1...v3.5.0+15.d356f7a
-[v3.5.1-rc.1]: https://github.com/openimsdk/open-im-server/compare/v3.5.0+2.e0bd54f-3-g52f9fc209...v3.5.1-rc.1
-[v3.5.0+2.e0bd54f-3-g52f9fc209]: https://github.com/openimsdk/open-im-server/compare/v3.5.0+2.e0bd54f-1-g4ce6a0fa6...v3.5.0+2.e0bd54f-3-g52f9fc209
-[v3.5.0+2.e0bd54f-1-g4ce6a0fa6]: https://github.com/openimsdk/open-im-server/compare/v3.5.1-alpha.1...v3.5.0+2.e0bd54f-1-g4ce6a0fa6
+[v3.5.1-alpha.2]: https://github.com/openimsdk/open-im-server/compare/v3.5.1-rc.1...v3.5.1-alpha.2
+[v3.5.1-rc.1]: https://github.com/openimsdk/open-im-server/compare/v3.5.1-alpha.1...v3.5.1-rc.1
[v3.5.1-alpha.1]: https://github.com/openimsdk/open-im-server/compare/v3.5.0...v3.5.1-alpha.1
[v3.5.0]: https://github.com/openimsdk/open-im-server/compare/v3.5.1...v3.5.0
[v3.5.1]: https://github.com/openimsdk/open-im-server/compare/v3.5.1-bate.1...v3.5.1
diff --git a/cmd/openim-api/main.go b/cmd/openim-api/main.go
index ad4e3b5c4..0fb609aa3 100644
--- a/cmd/openim-api/main.go
+++ b/cmd/openim-api/main.go
@@ -29,7 +29,6 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/errs"
-
"github.com/openimsdk/open-im-server/v3/internal/api"
"github.com/openimsdk/open-im-server/v3/pkg/common/cmd"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
diff --git a/internal/api/auth.go b/internal/api/auth.go
index 4aeadd790..0f7a3933b 100644
--- a/internal/api/auth.go
+++ b/internal/api/auth.go
@@ -18,7 +18,6 @@ import (
"github.com/OpenIMSDK/protocol/auth"
"github.com/OpenIMSDK/tools/a2r"
"github.com/gin-gonic/gin"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/internal/api/conversation.go b/internal/api/conversation.go
index c9101fb26..fe6c67001 100644
--- a/internal/api/conversation.go
+++ b/internal/api/conversation.go
@@ -18,7 +18,6 @@ import (
"github.com/OpenIMSDK/protocol/conversation"
"github.com/OpenIMSDK/tools/a2r"
"github.com/gin-gonic/gin"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/internal/api/friend.go b/internal/api/friend.go
index 98e86a037..24bcbf899 100644
--- a/internal/api/friend.go
+++ b/internal/api/friend.go
@@ -18,7 +18,6 @@ import (
"github.com/OpenIMSDK/protocol/friend"
"github.com/OpenIMSDK/tools/a2r"
"github.com/gin-gonic/gin"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/internal/api/group.go b/internal/api/group.go
index af90c2db4..c18ded64b 100644
--- a/internal/api/group.go
+++ b/internal/api/group.go
@@ -18,7 +18,6 @@ import (
"github.com/OpenIMSDK/protocol/group"
"github.com/OpenIMSDK/tools/a2r"
"github.com/gin-gonic/gin"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/internal/api/msg.go b/internal/api/msg.go
index 4b253f56b..61cd1ae6c 100644
--- a/internal/api/msg.go
+++ b/internal/api/msg.go
@@ -27,7 +27,6 @@ import (
"github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10"
"github.com/mitchellh/mapstructure"
-
"github.com/openimsdk/open-im-server/v3/pkg/apistruct"
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
diff --git a/internal/api/route.go b/internal/api/route.go
index c6e0f53aa..5c920ca05 100644
--- a/internal/api/route.go
+++ b/internal/api/route.go
@@ -29,19 +29,22 @@ import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"github.com/go-playground/validator/v10"
- "github.com/redis/go-redis/v9"
- "google.golang.org/grpc"
- "google.golang.org/grpc/credentials/insecure"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
+ "github.com/redis/go-redis/v9"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
)
func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.UniversalClient) *gin.Engine {
- discov.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, "round_robin"))) // Default RPC middleware
+ discov.AddOption(
+ mw.GrpcClient(),
+ grpc.WithTransportCredentials(insecure.NewCredentials()),
+ grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, "round_robin")),
+ ) // Default RPC middleware
gin.SetMode(gin.ReleaseMode)
r := gin.New()
if v, ok := binding.Validator.Engine().(*validator.Validate); ok {
diff --git a/internal/api/statistics.go b/internal/api/statistics.go
index 397523e88..2b80a1585 100644
--- a/internal/api/statistics.go
+++ b/internal/api/statistics.go
@@ -18,7 +18,6 @@ import (
"github.com/OpenIMSDK/protocol/user"
"github.com/OpenIMSDK/tools/a2r"
"github.com/gin-gonic/gin"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/internal/api/third.go b/internal/api/third.go
index 2acf1ce89..f00c0d8d3 100644
--- a/internal/api/third.go
+++ b/internal/api/third.go
@@ -24,7 +24,6 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/gin-gonic/gin"
-
config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/internal/api/user.go b/internal/api/user.go
index 16efcd704..3cc5470a7 100644
--- a/internal/api/user.go
+++ b/internal/api/user.go
@@ -23,7 +23,6 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
"github.com/gin-gonic/gin"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/internal/msggateway/callback.go b/internal/msggateway/callback.go
index 7d5381754..ede48f74a 100644
--- a/internal/msggateway/callback.go
+++ b/internal/msggateway/callback.go
@@ -20,7 +20,6 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/tools/mcontext"
-
cbapi "github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/http"
diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go
index 7017cf7d4..4e843821e 100644
--- a/internal/msggateway/client.go
+++ b/internal/msggateway/client.go
@@ -29,9 +29,8 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/protobuf/proto"
-
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
+ "google.golang.org/protobuf/proto"
)
var (
diff --git a/internal/msggateway/compressor_test.go b/internal/msggateway/compressor_test.go
index bb7106d9f..173c9bb20 100644
--- a/internal/msggateway/compressor_test.go
+++ b/internal/msggateway/compressor_test.go
@@ -111,7 +111,7 @@ func BenchmarkDecompress(b *testing.B) {
compressor := NewGzipCompressor()
comdata, err := compressor.Compress(src)
-
+
assert.Equal(b, nil, err)
for i := 0; i < b.N; i++ {
diff --git a/internal/msggateway/hub_server.go b/internal/msggateway/hub_server.go
index f6228717d..826c2488b 100644
--- a/internal/msggateway/hub_server.go
+++ b/internal/msggateway/hub_server.go
@@ -24,12 +24,11 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/startrpc"
+ "google.golang.org/grpc"
)
func (s *Server) InitServer(disCov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error {
diff --git a/internal/msggateway/message_handler.go b/internal/msggateway/message_handler.go
index 1cf91f67d..105a77336 100644
--- a/internal/msggateway/message_handler.go
+++ b/internal/msggateway/message_handler.go
@@ -25,9 +25,8 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/utils"
"github.com/go-playground/validator/v10"
- "google.golang.org/protobuf/proto"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
+ "google.golang.org/protobuf/proto"
)
type Req struct {
diff --git a/internal/msggateway/n_ws_server.go b/internal/msggateway/n_ws_server.go
index bf8a0da39..e8ba9939a 100644
--- a/internal/msggateway/n_ws_server.go
+++ b/internal/msggateway/n_ws_server.go
@@ -33,14 +33,13 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/utils"
"github.com/go-playground/validator/v10"
- "github.com/redis/go-redis/v9"
- "golang.org/x/sync/errgroup"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
+ "github.com/redis/go-redis/v9"
+ "golang.org/x/sync/errgroup"
)
type LongConnServer interface {
diff --git a/internal/msgtransfer/init.go b/internal/msgtransfer/init.go
index 077282f83..dfb7c5307 100644
--- a/internal/msgtransfer/init.go
+++ b/internal/msgtransfer/init.go
@@ -25,12 +25,6 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mw"
- "github.com/prometheus/client_golang/prometheus"
- "github.com/prometheus/client_golang/prometheus/collectors"
- "github.com/prometheus/client_golang/prometheus/promhttp"
- "google.golang.org/grpc"
- "google.golang.org/grpc/credentials/insecure"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
@@ -39,6 +33,11 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/collectors"
+ "github.com/prometheus/client_golang/prometheus/promhttp"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
)
type MsgTransfer struct {
diff --git a/internal/msgtransfer/online_history_msg_handler.go b/internal/msgtransfer/online_history_msg_handler.go
index e06ab5f07..4995d10e8 100644
--- a/internal/msgtransfer/online_history_msg_handler.go
+++ b/internal/msgtransfer/online_history_msg_handler.go
@@ -30,13 +30,12 @@ import (
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
"github.com/go-redis/redis"
- "google.golang.org/protobuf/proto"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
"github.com/openimsdk/open-im-server/v3/pkg/common/kafka"
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
+ "google.golang.org/protobuf/proto"
)
const (
diff --git a/internal/msgtransfer/online_msg_to_mongo_handler.go b/internal/msgtransfer/online_msg_to_mongo_handler.go
index 35c0a4a4c..efffc191f 100644
--- a/internal/msgtransfer/online_msg_to_mongo_handler.go
+++ b/internal/msgtransfer/online_msg_to_mongo_handler.go
@@ -20,12 +20,11 @@ import (
"github.com/IBM/sarama"
pbmsg "github.com/OpenIMSDK/protocol/msg"
"github.com/OpenIMSDK/tools/log"
- "google.golang.org/protobuf/proto"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
kfk "github.com/openimsdk/open-im-server/v3/pkg/common/kafka"
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
+ "google.golang.org/protobuf/proto"
)
type OnlineHistoryMongoConsumerHandler struct {
diff --git a/internal/push/callback.go b/internal/push/callback.go
index 46b5545fb..70862e4d2 100644
--- a/internal/push/callback.go
+++ b/internal/push/callback.go
@@ -21,7 +21,6 @@ import (
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/http"
diff --git a/internal/push/offlinepush/fcm/push.go b/internal/push/offlinepush/fcm/push.go
index a3453ba5a..aa6ec186f 100644
--- a/internal/push/offlinepush/fcm/push.go
+++ b/internal/push/offlinepush/fcm/push.go
@@ -21,12 +21,11 @@ import (
firebase "firebase.google.com/go"
"firebase.google.com/go/messaging"
"github.com/OpenIMSDK/protocol/constant"
- "github.com/redis/go-redis/v9"
- "google.golang.org/api/option"
-
"github.com/openimsdk/open-im-server/v3/internal/push/offlinepush"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
+ "github.com/redis/go-redis/v9"
+ "google.golang.org/api/option"
)
const SinglePushCountLimit = 400
diff --git a/internal/push/offlinepush/getui/push.go b/internal/push/offlinepush/getui/push.go
index 81dbfaee3..e950585a1 100644
--- a/internal/push/offlinepush/getui/push.go
+++ b/internal/push/offlinepush/getui/push.go
@@ -27,12 +27,11 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils/splitter"
- "github.com/redis/go-redis/v9"
-
"github.com/openimsdk/open-im-server/v3/internal/push/offlinepush"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
http2 "github.com/openimsdk/open-im-server/v3/pkg/common/http"
+ "github.com/redis/go-redis/v9"
)
var (
diff --git a/internal/push/push_handler.go b/internal/push/push_handler.go
index 18b987267..7b7a1150a 100644
--- a/internal/push/push_handler.go
+++ b/internal/push/push_handler.go
@@ -23,10 +23,9 @@ import (
pbpush "github.com/OpenIMSDK/protocol/push"
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/protobuf/proto"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
kfk "github.com/openimsdk/open-im-server/v3/pkg/common/kafka"
+ "google.golang.org/protobuf/proto"
)
type ConsumerHandler struct {
diff --git a/internal/push/push_rpc_server.go b/internal/push/push_rpc_server.go
index 30896849a..c5516e7cf 100644
--- a/internal/push/push_rpc_server.go
+++ b/internal/push/push_rpc_server.go
@@ -22,12 +22,11 @@ import (
"github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/localcache"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
+ "google.golang.org/grpc"
)
type pushServer struct {
diff --git a/internal/push/push_to_client.go b/internal/push/push_to_client.go
index 6e767a6be..84efdba0c 100644
--- a/internal/push/push_to_client.go
+++ b/internal/push/push_to_client.go
@@ -28,9 +28,6 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
- "golang.org/x/sync/errgroup"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/internal/push/offlinepush"
"github.com/openimsdk/open-im-server/v3/internal/push/offlinepush/dummy"
"github.com/openimsdk/open-im-server/v3/internal/push/offlinepush/fcm"
@@ -43,6 +40,8 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
+ "golang.org/x/sync/errgroup"
+ "google.golang.org/grpc"
)
type Pusher struct {
diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go
index 774717cf9..5f53911a4 100644
--- a/internal/rpc/auth/auth.go
+++ b/internal/rpc/auth/auth.go
@@ -25,14 +25,13 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/tokenverify"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
+ "google.golang.org/grpc"
)
type authServer struct {
diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go
index f513d1a2c..f3dc7ef17 100644
--- a/internal/rpc/conversation/conversaion.go
+++ b/internal/rpc/conversation/conversaion.go
@@ -27,8 +27,6 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/convert"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
@@ -37,6 +35,7 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/common/db/unrelation"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient/notification"
+ "google.golang.org/grpc"
)
type conversationServer struct {
diff --git a/internal/rpc/friend/black.go b/internal/rpc/friend/black.go
index 979cfdc95..57edd26ba 100644
--- a/internal/rpc/friend/black.go
+++ b/internal/rpc/friend/black.go
@@ -20,7 +20,6 @@ import (
pbfriend "github.com/OpenIMSDK/protocol/friend"
"github.com/OpenIMSDK/tools/mcontext"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/convert"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
diff --git a/internal/rpc/friend/callback.go b/internal/rpc/friend/callback.go
index e5054d9a9..2b6e31899 100644
--- a/internal/rpc/friend/callback.go
+++ b/internal/rpc/friend/callback.go
@@ -19,7 +19,6 @@ import (
pbfriend "github.com/OpenIMSDK/protocol/friend"
"github.com/OpenIMSDK/tools/utils"
-
cbapi "github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/http"
diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go
index f3aea14f5..4168731f7 100644
--- a/internal/rpc/friend/friend.go
+++ b/internal/rpc/friend/friend.go
@@ -25,8 +25,6 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/convert"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
@@ -36,6 +34,7 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/common/db/unrelation"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient/notification"
+ "google.golang.org/grpc"
)
type friendServer struct {
diff --git a/internal/rpc/group/cache.go b/internal/rpc/group/cache.go
index fc387736d..54b60c554 100644
--- a/internal/rpc/group/cache.go
+++ b/internal/rpc/group/cache.go
@@ -18,7 +18,6 @@ import (
"context"
pbgroup "github.com/OpenIMSDK/protocol/group"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/convert"
)
diff --git a/internal/rpc/group/callback.go b/internal/rpc/group/callback.go
index 2a0ce6584..f09c23ec6 100644
--- a/internal/rpc/group/callback.go
+++ b/internal/rpc/group/callback.go
@@ -25,7 +25,6 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/apistruct"
"github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
diff --git a/internal/rpc/group/convert.go b/internal/rpc/group/convert.go
index 2ee7f5056..ab4d3a2a1 100644
--- a/internal/rpc/group/convert.go
+++ b/internal/rpc/group/convert.go
@@ -16,7 +16,6 @@ package group
import (
"github.com/OpenIMSDK/protocol/sdkws"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go
index d8a1e1d56..fa060efda 100644
--- a/internal/rpc/group/group.go
+++ b/internal/rpc/group/group.go
@@ -35,8 +35,6 @@ import (
"github.com/OpenIMSDK/tools/mw/specialerror"
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
"github.com/openimsdk/open-im-server/v3/pkg/common/convert"
@@ -49,6 +47,7 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient/grouphash"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient/notification"
+ "google.golang.org/grpc"
)
func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error {
diff --git a/internal/rpc/msg/as_read.go b/internal/rpc/msg/as_read.go
index f9a44577b..cac9102fa 100644
--- a/internal/rpc/msg/as_read.go
+++ b/internal/rpc/msg/as_read.go
@@ -23,9 +23,8 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
utils2 "github.com/OpenIMSDK/tools/utils"
- "github.com/redis/go-redis/v9"
-
cbapi "github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
+ "github.com/redis/go-redis/v9"
)
func (m *msgServer) GetConversationsHasReadAndMaxSeq(ctx context.Context, req *msg.GetConversationsHasReadAndMaxSeqReq) (resp *msg.GetConversationsHasReadAndMaxSeqResp, err error) {
diff --git a/internal/rpc/msg/callback.go b/internal/rpc/msg/callback.go
index e281e4828..1a7cad70c 100644
--- a/internal/rpc/msg/callback.go
+++ b/internal/rpc/msg/callback.go
@@ -23,11 +23,10 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/protobuf/proto"
-
cbapi "github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/http"
+ "google.golang.org/protobuf/proto"
)
func cbURL() string {
diff --git a/internal/rpc/msg/delete.go b/internal/rpc/msg/delete.go
index e2d81c92a..091f11f4c 100644
--- a/internal/rpc/msg/delete.go
+++ b/internal/rpc/msg/delete.go
@@ -23,7 +23,6 @@ import (
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
)
diff --git a/internal/rpc/msg/message_interceptor.go b/internal/rpc/msg/message_interceptor.go
index a98c31219..3a2731fea 100644
--- a/internal/rpc/msg/message_interceptor.go
+++ b/internal/rpc/msg/message_interceptor.go
@@ -21,7 +21,6 @@ import (
"github.com/OpenIMSDK/protocol/msg"
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/errs"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go
index 2272911bc..eebfdf779 100644
--- a/internal/rpc/msg/revoke.go
+++ b/internal/rpc/msg/revoke.go
@@ -26,7 +26,6 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
unrelationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
diff --git a/internal/rpc/msg/send.go b/internal/rpc/msg/send.go
index 6f590578c..e04cebb3b 100644
--- a/internal/rpc/msg/send.go
+++ b/internal/rpc/msg/send.go
@@ -26,7 +26,6 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
)
diff --git a/internal/rpc/msg/server.go b/internal/rpc/msg/server.go
index 0643abe26..79ae483a2 100644
--- a/internal/rpc/msg/server.go
+++ b/internal/rpc/msg/server.go
@@ -19,13 +19,12 @@ import (
"github.com/OpenIMSDK/protocol/conversation"
"github.com/OpenIMSDK/protocol/msg"
"github.com/OpenIMSDK/tools/discoveryregistry"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/localcache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/unrelation"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
+ "google.golang.org/grpc"
)
type (
diff --git a/internal/rpc/msg/statistics.go b/internal/rpc/msg/statistics.go
index ac09e3f69..d7d33459b 100644
--- a/internal/rpc/msg/statistics.go
+++ b/internal/rpc/msg/statistics.go
@@ -21,7 +21,6 @@ import (
"github.com/OpenIMSDK/protocol/msg"
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
)
diff --git a/internal/rpc/msg/sync_msg.go b/internal/rpc/msg/sync_msg.go
index 3b76db1e4..fa894e034 100644
--- a/internal/rpc/msg/sync_msg.go
+++ b/internal/rpc/msg/sync_msg.go
@@ -22,7 +22,6 @@ import (
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
)
diff --git a/internal/rpc/msg/utils.go b/internal/rpc/msg/utils.go
index e45d7b395..d8a45e875 100644
--- a/internal/rpc/msg/utils.go
+++ b/internal/rpc/msg/utils.go
@@ -18,10 +18,9 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/utils"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/redis/go-redis/v9"
"go.mongodb.org/mongo-driver/mongo"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
func isMessageHasReadEnabled(msgData *sdkws.MsgData) bool {
diff --git a/internal/rpc/msg/verify.go b/internal/rpc/msg/verify.go
index 0080b6fdb..11055fac1 100644
--- a/internal/rpc/msg/verify.go
+++ b/internal/rpc/msg/verify.go
@@ -25,7 +25,6 @@ import (
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
diff --git a/internal/rpc/third/log.go b/internal/rpc/third/log.go
index 11c7467b8..420f399ba 100644
--- a/internal/rpc/third/log.go
+++ b/internal/rpc/third/log.go
@@ -25,7 +25,6 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/utils"
utils2 "github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/internal/rpc/third/s3.go b/internal/rpc/third/s3.go
index 488deb19e..7f68f4da8 100644
--- a/internal/rpc/third/s3.go
+++ b/internal/rpc/third/s3.go
@@ -29,7 +29,6 @@ import (
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
"github.com/google/uuid"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3/cont"
diff --git a/internal/rpc/third/third.go b/internal/rpc/third/third.go
index dfa77f9d3..9dd3ffd65 100644
--- a/internal/rpc/third/third.go
+++ b/internal/rpc/third/third.go
@@ -22,8 +22,6 @@ import (
"github.com/OpenIMSDK/protocol/third"
"github.com/OpenIMSDK/tools/discoveryregistry"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
@@ -34,6 +32,7 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3/oss"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/unrelation"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
+ "google.golang.org/grpc"
)
func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error {
diff --git a/internal/rpc/third/tool.go b/internal/rpc/third/tool.go
index efa047a43..cf25f9820 100644
--- a/internal/rpc/third/tool.go
+++ b/internal/rpc/third/tool.go
@@ -24,7 +24,6 @@ import (
"github.com/OpenIMSDK/protocol/third"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mcontext"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
)
diff --git a/internal/rpc/user/callback.go b/internal/rpc/user/callback.go
index 5276946a4..1437257f7 100644
--- a/internal/rpc/user/callback.go
+++ b/internal/rpc/user/callback.go
@@ -19,7 +19,6 @@ import (
pbuser "github.com/OpenIMSDK/protocol/user"
"github.com/OpenIMSDK/tools/utils"
-
cbapi "github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/http"
diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go
index b4140420b..7ed3ff7d6 100644
--- a/internal/rpc/user/user.go
+++ b/internal/rpc/user/user.go
@@ -30,8 +30,6 @@ import (
"github.com/OpenIMSDK/tools/pagination"
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/convert"
@@ -43,6 +41,7 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/common/db/unrelation"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient/notification"
+ "google.golang.org/grpc"
)
type userServer struct {
diff --git a/internal/tools/conversation.go b/internal/tools/conversation.go
index 5550bbad2..b555a3361 100644
--- a/internal/tools/conversation.go
+++ b/internal/tools/conversation.go
@@ -23,7 +23,6 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/internal/tools/cron_task.go b/internal/tools/cron_task.go
index 8d198ff28..9b74a5767 100644
--- a/internal/tools/cron_task.go
+++ b/internal/tools/cron_task.go
@@ -23,11 +23,10 @@ import (
"time"
"github.com/OpenIMSDK/tools/errs"
- "github.com/redis/go-redis/v9"
- "github.com/robfig/cron/v3"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
+ "github.com/redis/go-redis/v9"
+ "github.com/robfig/cron/v3"
)
func StartTask() error {
diff --git a/internal/tools/msg.go b/internal/tools/msg.go
index 6d5a50b1e..f2df0d337 100644
--- a/internal/tools/msg.go
+++ b/internal/tools/msg.go
@@ -27,10 +27,6 @@ import (
"github.com/OpenIMSDK/tools/mw"
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
- "github.com/redis/go-redis/v9"
- "google.golang.org/grpc"
- "google.golang.org/grpc/credentials/insecure"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
@@ -39,6 +35,9 @@ import (
kdisc "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient/notification"
+ "github.com/redis/go-redis/v9"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
)
type MsgTool struct {
diff --git a/internal/tools/msg_doc_convert.go b/internal/tools/msg_doc_convert.go
index b9150c362..eea1b69e8 100644
--- a/internal/tools/msg_doc_convert.go
+++ b/internal/tools/msg_doc_convert.go
@@ -18,7 +18,6 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
-
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
)
diff --git a/pkg/authverify/token.go b/pkg/authverify/token.go
index cfba2d844..0a46af3ec 100644
--- a/pkg/authverify/token.go
+++ b/pkg/authverify/token.go
@@ -23,7 +23,6 @@ import (
"github.com/OpenIMSDK/tools/tokenverify"
"github.com/OpenIMSDK/tools/utils"
"github.com/golang-jwt/jwt/v4"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
diff --git a/pkg/callbackstruct/group.go b/pkg/callbackstruct/group.go
index 5968f1e55..467061a4a 100644
--- a/pkg/callbackstruct/group.go
+++ b/pkg/callbackstruct/group.go
@@ -16,7 +16,6 @@ package callbackstruct
import (
common "github.com/OpenIMSDK/protocol/sdkws"
-
"github.com/openimsdk/open-im-server/v3/pkg/apistruct"
)
diff --git a/pkg/common/cmd/api.go b/pkg/common/cmd/api.go
index 7156ce6c4..47e4116e3 100644
--- a/pkg/common/cmd/api.go
+++ b/pkg/common/cmd/api.go
@@ -19,9 +19,8 @@ import (
"fmt"
"github.com/OpenIMSDK/protocol/constant"
- "github.com/spf13/cobra"
-
config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
+ "github.com/spf13/cobra"
)
type ApiCmd struct {
diff --git a/pkg/common/cmd/msg_gateway.go b/pkg/common/cmd/msg_gateway.go
index 1543afe15..403d0ec84 100644
--- a/pkg/common/cmd/msg_gateway.go
+++ b/pkg/common/cmd/msg_gateway.go
@@ -19,10 +19,9 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/tools/errs"
- "github.com/spf13/cobra"
-
"github.com/openimsdk/open-im-server/v3/internal/msggateway"
v3config "github.com/openimsdk/open-im-server/v3/pkg/common/config"
+ "github.com/spf13/cobra"
)
type MsgGatewayCmd struct {
diff --git a/pkg/common/cmd/msg_transfer.go b/pkg/common/cmd/msg_transfer.go
index 6ea2b86fa..4db24fac5 100644
--- a/pkg/common/cmd/msg_transfer.go
+++ b/pkg/common/cmd/msg_transfer.go
@@ -18,10 +18,9 @@ import (
"fmt"
"github.com/OpenIMSDK/protocol/constant"
- "github.com/spf13/cobra"
-
"github.com/openimsdk/open-im-server/v3/internal/msgtransfer"
config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
+ "github.com/spf13/cobra"
)
type MsgTransferCmd struct {
diff --git a/pkg/common/cmd/msg_utils.go b/pkg/common/cmd/msg_utils.go
index 3c670ad85..03c1cab67 100644
--- a/pkg/common/cmd/msg_utils.go
+++ b/pkg/common/cmd/msg_utils.go
@@ -15,10 +15,9 @@
package cmd
import (
- "github.com/spf13/cobra"
-
"github.com/openimsdk/open-im-server/v3/internal/tools"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "github.com/spf13/cobra"
)
type MsgUtilsCmd struct {
diff --git a/pkg/common/cmd/root.go b/pkg/common/cmd/root.go
index 69a2af950..591bfc804 100644
--- a/pkg/common/cmd/root.go
+++ b/pkg/common/cmd/root.go
@@ -20,10 +20,9 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
- "github.com/spf13/cobra"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
+ "github.com/spf13/cobra"
)
type RootCmdPt interface {
diff --git a/pkg/common/cmd/rpc.go b/pkg/common/cmd/rpc.go
index d78233cbc..e30de93a9 100644
--- a/pkg/common/cmd/rpc.go
+++ b/pkg/common/cmd/rpc.go
@@ -21,11 +21,10 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/errs"
- "github.com/spf13/cobra"
- "google.golang.org/grpc"
-
config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/startrpc"
+ "github.com/spf13/cobra"
+ "google.golang.org/grpc"
)
type RpcCmd struct {
diff --git a/pkg/common/config/parse.go b/pkg/common/config/parse.go
index e216f6014..a73665386 100644
--- a/pkg/common/config/parse.go
+++ b/pkg/common/config/parse.go
@@ -22,10 +22,9 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/tools/errs"
- "gopkg.in/yaml.v3"
-
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
"github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "gopkg.in/yaml.v3"
)
//go:embed version
diff --git a/pkg/common/convert/black.go b/pkg/common/convert/black.go
index 57140f436..683517fbc 100644
--- a/pkg/common/convert/black.go
+++ b/pkg/common/convert/black.go
@@ -19,7 +19,6 @@ import (
"github.com/OpenIMSDK/protocol/sdkws"
sdk "github.com/OpenIMSDK/protocol/sdkws"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/pkg/common/convert/conversation.go b/pkg/common/convert/conversation.go
index 165262b7f..b3f4913eb 100644
--- a/pkg/common/convert/conversation.go
+++ b/pkg/common/convert/conversation.go
@@ -17,7 +17,6 @@ package convert
import (
"github.com/OpenIMSDK/protocol/conversation"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/pkg/common/convert/friend.go b/pkg/common/convert/friend.go
index 0e9a05766..4231eb49d 100644
--- a/pkg/common/convert/friend.go
+++ b/pkg/common/convert/friend.go
@@ -20,7 +20,6 @@ import (
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
@@ -53,7 +52,11 @@ func FriendDB2Pb(ctx context.Context, friendDB *relation.FriendModel,
}, nil
}
-func FriendsDB2Pb(ctx context.Context, friendsDB []*relation.FriendModel, getUsers func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error)) (friendsPb []*sdkws.FriendInfo, err error) {
+func FriendsDB2Pb(
+ ctx context.Context,
+ friendsDB []*relation.FriendModel,
+ getUsers func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error),
+) (friendsPb []*sdkws.FriendInfo, err error) {
if len(friendsDB) == 0 {
return nil, nil
}
diff --git a/pkg/common/convert/group.go b/pkg/common/convert/group.go
index 18940f518..63372f21d 100644
--- a/pkg/common/convert/group.go
+++ b/pkg/common/convert/group.go
@@ -19,7 +19,6 @@ import (
pbgroup "github.com/OpenIMSDK/protocol/group"
sdkws "github.com/OpenIMSDK/protocol/sdkws"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/pkg/common/convert/msg.go b/pkg/common/convert/msg.go
index 56f71f018..34638049b 100644
--- a/pkg/common/convert/msg.go
+++ b/pkg/common/convert/msg.go
@@ -17,7 +17,6 @@ package convert
import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/protocol/sdkws"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
)
diff --git a/pkg/common/convert/user.go b/pkg/common/convert/user.go
index 62f80e458..38afd8c19 100644
--- a/pkg/common/convert/user.go
+++ b/pkg/common/convert/user.go
@@ -18,7 +18,6 @@ import (
"time"
"github.com/OpenIMSDK/protocol/sdkws"
-
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/pkg/common/db/cache/black.go b/pkg/common/db/cache/black.go
index 48bc3c285..c8cf2ddd3 100644
--- a/pkg/common/db/cache/black.go
+++ b/pkg/common/db/cache/black.go
@@ -19,9 +19,8 @@ import (
"time"
"github.com/dtm-labs/rockscache"
- "github.com/redis/go-redis/v9"
-
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
+ "github.com/redis/go-redis/v9"
)
const (
diff --git a/pkg/common/db/cache/conversation.go b/pkg/common/db/cache/conversation.go
index c8cc11923..90e400363 100644
--- a/pkg/common/db/cache/conversation.go
+++ b/pkg/common/db/cache/conversation.go
@@ -22,9 +22,8 @@ import (
"github.com/OpenIMSDK/tools/utils"
"github.com/dtm-labs/rockscache"
- "github.com/redis/go-redis/v9"
-
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
+ "github.com/redis/go-redis/v9"
)
const (
diff --git a/pkg/common/db/cache/friend.go b/pkg/common/db/cache/friend.go
index 91faddaf9..a160837ba 100644
--- a/pkg/common/db/cache/friend.go
+++ b/pkg/common/db/cache/friend.go
@@ -20,9 +20,8 @@ import (
"github.com/OpenIMSDK/tools/utils"
"github.com/dtm-labs/rockscache"
- "github.com/redis/go-redis/v9"
-
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
+ "github.com/redis/go-redis/v9"
)
const (
diff --git a/pkg/common/db/cache/group.go b/pkg/common/db/cache/group.go
index 0acf95ed4..4a5266db5 100644
--- a/pkg/common/db/cache/group.go
+++ b/pkg/common/db/cache/group.go
@@ -25,9 +25,8 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/utils"
"github.com/dtm-labs/rockscache"
- "github.com/redis/go-redis/v9"
-
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
+ "github.com/redis/go-redis/v9"
)
const (
diff --git a/pkg/common/db/cache/init_redis.go b/pkg/common/db/cache/init_redis.go
index 24de092b0..b81edf9e5 100644
--- a/pkg/common/db/cache/init_redis.go
+++ b/pkg/common/db/cache/init_redis.go
@@ -24,9 +24,8 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mw/specialerror"
- "github.com/redis/go-redis/v9"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
+ "github.com/redis/go-redis/v9"
)
var (
diff --git a/pkg/common/db/cache/meta_cache.go b/pkg/common/db/cache/meta_cache.go
index 5f05ff166..4c25754d6 100644
--- a/pkg/common/db/cache/meta_cache.go
+++ b/pkg/common/db/cache/meta_cache.go
@@ -194,7 +194,14 @@ func getCache[T any](ctx context.Context, rcClient *rockscache.Client, key strin
// return tArrays, nil
//}
-func batchGetCache2[T any, K comparable](ctx context.Context, rcClient *rockscache.Client, expire time.Duration, keys []K, keyFn func(key K) string, fns func(ctx context.Context, key K) (T, error)) ([]T, error) {
+func batchGetCache2[T any, K comparable](
+ ctx context.Context,
+ rcClient *rockscache.Client,
+ expire time.Duration,
+ keys []K,
+ keyFn func(key K) string,
+ fns func(ctx context.Context, key K) (T, error),
+) ([]T, error) {
if len(keys) == 0 {
return nil, nil
}
diff --git a/pkg/common/db/cache/msg.go b/pkg/common/db/cache/msg.go
index 09c456ab3..889f36baa 100644
--- a/pkg/common/db/cache/msg.go
+++ b/pkg/common/db/cache/msg.go
@@ -26,11 +26,10 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/utils"
"github.com/gogo/protobuf/jsonpb"
- "github.com/redis/go-redis/v9"
- "golang.org/x/sync/errgroup"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
+ "github.com/redis/go-redis/v9"
+ "golang.org/x/sync/errgroup"
)
const (
diff --git a/pkg/common/db/cache/s3.go b/pkg/common/db/cache/s3.go
index 1e68cedf8..28e993be0 100644
--- a/pkg/common/db/cache/s3.go
+++ b/pkg/common/db/cache/s3.go
@@ -20,10 +20,9 @@ import (
"time"
"github.com/dtm-labs/rockscache"
- "github.com/redis/go-redis/v9"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3"
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
+ "github.com/redis/go-redis/v9"
)
type ObjectCache interface {
diff --git a/pkg/common/db/cache/user.go b/pkg/common/db/cache/user.go
index 11c46b5ac..c6c6966f3 100644
--- a/pkg/common/db/cache/user.go
+++ b/pkg/common/db/cache/user.go
@@ -27,9 +27,8 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
"github.com/dtm-labs/rockscache"
- "github.com/redis/go-redis/v9"
-
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
+ "github.com/redis/go-redis/v9"
)
const (
diff --git a/pkg/common/db/controller/auth.go b/pkg/common/db/controller/auth.go
index 04c5d2617..dfd7b3e78 100644
--- a/pkg/common/db/controller/auth.go
+++ b/pkg/common/db/controller/auth.go
@@ -21,7 +21,6 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/tokenverify"
"github.com/golang-jwt/jwt/v4"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
)
diff --git a/pkg/common/db/controller/black.go b/pkg/common/db/controller/black.go
index 427194ecd..c4b253c2f 100644
--- a/pkg/common/db/controller/black.go
+++ b/pkg/common/db/controller/black.go
@@ -20,7 +20,6 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/pagination"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/pkg/common/db/controller/conversation.go b/pkg/common/db/controller/conversation.go
index bf4349cf4..3d46e4fbc 100644
--- a/pkg/common/db/controller/conversation.go
+++ b/pkg/common/db/controller/conversation.go
@@ -23,7 +23,6 @@ import (
"github.com/OpenIMSDK/tools/pagination"
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
@@ -42,7 +41,8 @@ type ConversationDatabase interface {
GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationtb.ConversationModel, error)
// SetUserConversations sets multiple conversation properties for a user, creates new conversations if they do not exist, or updates them otherwise. This operation is atomic.
SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationtb.ConversationModel) error
- // SetUsersConversationFieldTx updates a specific field for multiple users' conversations, creating new conversations if they do not exist, or updates them otherwise. This operation is transactional.
+ // SetUsersConversationFieldTx updates a specific field for multiple users' conversations, creating new conversations if they do not exist, or updates them otherwise. This operation is
+ // transactional.
SetUsersConversationFieldTx(ctx context.Context, userIDs []string, conversation *relationtb.ConversationModel, fieldMap map[string]any) error
// CreateGroupChatConversation creates a group chat conversation for the specified group ID and user IDs.
CreateGroupChatConversation(ctx context.Context, groupID string, userIDs []string) error
diff --git a/pkg/common/db/controller/friend.go b/pkg/common/db/controller/friend.go
index 24504c227..3c81d922c 100644
--- a/pkg/common/db/controller/friend.go
+++ b/pkg/common/db/controller/friend.go
@@ -26,7 +26,6 @@ import (
"github.com/OpenIMSDK/tools/pagination"
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go
index 2f2a972e4..45bf87b6f 100644
--- a/pkg/common/db/controller/group.go
+++ b/pkg/common/db/controller/group.go
@@ -23,10 +23,9 @@ import (
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
"github.com/dtm-labs/rockscache"
- "github.com/redis/go-redis/v9"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
+ "github.com/redis/go-redis/v9"
)
type GroupDatabase interface {
diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go
index 07b540ec0..56cb52703 100644
--- a/pkg/common/db/controller/msg.go
+++ b/pkg/common/db/controller/msg.go
@@ -26,9 +26,6 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/utils"
- "github.com/redis/go-redis/v9"
- "go.mongodb.org/mongo-driver/mongo"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/convert"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
@@ -36,6 +33,8 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/common/db/unrelation"
"github.com/openimsdk/open-im-server/v3/pkg/common/kafka"
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
+ "github.com/redis/go-redis/v9"
+ "go.mongodb.org/mongo-driver/mongo"
)
const (
@@ -61,7 +60,8 @@ type CommonMsgDatabase interface {
GetMsgBySeqsRange(ctx context.Context, userID string, conversationID string, begin, end, num, userMaxSeq int64) (minSeq int64, maxSeq int64, seqMsg []*sdkws.MsgData, err error)
// GetMsgBySeqs retrieves messages for large groups from MongoDB by sequence numbers.
GetMsgBySeqs(ctx context.Context, userID string, conversationID string, seqs []int64) (minSeq int64, maxSeq int64, seqMsg []*sdkws.MsgData, err error)
- // DeleteConversationMsgsAndSetMinSeq deletes conversation messages and resets the minimum sequence number. If `remainTime` is 0, all messages are deleted (this method does not delete Redis cache).
+ // DeleteConversationMsgsAndSetMinSeq deletes conversation messages and resets the minimum sequence number. If `remainTime` is 0, all messages are deleted (this method does not delete Redis
+ // cache).
DeleteConversationMsgsAndSetMinSeq(ctx context.Context, conversationID string, remainTime int64) error
// UserMsgsDestruct marks messages for deletion based on destruct time and returns a list of sequence numbers for marked messages.
UserMsgsDestruct(ctx context.Context, userID string, conversationID string, destructTime int64, lastMsgDestructTime time.Time) (seqs []int64, err error)
diff --git a/pkg/common/db/controller/s3.go b/pkg/common/db/controller/s3.go
index 95505de41..e847c9c8f 100644
--- a/pkg/common/db/controller/s3.go
+++ b/pkg/common/db/controller/s3.go
@@ -19,12 +19,11 @@ import (
"path/filepath"
"time"
- "github.com/redis/go-redis/v9"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3/cont"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
+ "github.com/redis/go-redis/v9"
)
type S3Database interface {
diff --git a/pkg/common/db/controller/third.go b/pkg/common/db/controller/third.go
index 55c047bd6..996d82c45 100644
--- a/pkg/common/db/controller/third.go
+++ b/pkg/common/db/controller/third.go
@@ -19,7 +19,6 @@ import (
"time"
"github.com/OpenIMSDK/tools/pagination"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go
index c18fef316..0e1bdd314 100644
--- a/pkg/common/db/controller/user.go
+++ b/pkg/common/db/controller/user.go
@@ -23,7 +23,6 @@ import (
"github.com/OpenIMSDK/tools/pagination"
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
unrelationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
diff --git a/pkg/common/db/localcache/conversation.go b/pkg/common/db/localcache/conversation.go
index c40bcdbce..9147fd3ce 100644
--- a/pkg/common/db/localcache/conversation.go
+++ b/pkg/common/db/localcache/conversation.go
@@ -19,7 +19,6 @@ import (
"sync"
"github.com/OpenIMSDK/protocol/conversation"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/pkg/common/db/localcache/group.go b/pkg/common/db/localcache/group.go
index 4958d91ee..0fdea8642 100644
--- a/pkg/common/db/localcache/group.go
+++ b/pkg/common/db/localcache/group.go
@@ -20,7 +20,6 @@ import (
"github.com/OpenIMSDK/protocol/group"
"github.com/OpenIMSDK/tools/errs"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/pkg/common/db/mgo/black.go b/pkg/common/db/mgo/black.go
index 1047e5c30..c555e0b77 100644
--- a/pkg/common/db/mgo/black.go
+++ b/pkg/common/db/mgo/black.go
@@ -19,11 +19,10 @@ import (
"github.com/OpenIMSDK/tools/mgoutil"
"github.com/OpenIMSDK/tools/pagination"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
func NewBlackMongo(db *mongo.Database) (relation.BlackModelInterface, error) {
diff --git a/pkg/common/db/mgo/conversation.go b/pkg/common/db/mgo/conversation.go
index 93ca4eceb..35e8a28e6 100644
--- a/pkg/common/db/mgo/conversation.go
+++ b/pkg/common/db/mgo/conversation.go
@@ -22,11 +22,10 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mgoutil"
"github.com/OpenIMSDK/tools/pagination"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
func NewConversationMongo(db *mongo.Database) (*ConversationMgo, error) {
diff --git a/pkg/common/db/mgo/friend.go b/pkg/common/db/mgo/friend.go
index 01719822d..aa7775ce0 100644
--- a/pkg/common/db/mgo/friend.go
+++ b/pkg/common/db/mgo/friend.go
@@ -19,11 +19,10 @@ import (
"github.com/OpenIMSDK/tools/mgoutil"
"github.com/OpenIMSDK/tools/pagination"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
// FriendMgo implements FriendModelInterface using MongoDB as the storage backend.
diff --git a/pkg/common/db/mgo/friend_request.go b/pkg/common/db/mgo/friend_request.go
index a05ca1018..3e0588a0b 100644
--- a/pkg/common/db/mgo/friend_request.go
+++ b/pkg/common/db/mgo/friend_request.go
@@ -19,11 +19,10 @@ import (
"github.com/OpenIMSDK/tools/mgoutil"
"github.com/OpenIMSDK/tools/pagination"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
func NewFriendRequestMongo(db *mongo.Database) (relation.FriendRequestModelInterface, error) {
diff --git a/pkg/common/db/mgo/group.go b/pkg/common/db/mgo/group.go
index cfb104a21..1bef90ebe 100644
--- a/pkg/common/db/mgo/group.go
+++ b/pkg/common/db/mgo/group.go
@@ -21,11 +21,10 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mgoutil"
"github.com/OpenIMSDK/tools/pagination"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
func NewGroupMongo(db *mongo.Database) (relation.GroupModelInterface, error) {
diff --git a/pkg/common/db/mgo/group_member.go b/pkg/common/db/mgo/group_member.go
index 5d3331baa..e1af34f7c 100644
--- a/pkg/common/db/mgo/group_member.go
+++ b/pkg/common/db/mgo/group_member.go
@@ -21,11 +21,10 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mgoutil"
"github.com/OpenIMSDK/tools/pagination"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
func NewGroupMember(db *mongo.Database) (relation.GroupMemberModelInterface, error) {
diff --git a/pkg/common/db/mgo/group_request.go b/pkg/common/db/mgo/group_request.go
index 87fba1636..9aee0e960 100644
--- a/pkg/common/db/mgo/group_request.go
+++ b/pkg/common/db/mgo/group_request.go
@@ -20,11 +20,10 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mgoutil"
"github.com/OpenIMSDK/tools/pagination"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
func NewGroupRequestMgo(db *mongo.Database) (relation.GroupRequestModelInterface, error) {
diff --git a/pkg/common/db/mgo/log.go b/pkg/common/db/mgo/log.go
index 09f002ee3..ca28d5964 100644
--- a/pkg/common/db/mgo/log.go
+++ b/pkg/common/db/mgo/log.go
@@ -20,11 +20,10 @@ import (
"github.com/OpenIMSDK/tools/mgoutil"
"github.com/OpenIMSDK/tools/pagination"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
func NewLogMongo(db *mongo.Database) (relation.LogInterface, error) {
diff --git a/pkg/common/db/mgo/object.go b/pkg/common/db/mgo/object.go
index 88bfde213..4c333afd6 100644
--- a/pkg/common/db/mgo/object.go
+++ b/pkg/common/db/mgo/object.go
@@ -18,11 +18,10 @@ import (
"context"
"github.com/OpenIMSDK/tools/mgoutil"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
func NewS3Mongo(db *mongo.Database) (relation.ObjectInfoModelInterface, error) {
diff --git a/pkg/common/db/mgo/user.go b/pkg/common/db/mgo/user.go
index df26776ac..dcdc14d4a 100644
--- a/pkg/common/db/mgo/user.go
+++ b/pkg/common/db/mgo/user.go
@@ -22,12 +22,11 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mgoutil"
"github.com/OpenIMSDK/tools/pagination"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
)
func NewUserMongo(db *mongo.Database) (relation.UserModelInterface, error) {
diff --git a/pkg/common/db/s3/aws/aws.go b/pkg/common/db/s3/aws/aws.go
index 7588eea91..dd54ed155 100644
--- a/pkg/common/db/s3/aws/aws.go
+++ b/pkg/common/db/s3/aws/aws.go
@@ -27,7 +27,6 @@ import (
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
sdk "github.com/aws/aws-sdk-go/service/s3"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3"
)
diff --git a/pkg/common/db/s3/cont/controller.go b/pkg/common/db/s3/cont/controller.go
index 0a40d8f36..915109aa5 100644
--- a/pkg/common/db/s3/cont/controller.go
+++ b/pkg/common/db/s3/cont/controller.go
@@ -27,7 +27,6 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
"github.com/google/uuid"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3"
)
diff --git a/pkg/common/db/s3/cos/cos.go b/pkg/common/db/s3/cos/cos.go
index b302f1de6..619f142ab 100644
--- a/pkg/common/db/s3/cos/cos.go
+++ b/pkg/common/db/s3/cos/cos.go
@@ -29,10 +29,9 @@ import (
"strings"
"time"
- "github.com/tencentyun/cos-go-sdk-v5"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3"
+ "github.com/tencentyun/cos-go-sdk-v5"
)
const (
diff --git a/pkg/common/db/s3/minio/minio.go b/pkg/common/db/s3/minio/minio.go
index a5e34e1aa..1eb3257e1 100644
--- a/pkg/common/db/s3/minio/minio.go
+++ b/pkg/common/db/s3/minio/minio.go
@@ -33,7 +33,6 @@ import (
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/minio/minio-go/v7/pkg/signer"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3"
diff --git a/pkg/common/db/s3/minio/thumbnail.go b/pkg/common/db/s3/minio/thumbnail.go
index 5dfdaee09..1bf96c27c 100644
--- a/pkg/common/db/s3/minio/thumbnail.go
+++ b/pkg/common/db/s3/minio/thumbnail.go
@@ -31,7 +31,6 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
"github.com/minio/minio-go/v7"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3"
)
diff --git a/pkg/common/db/s3/oss/oss.go b/pkg/common/db/s3/oss/oss.go
index a6be41d39..442f4e52f 100644
--- a/pkg/common/db/s3/oss/oss.go
+++ b/pkg/common/db/s3/oss/oss.go
@@ -32,7 +32,6 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/aliyun/aliyun-oss-go-sdk/oss"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/s3"
)
diff --git a/pkg/common/db/unrelation/mongo.go b/pkg/common/db/unrelation/mongo.go
index 25bf4d10c..09880fb37 100644
--- a/pkg/common/db/unrelation/mongo.go
+++ b/pkg/common/db/unrelation/mongo.go
@@ -23,12 +23,11 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mw/specialerror"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/config"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/config"
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
)
const (
diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go
index 0e33970c3..4deca56f8 100644
--- a/pkg/common/db/unrelation/msg.go
+++ b/pkg/common/db/unrelation/msg.go
@@ -26,13 +26,12 @@ import (
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
+ table "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"google.golang.org/protobuf/proto"
-
- table "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
)
var ErrMsgListNotExist = errors.New("user not have msg in mongoDB")
diff --git a/pkg/common/db/unrelation/msg_convert.go b/pkg/common/db/unrelation/msg_convert.go
index 373bc843e..30c74e927 100644
--- a/pkg/common/db/unrelation/msg_convert.go
+++ b/pkg/common/db/unrelation/msg_convert.go
@@ -19,10 +19,9 @@ import (
"fmt"
"github.com/OpenIMSDK/tools/log"
+ table "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
-
- table "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
)
func (m *MsgMongoDriver) ConvertMsgsDocLen(ctx context.Context, conversationIDs []string) {
diff --git a/pkg/common/db/unrelation/user.go b/pkg/common/db/unrelation/user.go
index 4c882fc64..cbf395bf8 100644
--- a/pkg/common/db/unrelation/user.go
+++ b/pkg/common/db/unrelation/user.go
@@ -18,11 +18,10 @@ import (
"context"
"github.com/OpenIMSDK/tools/errs"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/unrelation"
)
// prefixes and suffixes.
diff --git a/pkg/common/discoveryregister/direct/directconn.go b/pkg/common/discoveryregister/direct/directconn.go
index cc59934a3..2ae0de170 100644
--- a/pkg/common/discoveryregister/direct/directconn.go
+++ b/pkg/common/discoveryregister/direct/directconn.go
@@ -20,10 +20,9 @@ import (
"fmt"
"github.com/OpenIMSDK/tools/errs"
+ config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
-
- config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
type ServiceAddresses map[string][]int
diff --git a/pkg/common/discoveryregister/discoveryregister.go b/pkg/common/discoveryregister/discoveryregister.go
index 18684c349..a21d8d62a 100644
--- a/pkg/common/discoveryregister/discoveryregister.go
+++ b/pkg/common/discoveryregister/discoveryregister.go
@@ -20,7 +20,6 @@ import (
"github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/errs"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/direct"
"github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/kubernetes"
"github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/zookeeper"
diff --git a/pkg/common/discoveryregister/kubernetes/kubernetes.go b/pkg/common/discoveryregister/kubernetes/kubernetes.go
index 59a78a336..1292c64a8 100644
--- a/pkg/common/discoveryregister/kubernetes/kubernetes.go
+++ b/pkg/common/discoveryregister/kubernetes/kubernetes.go
@@ -24,10 +24,9 @@ import (
"github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/log"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/stathat/consistent"
"google.golang.org/grpc"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
// K8sDR represents the Kubernetes service discovery and registration client.
diff --git a/pkg/common/discoveryregister/zookeeper/zookeeper.go b/pkg/common/discoveryregister/zookeeper/zookeeper.go
index 099badf42..5f9a3b6bd 100644
--- a/pkg/common/discoveryregister/zookeeper/zookeeper.go
+++ b/pkg/common/discoveryregister/zookeeper/zookeeper.go
@@ -24,7 +24,6 @@ import (
openkeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
diff --git a/pkg/common/http/http_client.go b/pkg/common/http/http_client.go
index 141284b64..83908b8d3 100644
--- a/pkg/common/http/http_client.go
+++ b/pkg/common/http/http_client.go
@@ -25,7 +25,6 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
-
"github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
diff --git a/pkg/common/kafka/consumer_group.go b/pkg/common/kafka/consumer_group.go
index f8b3ee249..824c5be2e 100644
--- a/pkg/common/kafka/consumer_group.go
+++ b/pkg/common/kafka/consumer_group.go
@@ -22,7 +22,6 @@ import (
"github.com/IBM/sarama"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
diff --git a/pkg/common/kafka/producer.go b/pkg/common/kafka/producer.go
index 19ff19828..4c2378c59 100644
--- a/pkg/common/kafka/producer.go
+++ b/pkg/common/kafka/producer.go
@@ -27,9 +27,8 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
- "google.golang.org/protobuf/proto"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
+ "google.golang.org/protobuf/proto"
)
const maxRetry = 10 // number of retries
diff --git a/pkg/common/kafka/util.go b/pkg/common/kafka/util.go
index 578a308ef..a94397819 100644
--- a/pkg/common/kafka/util.go
+++ b/pkg/common/kafka/util.go
@@ -20,7 +20,6 @@ import (
"strings"
"github.com/IBM/sarama"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/tls"
)
diff --git a/pkg/common/prommetrics/prommetrics.go b/pkg/common/prommetrics/prommetrics.go
index 1ed13a1ef..52694168f 100644
--- a/pkg/common/prommetrics/prommetrics.go
+++ b/pkg/common/prommetrics/prommetrics.go
@@ -16,11 +16,10 @@ package prommetrics
import (
gp "github.com/grpc-ecosystem/go-grpc-prometheus"
- "github.com/prometheus/client_golang/prometheus"
- "github.com/prometheus/client_golang/prometheus/collectors"
-
config2 "github.com/openimsdk/open-im-server/v3/pkg/common/config"
"github.com/openimsdk/open-im-server/v3/pkg/common/ginprometheus"
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/collectors"
)
func NewGrpcPromObj(cusMetrics []prometheus.Collector) (*prometheus.Registry, *gp.ServerMetrics, error) {
diff --git a/pkg/common/startrpc/start.go b/pkg/common/startrpc/start.go
index 07b50070f..1576762e8 100644
--- a/pkg/common/startrpc/start.go
+++ b/pkg/common/startrpc/start.go
@@ -32,15 +32,14 @@ import (
"github.com/OpenIMSDK/tools/mw"
"github.com/OpenIMSDK/tools/network"
grpcprometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
- "github.com/prometheus/client_golang/prometheus"
- "github.com/prometheus/client_golang/prometheus/promhttp"
- "google.golang.org/grpc"
- "google.golang.org/grpc/credentials/insecure"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
kdisc "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister"
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promhttp"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/credentials/insecure"
)
// Start rpc server.
diff --git a/pkg/common/tls/tls.go b/pkg/common/tls/tls.go
index e897c13b6..a52f46df7 100644
--- a/pkg/common/tls/tls.go
+++ b/pkg/common/tls/tls.go
@@ -22,7 +22,6 @@ import (
"os"
"github.com/OpenIMSDK/tools/errs"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
diff --git a/pkg/rpcclient/auth.go b/pkg/rpcclient/auth.go
index 387acf320..bfd4b1119 100644
--- a/pkg/rpcclient/auth.go
+++ b/pkg/rpcclient/auth.go
@@ -19,10 +19,9 @@ import (
"github.com/OpenIMSDK/protocol/auth"
"github.com/OpenIMSDK/tools/discoveryregistry"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "google.golang.org/grpc"
)
func NewAuth(discov discoveryregistry.SvcDiscoveryRegistry) *Auth {
diff --git a/pkg/rpcclient/conversation.go b/pkg/rpcclient/conversation.go
index 926c571a4..ee9818f8f 100644
--- a/pkg/rpcclient/conversation.go
+++ b/pkg/rpcclient/conversation.go
@@ -21,10 +21,9 @@ import (
pbconversation "github.com/OpenIMSDK/protocol/conversation"
"github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/errs"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "google.golang.org/grpc"
)
type Conversation struct {
diff --git a/pkg/rpcclient/friend.go b/pkg/rpcclient/friend.go
index a0e0226ec..520616564 100644
--- a/pkg/rpcclient/friend.go
+++ b/pkg/rpcclient/friend.go
@@ -20,10 +20,9 @@ import (
"github.com/OpenIMSDK/protocol/friend"
sdkws "github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/discoveryregistry"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "google.golang.org/grpc"
)
type Friend struct {
diff --git a/pkg/rpcclient/group.go b/pkg/rpcclient/group.go
index 7a15c1116..bc9a3c75c 100644
--- a/pkg/rpcclient/group.go
+++ b/pkg/rpcclient/group.go
@@ -24,10 +24,9 @@ import (
"github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "google.golang.org/grpc"
)
type Group struct {
diff --git a/pkg/rpcclient/msg.go b/pkg/rpcclient/msg.go
index f468a6569..e4008ed20 100644
--- a/pkg/rpcclient/msg.go
+++ b/pkg/rpcclient/msg.go
@@ -24,10 +24,9 @@ import (
"github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/utils"
+ "github.com/openimsdk/open-im-server/v3/pkg/common/config"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
-
- "github.com/openimsdk/open-im-server/v3/pkg/common/config"
)
func newContentTypeConf() map[int32]config.NotificationConf {
diff --git a/pkg/rpcclient/notification/conversation.go b/pkg/rpcclient/notification/conversation.go
index 3bbad746e..b43e5494a 100644
--- a/pkg/rpcclient/notification/conversation.go
+++ b/pkg/rpcclient/notification/conversation.go
@@ -19,7 +19,6 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/protocol/sdkws"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/pkg/rpcclient/notification/friend.go b/pkg/rpcclient/notification/friend.go
index ba7a77c55..9237111be 100644
--- a/pkg/rpcclient/notification/friend.go
+++ b/pkg/rpcclient/notification/friend.go
@@ -21,7 +21,6 @@ import (
pbfriend "github.com/OpenIMSDK/protocol/friend"
"github.com/OpenIMSDK/protocol/sdkws"
"github.com/OpenIMSDK/tools/mcontext"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/convert"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
diff --git a/pkg/rpcclient/notification/group.go b/pkg/rpcclient/notification/group.go
index 8b355b663..1778a498d 100644
--- a/pkg/rpcclient/notification/group.go
+++ b/pkg/rpcclient/notification/group.go
@@ -25,7 +25,6 @@ import (
"github.com/OpenIMSDK/tools/log"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/utils"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
"github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
diff --git a/pkg/rpcclient/notification/msg.go b/pkg/rpcclient/notification/msg.go
index 60fa64f40..83280f80a 100644
--- a/pkg/rpcclient/notification/msg.go
+++ b/pkg/rpcclient/notification/msg.go
@@ -19,7 +19,6 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/protocol/sdkws"
-
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
diff --git a/pkg/rpcclient/notification/user.go b/pkg/rpcclient/notification/user.go
index 13e5b6abb..f94e59a33 100644
--- a/pkg/rpcclient/notification/user.go
+++ b/pkg/rpcclient/notification/user.go
@@ -19,7 +19,6 @@ import (
"github.com/OpenIMSDK/protocol/constant"
"github.com/OpenIMSDK/protocol/sdkws"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
diff --git a/pkg/rpcclient/push.go b/pkg/rpcclient/push.go
index 20296e6cd..2f540da81 100644
--- a/pkg/rpcclient/push.go
+++ b/pkg/rpcclient/push.go
@@ -19,10 +19,9 @@ import (
"github.com/OpenIMSDK/protocol/push"
"github.com/OpenIMSDK/tools/discoveryregistry"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "google.golang.org/grpc"
)
type Push struct {
diff --git a/pkg/rpcclient/third.go b/pkg/rpcclient/third.go
index f6ca458fd..be40335d5 100644
--- a/pkg/rpcclient/third.go
+++ b/pkg/rpcclient/third.go
@@ -23,10 +23,9 @@ import (
"github.com/OpenIMSDK/tools/errs"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "google.golang.org/grpc"
)
type Third struct {
diff --git a/pkg/rpcclient/user.go b/pkg/rpcclient/user.go
index 8d0f7fc8b..a6c202129 100644
--- a/pkg/rpcclient/user.go
+++ b/pkg/rpcclient/user.go
@@ -23,11 +23,10 @@ import (
"github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/utils"
- "google.golang.org/grpc"
-
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
util "github.com/openimsdk/open-im-server/v3/pkg/util/genutil"
+ "google.golang.org/grpc"
)
// User represents a structure holding connection details for the User RPC client.
diff --git a/test/e2e/page/chat_page.go b/test/e2e/page/chat_page.go
index 52aa8377d..d92c7ec6e 100644
--- a/test/e2e/page/chat_page.go
+++ b/test/e2e/page/chat_page.go
@@ -1 +1,15 @@
+// Copyright © 2024 OpenIM. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package page
diff --git a/test/e2e/page/login_page.go b/test/e2e/page/login_page.go
index 52aa8377d..d92c7ec6e 100644
--- a/test/e2e/page/login_page.go
+++ b/test/e2e/page/login_page.go
@@ -1 +1,15 @@
+// Copyright © 2024 OpenIM. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package page
diff --git a/tools/codescan/checker/checker.go b/tools/codescan/checker/checker.go
index 953236d0f..ad724dd5b 100644
--- a/tools/codescan/checker/checker.go
+++ b/tools/codescan/checker/checker.go
@@ -1,3 +1,17 @@
+// Copyright © 2024 OpenIM. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package checker
import (
diff --git a/tools/codescan/codescan.go b/tools/codescan/codescan.go
index c46f7a704..a83e895fc 100644
--- a/tools/codescan/codescan.go
+++ b/tools/codescan/codescan.go
@@ -1,3 +1,17 @@
+// Copyright © 2024 OpenIM. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package main
import (
diff --git a/tools/codescan/config.yaml b/tools/codescan/config.yaml
index 9a81236b8..32a8c1f54 100644
--- a/tools/codescan/config.yaml
+++ b/tools/codescan/config.yaml
@@ -1,3 +1,17 @@
+# Copyright © 2024 OpenIM. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
directory: ./
file_types:
- .go
diff --git a/tools/codescan/config/config.go b/tools/codescan/config/config.go
index 8f051e3da..aebf0d4f7 100644
--- a/tools/codescan/config/config.go
+++ b/tools/codescan/config/config.go
@@ -1,3 +1,17 @@
+// Copyright © 2024 OpenIM. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package config
import (
diff --git a/tools/formitychecker/checker/checker.go b/tools/formitychecker/checker/checker.go
index 9a64b7090..b17cc5427 100644
--- a/tools/formitychecker/checker/checker.go
+++ b/tools/formitychecker/checker/checker.go
@@ -22,6 +22,7 @@ import (
"strings"
"github.com/OpenIMSDK/tools/errs"
+
"github.com/openimsdk/open-im-server/tools/formitychecker/config"
)
diff --git a/tools/url2im/main.go b/tools/url2im/main.go
index 28c1e1c43..9e319932f 100644
--- a/tools/url2im/main.go
+++ b/tools/url2im/main.go
@@ -33,35 +33,35 @@ import (
func main() {
var conf pkg.Config // Configuration object, '*' denotes required fields
- // *Required*: Path for the task log file
- flag.StringVar(&conf.TaskPath, "task", "take.txt", "Path for the task log file")
-
- // Optional: Path for the progress log file
- flag.StringVar(&conf.ProgressPath, "progress", "", "Path for the progress log file")
-
- // Number of concurrent operations
- flag.IntVar(&conf.Concurrency, "concurrency", 1, "Number of concurrent operations")
-
- // Number of retry attempts
- flag.IntVar(&conf.Retry, "retry", 1, "Number of retry attempts")
-
- // Optional: Path for the temporary directory
- flag.StringVar(&conf.TempDir, "temp", "", "Path for the temporary directory")
-
- // Cache size in bytes (downloads move to disk when exceeded)
- flag.Int64Var(&conf.CacheSize, "cache", 1024*1024*100, "Cache size in bytes")
-
- // Request timeout in milliseconds
- flag.Int64Var((*int64)(&conf.Timeout), "timeout", 5000, "Request timeout in milliseconds")
-
- // *Required*: API endpoint for the IM service
- flag.StringVar(&conf.Api, "api", "http://127.0.0.1:10002", "API endpoint for the IM service")
-
- // IM administrator's user ID
- flag.StringVar(&conf.UserID, "userID", "openIM123456", "IM administrator's user ID")
+ // *Required*: Path for the task log file
+ flag.StringVar(&conf.TaskPath, "task", "take.txt", "Path for the task log file")
- // Secret for the IM configuration
- flag.StringVar(&conf.Secret, "secret", "openIM123", "Secret for the IM configuration")
+ // Optional: Path for the progress log file
+ flag.StringVar(&conf.ProgressPath, "progress", "", "Path for the progress log file")
+
+ // Number of concurrent operations
+ flag.IntVar(&conf.Concurrency, "concurrency", 1, "Number of concurrent operations")
+
+ // Number of retry attempts
+ flag.IntVar(&conf.Retry, "retry", 1, "Number of retry attempts")
+
+ // Optional: Path for the temporary directory
+ flag.StringVar(&conf.TempDir, "temp", "", "Path for the temporary directory")
+
+ // Cache size in bytes (downloads move to disk when exceeded)
+ flag.Int64Var(&conf.CacheSize, "cache", 1024*1024*100, "Cache size in bytes")
+
+ // Request timeout in milliseconds
+ flag.Int64Var((*int64)(&conf.Timeout), "timeout", 5000, "Request timeout in milliseconds")
+
+ // *Required*: API endpoint for the IM service
+ flag.StringVar(&conf.Api, "api", "http://127.0.0.1:10002", "API endpoint for the IM service")
+
+ // IM administrator's user ID
+ flag.StringVar(&conf.UserID, "userID", "openIM123456", "IM administrator's user ID")
+
+ // Secret for the IM configuration
+ flag.StringVar(&conf.Secret, "secret", "openIM123", "Secret for the IM configuration")
flag.Parse()
if !filepath.IsAbs(conf.TaskPath) {