Caps-Train/Sources/Configuration.swift
2024-10-28 19:06:45 +01:00

25 lines
458 B
Swift

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