1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-04 04:54:16 +08:00

247 lines
5.3 KiB
Go
Raw Normal View History

2022-09-23 16:33:55 +08:00
import { ReqPage, CommonModel } from '.';
export namespace App {
2022-09-23 16:33:55 +08:00
export interface App extends CommonModel {
name: string;
icon: string;
key: string;
tags: Tag[];
2023-02-17 16:21:13 +08:00
shortDescZh: string;
shortDescEn: string;
author: string;
source: string;
type: string;
status: string;
limit: number;
website: string;
github: string;
}
2022-09-23 16:33:55 +08:00
export interface AppDTO extends App {
versions: string[];
installed: boolean;
2022-09-23 16:33:55 +08:00
}
export interface Tag {
key: string;
name: string;
sort: number;
}
export interface AppResPage {
total: number;
items: App.AppDTO[];
}
2023-03-14 13:54:42 +08:00
export interface AppUpdateRes {
version: string;
canUpdate: boolean;
}
2022-09-23 16:33:55 +08:00
export interface AppDetail extends CommonModel {
appId: string;
icon: string;
2022-09-23 16:33:55 +08:00
version: string;
readme: string;
params: AppParams;
2022-09-23 16:33:55 +08:00
dockerCompose: string;
2023-04-02 16:54:00 +08:00
image: string;
hostMode?: boolean;
}
export interface AppReq extends ReqPage {
2022-11-02 15:19:14 +08:00
name?: string;
tags?: string[];
type?: string;
2023-02-08 16:21:17 +08:00
recommend?: boolean;
}
export interface AppParams {
formFields: FromField[];
}
export interface FromField {
type: string;
labelZh: string;
labelEn: string;
required: boolean;
default: any;
envKey: string;
2022-10-07 15:49:39 +08:00
key?: string;
values?: ServiceParam[];
child?: FromFieldChild;
params?: FromParam[];
multiple?: boolean;
}
export interface FromFieldChild extends FromField {
services: App.AppService[];
}
export interface FromParam {
type: string;
key: string;
value: string;
envKey: string;
}
export interface ServiceParam {
label: '';
value: '';
from?: '';
}
export interface AppInstall {
appDetailId: number;
params: any;
}
2022-11-28 13:50:53 +08:00
export interface AppInstallSearch extends ReqPage {
name?: string;
2023-01-16 15:30:24 +08:00
tags?: string[];
2023-02-09 17:18:24 +08:00
update?: boolean;
2023-01-16 15:30:24 +08:00
unused?: boolean;
sync?: boolean;
2022-11-28 13:50:53 +08:00
}
export interface ChangePort {
key: string;
name: string;
port: number;
}
export interface AppInstalled extends CommonModel {
2022-09-26 18:20:21 +08:00
name: string;
appId: number;
appDetailId: string;
2022-10-12 18:57:22 +08:00
env: string;
status: string;
description: string;
message: string;
icon: string;
2022-10-12 18:57:22 +08:00
canUpdate: boolean;
path: string;
app: App;
}
2022-09-26 18:20:21 +08:00
export interface AppInstallDto {
id: number;
name: string;
appID: number;
appDetailID: number;
version: string;
status: string;
message: string;
httpPort: number;
httpsPort: number;
path: string;
canUpdate: boolean;
icon: string;
appName: string;
ready: number;
total: number;
appKey: string;
appType: string;
appStatus: string;
}
export interface AppInstalledInfo {
id: number;
key: string;
name: string;
}
2022-11-18 16:14:23 +08:00
export interface CheckInstalled {
name: string;
version: string;
isExist: boolean;
2022-11-22 22:47:38 +08:00
app: string;
status: string;
createdAt: string;
lastBackupAt: string;
appInstallId: number;
2022-11-23 16:59:06 +08:00
containerName: string;
installPath: string;
httpPort: number;
httpsPort: number;
2022-11-18 16:14:23 +08:00
}
export interface DatabaseConnInfo {
status: string;
username: string;
password: string;
privilege: boolean;
containerName: string;
serviceName: string;
systemIP: string;
port: number;
}
2022-12-01 19:25:02 +08:00
export interface AppInstallResource {
type: string;
name: string;
}
2022-09-26 18:20:21 +08:00
export interface AppInstalledOp {
installId: number;
operate: string;
2022-10-13 16:46:38 +08:00
backupId?: number;
2022-10-13 18:56:53 +08:00
detailId?: number;
forceDelete?: boolean;
deleteBackup?: boolean;
2022-09-26 18:20:21 +08:00
}
2022-10-07 15:49:39 +08:00
export interface AppInstalledSearch extends ReqPage {
2022-10-28 17:04:57 +08:00
type: string;
2023-02-22 19:19:10 +08:00
unused?: boolean;
all?: boolean;
2022-10-28 17:04:57 +08:00
}
2022-10-07 15:49:39 +08:00
export interface AppService {
label: string;
value: string;
config?: Object;
from?: string;
2022-10-07 15:49:39 +08:00
}
2022-10-12 18:57:22 +08:00
2022-10-13 18:56:53 +08:00
export interface VersionDetail {
version: string;
detailId: number;
}
export interface InstallParams {
2023-03-08 11:04:22 +08:00
labelZh: string;
labelEn: string;
value: any;
edit: boolean;
key: string;
rule: string;
type: string;
values?: any;
showValue?: string;
2023-04-02 16:54:00 +08:00
required?: boolean;
multiple?: boolean;
}
export interface AppConfig {
params: InstallParams[];
cpuQuota: number;
memoryLimit: number;
memoryUnit: string;
containerName: string;
allowPort: boolean;
dockerCompose: string;
hostMode?: boolean;
}
export interface IgnoredApp {
name: string;
detailID: number;
version: string;
icon: string;
}
export interface AppUpdateVersionReq {
appInstallID: number;
updateVersion?: string;
}
}