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

364 lines
7.2 KiB
Go
Raw Normal View History

2022-11-02 15:19:14 +08:00
import { CommonModel, ReqPage } from '.';
2022-10-28 17:04:57 +08:00
2022-12-13 17:20:13 +08:00
export namespace Website {
export interface Website extends CommonModel {
2022-11-02 15:19:14 +08:00
primaryDomain: string;
type: string;
alias: string;
remark: string;
domains: string[];
appType: string;
2022-11-11 17:41:39 +08:00
appInstallId?: number;
webSiteGroupId: number;
2022-11-02 15:19:14 +08:00
otherDomains: string;
2023-01-03 16:56:36 +08:00
defaultServer: boolean;
2023-03-09 17:50:47 +08:00
protocol: string;
2023-01-04 11:44:43 +08:00
autoRenew: boolean;
2022-11-02 15:19:14 +08:00
appinstall?: NewAppInstall;
2022-11-25 15:37:24 +08:00
webSiteSSL: SSL;
runtimeID: number;
2023-04-14 16:01:06 +08:00
rewrite: string;
user: string;
group: string;
2022-11-02 15:19:14 +08:00
}
export interface WebsiteDTO extends Website {
errorLogPath: string;
accessLogPath: string;
sitePath: string;
2023-03-09 17:50:47 +08:00
appName: string;
runtimeName: string;
}
2022-11-02 15:19:14 +08:00
export interface NewAppInstall {
name: string;
2022-11-11 17:41:39 +08:00
appDetailId: number;
2022-11-02 15:19:14 +08:00
params: any;
}
export interface WebSiteSearch extends ReqPage {
name: string;
websiteGroupId: number;
2022-11-02 15:19:14 +08:00
}
export interface WebSiteDel {
id: number;
deleteApp: boolean;
deleteBackup: boolean;
2022-12-12 15:36:45 +08:00
forceDelete: boolean;
2022-11-02 15:19:14 +08:00
}
2022-10-28 17:04:57 +08:00
export interface WebSiteCreateReq {
primaryDomain: string;
type: string;
alias: string;
remark: string;
appType: string;
2022-11-11 17:41:39 +08:00
appInstallId: number;
webSiteGroupId: number;
2022-10-28 17:04:57 +08:00
otherDomains: string;
2022-12-12 15:36:45 +08:00
proxy: string;
proxyType: string;
2022-10-28 17:04:57 +08:00
}
2022-11-08 17:21:13 +08:00
export interface WebSiteUpdateReq {
id: number;
primaryDomain: string;
remark: string;
2022-11-11 17:41:39 +08:00
webSiteGroupId: number;
expireDate?: string;
2022-11-08 17:21:13 +08:00
}
2022-12-26 16:09:21 +08:00
export interface WebSiteOp {
id: number;
operate: string;
}
2022-12-30 17:39:17 +08:00
export interface WebSiteOpLog {
id: number;
operate: string;
logType: string;
}
export interface WebSiteLog {
enable: boolean;
content: string;
}
2022-11-03 17:06:48 +08:00
export interface Domain {
2022-11-03 18:02:07 +08:00
websiteId: number;
2022-11-03 17:06:48 +08:00
port: number;
id: number;
2022-11-03 18:02:07 +08:00
domain: string;
}
export interface DomainCreate {
websiteId: number;
port: number;
domain: string;
2022-11-03 17:06:48 +08:00
}
2022-11-07 16:19:05 +08:00
2022-12-13 17:20:13 +08:00
export interface DomainDelete {
id: number;
}
2022-11-07 16:19:05 +08:00
export interface NginxConfigReq {
2022-11-08 15:42:31 +08:00
operate: string;
2022-11-07 16:19:05 +08:00
websiteId: number;
scope: string;
params?: any;
}
2022-11-08 15:42:31 +08:00
2022-12-13 18:54:46 +08:00
export interface NginxScopeReq {
websiteId: number;
scope: string;
}
2022-11-08 15:42:31 +08:00
export interface NginxParam {
name: string;
params: string[];
}
2022-12-01 00:41:50 +08:00
export interface NginxScopeConfig {
enable: boolean;
params: NginxParam[];
}
export interface DnsAccount extends CommonModel {
name: string;
type: string;
authorization: Object;
}
export interface DnsAccountCreate {
name: string;
type: string;
authorization: Object;
}
export interface DnsAccountUpdate {
id: number;
name: string;
type: string;
authorization: Object;
}
2022-11-11 17:41:39 +08:00
export interface SSL extends CommonModel {
primaryDomain: string;
2022-11-11 17:41:39 +08:00
privateKey: string;
pem: string;
otherDomains: string;
2022-11-11 17:41:39 +08:00
certURL: string;
type: string;
issuerName: string;
expireDate: string;
startDate: string;
2023-01-03 18:37:57 +08:00
provider: string;
2023-01-04 14:26:22 +08:00
websites?: Website.Website[];
autoRenew: boolean;
2022-11-11 17:41:39 +08:00
}
2022-11-16 10:31:35 +08:00
export interface SSLCreate {
primaryDomain: string;
otherDomains: string;
2022-11-16 10:31:35 +08:00
provider: string;
acmeAccountId: number;
dnsAccountId: number;
}
export interface SSLApply {
websiteId: number;
SSLId: number;
}
export interface SSLRenew {
SSLId: number;
}
export interface SSLUpdate {
id: number;
autoRenew: boolean;
}
2022-11-11 17:41:39 +08:00
export interface AcmeAccount extends CommonModel {
email: string;
url: string;
}
export interface AcmeAccountCreate {
email: string;
}
2022-11-16 10:31:35 +08:00
export interface DNSResolveReq {
domains: string[];
acmeAccountId: number;
}
export interface DNSResolve {
2022-11-25 00:08:44 +08:00
resolve: string;
2022-11-16 10:31:35 +08:00
value: string;
2022-11-25 00:08:44 +08:00
domain: string;
err: string;
2022-11-16 10:31:35 +08:00
}
2022-11-20 18:32:56 +08:00
export interface SSLReq {
name?: string;
}
export interface HTTPSReq {
websiteId: number;
enable: boolean;
2022-11-24 17:50:47 +08:00
websiteSSLId?: number;
2022-11-20 18:32:56 +08:00
type: string;
2022-11-24 17:50:47 +08:00
certificate?: string;
privateKey?: string;
2022-12-28 16:07:43 +08:00
httpConfig: string;
SSLProtocol: string[];
algorithm: string;
2022-11-20 18:32:56 +08:00
}
export interface HTTPSConfig {
enable: boolean;
SSL: SSL;
2022-12-28 16:07:43 +08:00
httpConfig: string;
SSLProtocol: string[];
algorithm: string;
2022-11-20 18:32:56 +08:00
}
2022-12-04 17:45:54 +08:00
export interface CheckReq {
installIds?: number[];
}
export interface CheckRes {
name: string;
status: string;
version: string;
appName: string;
}
2022-12-06 11:42:11 +08:00
export interface WafReq {
websiteId: number;
key: string;
rule: string;
}
export interface WafRes {
enable: boolean;
filePath: string;
content: string;
}
export interface WafUpdate {
enable: boolean;
websiteId: number;
key: string;
}
2022-12-22 10:30:32 +08:00
export interface DelReq {
id: number;
}
2022-12-23 11:08:28 +08:00
export interface NginxUpdate {
id: number;
content: string;
}
2023-01-03 16:56:36 +08:00
export interface DefaultServerUpdate {
id: number;
}
export interface PHPConfig {
params: any;
}
export interface PHPConfigUpdate {
id: number;
params: any;
}
export interface PHPUpdate {
id: number;
content: string;
type: string;
}
2023-04-14 16:01:06 +08:00
export interface RewriteReq {
websiteID: number;
name: string;
}
export interface RewriteRes {
content: string;
}
export interface RewriteUpdate {
websiteID: number;
name: string;
content: string;
}
export interface DirUpdate {
id: number;
siteDir: string;
}
export interface DirPermissionUpdate {
id: number;
user: string;
group: string;
}
export interface ProxyReq {
id: number;
}
export interface ProxyConfig {
id: number;
operate: string;
enable: boolean;
cache: boolean;
cacheTime: number;
cacheUnit: string;
name: string;
modifier: string;
match: string;
proxyPass: string;
proxyHost: string;
filePath?: string;
replaces?: ProxReplace;
content?: string;
}
export interface ProxReplace {
[key: string]: string;
}
export interface ProxyFileUpdate {
websiteID: number;
name: string;
content: string;
}
export interface AuthReq {
websiteID: number;
}
export interface NginxAuth {
username: string;
remark: string;
}
export interface AuthConfig {
enable: boolean;
items: NginxAuth[];
}
export interface NginxAuthConfig {
websiteID: number;
operate: string;
username: string;
password: string;
remark: string;
}
2022-10-28 17:04:57 +08:00
}