github.com/pluralsh/plural-cli@v0.9.5/pkg/ui/web/wailsjs/go/models.ts (about) 1 export namespace manifest { 2 3 export class Context { 4 protect?: string[]; 5 // Go type: Globals 6 globals?: any; 7 8 static createFrom(source: any = {}) { 9 return new Context(source); 10 } 11 12 constructor(source: any = {}) { 13 if ('string' === typeof source) source = JSON.parse(source); 14 this.protect = source["protect"]; 15 this.globals = this.convertValues(source["globals"], null); 16 } 17 18 convertValues(a: any, classs: any, asMap: boolean = false): any { 19 if (!a) { 20 return a; 21 } 22 if (a.slice) { 23 return (a as any[]).map(elem => this.convertValues(elem, classs)); 24 } else if ("object" === typeof a) { 25 if (asMap) { 26 for (const key of Object.keys(a)) { 27 a[key] = new classs(a[key]); 28 } 29 return a; 30 } 31 return new classs(a); 32 } 33 return a; 34 } 35 } 36 export class NetworkConfig { 37 subdomain: string; 38 pluralDns: boolean; 39 40 static createFrom(source: any = {}) { 41 return new NetworkConfig(source); 42 } 43 44 constructor(source: any = {}) { 45 if ('string' === typeof source) source = JSON.parse(source); 46 this.subdomain = source["subdomain"]; 47 this.pluralDns = source["pluralDns"]; 48 } 49 } 50 51 } 52 53 export namespace ui { 54 55 export class Application { 56 key: string; 57 label: string; 58 isDependency: boolean; 59 dependencyOf: {[key: string]: any}; 60 data: {[key: string]: any}; 61 62 static createFrom(source: any = {}) { 63 return new Application(source); 64 } 65 66 constructor(source: any = {}) { 67 if ('string' === typeof source) source = JSON.parse(source); 68 this.key = source["key"]; 69 this.label = source["label"]; 70 this.isDependency = source["isDependency"]; 71 this.dependencyOf = source["dependencyOf"]; 72 this.data = source["data"]; 73 } 74 } 75 76 } 77