mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-20 16:59:01 +08:00
feat: Integrate Comprehensive E2E Testing for GoChat (#1906)
* feat: create e2e test readme Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: fix markdown file * feat: add openim make lint * feat: add git chglog pull request * feat: add git chglog pull request * fix: fix openim api err code * fix: fix openim api err code * fix: fix openim api err code * feat: Improve CICD * feat: Combining GitHub and Google Workspace for Effective Project Management' * feat: fix openim tools error code * feat: fix openim tools error code * feat: add openim error handle * feat: add openim error handle * feat: optimize tim white prom code return err * feat: fix openim tools error code * style: format openim server code style * feat: add openim optimize commit code * feat: add openim optimize commit code * feat: add openim auto format code * feat: add openim auto format code * feat: add openim auto format code * feat: add openim auto format code * feat: add openim auto format code * feat: format openim code * feat: Some of the notes were translated * feat: Some of the notes were translated * feat: update openim server code * feat: optimize openim reset code * feat: optimize openim reset code --------- Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
@@ -28,20 +28,20 @@ import (
|
||||
|
||||
func main() {
|
||||
var (
|
||||
usernameV2 = "root" // v2版本mysql用户名
|
||||
passwordV2 = "openIM" // v2版本mysql密码
|
||||
addrV2 = "127.0.0.1:13306" // v2版本mysql地址
|
||||
databaseV2 = "admin_chat" // v2版本mysql数据库名字
|
||||
usernameV2 = "root" // Username for MySQL v2 version
|
||||
passwordV2 = "openIM" // Password for MySQL v2 version
|
||||
addrV2 = "127.0.0.1:13306" // Address for MySQL v2 version
|
||||
databaseV2 = "admin_chat" // Database name for MySQL v2 version
|
||||
)
|
||||
|
||||
var (
|
||||
usernameV3 = "root" // v3版本mysql用户名
|
||||
passwordV3 = "openIM123" // v3版本mysql密码
|
||||
addrV3 = "127.0.0.1:13306" // v3版本mysql地址
|
||||
databaseV3 = "openim_enterprise" // v3版本mysql数据库名字
|
||||
usernameV3 = "root" // Username for MySQL v3 version
|
||||
passwordV3 = "openIM123" // Password for MySQL v3 version
|
||||
addrV3 = "127.0.0.1:13306" // Address for MySQL v3 version
|
||||
databaseV3 = "openim_enterprise" // Database name for MySQL v3 version
|
||||
)
|
||||
|
||||
var concurrency = 1 // 并发数量
|
||||
var concurrency = 1 // Concurrency quantity
|
||||
|
||||
log.SetFlags(log.LstdFlags | log.Llongfile)
|
||||
dsnV2 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", usernameV2, passwordV2, addrV2, databaseV2)
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// AppVersion pc端版本管理
|
||||
// AppVersion manages PC client versions
|
||||
type AppVersion struct {
|
||||
Version string `gorm:"column:version;size:64" json:"version"`
|
||||
Type int `gorm:"column:type;primary_key" json:"type"`
|
||||
@@ -29,7 +29,7 @@ type AppVersion struct {
|
||||
UpdateLog string `gorm:"column:update_log" json:"update_log"`
|
||||
}
|
||||
|
||||
// Admin 后台管理员
|
||||
// Admin manages backend administrators
|
||||
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"`
|
||||
@@ -40,19 +40,19 @@ type Admin struct {
|
||||
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
|
||||
}
|
||||
|
||||
// RegisterAddFriend 注册时默认好友
|
||||
// RegisterAddFriend specifies default friends when registering
|
||||
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 注册时默认群组
|
||||
// RegisterAddGroup specifies default groups when registering
|
||||
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 系统相关配置项
|
||||
// ClientInitConfig contains system-related configuration items
|
||||
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"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Register 注册信息表
|
||||
// Register Registration information sheet
|
||||
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"`
|
||||
@@ -29,7 +29,7 @@ type Register struct {
|
||||
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
|
||||
}
|
||||
|
||||
// Account 账号密码表
|
||||
// Account username and password table
|
||||
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"`
|
||||
@@ -38,7 +38,7 @@ type Account struct {
|
||||
OperatorUserID string `gorm:"column:operator_user_id;type:varchar(64)" json:"operatorUserID"`
|
||||
}
|
||||
|
||||
// Attribute 用户属性表
|
||||
// Attribute user information table
|
||||
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"`
|
||||
@@ -58,7 +58,7 @@ type Attribute struct {
|
||||
AllowAddFriend int32 `gorm:"column:allow_add_friend;default:1" json:"allowAddFriend"`
|
||||
}
|
||||
|
||||
// 封号表
|
||||
// User friend relationship table
|
||||
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"`
|
||||
@@ -66,7 +66,7 @@ type ForbiddenAccount struct {
|
||||
OperatorUserID string `gorm:"column:operator_user_id;type:varchar(255)" json:"operatorUserID"`
|
||||
}
|
||||
|
||||
// 用户登录信息表
|
||||
// user login record table
|
||||
type UserLoginRecord struct {
|
||||
UserID string `gorm:"column:user_id;size:64" json:"userID"`
|
||||
LoginTime time.Time `gorm:"column:login_time" json:"loginTime"`
|
||||
@@ -75,7 +75,7 @@ type UserLoginRecord struct {
|
||||
Platform string `gorm:"column:platform;type:varchar(32)" json:"platform"`
|
||||
}
|
||||
|
||||
// 禁止ip登录 注册
|
||||
// ip login registration is prohibited
|
||||
type IPForbidden struct {
|
||||
IP string `gorm:"column:ip;primary_key;type:char(32)" json:"ip"`
|
||||
LimitRegister int32 `gorm:"column:limit_register" json:"limitRegister"`
|
||||
@@ -83,14 +83,14 @@ type IPForbidden struct {
|
||||
CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
|
||||
}
|
||||
|
||||
// 限制userID只能在某些ip登录
|
||||
// Restrict userids to certain ip addresses
|
||||
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"`
|
||||
}
|
||||
|
||||
// 邀请码被注册使用
|
||||
// The invitation code is registered for use
|
||||
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"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Admin 后台管理员.
|
||||
// Admin Background administrator.
|
||||
type Admin struct {
|
||||
Account string `gorm:"column:account;primary_key;type:varchar(64)"`
|
||||
Password string `gorm:"column:password;type:varchar(64)"`
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package admin
|
||||
|
||||
// ClientConfig 客户端相关配置项.
|
||||
// ClientConfig Client related configuration items.
|
||||
type ClientConfig struct {
|
||||
Key string `gorm:"column:key;primary_key;type:varchar(255)"`
|
||||
Value string `gorm:"column:value;not null;type:text"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// ForbiddenAccount 封号表.
|
||||
// ForbiddenAccount forbidden account.
|
||||
type ForbiddenAccount struct {
|
||||
UserID string `gorm:"column:user_id;index:userID;primary_key;type:char(64)"`
|
||||
Reason string `gorm:"column:reason;type:varchar(255)" `
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 邀请码被注册使用.
|
||||
// The invitation code is registered for use.
|
||||
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)"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 禁止ip登录 注册.
|
||||
// ip login registration is prohibited.
|
||||
type IPForbidden struct {
|
||||
IP string `gorm:"column:ip;primary_key;type:char(32)"`
|
||||
LimitRegister bool `gorm:"column:limit_register"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 限制userID只能在某些ip登录.
|
||||
// Restrict userids to certain ip addresses.
|
||||
type LimitUserLoginIP struct {
|
||||
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
|
||||
IP string `gorm:"column:ip;primary_key;type:char(32)"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// RegisterAddFriend 注册时默认好友.
|
||||
// RegisterAddFriend Indicates the default friend when registering.
|
||||
type RegisterAddFriend struct {
|
||||
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
|
||||
CreateTime time.Time `gorm:"column:create_time"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// RegisterAddGroup 注册时默认群组.
|
||||
// RegisterAddGroup Indicates the default group for registration.
|
||||
type RegisterAddGroup struct {
|
||||
GroupID string `gorm:"column:group_id;primary_key;type:char(64)"`
|
||||
CreateTime time.Time `gorm:"column:create_time"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Account 账号密码表.
|
||||
// Account Account password table.
|
||||
type Account struct {
|
||||
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
|
||||
Password string `gorm:"column:password;type:varchar(32)"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Attribute 用户属性表.
|
||||
// Attribute Indicates the user attribute table.
|
||||
type Attribute struct {
|
||||
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
|
||||
Account string `gorm:"column:account;type:char(64)"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Register 注册信息表.
|
||||
// Register Indicates the registration information.
|
||||
type Register struct {
|
||||
UserID string `gorm:"column:user_id;primary_key;type:char(64)"`
|
||||
DeviceID string `gorm:"column:device_id;type:varchar(255)"`
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 用户登录信息表.
|
||||
// User login information table.
|
||||
type UserLoginRecord struct {
|
||||
UserID string `gorm:"column:user_id;size:64"`
|
||||
LoginTime time.Time `gorm:"column:login_time"`
|
||||
|
||||
Reference in New Issue
Block a user