mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
41 lines
986 B
TypeScript
41 lines
986 B
TypeScript
import type { ModelBase } from '@/api/curd'
|
|
import Curd from '@/api/curd'
|
|
import type { DnsCredential } from '@/api/dns_credential'
|
|
import type { AcmeUser } from '@/api/acme_user'
|
|
import type { PrivateKeyType } from '@/constants'
|
|
|
|
export interface Cert extends ModelBase {
|
|
name: string
|
|
domains: string[]
|
|
filename: string
|
|
ssl_certificate_path: string
|
|
ssl_certificate: string
|
|
ssl_certificate_key_path: string
|
|
ssl_certificate_key: string
|
|
auto_cert: number
|
|
challenge_method: string
|
|
dns_credential_id: number
|
|
dns_credential?: DnsCredential
|
|
acme_user_id: number
|
|
acme_user?: AcmeUser
|
|
key_type: string
|
|
log: string
|
|
certificate_info: CertificateInfo
|
|
}
|
|
|
|
export interface CertificateInfo {
|
|
subject_name: string
|
|
issuer_name: string
|
|
not_after: string
|
|
not_before: string
|
|
}
|
|
|
|
export interface CertificateResult {
|
|
ssl_certificate: string
|
|
ssl_certificate_key: string
|
|
key_type: PrivateKeyType
|
|
}
|
|
|
|
const cert: Curd<Cert> = new Curd('/cert')
|
|
|
|
export default cert
|