From 5cf191568e1df6a75b439a24d19f53afbe836c87 Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 23 Nov 2022 14:41:10 +0100 Subject: [PATCH] Introduce check for config file --- .../provs/server/domain/k3s/ConfigFileName.kt | 9 +++++++++ .../provs/server/domain/k3s/ConfigFileRepository.kt | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 src/main/kotlin/org/domaindrivenarchitecture/provs/server/domain/k3s/ConfigFileName.kt create mode 100644 src/main/kotlin/org/domaindrivenarchitecture/provs/server/domain/k3s/ConfigFileRepository.kt diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/server/domain/k3s/ConfigFileName.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/server/domain/k3s/ConfigFileName.kt new file mode 100644 index 0000000..d716f5b --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/server/domain/k3s/ConfigFileName.kt @@ -0,0 +1,9 @@ +package org.domaindrivenarchitecture.provs.server.domain.k3s + +import java.io.File + +data class ConfigFileName(val fileName: String) { + fun fullqualified() : String { + return File(fileName).absoluteFile.absolutePath + } +} \ No newline at end of file diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/server/domain/k3s/ConfigFileRepository.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/server/domain/k3s/ConfigFileRepository.kt new file mode 100644 index 0000000..029f6c9 --- /dev/null +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/server/domain/k3s/ConfigFileRepository.kt @@ -0,0 +1,5 @@ +package org.domaindrivenarchitecture.provs.server.domain.k3s + +interface ConfigFileRepository { + fun assertExists(configFileName: ConfigFileName?) +} \ No newline at end of file