You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.2 KiB
54 lines
1.2 KiB
import { Connection, TestRequest, ConnectionPoolType, SocketResult } from './crud.typings'; |
|
|
|
export interface Api { |
|
/** |
|
* 是否是平台 |
|
*/ |
|
isDec: boolean; |
|
|
|
/** |
|
* 获取已添加的数据连接 |
|
*/ |
|
getConnectionlist(): Promise<{data: Connection[]}>; |
|
|
|
/** |
|
* 删除数据连接 |
|
* @param connectionName 数据连接名称 |
|
*/ |
|
deleteConnection(connectionName: string): Promise<{data: string}>; |
|
|
|
/** |
|
* 添加数据连接 |
|
* @param data |
|
*/ |
|
addConnection(data: Connection): Promise<{data: string}>; |
|
|
|
/** |
|
* 更新数据连接 |
|
*/ |
|
updateConnection(data: Connection): Promise<{data: string}>; |
|
|
|
/** |
|
* 测试数据连接 |
|
* @param data |
|
*/ |
|
testConnection(data: Connection): Promise<TestRequest>; |
|
|
|
/** |
|
* 获取连接池数据 |
|
* @param name |
|
*/ |
|
getConnectionPool(name: string): Promise<{data: ConnectionPoolType}>; |
|
|
|
/** |
|
* 获取连接状态 |
|
* @param name |
|
*/ |
|
getConnectionStatus(name: string): Promise<SocketResult>; |
|
|
|
/** |
|
* 关闭连接 |
|
* @param name |
|
*/ |
|
shutdownConnectionStatus(name: string): Promise<SocketResult>; |
|
}
|
|
|