2023-07-19 08:25:41 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
type DBInfo struct {
|
2023-07-21 10:28:45 +00:00
|
|
|
From string `json:"from"`
|
2023-07-19 08:25:41 +00:00
|
|
|
Address string `json:"address"`
|
|
|
|
Port uint `json:"port"`
|
2023-07-20 09:51:57 +00:00
|
|
|
Username string `json:"userName"`
|
2023-07-19 08:25:41 +00:00
|
|
|
Password string `json:"password"`
|
|
|
|
|
|
|
|
Timeout uint `json:"timeout"` // second
|
|
|
|
}
|
|
|
|
|
|
|
|
type CreateInfo struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Format string `json:"format"`
|
|
|
|
Version string `json:"version"`
|
2023-07-20 09:51:57 +00:00
|
|
|
Username string `json:"userName"`
|
2023-07-19 08:25:41 +00:00
|
|
|
Password string `json:"password"`
|
|
|
|
Permission string `json:"permission"`
|
|
|
|
|
|
|
|
Timeout uint `json:"timeout"` // second
|
|
|
|
}
|
|
|
|
|
|
|
|
type DeleteInfo struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Version string `json:"version"`
|
2023-07-20 09:51:57 +00:00
|
|
|
Username string `json:"userName"`
|
2023-07-19 08:25:41 +00:00
|
|
|
Permission string `json:"permission"`
|
|
|
|
|
|
|
|
ForceDelete bool `json:"forceDelete"`
|
|
|
|
Timeout uint `json:"timeout"` // second
|
|
|
|
}
|
|
|
|
|
|
|
|
type PasswordChangeInfo struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Version string `json:"version"`
|
2023-07-20 09:51:57 +00:00
|
|
|
Username string `json:"userName"`
|
2023-07-19 08:25:41 +00:00
|
|
|
Password string `json:"password"`
|
|
|
|
Permission string `json:"permission"`
|
|
|
|
|
|
|
|
Timeout uint `json:"timeout"` // second
|
|
|
|
}
|
|
|
|
|
|
|
|
type AccessChangeInfo struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Version string `json:"version"`
|
2023-07-20 09:51:57 +00:00
|
|
|
Username string `json:"userName"`
|
2023-07-21 10:28:45 +00:00
|
|
|
Password string `json:"password"`
|
2023-07-19 08:25:41 +00:00
|
|
|
OldPermission string `json:"oldPermission"`
|
|
|
|
Permission string `json:"permission"`
|
|
|
|
|
|
|
|
Timeout uint `json:"timeout"` // second
|
|
|
|
}
|
|
|
|
|
2023-07-25 09:08:13 +00:00
|
|
|
type BackupInfo struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Format string `json:"format"`
|
|
|
|
TargetDir string `json:"targetDir"`
|
2023-07-27 06:32:23 +00:00
|
|
|
FileName string `json:"fileName"`
|
2023-07-25 09:08:13 +00:00
|
|
|
|
|
|
|
Timeout uint `json:"timeout"` // second
|
|
|
|
}
|
|
|
|
|
|
|
|
type RecoverInfo struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Format string `json:"format"`
|
|
|
|
SourceFile string `json:"sourceFile"`
|
|
|
|
|
|
|
|
Timeout uint `json:"timeout"` // second
|
|
|
|
}
|
|
|
|
|
2023-07-27 08:07:27 +00:00
|
|
|
type SyncDBInfo struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
From string `json:"from"`
|
|
|
|
MysqlName string `json:"mysqlName"`
|
|
|
|
Format string `json:"format"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
Permission string `json:"permission"`
|
|
|
|
}
|
|
|
|
|
2023-07-19 08:25:41 +00:00
|
|
|
var formatMap = map[string]string{
|
|
|
|
"utf8": "utf8_general_ci",
|
|
|
|
"utf8mb4": "utf8mb4_general_ci",
|
|
|
|
"gbk": "gbk_chinese_ci",
|
|
|
|
"big5": "big5_chinese_ci",
|
|
|
|
}
|