Merge remote-tracking branch 'upstream/main'

pull/1171/head
Gordon 2 years ago
commit 201e78014b

@ -361,13 +361,17 @@ linters-settings:
- gorm.io/gorm - gorm.io/gorm
- gorm.io/driver/mysql - gorm.io/driver/mysql
- k8s.io/klog - k8s.io/klog
- github.com/allowed/module
- go.mongodb.org/mongo-driver/mongo
# - gopkg.in/yaml.v2 # - gopkg.in/yaml.v2
domains: # List of allowed module domains domains: # List of allowed module domains
- google.golang.org - google.golang.org
- gopkg.in - gopkg.in
- golang.org - golang.org
- github.com - github.com
- go.mongodb.org
- go.uber.org - go.uber.org
- openim.io
- go.etcd.io - go.etcd.io
blocked: blocked:
versions: versions:

@ -61,11 +61,11 @@ func run(port int) error {
if err != nil { if err != nil {
return err return err
} }
if err := client.CreateRpcRootNodes(config.Config.GetServiceNames()); err != nil { if err = client.CreateRpcRootNodes(config.Config.GetServiceNames()); err != nil {
return err return err
} }
fmt.Println("api register public config to discov") fmt.Println("api register public config to discov")
if err := client.RegisterConf2Registry(constant.OpenIMCommonConfigKey, config.Config.EncodeConfig()); err != nil { if err = client.RegisterConf2Registry(constant.OpenIMCommonConfigKey, config.Config.EncodeConfig()); err != nil {
return err return err
} }
fmt.Println("api register public config to discov success") fmt.Println("api register public config to discov success")
@ -82,7 +82,9 @@ func run(port int) error {
err = router.Run(address) err = router.Run(address)
if err != nil { if err != nil {
log.ZError(context.Background(), "api run failed ", err, "address", address) log.ZError(context.Background(), "api run failed ", err, "address", address)
return err return err
} }
return nil return nil
} }

@ -12,4 +12,5 @@ use (
./tools/yamlfmt ./tools/yamlfmt
./tools/component ./tools/component
./tools/url2im ./tools/url2im
./tools/data-conversion
) )

@ -106,7 +106,7 @@ func (o *ThirdApi) ObjectRedirect(c *gin.Context) {
c.Redirect(http.StatusFound, resp.Url) c.Redirect(http.StatusFound, resp.Url)
} }
// #################### logs #################### // #################### logs ####################.
func (o *ThirdApi) UploadLogs(c *gin.Context) { func (o *ThirdApi) UploadLogs(c *gin.Context) {
a2r.Call(third.ThirdClient.UploadLogs, o.Client, c) a2r.Call(third.ThirdClient.UploadLogs, o.Client, c)
} }

@ -120,6 +120,7 @@ func (d *GWebSocket) SetReadLimit(limit int64) {
func (d *GWebSocket) SetPongHandler(handler PingPongHandler) { func (d *GWebSocket) SetPongHandler(handler PingPongHandler) {
d.conn.SetPongHandler(handler) d.conn.SetPongHandler(handler)
} }
func (d *GWebSocket) SetPingHandler(handler PingPongHandler) { func (d *GWebSocket) SetPingHandler(handler PingPongHandler) {
d.conn.SetPingHandler(handler) d.conn.SetPingHandler(handler)
} }

@ -69,7 +69,6 @@ func (t *thirdServer) UploadLogs(ctx context.Context, req *third.UploadLogsReq)
} }
func (t *thirdServer) DeleteLogs(ctx context.Context, req *third.DeleteLogsReq) (*third.DeleteLogsResp, error) { func (t *thirdServer) DeleteLogs(ctx context.Context, req *third.DeleteLogsReq) (*third.DeleteLogsResp, error) {
if err := authverify.CheckAdmin(ctx); err != nil { if err := authverify.CheckAdmin(ctx); err != nil {
return nil, err return nil, err
} }

@ -414,7 +414,8 @@ func (c *ConversationRedisCache) GetUserAllHasReadSeqs(
} }
func (c *ConversationRedisCache) DelUserAllHasReadSeqs(ownerUserID string, func (c *ConversationRedisCache) DelUserAllHasReadSeqs(ownerUserID string,
conversationIDs ...string) ConversationCache { conversationIDs ...string,
) ConversationCache {
cache := c.NewCache() cache := c.NewCache()
for _, conversationID := range conversationIDs { for _, conversationID := range conversationIDs {
cache.AddKeys(c.getConversationHasReadSeqKey(ownerUserID, conversationID)) cache.AddKeys(c.getConversationHasReadSeqKey(ownerUserID, conversationID))

@ -28,7 +28,7 @@ import (
type ThirdDatabase interface { type ThirdDatabase interface {
FcmUpdateToken(ctx context.Context, account string, platformID int, fcmToken string, expireTime int64) error FcmUpdateToken(ctx context.Context, account string, platformID int, fcmToken string, expireTime int64) error
SetAppBadge(ctx context.Context, userID string, value int) error SetAppBadge(ctx context.Context, userID string, value int) error
//about log for debug // about log for debug
UploadLogs(ctx context.Context, logs []*relation.Log) error UploadLogs(ctx context.Context, logs []*relation.Log) error
DeleteLogs(ctx context.Context, logID []string, userID string) error DeleteLogs(ctx context.Context, logID []string, userID string) error
SearchLogs(ctx context.Context, keyword string, start time.Time, end time.Time, pageNumber int32, showNumber int32) (uint32, []*relation.Log, error) SearchLogs(ctx context.Context, keyword string, start time.Time, end time.Time, pageNumber int32, showNumber int32) (uint32, []*relation.Log, error)
@ -60,7 +60,6 @@ func (t *thirdDatabase) GetLogs(ctx context.Context, LogIDs []string, userID str
// SearchLogs implements ThirdDatabase. // SearchLogs implements ThirdDatabase.
func (t *thirdDatabase) SearchLogs(ctx context.Context, keyword string, start time.Time, end time.Time, pageNumber int32, showNumber int32) (uint32, []*relation.Log, error) { func (t *thirdDatabase) SearchLogs(ctx context.Context, keyword string, start time.Time, end time.Time, pageNumber int32, showNumber int32) (uint32, []*relation.Log, error) {
return t.logdb.Search(ctx, keyword, start, end, pageNumber, showNumber) return t.logdb.Search(ctx, keyword, start, end, pageNumber, showNumber)
} }
// UploadLogs implements ThirdDatabase. // UploadLogs implements ThirdDatabase.

@ -41,6 +41,7 @@ func (l *LogGorm) Get(ctx context.Context, logIDs []string, userID string) ([]*r
} }
return logs, errs.Wrap(l.db.WithContext(ctx).Where("log_id in ? and user_id=?", logIDs, userID).Find(&logs).Error) return logs, errs.Wrap(l.db.WithContext(ctx).Where("log_id in ? and user_id=?", logIDs, userID).Find(&logs).Error)
} }
func NewLogGorm(db *gorm.DB) relationtb.LogInterface { func NewLogGorm(db *gorm.DB) relationtb.LogInterface {
db.AutoMigrate(&relationtb.Log{}) db.AutoMigrate(&relationtb.Log{})
return &LogGorm{db: db} return &LogGorm{db: db}

@ -18,11 +18,11 @@ set -o errexit
set +o nounset set +o nounset
set -o pipefail set -o pipefail
ulimit -n 200000
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P) OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh [[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
openim::util::set_max_fd 200000
SERVER_NAME="openim-msggateway" SERVER_NAME="openim-msggateway"
function openim::msggateway::start() function openim::msggateway::start()

@ -18,11 +18,11 @@ set -o errexit
set +o nounset set +o nounset
set -o pipefail set -o pipefail
ulimit -n 200000
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P) OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh [[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
openim::util::set_max_fd 200000
SERVER_NAME="openim-msgtransfer" SERVER_NAME="openim-msgtransfer"
function openim::msgtransfer::start() function openim::msgtransfer::start()

@ -1250,6 +1250,38 @@ function openim::util::gencpu() {
echo $cpu_count echo $cpu_count
} }
function openim::util::set_max_fd() {
local desired_fd=$1
local max_fd_limit
# Check if we're not on cygwin or darwin.
if [ "$(uname -s | tr '[:upper:]' '[:lower:]')" != "cygwin" ] && [ "$(uname -s | tr '[:upper:]' '[:lower:]')" != "darwin" ]; then
# Try to get the hard limit.
max_fd_limit=$(ulimit -H -n)
if [ $? -eq 0 ]; then
# If desired_fd is 'maximum' or 'max', set it to the hard limit.
if [ "$desired_fd" = "maximum" ] || [ "$desired_fd" = "max" ]; then
desired_fd="$max_fd_limit"
fi
# Check if desired_fd is less than or equal to max_fd_limit.
if [ "$desired_fd" -le "$max_fd_limit" ]; then
ulimit -n "$desired_fd"
if [ $? -ne 0 ]; then
echo "Warning: Could not set maximum file descriptor limit to $desired_fd"
fi
else
echo "Warning: Desired file descriptor limit ($desired_fd) is greater than the hard limit ($max_fd_limit)"
fi
else
echo "Warning: Could not query the maximum file descriptor hard limit."
fi
else
echo "Warning: Not attempting to modify file descriptor limit on Cygwin or Darwin."
fi
}
function openim::util::gen_os_arch() { function openim::util::gen_os_arch() {
# Get the current operating system and architecture # Get the current operating system and architecture
OS=$(uname -s | tr '[:upper:]' '[:lower:]') OS=$(uname -s | tr '[:upper:]' '[:lower:]')

@ -46,7 +46,7 @@ import (
) )
const ( const (
// defaultCfgPath is the default path of the configuration file // defaultCfgPath is the default path of the configuration file.
defaultCfgPath = "../../../../../config/config.yaml" defaultCfgPath = "../../../../../config/config.yaml"
minioHealthCheckDuration = 1 minioHealthCheckDuration = 1
maxRetry = 100 maxRetry = 100
@ -66,6 +66,7 @@ func initCfg() error {
if err != nil { if err != nil {
return err return err
} }
return yaml.Unmarshal(data, &config.Config) return yaml.Unmarshal(data, &config.Config)
} }
@ -79,6 +80,7 @@ func main() {
if err := initCfg(); err != nil { if err := initCfg(); err != nil {
fmt.Printf("Read config failed: %v\n", err) fmt.Printf("Read config failed: %v\n", err)
return return
} }
@ -111,6 +113,7 @@ func main() {
if allSuccess { if allSuccess {
successPrint("All components started successfully!") successPrint("All components started successfully!")
return return
} }
} }
@ -126,9 +129,11 @@ func exactIP(urll string) string {
if strings.HasSuffix(host, ":") { if strings.HasSuffix(host, ":") {
host = host[0 : len(host)-1] host = host[0 : len(host)-1]
} }
return host return host
} }
func checkMysql() error { func checkMysql() error {
var sqlDB *sql.DB var sqlDB *sql.DB
defer func() { defer func() {
@ -148,6 +153,7 @@ func checkMysql() error {
return errs.Wrap(err) return errs.Wrap(err)
} }
} }
return nil return nil
} }
@ -177,6 +183,7 @@ func checkMongo() error {
return errs.Wrap(err) return errs.Wrap(err)
} }
} }
return nil return nil
} }
@ -209,6 +216,7 @@ func checkMinio() error {
return ErrConfig.Wrap("apiURL or Minio SignEndpoint endpoint contain 127.0.0.1") return ErrConfig.Wrap("apiURL or Minio SignEndpoint endpoint contain 127.0.0.1")
} }
} }
return nil return nil
} }
@ -236,6 +244,7 @@ func checkRedis() error {
if err != nil { if err != nil {
return errs.Wrap(err) return errs.Wrap(err)
} }
return nil return nil
} }
@ -260,6 +269,7 @@ func checkZookeeper() error {
return errs.Wrap(err) return errs.Wrap(err)
} }
} }
return nil return nil
} }
@ -295,6 +305,7 @@ func checkKafka() error {
return ErrComponentStart.Wrap(fmt.Sprintf("kafka doesn't contain topic:%v", config.Config.Kafka.LatestMsgToRedis.Topic)) return ErrComponentStart.Wrap(fmt.Sprintf("kafka doesn't contain topic:%v", config.Config.Kafka.LatestMsgToRedis.Topic))
} }
} }
return nil return nil
} }

@ -0,0 +1,32 @@
package conversion
import (
"fmt"
"gorm.io/gorm"
"gorm.io/gorm/schema"
)
func FindAndInsert[V2 any, V3 schema.Tabler](v2db *gorm.DB, v3db *gorm.DB, fn func(V2) V3) (string, error) {
var t V3
name := t.TableName()
if err := v3db.AutoMigrate(&t); err != nil {
return name, fmt.Errorf("auto migrate v3 %s failed %w", name, err)
}
const size = 100
for i := 0; ; i++ {
var v2s []V2
if err := v2db.Offset(i * size).Limit(size).Find(&v2s).Error; err != nil {
return name, fmt.Errorf("find v2 %s failed %w", name, err)
}
if len(v2s) == 0 {
return name, nil
}
v3s := make([]V3, 0, len(v2s))
for _, v := range v2s {
v3s = append(v3s, fn(v))
}
if err := v3db.Create(&v3s).Error; err != nil {
return name, fmt.Errorf("insert v3 %s failed %w", name, err)
}
}
}

@ -0,0 +1,140 @@
package conversion
import (
v2 "github.com/openimsdk/open-im-server/v3/tools/data-conversion/chat/v2"
"github.com/openimsdk/open-im-server/v3/tools/data-conversion/chat/v3/admin"
"github.com/openimsdk/open-im-server/v3/tools/data-conversion/chat/v3/chat"
)
// ########## chat ##########
func Account(v v2.Account) chat.Account {
return chat.Account{
UserID: v.UserID,
Password: v.Password,
CreateTime: v.CreateTime,
ChangeTime: v.ChangeTime,
OperatorUserID: v.OperatorUserID,
}
}
func Attribute(v v2.Attribute) chat.Attribute {
return chat.Attribute{
UserID: v.UserID,
Account: v.Account,
PhoneNumber: v.PhoneNumber,
AreaCode: v.AreaCode,
Email: v.Email,
Nickname: v.Nickname,
FaceURL: v.FaceURL,
Gender: v.Gender,
CreateTime: v.CreateTime,
ChangeTime: v.ChangeTime,
BirthTime: v.BirthTime,
Level: v.Level,
AllowVibration: v.AllowVibration,
AllowBeep: v.AllowBeep,
AllowAddFriend: v.AllowAddFriend,
GlobalRecvMsgOpt: 0,
}
}
func Register(v v2.Register) chat.Register {
return chat.Register{
UserID: v.UserID,
DeviceID: v.DeviceID,
IP: v.IP,
Platform: v.Platform,
AccountType: v.AccountType,
Mode: v.Mode,
CreateTime: v.CreateTime,
}
}
func UserLoginRecord(v v2.UserLoginRecord) chat.UserLoginRecord {
return chat.UserLoginRecord{
UserID: v.UserID,
LoginTime: v.LoginTime,
IP: v.IP,
DeviceID: v.DeviceID,
Platform: v.Platform,
}
}
// ########## admin ##########
func Admin(v v2.Admin) admin.Admin {
return admin.Admin{
Account: v.Account,
Password: v.Password,
FaceURL: v.FaceURL,
Nickname: v.Nickname,
UserID: v.UserID,
Level: v.Level,
CreateTime: v.CreateTime,
}
}
func Applet(v v2.Applet) admin.Applet {
return admin.Applet{
ID: v.ID,
Name: v.Name,
AppID: v.AppID,
Icon: v.Icon,
URL: v.URL,
MD5: v.MD5,
Size: v.Size,
Version: v.Version,
Priority: v.Priority,
Status: v.Status,
CreateTime: v.CreateTime,
}
}
func ForbiddenAccount(v v2.ForbiddenAccount) admin.ForbiddenAccount {
return admin.ForbiddenAccount{
UserID: v.UserID,
Reason: v.Reason,
OperatorUserID: v.OperatorUserID,
CreateTime: v.CreateTime,
}
}
func InvitationRegister(v v2.InvitationRegister) admin.InvitationRegister {
return admin.InvitationRegister{
InvitationCode: v.InvitationCode,
UsedByUserID: v.UsedByUserID,
CreateTime: v.CreateTime,
}
}
func IPForbidden(v v2.IPForbidden) admin.IPForbidden {
return admin.IPForbidden{
IP: v.IP,
LimitRegister: v.LimitRegister > 0,
LimitLogin: v.LimitLogin > 0,
CreateTime: v.CreateTime,
}
}
func LimitUserLoginIP(v v2.LimitUserLoginIP) admin.LimitUserLoginIP {
return admin.LimitUserLoginIP{
UserID: v.UserID,
IP: v.IP,
CreateTime: v.CreateTime,
}
}
func RegisterAddFriend(v v2.RegisterAddFriend) admin.RegisterAddFriend {
return admin.RegisterAddFriend{
UserID: v.UserID,
CreateTime: v.CreateTime,
}
}
func RegisterAddGroup(v v2.RegisterAddGroup) admin.RegisterAddGroup {
return admin.RegisterAddGroup{
GroupID: v.GroupID,
CreateTime: v.CreateTime,
}
}

@ -0,0 +1,67 @@
package main
import (
"fmt"
"github.com/openimsdk/open-im-server/v3/tools/data-conversion/chat/conversion"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"log"
)
func main() {
var (
usernameV2 = "root"
passwordV2 = "openIM123"
addrV2 = "127.0.0.1:13306"
databaseV2 = "admin_chat"
)
var (
usernameV3 = "root"
passwordV3 = "openIM123"
addrV3 = "127.0.0.1:13306"
databaseV3 = "openim_enterprise"
)
dsnV2 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", usernameV2, passwordV2, addrV2, databaseV2)
dsnV3 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", usernameV3, passwordV3, addrV3, databaseV3)
dbV2, err := gorm.Open(mysql.Open(dsnV2), &gorm.Config{})
if err != nil {
log.Println("open v2 db failed", err)
return
}
dbV3, err := gorm.Open(mysql.Open(dsnV3), &gorm.Config{})
if err != nil {
log.Println("open v3 db failed", err)
return
}
var fns []func() (string, error)
Append := func(fn func() (string, error)) {
fns = append(fns, fn)
}
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.Account) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.Attribute) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.Register) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.UserLoginRecord) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.Admin) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.Applet) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.ForbiddenAccount) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.InvitationRegister) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.IPForbidden) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.LimitUserLoginIP) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.RegisterAddFriend) })
Append(func() (string, error) { return conversion.FindAndInsert(dbV2, dbV3, conversion.RegisterAddGroup) })
for i := range fns {
name, err := fns[i]()
if err == nil {
log.Printf("[%d/%d] %s success\n", i+1, len(fns), name)
} else {
log.Printf("[%d/%d] %s failed %s\n", i+1, len(fns), name, err)
return
}
}
}

@ -0,0 +1,63 @@
package v2
import (
"time"
)
// AppVersion pc端版本管理
type AppVersion struct {
Version string `gorm:"column:version;size:64" json:"version"`
Type int `gorm:"column:type;primary_key" json:"type"`
UpdateTime int `gorm:"column:update_time" json:"update_time"`
ForceUpdate bool `gorm:"column:force_update" json:"force_update"`
FileName string `gorm:"column:file_name" json:"file_name"`
YamlName string `gorm:"column:yaml_name" json:"yaml_name"`
UpdateLog string `gorm:"column:update_log" json:"update_log"`
}
// Admin 后台管理员
type Admin struct {
Account string `gorm:"column:account;primary_key;type:char(64)" json:"account"`
Password string `gorm:"column:Password;type:char(64)" json:"password"`
FaceURL string `gorm:"column:FaceURL;type:char(64)" json:"faceURL"`
Nickname string `gorm:"column:Nickname;type:char(64)" json:"nickname"`
UserID string `gorm:"column:UserID;type:char(64)" json:"userID"` //openIM userID
Level int32 `gorm:"column:level;default:1" json:"level"`
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
}
// RegisterAddFriend 注册时默认好友
type RegisterAddFriend struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"`
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
}
// RegisterAddGroup 注册时默认群组
type RegisterAddGroup struct {
GroupID string `gorm:"column:group_id;primary_key;type:char(64)" json:"userID"`
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
}
// ClientInitConfig 系统相关配置项
type ClientInitConfig struct {
DiscoverPageURL string `gorm:"column:discover_page_url;size:128" json:"discoverPageURL"`
OrdinaryUserAddFriend int32 `gorm:"column:ordinary_user_add_friend; default:1" json:"ordinaryUserAddFriend"`
BossUserID string `gorm:"column:boss_user_id;type:char(64)" json:"bossUserID"`
AdminURL string `gorm:"column:admin_url;type:char(128)" json:"adminURL"`
AllowSendMsgNotFriend int32 `gorm:"column:allow_send_msg_not_friend;default:1" json:"allowSendMsgNotFriend"`
NeedInvitationCodeRegister int32 `gorm:"column:need_invitation_code_register;default:0" json:"needInvitationCodeRegister"`
}
type Applet struct {
ID string `gorm:"column:id;primary_key;size:64"`
Name string `gorm:"column:name;uniqueIndex;size:64"`
AppID string `gorm:"column:app_id;uniqueIndex;size:255"`
Icon string `gorm:"column:icon;size:255"`
URL string `gorm:"column:url;size:255"`
MD5 string `gorm:"column:md5;size:255"`
Size int64 `gorm:"column:size"`
Version string `gorm:"column:version;size:64"`
Priority uint32 `gorm:"column:priority;size:64"`
Status uint8 `gorm:"column:status"`
CreateTime time.Time `gorm:"column:create_time;autoCreateTime;size:64"`
}

@ -0,0 +1,95 @@
package v2
import (
"time"
)
// Register 注册信息表
type Register struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"`
DeviceID string `gorm:"column:device_id;type:varchar(255)" json:"deviceID"`
IP string `gorm:"column:ip;type:varchar(32)" json:"ip"`
Platform string `gorm:"column:platform;type:varchar(32)" json:"platform"`
AccountType string `gorm:"column:account_type;type:varchar(32)" json:"accountType"` //email phone account
Mode string `gorm:"column:mode;type:varchar(32)"` //user admin
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
}
// Account 账号密码表
type Account struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"`
Password string `gorm:"column:password;type:varchar(255)" json:"password"`
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
ChangeTime time.Time `gorm:"column:change_time" json:"changeTime"`
OperatorUserID string `gorm:"column:operator_user_id;type:varchar(64)" json:"operatorUserID"`
}
// Attribute 用户属性表
type Attribute struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"`
Account string `gorm:"column:account;type:char(64)" json:"account"`
PhoneNumber string `gorm:"column:phone_number;type:varchar(32)" json:"phoneNumber"`
AreaCode string `gorm:"column:area_code;type:varchar(8)" json:"areaCode"`
Email string `gorm:"column:email;type:varchar(64)" json:"email"`
Nickname string `gorm:"column:nickname;type:varchar(64)" json:"nickname"`
FaceURL string `gorm:"column:face_url;type:varchar(255)" json:"faceURL"`
Gender int32 `gorm:"column:gender" json:"gender"`
Birth uint32 `gorm:"column:birth" json:"birth"`
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
ChangeTime time.Time `gorm:"column:change_time" json:"changeTime"`
BirthTime time.Time `gorm:"column:birth_time" json:"birthTime"`
Level int32 `gorm:"column:level;default:1" json:"level"`
AllowVibration int32 `gorm:"column:allow_vibration;default:1" json:"allowVibration"`
AllowBeep int32 `gorm:"column:allow_beep;default:1" json:"allowBeep"`
AllowAddFriend int32 `gorm:"column:allow_add_friend;default:1" json:"allowAddFriend"`
}
// 封号表
type ForbiddenAccount struct {
UserID string `gorm:"column:user_id;index:userID;primary_key;type:char(64)" json:"userID"`
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
Reason string `gorm:"column:reason;type:varchar(255)" json:"reason"`
OperatorUserID string `gorm:"column:operator_user_id;type:varchar(255)" json:"operatorUserID"`
}
// 用户登录信息表
type UserLoginRecord struct {
UserID string `gorm:"column:user_id;size:64" json:"userID"`
LoginTime time.Time `gorm:"column:login_time" json:"loginTime"`
IP string `gorm:"column:ip;type:varchar(32)" json:"ip"`
DeviceID string `gorm:"column:device_id;type:varchar(255)" json:"deviceID"`
Platform string `gorm:"column:platform;type:varchar(32)" json:"platform"`
}
// 禁止ip登录 注册
type IPForbidden struct {
IP string `gorm:"column:ip;primary_key;type:char(32)" json:"ip"`
LimitRegister int32 `gorm:"column:limit_register" json:"limitRegister"`
LimitLogin int32 `gorm:"column:limit_login" json:"limitLogin"`
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
}
// 限制userID只能在某些ip登录
type LimitUserLoginIP struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"`
IP string `gorm:"column:ip;primary_key;type:char(32)" json:"ip"`
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
}
// 邀请码被注册使用
type InvitationRegister struct {
InvitationCode string `gorm:"column:invitation_code;primary_key;type:char(32)" json:"invitationCode"`
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
UsedByUserID string `gorm:"column:user_id;index:userID;type:char(64)" json:"usedByUserID"`
}
type SignalRecord struct {
FileName string `gorm:"column:file_name;primary_key;type:char(128)" json:"fileName"`
MediaType string `gorm:"column:media_type;type:char(64);index:media_type_index" json:"mediaType"`
RoomType string `gorm:"column:room_type;type:char(20)" json:"roomType"`
SenderID string `gorm:"column:sender_id;type:char(64);index:sender_id_index" json:"senderID"`
RecvID string `gorm:"column:recv_id;type:char(64);index:recv_id_index" json:"recvID"`
GroupID string `gorm:"column:group_id;type:char(64)" json:"groupID"`
DownloadURL string `gorm:"column:download_url;type:text" json:"downloadURL"`
CreateTime time.Time `gorm:"create_time;index:create_time_index" json:"createTime"`
}

@ -0,0 +1,34 @@
// Copyright © 2023 OpenIM open source community. 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 admin
import (
"time"
)
// Admin 后台管理员.
type Admin struct {
Account string `gorm:"column:account;primary_key;type:varchar(64)"`
Password string `gorm:"column:password;type:varchar(64)"`
FaceURL string `gorm:"column:face_url;type:varchar(255)"`
Nickname string `gorm:"column:nickname;type:varchar(64)"`
UserID string `gorm:"column:user_id;type:varchar(64)"` // openIM userID
Level int32 `gorm:"column:level;default:1" `
CreateTime time.Time `gorm:"column:create_time"`
}
func (Admin) TableName() string {
return "admins"
}

@ -0,0 +1,37 @@
// Copyright © 2023 OpenIM open source community. 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 admin
import (
"time"
)
type Applet struct {
ID string `gorm:"column:id;primary_key;size:64"`
Name string `gorm:"column:name;size:64"`
AppID string `gorm:"column:app_id;uniqueIndex;size:255"`
Icon string `gorm:"column:icon;size:255"`
URL string `gorm:"column:url;size:255"`
MD5 string `gorm:"column:md5;size:255"`
Size int64 `gorm:"column:size"`
Version string `gorm:"column:version;size:64"`
Priority uint32 `gorm:"column:priority;size:64"`
Status uint8 `gorm:"column:status"`
CreateTime time.Time `gorm:"column:create_time;autoCreateTime;size:64"`
}
func (Applet) TableName() string {
return "applets"
}

@ -0,0 +1,25 @@
// Copyright © 2023 OpenIM open source community. 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 admin
// ClientConfig 客户端相关配置项.
type ClientConfig struct {
Key string `gorm:"column:key;primary_key;type:varchar(255)"`
Value string `gorm:"column:value;not null;type:text"`
}
func (ClientConfig) TableName() string {
return "client_config"
}

@ -0,0 +1,31 @@
// Copyright © 2023 OpenIM open source community. 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 admin
import (
"time"
)
// ForbiddenAccount 封号表.
type ForbiddenAccount struct {
UserID string `gorm:"column:user_id;index:userID;primary_key;type:char(64)"`
Reason string `gorm:"column:reason;type:varchar(255)" `
OperatorUserID string `gorm:"column:operator_user_id;type:varchar(255)"`
CreateTime time.Time `gorm:"column:create_time" `
}
func (ForbiddenAccount) TableName() string {
return "forbidden_accounts"
}

@ -0,0 +1,30 @@
// Copyright © 2023 OpenIM open source community. 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 admin
import (
"time"
)
// 邀请码被注册使用.
type InvitationRegister struct {
InvitationCode string `gorm:"column:invitation_code;primary_key;type:char(32)"`
UsedByUserID string `gorm:"column:user_id;index:userID;type:char(64)"`
CreateTime time.Time `gorm:"column:create_time"`
}
func (InvitationRegister) TableName() string {
return "invitation_registers"
}

@ -0,0 +1,31 @@
// Copyright © 2023 OpenIM open source community. 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 admin
import (
"time"
)
// 禁止ip登录 注册.
type IPForbidden struct {
IP string `gorm:"column:ip;primary_key;type:char(32)"`
LimitRegister bool `gorm:"column:limit_register"`
LimitLogin bool `gorm:"column:limit_login"`
CreateTime time.Time `gorm:"column:create_time"`
}
func (IPForbidden) TableName() string {
return "ip_forbiddens"
}

@ -0,0 +1,30 @@
// Copyright © 2023 OpenIM open source community. 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 admin
import (
"time"
)
// 限制userID只能在某些ip登录.
type LimitUserLoginIP struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
IP string `gorm:"column:ip;primary_key;type:char(32)"`
CreateTime time.Time `gorm:"column:create_time" `
}
func (LimitUserLoginIP) TableName() string {
return "limit_user_login_ips"
}

@ -0,0 +1,29 @@
// Copyright © 2023 OpenIM open source community. 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 admin
import (
"time"
)
// RegisterAddFriend 注册时默认好友.
type RegisterAddFriend struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
CreateTime time.Time `gorm:"column:create_time"`
}
func (RegisterAddFriend) TableName() string {
return "register_add_friends"
}

@ -0,0 +1,29 @@
// Copyright © 2023 OpenIM open source community. 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 admin
import (
"time"
)
// RegisterAddGroup 注册时默认群组.
type RegisterAddGroup struct {
GroupID string `gorm:"column:group_id;primary_key;type:char(64)"`
CreateTime time.Time `gorm:"column:create_time"`
}
func (RegisterAddGroup) TableName() string {
return "register_add_groups"
}

@ -0,0 +1,32 @@
// Copyright © 2023 OpenIM open source community. 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 chat
import (
"time"
)
// Account 账号密码表.
type Account struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
Password string `gorm:"column:password;type:varchar(32)"`
CreateTime time.Time `gorm:"column:create_time;autoCreateTime"`
ChangeTime time.Time `gorm:"column:change_time;autoUpdateTime"`
OperatorUserID string `gorm:"column:operator_user_id;type:varchar(64)"`
}
func (Account) TableName() string {
return "accounts"
}

@ -0,0 +1,43 @@
// Copyright © 2023 OpenIM open source community. 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 chat
import (
"time"
)
// Attribute 用户属性表.
type Attribute struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
Account string `gorm:"column:account;type:char(64)"`
PhoneNumber string `gorm:"column:phone_number;type:varchar(32)"`
AreaCode string `gorm:"column:area_code;type:varchar(8)"`
Email string `gorm:"column:email;type:varchar(64)" `
Nickname string `gorm:"column:nickname;type:varchar(64)" `
FaceURL string `gorm:"column:face_url;type:varchar(255)" `
Gender int32 `gorm:"column:gender"`
CreateTime time.Time `gorm:"column:create_time"`
ChangeTime time.Time `gorm:"column:change_time"`
BirthTime time.Time `gorm:"column:birth_time"`
Level int32 `gorm:"column:level;default:1"`
AllowVibration int32 `gorm:"column:allow_vibration;default:1"`
AllowBeep int32 `gorm:"column:allow_beep;default:1"`
AllowAddFriend int32 `gorm:"column:allow_add_friend;default:1"`
GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt;default:0"`
}
func (Attribute) TableName() string {
return "attributes"
}

@ -0,0 +1,34 @@
// Copyright © 2023 OpenIM open source community. 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 chat
import (
"time"
)
// Register 注册信息表.
type Register struct {
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
DeviceID string `gorm:"column:device_id;type:varchar(255)"`
IP string `gorm:"column:ip;type:varchar(64)"`
Platform string `gorm:"column:platform;type:varchar(32)"`
AccountType string `gorm:"column:account_type;type:varchar(32)"` // email phone account
Mode string `gorm:"column:mode;type:varchar(32)"` // user admin
CreateTime time.Time `gorm:"column:create_time"`
}
func (Register) TableName() string {
return "registers"
}

@ -0,0 +1,32 @@
// Copyright © 2023 OpenIM open source community. 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 chat
import (
"time"
)
// 用户登录信息表.
type UserLoginRecord struct {
UserID string `gorm:"column:user_id;size:64"`
LoginTime time.Time `gorm:"column:login_time"`
IP string `gorm:"column:ip;type:varchar(32)"`
DeviceID string `gorm:"column:device_id;type:varchar(255)"`
Platform string `gorm:"column:platform;type:varchar(32)"`
}
func (UserLoginRecord) TableName() string {
return "user_login_records"
}

@ -0,0 +1,52 @@
module github.com/openimsdk/open-im-server/v3/tools/data-conversion
go 1.18
require (
github.com/IBM/sarama v1.41.2
github.com/OpenIMSDK/tools v0.0.14
github.com/openimsdk/open-im-server/v3 v3.3.2
gorm.io/driver/mysql v1.5.1
gorm.io/gorm v1.25.4
)
require (
github.com/OpenIMSDK/protocol v0.0.23 // indirect
github.com/bwmarrin/snowflake v0.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eapache/go-resiliency v1.4.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect
github.com/lestrrat-go/strftime v1.0.6 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/image v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect
google.golang.org/grpc v1.57.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)

@ -0,0 +1,156 @@
github.com/IBM/sarama v1.41.2 h1:ZDBZfGPHAD4uuAtSv4U22fRZBgst0eEwGFzLj0fb85c=
github.com/IBM/sarama v1.41.2/go.mod h1:xdpu7sd6OE1uxNdjYTSKUfY8FaKkJES9/+EyjSgiGQk=
github.com/OpenIMSDK/protocol v0.0.23 h1:L545aRQez6Ro+AaJB1Z6Mz7ojnDtp41WqASxYveCkcE=
github.com/OpenIMSDK/protocol v0.0.23/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y=
github.com/OpenIMSDK/tools v0.0.14 h1:WLof/+WxyPyRST+QkoTKubYCiV73uCLiL8pgnpH/yKQ=
github.com/OpenIMSDK/tools v0.0.14/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0=
github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho=
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws=
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0=
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8=
github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo=
github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM=
github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg=
github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo=
github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o=
github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg=
github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8=
github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs=
github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY=
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=
github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8=
github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is=
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible h1:Y6sqxHMyB1D2YSzWkLibYKgg+SwmyFU9dF2hn6MdTj4=
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible/go.mod h1:ZQnN8lSECaebrkQytbHj4xNgtg8CR7RYXnPok8e0EHA=
github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ=
github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/openimsdk/open-im-server/v3 v3.3.2 h1:uK6glaidrnWlYXFSwzOEq7fXS6jT1OyesUJENZJeptI=
github.com/openimsdk/open-im-server/v3 v3.3.2/go.mod h1:rqKiCkjav5P7tQmyqaixnMJcayWlM4XtXmwG+cZNw78=
github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ=
github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ=
golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 h1:wukfNtZmZUurLN/atp2hiIeTKn7QJWIQdHzqmsOnAOk=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw=
google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw=
gorm.io/driver/mysql v1.5.1/go.mod h1:Jo3Xu7mMhCyj8dlrb3WoCaRd1FhsVh+yMXb1jUInf5o=
gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gorm.io/gorm v1.25.4 h1:iyNd8fNAe8W9dvtlgeRI5zSVZPsq3OpcTu37cYcpCmw=
gorm.io/gorm v1.25.4/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
Loading…
Cancel
Save