Caps-Train/Sources/Configuration.swift
2023-10-23 16:49:56 +02:00

23 lines
424 B
Swift

import Foundation
struct Configuration {
let contentFolder: String
let trainingIterations: Int
let serverPath: String
let authenticationToken: String
}
extension Configuration {
func serverUrl() throws -> URL {
guard let serverUrl = URL(string: serverPath) else {
throw TrainingError.invalidServerPath(serverPath)
}
return serverUrl
}
}