From bafe762ac01d16904c18404283027e426e19bc73 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 3 Feb 2021 16:35:48 +0100 Subject: Code reorganization. Moving main code to src, keeping modules in modules/ --- .../src/main/java/io/trygvis/acme/AcmeAppsMain.java | 14 ++++++++++++++ .../acme/src/main/java/io/trygvis/acme/VpnMain.java | 21 +++++++++++++++++++++ .../main/java/io/trygvis/acme/apps/AcmeMyApp.java | 6 ++++++ .../src/main/java/io/trygvis/acme/apps/AcmeOps.java | 4 ++++ 4 files changed, 45 insertions(+) create mode 100644 example/modules/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java create mode 100644 example/modules/acme/src/main/java/io/trygvis/acme/VpnMain.java create mode 100644 example/modules/acme/src/main/java/io/trygvis/acme/apps/AcmeMyApp.java create mode 100644 example/modules/acme/src/main/java/io/trygvis/acme/apps/AcmeOps.java (limited to 'example/modules/acme/src/main/java/io') diff --git a/example/modules/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java b/example/modules/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java new file mode 100644 index 0000000..c65a3b2 --- /dev/null +++ b/example/modules/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java @@ -0,0 +1,14 @@ +package io.trygvis.acme; + +public class AcmeAppsMain { +// public static void main(String[] args) throws IOException { +// try (var engine = new Engine( +// "acme-apps", +// new File("acme.yaml"), +// new File("acme-apps"), +// new String[]{"init", "generate"}, +// new File[0])) { +// engine.io.dump(new File("out", "acme/apps.yaml"), engine.session.getFactHandles()); +// } +// } +} diff --git a/example/modules/acme/src/main/java/io/trygvis/acme/VpnMain.java b/example/modules/acme/src/main/java/io/trygvis/acme/VpnMain.java new file mode 100644 index 0000000..cbf962c --- /dev/null +++ b/example/modules/acme/src/main/java/io/trygvis/acme/VpnMain.java @@ -0,0 +1,21 @@ +package io.trygvis.acme; + +public class VpnMain { +// public static void main(String[] args) throws IOException { +// try (var engine = new Engine( +// "acme-wireguard", +// new File("acme.yaml"), +// new File("acme-wireguard"), +// new String[]{"init", "generate"}, +// new File[0])) { +// var outputFile = new File("out", "acme/wireguard.yaml"); +// engine.io.dump(outputFile, engine.session.getFactHandles(), (Object o) -> +// o.getClass().getName().contains("Wg") +// || o instanceof Machine +// || o instanceof DnsEntry +// || o instanceof Ipv4Cidr +// || o instanceof Ipv4Address +// ); +// } +// } +} diff --git a/example/modules/acme/src/main/java/io/trygvis/acme/apps/AcmeMyApp.java b/example/modules/acme/src/main/java/io/trygvis/acme/apps/AcmeMyApp.java new file mode 100644 index 0000000..9371af2 --- /dev/null +++ b/example/modules/acme/src/main/java/io/trygvis/acme/apps/AcmeMyApp.java @@ -0,0 +1,6 @@ +package io.trygvis.acme.apps; + +public class AcmeMyApp { + public String environment; + public String dockerTag; +} diff --git a/example/modules/acme/src/main/java/io/trygvis/acme/apps/AcmeOps.java b/example/modules/acme/src/main/java/io/trygvis/acme/apps/AcmeOps.java new file mode 100644 index 0000000..be9d82b --- /dev/null +++ b/example/modules/acme/src/main/java/io/trygvis/acme/apps/AcmeOps.java @@ -0,0 +1,4 @@ +package io.trygvis.acme.apps; + +public class AcmeOps { +} -- cgit v1.2.3