Skip to content

Commit

Permalink
config object new model
Browse files Browse the repository at this point in the history
  • Loading branch information
mageddo committed Dec 2, 2024
1 parent 860d8ec commit ffd103a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public static Config.Env toDomainEnv(ConfigJsonV2.Env env) {
}

public static List<Config.Entry> toDomainEntries(List<ConfigJsonV2.Entry> hostnames) {
if (hostnames == null) {
return null;
}
return hostnames
.stream()
.map(ConfigJsonV2EnvsMapper::toDomainEntry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public static Config toConfig(ConfigJson json, Path configFileAbsolutePath) {
.configPath(configFileAbsolutePath)
.solverRemote(toSolverRemote(json))
.solverStub(toSolverStub(json.getSolverStub()))
.activeEnv(json.getActiveEnv())
.envs(json.getEnvs())
.source(Config.Source.JSON)
.build();
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/configs-test/004.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"dnsServerPort" : 5391,
"domain" : "acme",
"dpsNetworkAutoConnect" : true,
"envs" : [ {
"name" : "MARROI"
} ],
"hostMachineHostname" : "batata.com",
"logFile" : "/var/log/dns-proxy-server.log",
"logLevel" : "DEBUG",
Expand Down

0 comments on commit ffd103a

Please sign in to comment.