1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-20 16:59:17 +08:00

164 lines
4.4 KiB
Go
Raw Normal View History

2022-10-25 18:34:33 +08:00
import { ReqPage } from '.';
2022-10-20 18:45:47 +08:00
export namespace Database {
export interface SearchBackupRecord extends ReqPage {
mysqlName: string;
dbName: string;
}
2022-10-20 18:45:47 +08:00
export interface MysqlDBInfo {
id: number;
createdAt: Date;
name: string;
format: string;
username: string;
password: string;
permission: string;
description: string;
}
2022-10-25 18:34:33 +08:00
export interface BaseInfo {
name: string;
port: number;
password: string;
remoteConn: boolean;
mysqlKey: string;
2022-11-04 19:02:15 +08:00
containerName: string;
2022-10-25 18:34:33 +08:00
}
export interface MysqlConfUpdateByFile {
mysqlName: string;
file: string;
}
2022-10-20 18:45:47 +08:00
export interface MysqlDBCreate {
name: string;
format: string;
username: string;
password: string;
permission: string;
description: string;
}
export interface MysqlDBDelete {
id: number;
forceDelete: boolean;
deleteBackup: boolean;
}
2022-10-21 18:50:38 +08:00
export interface MysqlVariables {
mysqlName: string;
2022-10-21 18:50:38 +08:00
binlog_cache_size: number;
innodb_buffer_pool_size: number;
innodb_log_buffer_size: number;
join_buffer_size: number;
key_buffer_size: number;
max_connections: number;
query_cache_size: number;
read_buffer_size: number;
read_rnd_buffer_size: number;
sort_buffer_size: number;
table_open_cache: number;
thread_cache_size: number;
thread_stack: number;
tmp_table_size: number;
2022-11-04 19:02:15 +08:00
slow_query_log: string;
long_query_time: number;
}
export interface VariablesUpdate {
param: string;
value: any;
2022-10-21 18:50:38 +08:00
}
export interface MysqlStatus {
Aborted_clients: number;
Aborted_connects: number;
Bytes_received: number;
Bytes_sent: number;
Com_commit: number;
Com_rollback: number;
Connections: number;
Created_tmp_disk_tables: number;
Created_tmp_tables: number;
Innodb_buffer_pool_pages_dirty: number;
Innodb_buffer_pool_read_requests: number;
Innodb_buffer_pool_reads: number;
Key_read_requests: number;
Key_reads: number;
Key_write_requests: number;
Key_writes: number;
Max_used_connections: number;
Open_tables: number;
Opened_files: number;
Opened_tables: number;
Qcache_hits: number;
Qcache_inserts: number;
Questions: number;
Select_full_join: number;
Select_range_check: number;
Sort_merge_passes: number;
Table_locks_waited: number;
Threads_cached: number;
Threads_connected: number;
Threads_created: number;
Threads_running: number;
Uptime: number;
Run: number;
File: string;
Position: number;
}
export interface ChangeInfo {
id: number;
value: string;
}
2022-10-31 17:26:15 +08:00
// redis
export interface RedisConfUpdate {
timeout: string;
maxclients: string;
maxmemory: string;
}
2022-11-03 23:42:42 +08:00
export interface RedisConfPersistenceUpdate {
type: string;
appendonly: string;
appendfsync: string;
save: string;
}
export interface RedisConfUpdateByFile {
file: string;
2022-11-03 23:42:42 +08:00
restartNow: boolean;
}
export interface RedisStatus {
tcp_port: string;
uptime_in_days: string;
connected_clients: string;
used_memory: string;
used_memory_rss: string;
used_memory_peak: string;
mem_fragmentation_ratio: string;
total_connections_received: string;
total_commands_processed: string;
instantaneous_ops_per_sec: string;
keyspace_hits: string;
keyspace_misses: string;
latest_fork_usec: string;
}
export interface RedisConf {
name: string;
port: number;
timeout: number;
maxclients: number;
requirepass: string;
maxmemory: number;
}
export interface RedisPersistenceConf {
appendonly: string;
appendfsync: string;
save: string;
}
2022-11-08 19:03:38 +08:00
export interface FileRecord {
2022-11-03 23:42:42 +08:00
fileName: string;
fileDir: string;
createdAt: string;
size: string;
}
export interface RedisRecover {
fileName: string;
fileDir: string;
}
2022-10-20 18:45:47 +08:00
}