-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update blueprint properties and tests
- Loading branch information
Showing
8 changed files
with
158 additions
and
161 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
72 changes: 72 additions & 0 deletions
72
services/blueprint-service/src/main/kotlin/org/katan/service/blueprint/parser/Properties.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,72 @@ | ||
package org.katan.service.blueprint.parser | ||
|
||
import org.katan.service.blueprint.parser.PropertyKind.Literal | ||
import org.katan.service.blueprint.parser.PropertyKind.Mixed | ||
import org.katan.service.blueprint.parser.PropertyKind.Multiple | ||
import org.katan.service.blueprint.parser.PropertyKind.Struct | ||
|
||
internal object Properties { | ||
val Name = Property( | ||
qualifiedName = "name", | ||
kind = Literal, | ||
constraints = listOf(RequiredPropertyConstraint, NotBlankPropertyConstraint) | ||
) | ||
val Version = Property( | ||
qualifiedName = "version", | ||
kind = Literal, | ||
constraints = listOf(RequiredPropertyConstraint, NotBlankPropertyConstraint) | ||
) | ||
val Build = Property( | ||
qualifiedName = "build", | ||
kind = Struct | ||
) | ||
val Entrypoint = Property( | ||
qualifiedName = "build.entrypoint", | ||
kind = Literal | ||
) | ||
val Image = Property( | ||
qualifiedName = "build.image", | ||
kind = Mixed( | ||
Literal, | ||
Multiple(Struct) | ||
), | ||
constraints = listOf(RequiredPropertyConstraint) | ||
) | ||
val ImageReference = Property( | ||
qualifiedName = "build.image.ref", | ||
kind = Literal, | ||
constraints = listOf(RequiredPropertyConstraint) | ||
) | ||
val ImageTag = Property( | ||
qualifiedName = "build.image.tag", | ||
kind = Literal, | ||
constraints = listOf(RequiredPropertyConstraint) | ||
) | ||
val Instance = Property( | ||
qualifiedName = "build.instance", | ||
kind = Struct | ||
) | ||
val InstanceName = Property( | ||
qualifiedName = "build.instance.name", | ||
kind = Literal | ||
) | ||
val Options = Property( | ||
qualifiedName = "options", | ||
kind = Struct | ||
) | ||
val OptionsId = Property( | ||
qualifiedName = "options.id", | ||
kind = Literal, | ||
constraints = listOf(RequiredPropertyConstraint) | ||
) | ||
val OptionsType = Property( | ||
qualifiedName = "options.type", | ||
kind = Literal, | ||
constraints = listOf(RequiredPropertyConstraint) | ||
) | ||
val OptionsEnv = Property( | ||
qualifiedName = "options.env", | ||
kind = Literal, | ||
constraints = listOf(EnvironmentVariableConstraint) | ||
) | ||
} |
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.