1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-02-01 14:38:07 +08:00

253 lines
5.7 KiB
Go
Raw Normal View History

2022-10-17 16:04:39 +08:00
import { ReqPage } from '.';
export namespace Container {
export interface ContainerOperate {
name: string;
operation: string;
newName: string;
}
2022-10-17 16:04:39 +08:00
export interface ContainerSearch extends ReqPage {
filters: string;
}
2022-10-12 18:55:47 +08:00
export interface ContainerCreate {
name: string;
image: string;
cmd: Array<string>;
publishAllPorts: boolean;
exposedPorts: Array<Port>;
nanoCPUs: number;
memory: number;
volumes: Array<Volume>;
autoRemove: boolean;
labels: Array<string>;
labelsStr: string;
env: Array<string>;
envStr: string;
restartPolicy: string;
}
export interface Port {
containerPort: number;
hostPort: number;
}
export interface Volume {
sourceDir: string;
containerDir: string;
mode: string;
}
export interface ContainerInfo {
containerID: string;
name: string;
imageName: string;
createTime: string;
state: string;
runTime: string;
}
2022-10-13 18:24:24 +08:00
export interface ContainerStats {
cpuPercent: number;
memory: number;
cache: number;
ioRead: number;
ioWrite: number;
networkRX: number;
networkTX: number;
shotTime: Date;
}
export interface ContainerLogSearch {
containerID: string;
mode: string;
}
2022-10-11 19:47:16 +08:00
export interface ContainerInspect {
id: string;
type: string;
}
2022-10-12 18:55:47 +08:00
export interface Options {
option: string;
}
2022-10-09 16:17:15 +08:00
export interface ImageInfo {
id: string;
createdAt: Date;
name: string;
2022-10-11 17:46:52 +08:00
tags: Array<string>;
size: string;
}
2022-10-11 14:20:51 +08:00
export interface ImageBuild {
from: string;
2022-10-12 13:42:58 +08:00
name: string;
2022-10-11 14:20:51 +08:00
dockerfile: string;
2022-10-12 13:42:58 +08:00
tags: Array<string>;
2022-10-11 14:20:51 +08:00
}
export interface ImagePull {
repoID: number;
imageName: string;
}
2022-10-11 17:46:52 +08:00
export interface ImageTag {
repoID: number;
sourceID: string;
targetName: string;
}
export interface ImagePush {
repoID: number;
tagName: string;
}
export interface ImageLoad {
path: string;
}
export interface ImageSave {
2022-10-11 17:46:52 +08:00
tagName: string;
path: string;
name: string;
}
2022-10-11 14:20:51 +08:00
export interface NetworkInfo {
id: string;
name: string;
isSystem: boolean;
2022-10-11 14:20:51 +08:00
labels: Array<string>;
driver: string;
ipamDriver: string;
2022-10-11 17:46:52 +08:00
subnet: string;
gateway: string;
2022-10-11 14:20:51 +08:00
createdAt: string;
attachable: string;
2022-10-18 18:39:45 +08:00
expand: boolean;
2022-10-11 14:20:51 +08:00
}
export interface NetworkCreate {
name: string;
labels: Array<string>;
options: Array<string>;
driver: string;
2022-10-11 17:46:52 +08:00
subnet: string;
gateway: string;
2022-10-11 14:20:51 +08:00
scope: string;
}
export interface VolumeInfo {
name: string;
labels: Array<string>;
driver: string;
mountpoint: string;
createdAt: string;
}
export interface VolumeCreate {
name: string;
driver: string;
options: Array<string>;
2022-10-11 17:46:52 +08:00
labels: Array<string>;
2022-10-11 14:20:51 +08:00
}
2022-10-09 16:17:15 +08:00
export interface RepoCreate {
name: string;
downloadUrl: string;
protocol: string;
2022-10-09 16:17:15 +08:00
username: string;
password: string;
auth: boolean;
}
export interface RepoUpdate {
id: number;
downloadUrl: string;
protocol: string;
2022-10-09 16:17:15 +08:00
username: string;
password: string;
auth: boolean;
}
export interface RepoDelete {
ids: Array<number>;
deleteInsecure: boolean;
}
2022-10-09 16:17:15 +08:00
export interface RepoInfo {
id: number;
createdAt: Date;
name: string;
downloadUrl: string;
protocol: string;
2022-10-09 16:17:15 +08:00
username: string;
password: string;
auth: boolean;
}
export interface RepoOptions {
id: number;
name: string;
downloadUrl: string;
}
2022-10-11 14:20:51 +08:00
2022-10-17 16:04:39 +08:00
export interface ComposeInfo {
name: string;
createdAt: string;
2022-10-18 18:39:45 +08:00
createdBy: string;
2022-10-17 16:04:39 +08:00
containerNumber: number;
configFile: string;
workdir: string;
path: string;
containers: Array<ComposeContainer>;
expand: boolean;
}
export interface ComposeContainer {
name: string;
createTime: string;
containerID: string;
state: string;
}
export interface ComposeCreate {
name: string;
from: string;
file: string;
path: string;
template: number;
}
export interface ComposeOpration {
name: string;
2022-10-17 16:04:39 +08:00
operation: string;
path: string;
}
2022-12-06 15:05:13 +08:00
export interface ComposeUpdate {
name: string;
2022-12-06 15:05:13 +08:00
path: string;
content: string;
}
2022-10-17 16:04:39 +08:00
2022-10-17 09:10:06 +08:00
export interface TemplateCreate {
name: string;
from: string;
description: string;
2022-10-17 16:04:39 +08:00
path: string;
2022-10-17 09:10:06 +08:00
content: string;
}
export interface TemplateUpdate {
id: number;
from: string;
description: string;
2022-10-17 16:04:39 +08:00
path: string;
2022-10-17 09:10:06 +08:00
content: string;
}
export interface TemplateInfo {
id: number;
createdAt: Date;
name: string;
from: string;
description: string;
2022-10-17 16:04:39 +08:00
path: string;
2022-10-17 09:10:06 +08:00
content: string;
}
2022-10-11 14:20:51 +08:00
export interface BatchDelete {
names: Array<string>;
2022-10-11 14:20:51 +08:00
}
2022-11-14 19:19:42 +08:00
export interface DaemonJsonUpdateByFile {
file: string;
}
2022-12-07 17:28:14 +08:00
export interface DockerOperate {
operation: string;
}
2022-11-14 19:19:42 +08:00
export interface DaemonJsonConf {
status: string;
2023-01-05 17:29:27 +08:00
version: string;
2022-11-14 19:19:42 +08:00
registryMirrors: Array<string>;
insecureRegistries: Array<string>;
liveRestore: boolean;
cgroupDriver: string;
}
}