-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ : convert TerraformVariable.java to Variable.kt
- Loading branch information
Showing
12 changed files
with
74 additions
and
149 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
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
package io.codeka.gaia.hcl | ||
|
||
data class Variable(var name: String = "", var type: String = "", var description: String = "", var default: String = ""); | ||
|
||
data class Output(var name: String = "", var value: String = "", var description: String = "", var sensitive: String = "false"); | ||
|
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
71 changes: 0 additions & 71 deletions
71
src/main/java/io/codeka/gaia/modules/bo/TerraformVariable.java
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
package io.codeka.gaia.modules.bo | ||
|
||
import javax.validation.constraints.NotBlank | ||
|
||
/** | ||
* Represents a module variable. | ||
* We use `@JvmOverloads` annotation to tell the Kotlin compiler to generate constructors that use default values. | ||
* Also, the `@NotBlank` annotation is targeted to the field, and not the constructor param. | ||
* | ||
* @see https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-overloads/index.html | ||
* @see https://kotlinlang.org/docs/reference/annotations.html#annotation-use-site-targets | ||
*/ | ||
data class Variable @JvmOverloads constructor(@field:NotBlank val name: String, | ||
var type: String? = null, | ||
var description: String? = null, | ||
var defaultValue: String? = null, | ||
var editable: Boolean = false, | ||
var mandatory: Boolean = false, | ||
var validationRegex: String? = null) |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.