packet name pb

This commit is contained in:
withchao
2023-03-16 10:46:06 +08:00
parent 8437c9a38b
commit 17de3e7927
208 changed files with 25300 additions and 15564 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
package cmd
import (
"OpenIM/internal/msggateway"
//"OpenIM/internal/msggateway"
"OpenIM/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/internal/msggateway"
//"github.com/OpenIMSDK/Open-IM-Server/internal/msggateway"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -1,7 +1,7 @@
package cmd
import (
"OpenIM/internal/msgtransfer"
"github.com/OpenIMSDK/Open-IM-Server/internal/msgtransfer"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -1,8 +1,8 @@
package cmd
import (
"OpenIM/internal/tools"
"context"
"github.com/OpenIMSDK/Open-IM-Server/internal/tools"
"github.com/spf13/cobra"
)
+3 -3
View File
@@ -1,10 +1,10 @@
package cmd
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/log"
"fmt"
"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/log"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package cmd
import (
"OpenIM/internal/startrpc"
"OpenIM/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/internal/startrpc"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/spf13/cobra"
"google.golang.org/grpc"
)
+1 -1
View File
@@ -1,8 +1,8 @@
package config
import (
"OpenIM/pkg/discoveryregistry"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"io/ioutil"
"os"
"path/filepath"
+1 -1
View File
@@ -1,8 +1,8 @@
package cache
import (
"OpenIM/pkg/common/db/relation"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation"
"github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"time"
+3 -3
View File
@@ -1,10 +1,10 @@
package cache
import (
"OpenIM/pkg/common/db/relation"
relationTb "OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation"
relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"time"
+2 -2
View File
@@ -1,9 +1,9 @@
package cache
import (
"OpenIM/pkg/common/db/table/unrelation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/dtm-labs/rockscache"
"time"
)
+3 -3
View File
@@ -1,11 +1,11 @@
package cache
import (
"OpenIM/pkg/common/db/relation"
relationTb "OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"encoding/json"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation"
relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"time"
+3 -3
View File
@@ -1,10 +1,10 @@
package cache
import (
relationTb "OpenIM/pkg/common/db/table/relation"
unrelation2 "OpenIM/pkg/common/db/table/unrelation"
"OpenIM/pkg/utils"
"context"
relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
unrelation2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"math/big"
+3 -3
View File
@@ -1,11 +1,11 @@
package cache
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/mw/specialerror"
"OpenIM/pkg/errs"
"context"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/go-redis/redis/v8"
"time"
)
+7 -7
View File
@@ -1,16 +1,16 @@
package cache
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/log"
"OpenIM/pkg/common/tracelog"
pbMsg "OpenIM/pkg/proto/msg"
"OpenIM/pkg/proto/sdkws"
"OpenIM/pkg/utils"
"context"
"errors"
"fmt"
"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/log"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tracelog"
pbMsg "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/utils"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"strconv"
+1 -2
View File
@@ -1,16 +1,15 @@
package cache
import (
"OpenIM/pkg/utils"
"context"
"encoding/json"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/dtm-labs/rockscache"
"time"
)
const scanCount = 3000
func GetDefaultOpt() rockscache.Options {
opts := rockscache.NewDefaultOptions()
opts.StrongConsistency = true
+3 -3
View File
@@ -1,11 +1,11 @@
package cache
import (
"OpenIM/pkg/common/db/relation"
relationTb "OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"encoding/json"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation"
relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
"strconv"
+4 -4
View File
@@ -1,11 +1,11 @@
package controller
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/cache"
"OpenIM/pkg/common/tokenverify"
"OpenIM/pkg/utils"
"context"
"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/tokenverify"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/golang-jwt/jwt/v4"
)
+2 -2
View File
@@ -1,10 +1,10 @@
package controller
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"errors"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package controller
import (
relationTb "OpenIM/pkg/common/db/table/relation"
pbMsg "OpenIM/pkg/proto/msg"
relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg"
)
type ChatLogDatabase interface {
+6 -6
View File
@@ -1,14 +1,14 @@
package controller
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/cache"
"OpenIM/pkg/common/db/relation"
relationTb "OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/common/db/tx"
"OpenIM/pkg/utils"
"context"
"encoding/json"
"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/relation"
relationTb "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/utils"
)
type ConversationDatabase interface {
+1 -1
View File
@@ -1,8 +1,8 @@
package controller
import (
unRelationTb "OpenIM/pkg/common/db/table/unrelation"
"context"
unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
)
// for mongoDB
+5 -5
View File
@@ -1,13 +1,13 @@
package controller
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/common/db/tx"
"OpenIM/pkg/errs"
"OpenIM/pkg/utils"
"context"
"errors"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"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/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+8 -8
View File
@@ -1,16 +1,16 @@
package controller
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/cache"
"OpenIM/pkg/common/db/relation"
relationTb "OpenIM/pkg/common/db/table/relation"
unRelationTb "OpenIM/pkg/common/db/table/unrelation"
"OpenIM/pkg/common/db/tx"
"OpenIM/pkg/common/db/unrelation"
"OpenIM/pkg/utils"
"context"
"fmt"
"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/relation"
relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/dtm-labs/rockscache"
_ "github.com/dtm-labs/rockscache"
"github.com/go-redis/redis/v8"
+12 -12
View File
@@ -1,25 +1,25 @@
package controller
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/cache"
unRelationTb "OpenIM/pkg/common/db/table/unrelation"
"OpenIM/pkg/common/db/unrelation"
"OpenIM/pkg/common/kafka"
"OpenIM/pkg/common/log"
"OpenIM/pkg/common/prome"
"OpenIM/pkg/common/tracelog"
"fmt"
"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"
unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tracelog"
"github.com/gogo/protobuf/sortkeys"
"sync"
"time"
pbMsg "OpenIM/pkg/proto/msg"
"OpenIM/pkg/proto/sdkws"
"OpenIM/pkg/utils"
"context"
"errors"
pbMsg "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/utils"
"github.com/go-redis/redis/v8"
"go.mongodb.org/mongo-driver/mongo"
+2 -2
View File
@@ -1,9 +1,9 @@
package controller
import (
"OpenIM/pkg/common/db/cache"
"OpenIM/pkg/proto/sdkws"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
)
type PushDatabase interface {
+7 -7
View File
@@ -2,18 +2,18 @@ package controller
import "C"
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/db/obj"
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/common/log"
"OpenIM/pkg/errs"
"OpenIM/pkg/proto/third"
"OpenIM/pkg/utils"
"context"
"crypto/md5"
"encoding/hex"
"errors"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/obj"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/google/uuid"
"path"
"strconv"
+2 -2
View File
@@ -1,9 +1,9 @@
package controller
import (
"OpenIM/pkg/common/db/cache"
"OpenIM/pkg/proto/sdkws"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
)
type ThirdDatabase interface {
+3 -3
View File
@@ -1,10 +1,10 @@
package controller
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/errs"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
)
type UserDatabase interface {
+3 -3
View File
@@ -1,10 +1,10 @@
package localcache
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/discoveryregistry"
"OpenIM/pkg/proto/conversation"
"context"
"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"
"sync"
)
+4 -4
View File
@@ -1,11 +1,11 @@
package localcache
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/discoveryregistry"
"OpenIM/pkg/errs"
"OpenIM/pkg/proto/group"
"context"
"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"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group"
"sync"
)
+2 -2
View File
@@ -1,11 +1,11 @@
package obj
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/utils"
"context"
"errors"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/minio/minio-go/v7/pkg/s3utils"
+2 -2
View File
@@ -1,9 +1,9 @@
package relation
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+5 -5
View File
@@ -1,12 +1,12 @@
package relation
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/table/relation"
pbMsg "OpenIM/pkg/proto/msg"
sdkws "OpenIM/pkg/proto/sdkws"
"OpenIM/pkg/utils"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"github.com/jinzhu/copier"
+3 -3
View File
@@ -1,10 +1,10 @@
package relation
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,9 +1,9 @@
package relation
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
@@ -1,9 +1,9 @@
package relation
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+3 -3
View File
@@ -1,10 +1,10 @@
package relation
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,9 +1,9 @@
package relation
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
@@ -1,9 +1,9 @@
package relation
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+4 -4
View File
@@ -1,12 +1,12 @@
package relation
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/log"
"OpenIM/pkg/common/mw/specialerror"
"OpenIM/pkg/errs"
"context"
"fmt"
"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/common/mw/specialerror"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
mysqlDriver "github.com/go-sql-driver/mysql"
"gorm.io/driver/mysql"
"strings"
+2 -2
View File
@@ -1,9 +1,9 @@
package relation
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,9 +1,9 @@
package relation
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
"time"
)
+2 -2
View File
@@ -1,9 +1,9 @@
package relation
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
"time"
)
+2 -2
View File
@@ -1,9 +1,9 @@
package relation
import (
"OpenIM/pkg/common/db/table/relation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+1 -1
View File
@@ -1,7 +1,7 @@
package relation
import (
"OpenIM/pkg/utils"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package relation
import (
"time"
pbMsg "OpenIM/pkg/proto/msg"
pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg"
)
const (
+1 -1
View File
@@ -1,7 +1,7 @@
package relation
import (
"OpenIM/pkg/utils"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"gorm.io/gorm"
)
@@ -1,8 +1,8 @@
package unrelation
import (
"OpenIM/pkg/proto/sdkws"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
"strconv"
"strings"
)
+2 -2
View File
@@ -1,9 +1,9 @@
package unrelation
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/proto/sdkws"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
"strconv"
"strings"
)
+1 -1
View File
@@ -1,8 +1,8 @@
package tx
import (
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"go.mongodb.org/mongo-driver/mongo"
)
+2 -2
View File
@@ -1,11 +1,11 @@
package unrelation
import (
unRelationTb "OpenIM/pkg/common/db/table/unrelation"
"OpenIM/pkg/utils"
"context"
"errors"
"fmt"
unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
+5 -5
View File
@@ -1,13 +1,13 @@
package unrelation
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/db/table/unrelation"
"OpenIM/pkg/common/mw/specialerror"
"OpenIM/pkg/errs"
"OpenIM/pkg/utils"
"context"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/x/bsonx"
+3 -3
View File
@@ -1,12 +1,12 @@
package unrelation
import (
table "OpenIM/pkg/common/db/table/unrelation"
"OpenIM/pkg/proto/sdkws"
"OpenIM/pkg/utils"
"context"
"errors"
"fmt"
table "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/golang/protobuf/proto"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
+2 -2
View File
@@ -1,9 +1,9 @@
package unrelation
import (
"OpenIM/pkg/common/db/table/unrelation"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
+3 -3
View File
@@ -7,11 +7,11 @@
package http
import (
"OpenIM/pkg/callbackstruct"
"OpenIM/pkg/common/config"
"OpenIM/pkg/errs"
"bytes"
"encoding/json"
"github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"io/ioutil"
"net/http"
urlLib "net/url"
+1 -1
View File
@@ -1,7 +1,7 @@
package kafka
import (
"OpenIM/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"sync"
"github.com/Shopify/sarama"
+2 -2
View File
@@ -7,9 +7,9 @@
package kafka
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/tracelog"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tracelog"
"github.com/Shopify/sarama"
)
+6 -6
View File
@@ -1,18 +1,18 @@
package kafka
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/constant"
log "OpenIM/pkg/common/log"
"OpenIM/pkg/common/tracelog"
"OpenIM/pkg/utils"
"context"
"errors"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
log "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tracelog"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/Shopify/sarama"
"github.com/golang/protobuf/proto"
prome "OpenIM/pkg/common/prome"
prome "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome"
)
type Producer struct {
+6 -6
View File
@@ -7,9 +7,9 @@
package log
import (
"OpenIM/pkg/common/config"
"context"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
elasticV7 "github.com/olivere/elastic/v7"
"github.com/sirupsen/logrus"
"log"
@@ -18,13 +18,13 @@ import (
"time"
)
//esHook CUSTOMIZED ES hook
// esHook CUSTOMIZED ES hook
type esHook struct {
moduleName string
client *elasticV7.Client
}
//newEsHook Initialization
// newEsHook Initialization
func newEsHook(moduleName string) *esHook {
//https://github.com/sohlich/elogrus
//client, err := elastic.NewClient(elastic.SetURL("http://localhost:9200"))
@@ -61,7 +61,7 @@ func newEsHook(moduleName string) *esHook {
return &esHook{client: es, moduleName: moduleName}
}
//Fire log hook interface
// Fire log hook interface
func (hook *esHook) Fire(entry *logrus.Entry) error {
doc := newEsLog(entry)
go hook.sendEs(doc)
@@ -72,7 +72,7 @@ func (hook *esHook) Levels() []logrus.Level {
return logrus.AllLevels
}
//sendEs
// sendEs
func (hook *esHook) sendEs(doc appLogDocModel) {
defer func() {
if r := recover(); r != nil {
@@ -86,7 +86,7 @@ func (hook *esHook) sendEs(doc appLogDocModel) {
}
//appLogDocModel es model
// appLogDocModel es model
type appLogDocModel map[string]interface{}
func newEsLog(e *logrus.Entry) appLogDocModel {
+1 -1
View File
@@ -7,7 +7,7 @@
package log
import (
"OpenIM/pkg/utils"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/sirupsen/logrus"
"runtime"
"strings"
+1 -1
View File
@@ -1,7 +1,7 @@
package log
import (
"OpenIM/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
nested "github.com/antonfisher/nested-logrus-formatter"
rotatelogs "github.com/lestrrat-go/file-rotatelogs"
"github.com/rifflock/lfshook"
+4 -4
View File
@@ -1,10 +1,10 @@
package log
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/tracelog"
"bufio"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tracelog"
//"bufio"
"fmt"
@@ -128,7 +128,7 @@ func Debug(OperationID string, args ...interface{}) {
}).Debugln(args)
}
//Deprecated
// Deprecated
func Warning(token, OperationID, format string, args ...interface{}) {
logger.WithFields(logrus.Fields{
"PID": logger.Pid,
@@ -137,7 +137,7 @@ func Warning(token, OperationID, format string, args ...interface{}) {
}
//internal method
// internal method
func argsHandle(OperationID string, fields logrus.Fields, args []interface{}) {
for i := 0; i < len(args); i += 2 {
if i+1 < len(args) {
+3 -3
View File
@@ -1,10 +1,10 @@
package log
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/tracelog"
"context"
"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/tracelog"
rotatelogs "github.com/lestrrat-go/file-rotatelogs"
"os"
"path/filepath"
+1 -1
View File
@@ -1,9 +1,9 @@
package mw
import (
"OpenIM/pkg/common/constant"
"bytes"
"encoding/json"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/gin-gonic/gin"
"io"
"net/http"
+3 -3
View File
@@ -1,11 +1,11 @@
package mw
import (
"OpenIM/pkg/common/constant"
"OpenIM/pkg/common/log"
"OpenIM/pkg/errs"
"context"
"errors"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
+4 -4
View File
@@ -1,12 +1,12 @@
package mw
import (
"OpenIM/pkg/common/log"
"OpenIM/pkg/common/mw/specialerror"
"OpenIM/pkg/errs"
"OpenIM/pkg/proto/wrapperspb"
"context"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
+1 -1
View File
@@ -1,6 +1,6 @@
package specialerror
import "OpenIM/pkg/errs"
import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
var handlers []func(err error) errs.CodeError
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/json"
"time"
"OpenIM/pkg/common/log"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"google.golang.org/grpc"
"google.golang.org/grpc/peer"
+1 -1
View File
@@ -1,8 +1,8 @@
package prome
import (
"OpenIM/pkg/common/config"
"bytes"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"net/http"
"strconv"
+4 -4
View File
@@ -1,11 +1,11 @@
package tokenverify
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/common/tracelog"
"OpenIM/pkg/errs"
"OpenIM/pkg/utils"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tracelog"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/golang-jwt/jwt/v4"
"time"
)
+1 -1
View File
@@ -1,8 +1,8 @@
package tracelog
import (
"OpenIM/pkg/common/constant"
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
)
func NewCtx(operationID string) context.Context {