doxy/App/Sources/Options/AppOptions.swift

42 lines
1.1 KiB
Swift
Raw Normal View History

2025-02-22 10:21:07 +01:00
import ArgumentParser
import DoxyLibrary
2025-02-22 10:21:07 +01:00
import Logging
extension App {
struct Options: AppArguments, ParsableArguments {
2025-02-22 10:21:07 +01:00
// MARK: Properties
@Option(
name: .shortAndLong,
help: "A path to the location of the DocC archives in the local file system."
)
var archivesPath: String = "Resources/Archives"
@Option(
name: .shortAndLong,
help: "A hostname to bind the application to. Defaults to `127.0.0.1`."
)
2025-02-22 10:21:07 +01:00
var hostname: String = "127.0.0.1"
@Option(
name: .shortAndLong,
help: "A log level to set the logger service in the application."
)
var logLevel: Logger.Level?
@Option(
name: .shortAndLong,
help: "A name for the Hummingbird application."
)
var name: String = "Doxy"
2025-02-22 10:21:07 +01:00
@Option(
name: .shortAndLong,
help: "A port number to bind the application to. Defaults to `8080`."
)
2025-02-22 10:21:07 +01:00
var port: Int = 8080
}
}