chore: tools, pb replaced by public warehouse (#662)

* fix: StringValue When there are double quotes in the string value, serialization and deserialization fail

Signed-off-by: withchao <993506633@qq.com>

* test: StatusTemporaryRedirect -> StatusFound

Signed-off-by: withchao <993506633@qq.com>

* chore: pb a2r

Signed-off-by: withchao <993506633@qq.com>

* chore: replacement package

Signed-off-by: withchao <993506633@qq.com>

* chore: replacement package

Signed-off-by: withchao <993506633@qq.com>

* chore: replacement package

Signed-off-by: withchao <993506633@qq.com>

* fix: remove go mod replace

Signed-off-by: withchao <993506633@qq.com>

* fix: tools version

Signed-off-by: withchao <993506633@qq.com>

* fix: config.yaml

Signed-off-by: withchao <993506633@qq.com>

---------

Signed-off-by: withchao <993506633@qq.com>
This commit is contained in:
withchao
2023-07-25 20:13:32 +08:00
committed by GitHub
parent 166fb3ca62
commit 5f6b2b7f9d
255 changed files with 721 additions and 43133 deletions
+3 -3
View File
@@ -20,9 +20,9 @@ import (
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify"
pbFriend "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend"
pbFriend "github.com/OpenIMSDK/protocol/friend"
"github.com/OpenIMSDK/tools/mcontext"
"github.com/OpenIMSDK/tools/tokenverify"
)
func (s *friendServer) GetPaginationBlacks(
+5 -5
View File
@@ -18,12 +18,12 @@ import (
"context"
cbapi "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct"
"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/http"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
pbfriend "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend"
pbfriend "github.com/OpenIMSDK/protocol/friend"
"github.com/OpenIMSDK/tools/config"
"github.com/OpenIMSDK/tools/constant"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/mcontext"
)
func CallbackBeforeAddFriend(ctx context.Context, req *pbfriend.ApplyToAddFriendReq) error {
+16 -14
View File
@@ -18,23 +18,23 @@ import (
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient"
"github.com/OpenIMSDK/tools/log"
"google.golang.org/grpc"
"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"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation"
tablerelation "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify"
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/notification"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
pbfriend "github.com/OpenIMSDK/protocol/friend"
"github.com/OpenIMSDK/tools/constant"
registry "github.com/OpenIMSDK/tools/discoveryregistry"
"github.com/OpenIMSDK/tools/errs"
"github.com/OpenIMSDK/tools/tokenverify"
"github.com/OpenIMSDK/tools/tx"
"github.com/OpenIMSDK/tools/utils"
)
type friendServer struct {
@@ -83,6 +83,11 @@ func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error {
return nil
}
func (s *friendServer) GetDesignatedFriendsApply(ctx context.Context, req *pbfriend.GetDesignatedFriendsApplyReq) (*pbfriend.GetDesignatedFriendsApplyResp, error) {
//TODO implement me
panic("implement me")
}
// ok.
func (s *friendServer) ApplyToAddFriend(
ctx context.Context,
@@ -249,8 +254,7 @@ func (s *friendServer) GetPaginationFriendsApplyTo(
if err := s.userRpcClient.Access(ctx, req.UserID); err != nil {
return nil, err
}
pageNumber, showNumber := utils.GetPage(req.Pagination)
friendRequests, total, err := s.friendDatabase.PageFriendRequestToMe(ctx, req.UserID, pageNumber, showNumber)
friendRequests, total, err := s.friendDatabase.PageFriendRequestToMe(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber)
if err != nil {
return nil, err
}
@@ -273,8 +277,7 @@ func (s *friendServer) GetPaginationFriendsApplyFrom(
if err := s.userRpcClient.Access(ctx, req.UserID); err != nil {
return nil, err
}
pageNumber, showNumber := utils.GetPage(req.Pagination)
friendRequests, total, err := s.friendDatabase.PageFriendRequestFromMe(ctx, req.UserID, pageNumber, showNumber)
friendRequests, total, err := s.friendDatabase.PageFriendRequestFromMe(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber)
if err != nil {
return nil, err
}
@@ -309,8 +312,7 @@ func (s *friendServer) GetPaginationFriends(
if err := s.userRpcClient.Access(ctx, req.UserID); err != nil {
return nil, err
}
pageNumber, showNumber := utils.GetPage(req.Pagination)
friends, total, err := s.friendDatabase.PageOwnerFriends(ctx, req.UserID, pageNumber, showNumber)
friends, total, err := s.friendDatabase.PageOwnerFriends(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber)
if err != nil {
return nil, err
}