Setting up the model resolution design.

This commit is contained in:
Daniel Scalzi
2019-07-29 23:55:33 -04:00
parent 077fd12ec3
commit b942f4df59
10 changed files with 80 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
import { Distribution } from '../spec/distribution'
import { ModelStructure } from './model.struct'
import { ServerStructure } from './server.struct'
export class DistributionStructure implements ModelStructure<Distribution> {
private servers: ServerStructure[] | undefined
constructor(
private root: string
) {}
public getServers() {
return new ServerStructure(this.root).getSpecModel()
}
public getSpecModel(): Distribution {
return {
version: '1.0.0',
rss: 'TODO',
servers: this.getServers()
}
}
}