Skip to content

Commit

Permalink
Add dhall definitions for linked service dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
clementd-fretlink committed Jul 2, 2020
1 parent 90634ee commit f642276
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dhall/Config.dhall
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
let Addon = (./Addon.dhall).Type

let ServiceDependency = (./ServiceDependency.dhall).Type

let Vault = ./Vault.dhall

let FixedOrRange =
Expand Down Expand Up @@ -28,6 +30,7 @@ let Config =
, clever_haskell_entry_point : Optional Text
, clever_disable_metrics : Bool
, clever_addons : List Addon
, clever_service_dependencies : List ServiceDependency
, clever_env : Environment
, clever_build_flavor : Optional Text
, clever_scaling : Optional ScalingParameters
Expand All @@ -48,6 +51,7 @@ let mkConfig =
, clever_haskell_entry_point = None Text
, clever_disable_metrics = False
, clever_addons = [] : List Addon
, clever_service_dependencies = [] : List ServiceDependency
, clever_env = {=}
, clever_build_flavor = None Text
, clever_scaling = None ScalingParameters
Expand Down
9 changes: 9 additions & 0 deletions dhall/ServiceDependency.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
let ServiceDependency =
< Addon : { addon_id : Text } | Application : { app_id : Text } >

let addon = λ(addon_id : Text) ServiceDependency.Addon { addon_id = addon_id }

let application =
λ(app_id : Text) ServiceDependency.Application { app_id = app_id }

in { Type = ServiceDependency, addon = addon, application = application }
6 changes: 5 additions & 1 deletion dhall/package.dhall
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{ Addon = ./Addon.dhall, Config = ./Config.dhall, Vault = ./Vault.dhall }
{ Addon = ./Addon.dhall
, ServiceDependency = ./ServiceDependency.dhall
, Config = ./Config.dhall
, Vault = ./Vault.dhall
}

0 comments on commit f642276

Please sign in to comment.