From 2ce1bc84f2fde45c78a8804e252891134d37de51 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Fri, 17 Mar 2023 11:27:34 +0800 Subject: [PATCH] pkg --- internal/api/auth.go | 2 +- internal/api/conversation.go | 2 +- internal/api/friend.go | 2 +- internal/api/group.go | 2 +- internal/api/msg.go | 4 ++-- internal/api/third.go | 2 +- internal/api/user.go | 2 +- internal/msggateway/hub_server.go | 2 +- internal/msggateway/message_handler.go | 2 +- internal/rpc/conversation/conversaion.go | 4 ++-- internal/rpc/friend/black.go | 2 +- internal/rpc/friend/friend.go | 6 +++--- internal/rpc/group/group.go | 4 ++-- internal/rpc/msg/server.go | 2 +- internal/rpc/third/third.go | 2 +- internal/rpc/user/user.go | 6 +++--- pkg/common/cmd/rpc.go | 2 +- pkg/common/mw/gin.go | 2 +- 18 files changed, 25 insertions(+), 25 deletions(-) diff --git a/internal/api/auth.go b/internal/api/auth.go index 5e1b8ad0c..fbaf328b7 100644 --- a/internal/api/auth.go +++ b/internal/api/auth.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r" + "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" auth "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth" diff --git a/internal/api/conversation.go b/internal/api/conversation.go index 721943c25..0c92b7ff4 100644 --- a/internal/api/conversation.go +++ b/internal/api/conversation.go @@ -3,7 +3,7 @@ package api import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r" + "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" diff --git a/internal/api/friend.go b/internal/api/friend.go index 978fdbe6d..73f1c1177 100644 --- a/internal/api/friend.go +++ b/internal/api/friend.go @@ -3,7 +3,7 @@ package api import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r" + "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" diff --git a/internal/api/group.go b/internal/api/group.go index 63e4d702b..875256869 100644 --- a/internal/api/group.go +++ b/internal/api/group.go @@ -3,7 +3,7 @@ package api import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r" + "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" diff --git a/internal/api/msg.go b/internal/api/msg.go index 6b9f84699..5d8ca40b0 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -3,8 +3,8 @@ package api import ( "context" "errors" - "github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r" - "github.com/OpenIMSDK/Open-IM-Server/internal/apiresp" + "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" + "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" "github.com/OpenIMSDK/Open-IM-Server/pkg/apistruct" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" diff --git a/internal/api/third.go b/internal/api/third.go index fb5327be2..dbff5b720 100644 --- a/internal/api/third.go +++ b/internal/api/third.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r" + "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/internal/api/user.go b/internal/api/user.go index b65204707..e7912e49b 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -2,7 +2,7 @@ package api import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/api/a2r" + "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" diff --git a/internal/msggateway/hub_server.go b/internal/msggateway/hub_server.go index 98253a009..96e56b398 100644 --- a/internal/msggateway/hub_server.go +++ b/internal/msggateway/hub_server.go @@ -2,7 +2,6 @@ package msggateway import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/startrpc" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" @@ -10,6 +9,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway" + "github.com/OpenIMSDK/Open-IM-Server/pkg/startrpc" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "google.golang.org/grpc" ) diff --git a/internal/msggateway/message_handler.go b/internal/msggateway/message_handler.go index 50c2aecfb..f8beb86e6 100644 --- a/internal/msggateway/message_handler.go +++ b/internal/msggateway/message_handler.go @@ -2,9 +2,9 @@ package msggateway import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" "github.com/go-playground/validator/v10" "github.com/golang/protobuf/proto" ) diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index 0672a2b90..a5bbb57ca 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -2,8 +2,6 @@ package conversation import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/check" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" @@ -12,6 +10,8 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "google.golang.org/grpc" ) diff --git a/internal/rpc/friend/black.go b/internal/rpc/friend/black.go index e3c19af8f..9d5ef2e72 100644 --- a/internal/rpc/friend/black.go +++ b/internal/rpc/friend/black.go @@ -4,11 +4,11 @@ import ( "context" "time" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tracelog" pbFriend "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/convert" ) func (s *friendServer) GetPaginationBlacks(ctx context.Context, req *pbFriend.GetPaginationBlacksReq) (resp *pbFriend.GetPaginationBlacksResp, err error) { diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index 0aeaccef0..6d519a3d5 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -2,9 +2,6 @@ package friend import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/check" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/convert" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" @@ -14,6 +11,9 @@ import ( registry "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" pbfriend "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/convert" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "google.golang.org/grpc" ) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index faad8ce16..3b81a7270 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -3,8 +3,6 @@ package group import ( "context" "fmt" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/check" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" @@ -19,6 +17,8 @@ import ( pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" pbGroup "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "google.golang.org/grpc" "gorm.io/gorm" diff --git a/internal/rpc/msg/server.go b/internal/rpc/msg/server.go index 84a537e16..86b65a15d 100644 --- a/internal/rpc/msg/server.go +++ b/internal/rpc/msg/server.go @@ -1,7 +1,6 @@ package msg import ( - "github.com/OpenIMSDK/Open-IM-Server/internal/common/check" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/localcache" @@ -9,6 +8,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check" "google.golang.org/grpc" ) diff --git a/internal/rpc/third/third.go b/internal/rpc/third/third.go index 4f971b2bb..5a4a1883c 100644 --- a/internal/rpc/third/third.go +++ b/internal/rpc/third/third.go @@ -2,7 +2,6 @@ package third import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/check" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/obj" @@ -10,6 +9,7 @@ import ( relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check" "google.golang.org/grpc" ) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index b7d231b22..6b6b96330 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -2,9 +2,6 @@ package user import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/check" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/convert" - "github.com/OpenIMSDK/Open-IM-Server/internal/common/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" @@ -16,6 +13,9 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" pbuser "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/convert" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "google.golang.org/grpc" ) diff --git a/pkg/common/cmd/rpc.go b/pkg/common/cmd/rpc.go index 3af1047bd..6c6e9b485 100644 --- a/pkg/common/cmd/rpc.go +++ b/pkg/common/cmd/rpc.go @@ -1,8 +1,8 @@ package cmd import ( - "github.com/OpenIMSDK/Open-IM-Server/internal/startrpc" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" + "github.com/OpenIMSDK/Open-IM-Server/pkg/startrpc" "github.com/spf13/cobra" "google.golang.org/grpc" ) diff --git a/pkg/common/mw/gin.go b/pkg/common/mw/gin.go index ad90188b8..23606c041 100644 --- a/pkg/common/mw/gin.go +++ b/pkg/common/mw/gin.go @@ -3,7 +3,7 @@ package mw import ( "bytes" "encoding/json" - "github.com/OpenIMSDK/Open-IM-Server/internal/apiresp" + "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"