Browse Source

add properties to instance model

master
James Fenn 4 months ago
parent
commit
5c619e2a11
1 changed files with 9 additions and 4 deletions
  1. +9
    -4
      source/model/instance.d

+ 9
- 4
source/model/instance.d View File

@@ -10,9 +10,14 @@ struct Instance {
mixin JsonizeMe;

@jsonize {
string name; // project git name
string owner; // project owner name
int[] ports; // reserved port numbers (or null)
string name; // unique project name
string owner; // project owner name
string gitUrl; // git repo
string[] domains; // domain hostnames

string preset; // configuration preset; "docker", "jekyll", "static"
int[string] ports; // outer[inner] port mappings
string[] volumes; // volume locations
}

bool opEquals(Instance other) {
@@ -28,7 +33,7 @@ struct Instance {
}

string toString() {
return owner ~ " / " ~ name ~ ":\t" ~ ports.map!(a => to!string(a)).join(",");
return owner ~ " / " ~ name ~ ":\t" ~ ports.keys.map!(a => to!string(a)).join(",");
}
}



Loading…
Cancel
Save