-
-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(pact-jvm-server): Move Config to Kotlin
- Loading branch information
1 parent
51330be
commit ca29ef0
Showing
5 changed files
with
61 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
pact-jvm-server/src/main/kotlin/au/com/dius/pact/server/Config.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package au.com.dius.pact.server | ||
|
||
data class Config @JvmOverloads constructor( | ||
val port: Int = 29999, | ||
val host: String = "localhost", | ||
val daemon: Boolean = false, | ||
val portLowerBound: Int = 20000, | ||
val portUpperBound: Int = 40000, | ||
val debug: Boolean = false, | ||
val pactVersion: Int = 2, | ||
val keystorePath: String = "", | ||
val keystorePassword: String = "", | ||
val sslPort : Int = 8443, | ||
val broker: String = "", | ||
val authToken: String = "" | ||
) { | ||
// Scala can't access the copy method correctly | ||
fun copyPort(port: Int) = this.copy(port = port) | ||
fun copyHost(host: String) = this.copy(host = host) | ||
fun copyDaemon(daemon: Boolean) = this.copy(daemon = daemon) | ||
fun copyPortLowerBound(portLowerBound: Int) = this.copy(portLowerBound = portLowerBound) | ||
fun copyPortUpperBound(portUpperBound: Int) = this.copy(portUpperBound = portUpperBound) | ||
fun copyDebug(debug: Boolean) = this.copy(debug = debug) | ||
fun copyPactVersion(pactVersion: Int) = this.copy(pactVersion = pactVersion) | ||
fun copyKeystorePath(keystorePath: String) = this.copy(keystorePath = keystorePath) | ||
fun copyKeystorePassword(keystorePassword: String) = this.copy(keystorePassword = keystorePassword) | ||
fun copySslPort(sslPort : Int) = this.copy(sslPort = sslPort) | ||
fun copyBroker(broker: String) = this.copy(broker = broker) | ||
fun copyAuthToken(authToken: String) = this.copy(authToken = authToken) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters