2022-10-20 18:45:47 +08:00
|
|
|
package dto
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
2023-07-24 14:55:26 +08:00
|
|
|
type MysqlDBSearch struct {
|
|
|
|
PageInfo
|
2023-09-16 13:16:15 +08:00
|
|
|
Info string `json:"info"`
|
|
|
|
Database string `json:"database" validate:"required"`
|
|
|
|
OrderBy string `json:"orderBy"`
|
|
|
|
Order string `json:"order"`
|
2023-07-24 14:55:26 +08:00
|
|
|
}
|
|
|
|
|
2022-10-20 18:45:47 +08:00
|
|
|
type MysqlDBInfo struct {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
Name string `json:"name"`
|
2023-07-21 18:28:45 +08:00
|
|
|
From string `json:"from"`
|
2023-09-16 13:16:15 +08:00
|
|
|
MysqlName string `json:"mysqlName"`
|
2022-10-20 18:45:47 +08:00
|
|
|
Format string `json:"format"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
Permission string `json:"permission"`
|
2022-10-27 23:09:39 +08:00
|
|
|
BackupCount int `json:"backupCount"`
|
2022-10-20 18:45:47 +08:00
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
|
2023-08-03 16:19:30 +08:00
|
|
|
type MysqlOption struct {
|
2023-09-16 13:16:15 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
From string `json:"from"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Database string `json:"database"`
|
|
|
|
Name string `json:"name"`
|
2023-08-03 16:19:30 +08:00
|
|
|
}
|
|
|
|
|
2022-10-20 18:45:47 +08:00
|
|
|
type MysqlDBCreate struct {
|
2022-10-24 18:46:19 +08:00
|
|
|
Name string `json:"name" validate:"required"`
|
2023-08-29 10:50:15 +08:00
|
|
|
From string `json:"from" validate:"required,oneof=local remote"`
|
2023-09-16 13:16:15 +08:00
|
|
|
Database string `json:"database" validate:"required"`
|
2023-01-03 18:32:02 +08:00
|
|
|
Format string `json:"format" validate:"required,oneof=utf8mb4 utf8 gbk big5"`
|
2022-10-24 18:46:19 +08:00
|
|
|
Username string `json:"username" validate:"required"`
|
|
|
|
Password string `json:"password" validate:"required"`
|
|
|
|
Permission string `json:"permission" validate:"required"`
|
|
|
|
Description string `json:"description"`
|
2022-10-20 18:45:47 +08:00
|
|
|
}
|
2022-10-21 18:50:38 +08:00
|
|
|
|
2023-12-25 17:08:09 +08:00
|
|
|
type BindUser struct {
|
|
|
|
Database string `json:"database" validate:"required"`
|
|
|
|
DB string `json:"db" validate:"required"`
|
|
|
|
Username string `json:"username" validate:"required"`
|
|
|
|
Password string `json:"password" validate:"required"`
|
|
|
|
Permission string `json:"permission" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2023-09-16 13:16:15 +08:00
|
|
|
type MysqlLoadDB struct {
|
|
|
|
From string `json:"from" validate:"required,oneof=local remote"`
|
|
|
|
Type string `json:"type" validate:"required,oneof=mysql mariadb"`
|
|
|
|
Database string `json:"database" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2023-08-29 10:50:15 +08:00
|
|
|
type MysqlDBDeleteCheck struct {
|
2023-09-16 13:16:15 +08:00
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required,oneof=mysql mariadb"`
|
|
|
|
Database string `json:"database" validate:"required"`
|
2023-08-29 10:50:15 +08:00
|
|
|
}
|
|
|
|
|
2022-12-26 14:47:08 +08:00
|
|
|
type MysqlDBDelete struct {
|
2023-09-16 13:16:15 +08:00
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required,oneof=mysql mariadb"`
|
|
|
|
Database string `json:"database" validate:"required"`
|
|
|
|
ForceDelete bool `json:"forceDelete"`
|
|
|
|
DeleteBackup bool `json:"deleteBackup"`
|
2022-12-26 14:47:08 +08:00
|
|
|
}
|
|
|
|
|
2022-10-21 18:50:38 +08:00
|
|
|
type MysqlStatus struct {
|
|
|
|
AbortedClients string `json:"Aborted_clients"`
|
|
|
|
AbortedConnects string `json:"Aborted_connects"`
|
|
|
|
BytesReceived string `json:"Bytes_received"`
|
|
|
|
BytesSent string `json:"Bytes_sent"`
|
|
|
|
ComCommit string `json:"Com_commit"`
|
|
|
|
ComRollback string `json:"Com_rollback"`
|
|
|
|
Connections string `json:"Connections"`
|
|
|
|
CreatedTmpDiskTables string `json:"Created_tmp_disk_tables"`
|
|
|
|
CreatedTmpTables string `json:"Created_tmp_tables"`
|
|
|
|
InnodbBufferPoolPagesDirty string `json:"Innodb_buffer_pool_pages_dirty"`
|
|
|
|
InnodbBufferPoolReadRequests string `json:"Innodb_buffer_pool_read_requests"`
|
|
|
|
InnodbBufferPoolReads string `json:"Innodb_buffer_pool_reads"`
|
|
|
|
KeyReadRequests string `json:"Key_read_requests"`
|
|
|
|
KeyReads string `json:"Key_reads"`
|
|
|
|
KeyWriteEequests string `json:"Key_write_requests"`
|
|
|
|
KeyWrites string `json:"Key_writes"`
|
|
|
|
MaxUsedConnections string `json:"Max_used_connections"`
|
|
|
|
OpenTables string `json:"Open_tables"`
|
|
|
|
OpenedFiles string `json:"Opened_files"`
|
|
|
|
OpenedTables string `json:"Opened_tables"`
|
|
|
|
QcacheHits string `json:"Qcache_hits"`
|
|
|
|
QcacheInserts string `json:"Qcache_inserts"`
|
|
|
|
Questions string `json:"Questions"`
|
|
|
|
SelectFullJoin string `json:"Select_full_join"`
|
|
|
|
SelectRangeCheck string `json:"Select_range_check"`
|
|
|
|
SortMergePasses string `json:"Sort_merge_passes"`
|
|
|
|
TableLocksWaited string `json:"Table_locks_waited"`
|
|
|
|
ThreadsCached string `json:"Threads_cached"`
|
|
|
|
ThreadsConnected string `json:"Threads_connected"`
|
|
|
|
ThreadsCreated string `json:"Threads_created"`
|
|
|
|
ThreadsRunning string `json:"Threads_running"`
|
|
|
|
Uptime string `json:"Uptime"`
|
|
|
|
Run string `json:"Run"`
|
|
|
|
File string `json:"File"`
|
|
|
|
Position string `json:"Position"`
|
|
|
|
}
|
|
|
|
|
2022-10-24 18:46:19 +08:00
|
|
|
type MysqlVariables struct {
|
2022-10-21 18:50:38 +08:00
|
|
|
BinlogCachSize string `json:"binlog_cache_size"`
|
|
|
|
InnodbBufferPoolSize string `json:"innodb_buffer_pool_size"`
|
|
|
|
InnodbLogBufferSize string `json:"innodb_log_buffer_size"`
|
|
|
|
JoinBufferSize string `json:"join_buffer_size"`
|
|
|
|
KeyBufferSize string `json:"key_buffer_size"`
|
|
|
|
MaxConnections string `json:"max_connections"`
|
|
|
|
MaxHeapTableSize string `json:"max_heap_table_size"`
|
|
|
|
QueryCacheSize string `json:"query_cache_size"`
|
|
|
|
QueryCache_type string `json:"query_cache_type"`
|
|
|
|
ReadBufferSize string `json:"read_buffer_size"`
|
|
|
|
ReadRndBufferSize string `json:"read_rnd_buffer_size"`
|
|
|
|
SortBufferSize string `json:"sort_buffer_size"`
|
|
|
|
TableOpenCache string `json:"table_open_cache"`
|
|
|
|
ThreadCacheSize string `json:"thread_cache_size"`
|
|
|
|
ThreadStack string `json:"thread_stack"`
|
2022-11-04 19:02:15 +08:00
|
|
|
TmpTableSize string `json:"tmp_table_size"`
|
|
|
|
|
|
|
|
SlowQueryLog string `json:"slow_query_log"`
|
|
|
|
LongQueryTime string `json:"long_query_time"`
|
2022-10-21 18:50:38 +08:00
|
|
|
}
|
2022-10-24 18:46:19 +08:00
|
|
|
|
2022-10-25 11:41:19 +08:00
|
|
|
type MysqlVariablesUpdate struct {
|
2023-09-16 13:16:15 +08:00
|
|
|
Type string `json:"type" validate:"required,oneof=mysql mariadb"`
|
|
|
|
Database string `json:"database" validate:"required"`
|
|
|
|
Variables []MysqlVariablesUpdateHelper `json:"variables"`
|
2023-08-29 10:50:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type MysqlVariablesUpdateHelper struct {
|
2022-12-20 15:23:48 +08:00
|
|
|
Param string `json:"param"`
|
|
|
|
Value interface{} `json:"value"`
|
2022-10-25 11:41:19 +08:00
|
|
|
}
|
2022-11-02 18:30:22 +08:00
|
|
|
type MysqlConfUpdateByFile struct {
|
2023-09-16 13:16:15 +08:00
|
|
|
Type string `json:"type" validate:"required,oneof=mysql mariadb"`
|
|
|
|
Database string `json:"database" validate:"required"`
|
|
|
|
File string `json:"file"`
|
2022-11-02 18:30:22 +08:00
|
|
|
}
|
2022-10-25 11:41:19 +08:00
|
|
|
|
2022-10-24 18:46:19 +08:00
|
|
|
type ChangeDBInfo struct {
|
2023-09-16 13:16:15 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
From string `json:"from" validate:"required,oneof=local remote"`
|
|
|
|
Type string `json:"type" validate:"required,oneof=mysql mariadb"`
|
|
|
|
Database string `json:"database" validate:"required"`
|
|
|
|
Value string `json:"value" validate:"required"`
|
2022-10-24 18:46:19 +08:00
|
|
|
}
|
|
|
|
|
2022-10-25 18:34:33 +08:00
|
|
|
type DBBaseInfo struct {
|
2022-11-04 19:02:15 +08:00
|
|
|
Name string `json:"name"`
|
|
|
|
ContainerName string `json:"containerName"`
|
|
|
|
Port int64 `json:"port"`
|
2022-10-25 18:34:33 +08:00
|
|
|
}
|
|
|
|
|
2022-10-31 17:26:15 +08:00
|
|
|
// redis
|
2023-09-13 14:10:11 +08:00
|
|
|
type ChangeRedisPass struct {
|
|
|
|
Value string `json:"value" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2022-10-31 23:52:39 +08:00
|
|
|
type RedisConfUpdate struct {
|
2022-12-20 18:59:26 +08:00
|
|
|
Timeout string `json:"timeout"`
|
|
|
|
Maxclients string `json:"maxclients"`
|
|
|
|
Maxmemory string `json:"maxmemory"`
|
2022-11-02 18:30:22 +08:00
|
|
|
}
|
2022-11-03 23:42:42 +08:00
|
|
|
type RedisConfPersistenceUpdate struct {
|
|
|
|
Type string `json:"type" validate:"required,oneof=aof rbd"`
|
|
|
|
Appendonly string `json:"appendonly"`
|
|
|
|
Appendfsync string `json:"appendfsync"`
|
|
|
|
Save string `json:"save"`
|
|
|
|
}
|
2022-11-02 18:30:22 +08:00
|
|
|
type RedisConfUpdateByFile struct {
|
2023-10-27 14:19:26 +08:00
|
|
|
File string `json:"file" validate:"required"`
|
2022-11-03 23:42:42 +08:00
|
|
|
RestartNow bool `json:"restartNow"`
|
2022-10-31 23:52:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type RedisConf struct {
|
2022-11-02 16:28:54 +08:00
|
|
|
Name string `json:"name"`
|
2022-11-08 14:34:41 +08:00
|
|
|
Port int64 `json:"port"`
|
2022-11-02 16:28:54 +08:00
|
|
|
ContainerName string `json:"containerName"`
|
|
|
|
Timeout string `json:"timeout"`
|
|
|
|
Maxclients string `json:"maxclients"`
|
|
|
|
Requirepass string `json:"requirepass"`
|
|
|
|
Maxmemory string `json:"maxmemory"`
|
|
|
|
}
|
2022-10-31 23:52:39 +08:00
|
|
|
|
2022-11-02 16:28:54 +08:00
|
|
|
type RedisPersistence struct {
|
2022-10-31 23:52:39 +08:00
|
|
|
Appendonly string `json:"appendonly"`
|
|
|
|
Appendfsync string `json:"appendfsync"`
|
|
|
|
Save string `json:"save"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type RedisStatus struct {
|
|
|
|
TcpPort string `json:"tcp_port"`
|
|
|
|
UptimeInDays string `json:"uptime_in_days"`
|
|
|
|
ConnectedClients string `json:"connected_clients"`
|
|
|
|
UsedMemory string `json:"used_memory"`
|
|
|
|
UsedMemory_rss string `json:"used_memory_rss"`
|
|
|
|
UsedMemory_peak string `json:"used_memory_peak"`
|
|
|
|
MemFragmentationRatio string `json:"mem_fragmentation_ratio"`
|
|
|
|
TotalConnectionsReceived string `json:"total_connections_received"`
|
|
|
|
TotalCommandsProcessed string `json:"total_commands_processed"`
|
|
|
|
InstantaneousOpsPerSec string `json:"instantaneous_ops_per_sec"`
|
|
|
|
KeyspaceHits string `json:"keyspace_hits"`
|
|
|
|
KeyspaceMisses string `json:"keyspace_misses"`
|
|
|
|
LatestForkUsec string `json:"latest_fork_usec"`
|
2022-10-31 17:26:15 +08:00
|
|
|
}
|
2022-11-03 23:42:42 +08:00
|
|
|
|
2022-11-09 15:08:38 +08:00
|
|
|
type DatabaseFileRecords struct {
|
2022-11-03 23:42:42 +08:00
|
|
|
FileName string `json:"fileName"`
|
|
|
|
FileDir string `json:"fileDir"`
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
Size int `json:"size"`
|
|
|
|
}
|
|
|
|
type RedisBackupRecover struct {
|
|
|
|
FileName string `json:"fileName"`
|
|
|
|
FileDir string `json:"fileDir"`
|
|
|
|
}
|
2023-08-29 10:50:15 +08:00
|
|
|
|
|
|
|
// database
|
|
|
|
type DatabaseSearch struct {
|
|
|
|
PageInfo
|
|
|
|
Info string `json:"info"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
OrderBy string `json:"orderBy"`
|
|
|
|
Order string `json:"order"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DatabaseInfo struct {
|
2023-11-29 10:46:07 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
Name string `json:"name" validate:"max=256"`
|
|
|
|
From string `json:"from"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Version string `json:"version"`
|
|
|
|
Address string `json:"address"`
|
|
|
|
Port uint `json:"port"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
|
|
|
SSL bool `json:"ssl"`
|
|
|
|
RootCert string `json:"rootCert"`
|
|
|
|
ClientKey string `json:"clientKey"`
|
|
|
|
ClientCert string `json:"clientCert"`
|
|
|
|
SkipVerify bool `json:"skipVerify"`
|
|
|
|
|
|
|
|
Description string `json:"description"`
|
2023-08-29 10:50:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type DatabaseOption struct {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
From string `json:"from"`
|
|
|
|
Database string `json:"database"`
|
|
|
|
Version string `json:"version"`
|
|
|
|
Address string `json:"address"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DatabaseCreate struct {
|
2023-11-29 10:46:07 +08:00
|
|
|
Name string `json:"name" validate:"required,max=256"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
From string `json:"from" validate:"required,oneof=local remote"`
|
|
|
|
Version string `json:"version" validate:"required"`
|
|
|
|
Address string `json:"address"`
|
|
|
|
Port uint `json:"port"`
|
|
|
|
Username string `json:"username" validate:"required"`
|
|
|
|
Password string `json:"password" validate:"required"`
|
|
|
|
|
|
|
|
SSL bool `json:"ssl"`
|
|
|
|
RootCert string `json:"rootCert"`
|
|
|
|
ClientKey string `json:"clientKey"`
|
|
|
|
ClientCert string `json:"clientCert"`
|
|
|
|
SkipVerify bool `json:"skipVerify"`
|
|
|
|
|
2023-08-29 10:50:15 +08:00
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DatabaseUpdate struct {
|
2023-11-29 10:46:07 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Version string `json:"version" validate:"required"`
|
|
|
|
Address string `json:"address"`
|
|
|
|
Port uint `json:"port"`
|
|
|
|
Username string `json:"username" validate:"required"`
|
|
|
|
Password string `json:"password" validate:"required"`
|
|
|
|
|
|
|
|
SSL bool `json:"ssl"`
|
|
|
|
RootCert string `json:"rootCert"`
|
|
|
|
ClientKey string `json:"clientKey"`
|
|
|
|
ClientCert string `json:"clientCert"`
|
|
|
|
SkipVerify bool `json:"skipVerify"`
|
|
|
|
|
2023-08-29 10:50:15 +08:00
|
|
|
Description string `json:"description"`
|
|
|
|
}
|
2023-10-08 14:52:14 +08:00
|
|
|
|
|
|
|
type DatabaseDelete struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
ForceDelete bool `json:"forceDelete"`
|
|
|
|
DeleteBackup bool `json:"deleteBackup"`
|
|
|
|
}
|