2019-01-08 19:45:35 +00:00
|
|
|
import * as plugins from './smartacme.plugins';
|
2019-01-08 23:01:01 +00:00
|
|
|
|
|
|
|
import * as interfaces from './interfaces';
|
|
|
|
|
2019-01-08 19:45:35 +00:00
|
|
|
import { CertManager } from './smartacme.classes.certmanager';
|
|
|
|
|
|
|
|
import { Collection, svDb, unI } from '@pushrocks/smartdata';
|
|
|
|
|
|
|
|
@plugins.smartdata.Collection(() => {
|
|
|
|
return CertManager.activeDB;
|
|
|
|
})
|
2019-01-08 23:01:01 +00:00
|
|
|
export class Cert extends plugins.smartdata.SmartDataDbDoc<Cert> implements interfaces.ICert {
|
2019-01-08 19:45:35 +00:00
|
|
|
@unI()
|
|
|
|
public index: string;
|
|
|
|
|
|
|
|
@svDb()
|
2019-01-08 23:01:01 +00:00
|
|
|
public domainName: string;
|
2019-01-08 19:45:35 +00:00
|
|
|
|
|
|
|
@svDb()
|
2019-01-08 23:01:01 +00:00
|
|
|
public created: number;
|
2019-01-08 19:45:35 +00:00
|
|
|
|
|
|
|
@svDb()
|
2019-01-08 23:01:01 +00:00
|
|
|
public privateKey: string;
|
2019-01-08 19:45:35 +00:00
|
|
|
|
|
|
|
@svDb()
|
2019-01-08 23:01:01 +00:00
|
|
|
public publicKey: string;
|
2019-01-08 19:45:35 +00:00
|
|
|
|
|
|
|
@svDb()
|
2019-01-08 23:01:01 +00:00
|
|
|
public csr: string;
|
2019-01-08 19:45:35 +00:00
|
|
|
|
|
|
|
constructor(privateKeyArg: string, publicKeyArg: string, csrArg: string) {
|
|
|
|
super();
|
|
|
|
this.privateKey = privateKeyArg;
|
|
|
|
this.publicKey = publicKeyArg;
|
|
|
|
this.csr = csrArg;
|
|
|
|
}
|
|
|
|
}
|