Error code standardization

This commit is contained in:
wenxu12345 2023-02-16 15:41:37 +08:00
parent b6d19dba00
commit dc33071478
49 changed files with 41 additions and 77 deletions

View File

@ -1,7 +1,6 @@
package main package main
import ( import (
_ "Open_IM/cmd/open_im_api/docs"
apiAuth "Open_IM/internal/api/auth" apiAuth "Open_IM/internal/api/auth"
"Open_IM/internal/api/conversation" "Open_IM/internal/api/conversation"
"Open_IM/internal/api/friend" "Open_IM/internal/api/friend"
@ -14,7 +13,6 @@ import (
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/middleware" "Open_IM/pkg/common/middleware"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/utils"
"flag" "flag"
"fmt" "fmt"
@ -28,7 +26,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
//"syscall" //"syscall"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
prome "Open_IM/pkg/common/prometheus" prome "Open_IM/pkg/common/prome"
) )
// @title open-IM-Server API // @title open-IM-Server API

View File

@ -4,7 +4,7 @@ import (
rpcConversation "Open_IM/internal/rpc/conversation" rpcConversation "Open_IM/internal/rpc/conversation"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
prome "Open_IM/pkg/common/prometheus" prome "Open_IM/pkg/common/prome"
"flag" "flag"
"fmt" "fmt"
) )

1
go.mod
View File

@ -56,7 +56,6 @@ require (
) )
require ( require (
github.com/envoyproxy/protoc-gen-validate v0.1.0
github.com/go-openapi/spec v0.20.6 // indirect github.com/go-openapi/spec v0.20.6 // indirect
github.com/go-openapi/swag v0.21.1 // indirect github.com/go-openapi/swag v0.21.1 // indirect
github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/locales v0.14.1 // indirect

1
go.sum
View File

@ -510,7 +510,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=

View File

@ -1,7 +1,7 @@
package apiAuth package apiAuth
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"

View File

@ -1,10 +1,9 @@
package conversation package conversation
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/getcdv3"
pbConversation "Open_IM/pkg/proto/conversation" pbConversation "Open_IM/pkg/proto/conversation"
pbUser "Open_IM/pkg/proto/user" pbUser "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"

View File

@ -2,7 +2,7 @@ package friend
//import ( //import (
// jsonData "Open_IM/internal/utils" // jsonData "Open_IM/internal/utils"
// api "Open_IM/pkg/api_struct" // api "Open_IM/pkg/apistruct"
// "Open_IM/pkg/common/config" // "Open_IM/pkg/common/config"
// "Open_IM/pkg/common/log" // "Open_IM/pkg/common/log"
// "Open_IM/pkg/common/tokenverify" // "Open_IM/pkg/common/tokenverify"

View File

@ -1,8 +1,8 @@
package friend package friend
import ( import (
common "Open_IM/internal/api_to_rpc" common "Open_IM/internal/api2rpc"
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
rpc "Open_IM/pkg/proto/friend" rpc "Open_IM/pkg/proto/friend"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"

View File

@ -2,7 +2,7 @@ package group
//import ( //import (
// common "Open_IM/internal/api_to_rpc" // common "Open_IM/internal/api_to_rpc"
// api "Open_IM/pkg/api_struct" // api "Open_IM/pkg/apistruct"
// "Open_IM/pkg/common/config" // "Open_IM/pkg/common/config"
// "Open_IM/pkg/common/constant" // "Open_IM/pkg/common/constant"
// "Open_IM/pkg/common/log" // "Open_IM/pkg/common/log"

View File

@ -1,7 +1,7 @@
package group package group
import ( import (
"Open_IM/pkg/api_struct" "Open_IM/pkg/apistruct"
"Open_IM/pkg/proto/group" "Open_IM/pkg/proto/group"
"context" "context"
"errors" "errors"

View File

@ -2,7 +2,7 @@ package group
//import ( //import (
// jsonData "Open_IM/internal/utils" // jsonData "Open_IM/internal/utils"
// api "Open_IM/pkg/api_struct" // api "Open_IM/pkg/apistruct"
// "Open_IM/pkg/common/config" // "Open_IM/pkg/common/config"
// "Open_IM/pkg/common/log" // "Open_IM/pkg/common/log"
// "Open_IM/pkg/common/token_verify" // "Open_IM/pkg/common/token_verify"

View File

@ -7,10 +7,9 @@
package manage package manage
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
pbChat "Open_IM/pkg/proto/msg" pbChat "Open_IM/pkg/proto/msg"

View File

@ -7,12 +7,11 @@
package manage package manage
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/getcdv3"
pbRelay "Open_IM/pkg/proto/relay" pbRelay "Open_IM/pkg/proto/relay"
rpc "Open_IM/pkg/proto/user" rpc "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"

View File

@ -1,12 +1,11 @@
package msg package msg
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/getcdv3"
rpc "Open_IM/pkg/proto/msg" rpc "Open_IM/pkg/proto/msg"
pbCommon "Open_IM/pkg/proto/sdkws" pbCommon "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"

View File

@ -1,12 +1,11 @@
package msg package msg
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/getcdv3"
rpc "Open_IM/pkg/proto/msg" rpc "Open_IM/pkg/proto/msg"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"

View File

@ -4,7 +4,6 @@ import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/getcdv3"
pbChat "Open_IM/pkg/proto/msg" pbChat "Open_IM/pkg/proto/msg"
sdkws "Open_IM/pkg/proto/sdkws" sdkws "Open_IM/pkg/proto/sdkws"
"context" "context"

View File

@ -4,7 +4,6 @@ import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/getcdv3"
"Open_IM/pkg/proto/msg" "Open_IM/pkg/proto/msg"
sdkws "Open_IM/pkg/proto/sdkws" sdkws "Open_IM/pkg/proto/sdkws"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"

View File

@ -7,7 +7,6 @@ import (
sdkws "Open_IM/pkg/proto/sdkws" sdkws "Open_IM/pkg/proto/sdkws"
"context" "context"
"Open_IM/pkg/getcdv3"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"net/http" "net/http"
"strings" "strings"

View File

@ -1,7 +1,7 @@
package apiThird package apiThird
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"

View File

@ -1,7 +1,7 @@
package apiThird package apiThird
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"

View File

@ -1,8 +1,7 @@
package apiThird package apiThird
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"

View File

@ -1,10 +1,9 @@
package apiThird package apiThird
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
_ "Open_IM/pkg/common/tokenverify" _ "Open_IM/pkg/common/tokenverify"

View File

@ -1,8 +1,7 @@
package apiThird package apiThird
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"

View File

@ -1,8 +1,7 @@
package apiThird package apiThird
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"

View File

@ -1,7 +1,7 @@
package apiThird package apiThird
import ( import (
api "Open_IM/pkg/api_struct" api "Open_IM/pkg/apistruct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"

View File

@ -1,17 +1,16 @@
package user package user
import ( import (
jsonData "Open_IM/internal/utils" api "Open_IM/pkg/apistruct"
api "Open_IM/pkg/api_struct"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
cacheRpc "Open_IM/pkg/proto/cache"
pbRelay "Open_IM/pkg/proto/relay" pbRelay "Open_IM/pkg/proto/relay"
sdkws "Open_IM/pkg/proto/sdkws" sdkws "Open_IM/pkg/proto/sdkws"
rpc "Open_IM/pkg/proto/user" rpc "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
jsonData "Open_IM/pkg/utils"
"context" "context"
"net/http" "net/http"
"strings" "strings"

View File

@ -2,7 +2,6 @@ package msggateway
import ( import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
pbChat "Open_IM/pkg/proto/msg" pbChat "Open_IM/pkg/proto/msg"
sdkws "Open_IM/pkg/proto/sdkws" sdkws "Open_IM/pkg/proto/sdkws"

View File

@ -8,7 +8,7 @@ import (
"fmt" "fmt"
"sync" "sync"
prome "Open_IM/pkg/common/prometheus" prome "Open_IM/pkg/common/prome"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"
) )

View File

@ -3,7 +3,6 @@ package msggateway
import ( import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/prome" "Open_IM/pkg/common/prome"
pbChat "Open_IM/pkg/proto/msg" pbChat "Open_IM/pkg/proto/msg"

View File

@ -4,7 +4,6 @@ import (
"bytes" "bytes"
"compress/gzip" "compress/gzip"
"io/ioutil" "io/ioutil"
"open_im_sdk/pkg/utils"
) )
type Compressor interface { type Compressor interface {

View File

@ -3,7 +3,6 @@ package new
import ( import (
"bytes" "bytes"
"encoding/gob" "encoding/gob"
"open_im_sdk/pkg/utils"
) )
type Encoder interface { type Encoder interface {

View File

@ -5,7 +5,6 @@ import (
"errors" "errors"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"net/http" "net/http"
"open_im_sdk/pkg/utils"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"

View File

@ -12,15 +12,13 @@ import (
"bytes" "bytes"
"context" "context"
"encoding/gob" "encoding/gob"
"github.com/golang/protobuf/proto"
"github.com/gorilla/websocket"
grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"google.golang.org/grpc"
"net" "net"
"strconv" "strconv"
"strings" "strings"
"github.com/golang/protobuf/proto"
grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/gorilla/websocket"
"google.golang.org/grpc"
) )
type RPCServer struct { type RPCServer struct {

View File

@ -3,9 +3,8 @@ package msggateway
import ( import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
prome "Open_IM/pkg/common/prometheus" prome "Open_IM/pkg/common/prome"
"Open_IM/pkg/common/tokenverify" "Open_IM/pkg/common/tokenverify"
pbRelay "Open_IM/pkg/proto/relay" pbRelay "Open_IM/pkg/proto/relay"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"

View File

@ -3,7 +3,6 @@ package fcm
import ( import (
"Open_IM/internal/push" "Open_IM/internal/push"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"context" "context"
go_redis "github.com/go-redis/redis/v8" go_redis "github.com/go-redis/redis/v8"

View File

@ -3,7 +3,6 @@ package getui
import ( import (
"Open_IM/internal/push" "Open_IM/internal/push"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"bytes" "bytes"

View File

@ -15,7 +15,7 @@ import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/kafka" "Open_IM/pkg/common/kafka"
prome "Open_IM/pkg/common/prometheus" prome "Open_IM/pkg/common/prome"
"Open_IM/pkg/statistics" "Open_IM/pkg/statistics"
"fmt" "fmt"
) )

View File

@ -3,10 +3,9 @@ package logic
import ( import (
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
prome "Open_IM/pkg/common/prometheus" prome "Open_IM/pkg/common/prome"
"Open_IM/pkg/getcdv3"
pbPush "Open_IM/pkg/proto/push" pbPush "Open_IM/pkg/proto/push"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"

View File

@ -10,9 +10,8 @@ import (
"Open_IM/internal/push" "Open_IM/internal/push"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/getcdv3"
pbPush "Open_IM/pkg/proto/push" pbPush "Open_IM/pkg/proto/push"
pbRelay "Open_IM/pkg/proto/relay" pbRelay "Open_IM/pkg/proto/relay"
pbRtc "Open_IM/pkg/proto/rtc" pbRtc "Open_IM/pkg/proto/rtc"
@ -20,7 +19,7 @@ import (
"context" "context"
"strings" "strings"
prome "Open_IM/pkg/common/prometheus" prome "Open_IM/pkg/common/prome"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
) )

View File

@ -1,10 +1,7 @@
package logic package logic
import ( import (
tpns "Open_IM/internal/push/sdk/tpns-server-sdk-go/go"
"Open_IM/internal/push/sdk/tpns-server-sdk-go/go/auth" "Open_IM/internal/push/sdk/tpns-server-sdk-go/go/auth"
"Open_IM/internal/push/sdk/tpns-server-sdk-go/go/common"
"Open_IM/internal/push/sdk/tpns-server-sdk-go/go/req"
"Open_IM/pkg/common/config" "Open_IM/pkg/common/config"
) )

View File

@ -8,12 +8,10 @@ import (
"Open_IM/pkg/common/db/controller" "Open_IM/pkg/common/db/controller"
"Open_IM/pkg/common/db/relation" "Open_IM/pkg/common/db/relation"
tableRelation "Open_IM/pkg/common/db/table/relation" tableRelation "Open_IM/pkg/common/db/table/relation"
"Open_IM/pkg/common/db/unrelation"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
promePkg "Open_IM/pkg/common/prometheus" promePkg "Open_IM/pkg/common/prome"
"Open_IM/pkg/getcdv3"
pbConversation "Open_IM/pkg/proto/conversation" pbConversation "Open_IM/pkg/proto/conversation"
pbUser "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"github.com/dtm-labs/rockscache" "github.com/dtm-labs/rockscache"

View File

@ -32,7 +32,7 @@ func toCommonCallback(ctx context.Context, msg *pbChat.SendMsgReq, command strin
AtUserIDList: msg.MsgData.AtUserIDList, AtUserIDList: msg.MsgData.AtUserIDList,
SenderFaceURL: msg.MsgData.SenderFaceURL, SenderFaceURL: msg.MsgData.SenderFaceURL,
Content: utils.GetContent(msg.MsgData), Content: utils.GetContent(msg.MsgData),
Seq: msg.MsgData.Seq, Seq: uint32(msg.MsgData.Seq),
Ex: msg.MsgData.Ex, Ex: msg.MsgData.Ex,
} }
} }

View File

@ -3,7 +3,6 @@ package msg
import ( import (
"Open_IM/internal/common/notification" "Open_IM/internal/common/notification"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/proto/msg" "Open_IM/pkg/proto/msg"
"Open_IM/pkg/proto/sdkws" "Open_IM/pkg/proto/sdkws"

View File

@ -1,7 +1,6 @@
package msg package msg
import ( import (
"Open_IM/pkg/common/db"
"time" "time"
) )

View File

@ -2,7 +2,7 @@ package msg
import ( import (
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
promePkg "Open_IM/pkg/common/prometheus" promePkg "Open_IM/pkg/common/prome"
pbConversation "Open_IM/pkg/proto/conversation" pbConversation "Open_IM/pkg/proto/conversation"
"Open_IM/pkg/proto/msg" "Open_IM/pkg/proto/msg"
"Open_IM/pkg/proto/sdkws" "Open_IM/pkg/proto/sdkws"

View File

@ -9,7 +9,7 @@ import (
discoveryRegistry "Open_IM/pkg/discoveryregistry" discoveryRegistry "Open_IM/pkg/discoveryregistry"
"github.com/OpenIMSDK/openKeeper" "github.com/OpenIMSDK/openKeeper"
promePkg "Open_IM/pkg/common/prometheus" promePkg "Open_IM/pkg/common/prome"
"Open_IM/pkg/proto/msg" "Open_IM/pkg/proto/msg"
"google.golang.org/grpc" "google.golang.org/grpc"
) )

View File

@ -6,7 +6,7 @@ import (
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
"Open_IM/pkg/common/middleware" "Open_IM/pkg/common/middleware"
promePkg "Open_IM/pkg/common/prometheus" promePkg "Open_IM/pkg/common/prome"
"flag" "flag"
"fmt" "fmt"
"github.com/OpenIMSDK/openKeeper" "github.com/OpenIMSDK/openKeeper"

View File

@ -9,7 +9,7 @@ import (
"github.com/Shopify/sarama" "github.com/Shopify/sarama"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
prome "Open_IM/pkg/common/prometheus" prome "Open_IM/pkg/common/prome"
) )
type Producer struct { type Producer struct {