feat: Begins using swift argument parser and creating cli client dependency
All checks were successful
CI / Run Tests (push) Successful in 4m27s

This commit is contained in:
2024-11-16 22:32:32 -05:00
parent 3416ce1003
commit 6472d3cd1e
19 changed files with 657 additions and 342 deletions

View File

@@ -25,6 +25,12 @@ public struct EnvVars: Codable, Equatable, Sendable {
/// The MQTT user password.
public var password: String?
/// Set a custom logging level.
public var logLevel: Logger.Level?
/// Set the mqtt broker version.
public var version: String?
/// Create a new ``EnvVars``
///
/// - Parameters:
@@ -38,9 +44,11 @@ public struct EnvVars: Codable, Equatable, Sendable {
appEnv: AppEnv = .development,
host: String = "127.0.0.1",
port: String? = "1883",
identifier: String = "dewPoint-controller",
identifier: String = "dewpoint-controller",
userName: String? = "mqtt_user",
password: String? = "secret!"
password: String? = "secret!",
logLevel: Logger.Level? = nil,
version: String? = nil
) {
self.appEnv = appEnv
self.host = host
@@ -48,6 +56,8 @@ public struct EnvVars: Codable, Equatable, Sendable {
self.identifier = identifier
self.userName = userName
self.password = password
self.logLevel = logLevel
self.version = version
}
/// Custom coding keys.
@@ -58,6 +68,8 @@ public struct EnvVars: Codable, Equatable, Sendable {
case identifier = "MQTT_IDENTIFIER"
case userName = "MQTT_USERNAME"
case password = "MQTT_PASSWORD"
case logLevel = "LOG_LEVEL"
case version = "MQTT_VERSION"
}
/// Represents the different app environments.