]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/commitdiff
upgrade dhall to 1.26.1 and merge types and terms polykinds 17/head
authorClement Delafargue <clement.delafargue@fretlink.com>
Thu, 3 Oct 2019 09:31:56 +0000 (11:31 +0200)
committerClement Delafargue <clement.delafargue@fretlink.com>
Thu, 3 Oct 2019 09:31:56 +0000 (11:31 +0200)
Previously, types were flattened and terms were nested (as are the
directories). For consistency, I made the types nested as well.

17 files changed:
.travis.yml
dhall-1.26.1.nix [moved from dhall-1.21.0.nix with 87% similarity]
dhall/.gitignore [new file with mode: 0644]
dhall/Config.dhall
dhall/package.dhall [new file with mode: 0644]
dhall/server/Server.dhall [deleted file]
dhall/server/functions.dhall [deleted file]
dhall/server/mkServer.dhall [deleted file]
dhall/server/package.dhall [new file with mode: 0644]
dhall/server/service/Route.dhall [moved from dhall/server/service/route/Route.dhall with 100% similarity]
dhall/server/service/Service.dhall
dhall/server/service/functions.dhall [deleted file]
dhall/server/service/package.dhall [new file with mode: 0644]
dhall/server/service/plugin/CorrelationId.dhall [deleted file]
dhall/server/service/plugin/correlationId.dhall [new file with mode: 0644]
dhall/server/service/plugin/functions.dhall [deleted file]
dhall/server/service/plugin/package.dhall [new file with mode: 0644]

index 029c1a9375ef3b24897810fa781469267eb9920e..7bf8ed8ea8cfcec8fb2e3ef469765b234ce4a920 100644 (file)
@@ -7,7 +7,7 @@ sudo: false
 install:
   # Install ansible
   - nix-env -i python2.7-ansible python2.7-ansible-lint
-  - nix-env -if ./dhall-1.21.0.nix
+  - nix-env -if ./dhall-1.26.1.nix
 
   # Check ansible version
   - ansible --version
similarity index 87%
rename from dhall-1.21.0.nix
rename to dhall-1.26.1.nix
index e53369bd7cc7a30d5e070d879f45d076b65a3f0a..918a528a197ee1942ea3490c9ad3fdac850b0d74 100644 (file)
@@ -19,4 +19,4 @@ let
         '';
       };
 in
-  mkVersion "1.21.0" "0x7q6v1y62fq6724kx1hcfp1fcqv3lbv33ji6jzfd5y316a31r77"
+  mkVersion "1.26.1" "0sl4r3mfairgd6kn26hs1r1lkh8rn992grd73078rhqf5w90ag05"
diff --git a/dhall/.gitignore b/dhall/.gitignore
new file mode 100644 (file)
index 0000000..8f5fd87
--- /dev/null
@@ -0,0 +1 @@
+.history
index f1a28fc8cc9fcc676f64b37e3149b8a5554ff30f..dad94f9cac752864884ee79e342246c1f0ab62dc 100644 (file)
@@ -1 +1,2 @@
-let Server = ./server/Server.dhall in { kong_servers : List Server }
+let Server = ./server/package.dhall in { kong_servers : List Server.Type }
+
diff --git a/dhall/package.dhall b/dhall/package.dhall
new file mode 100644 (file)
index 0000000..53461ae
--- /dev/null
@@ -0,0 +1,4 @@
+{ Vault = ./Vault.dhall
+, Config = ./Config.dhall
+, Server = ./server/package.dhall
+}
diff --git a/dhall/server/Server.dhall b/dhall/server/Server.dhall
deleted file mode 100644 (file)
index beddd7d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-    let Service = ./service/Service.dhall
-
-in  { kong_app_admin_url :
-        Text
-    , kong_app_admin_apikey :
-        Text
-    , services :
-        List Service
-    }
diff --git a/dhall/server/functions.dhall b/dhall/server/functions.dhall
deleted file mode 100644 (file)
index 2775fb9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{ Service = ./service/functions.dhall, mkServer = ./mkServer.dhall }
diff --git a/dhall/server/mkServer.dhall b/dhall/server/mkServer.dhall
deleted file mode 100644 (file)
index f02055b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-    let Server = ./Server.dhall
-
-in  let Service = ./service/Service.dhall
-
-in  let Vault = ./../Vault.dhall
-
-in    λ(vault : Vault)
-    → λ(adminUrl : Text)
-    → λ(services : List Service)
-    →   { kong_app_admin_url =
-            adminUrl
-        , kong_app_admin_apikey =
-            vault.appAdminApiKey
-        , services =
-            services
-        }
-      : Server
diff --git a/dhall/server/package.dhall b/dhall/server/package.dhall
new file mode 100644 (file)
index 0000000..e9e398c
--- /dev/null
@@ -0,0 +1,21 @@
+let Service = ./service/package.dhall
+
+let Server =
+      { kong_app_admin_url : Text
+      , kong_app_admin_apikey : Text
+      , services : List Service.Type
+      }
+
+let Vault = ./../Vault.dhall
+
+let mkServer =
+        λ(vault : Vault)
+      → λ(adminUrl : Text)
+      → λ(services : List Service.Type)
+      →   { kong_app_admin_url = adminUrl
+          , kong_app_admin_apikey = vault.appAdminApiKey
+          , services = services
+          }
+        : Server
+
+in  { Service = Service, Type = Server, mkServer = mkServer }
index f238553966a23b591310c42b126f9943f982fa07..7fb1ef4260ec7d166fa703b1c34bb2f2dfc493ac 100644 (file)
@@ -1,5 +1,5 @@
-    let Plugin = ./plugin/Plugin.dhall
+let Plugin = ./plugin/Plugin.dhall
 
-in  let Route = ./route/Route.dhall
+let Route = ./Route.dhall
 
 in  { name : Text, url : Text, plugins : List Plugin, routes : List Route }
diff --git a/dhall/server/service/functions.dhall b/dhall/server/service/functions.dhall
deleted file mode 100644 (file)
index 08f25c0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{ Plugin = ./plugin/functions.dhall }
diff --git a/dhall/server/service/package.dhall b/dhall/server/service/package.dhall
new file mode 100644 (file)
index 0000000..05bbe37
--- /dev/null
@@ -0,0 +1,12 @@
+let Plugin = ./plugin/package.dhall
+
+let Route = ./Route.dhall
+
+let Service =
+      { name : Text
+      , url : Text
+      , plugins : List Plugin.Type
+      , routes : List Route
+      }
+
+in  { Type = Service, Route = Route, Plugin = Plugin }
diff --git a/dhall/server/service/plugin/CorrelationId.dhall b/dhall/server/service/plugin/CorrelationId.dhall
deleted file mode 100644 (file)
index fc69f4f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-let Plugin = ./Plugin.dhall
-
-let config = ./Config.dhall
-
-in    λ(generator : Optional Text)
-       →   { name =
-                       "correlation-id"
-               , config =
-                       config.CorrelationId
-                       { header_name =
-                               "X-correl"
-                       , echo_downstream =
-                               True
-                       , generator =
-                               Optional/fold
-                               Text
-                               generator
-                               Text
-                               (λ(t : Text) → t)
-                               "uuid#counter"
-                       }
-               }
-         : Plugin
diff --git a/dhall/server/service/plugin/correlationId.dhall b/dhall/server/service/plugin/correlationId.dhall
new file mode 100644 (file)
index 0000000..d5d5928
--- /dev/null
@@ -0,0 +1,23 @@
+let Plugin = ./Plugin.dhall
+
+let config = ./Config.dhall
+
+in    λ(generator : Optional Text)
+    →   { name =
+            "correlation-id"
+        , config =
+            config.CorrelationId
+            { header_name =
+                "X-correl"
+            , echo_downstream =
+                True
+            , generator =
+                Optional/fold
+                Text
+                generator
+                Text
+                (λ(t : Text) → t)
+                "uuid#counter"
+            }
+        }
+      : Plugin
diff --git a/dhall/server/service/plugin/functions.dhall b/dhall/server/service/plugin/functions.dhall
deleted file mode 100644 (file)
index dcf2c9a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{ mkRequestTermination =
-    ./mkRequestTermination.dhall
-, mkRequestTransformer =
-    ./mkRequestTransformer.dhall
-, mkIPRestriction =
-    ./mkIPRestriction.dhall
-, CorrelationId =
-    ./CorrelationId.dhall
-}
diff --git a/dhall/server/service/plugin/package.dhall b/dhall/server/service/plugin/package.dhall
new file mode 100644 (file)
index 0000000..872c53b
--- /dev/null
@@ -0,0 +1,6 @@
+{ Type = ./Plugin.dhall
+, mkRequestTermination = ./mkRequestTermination.dhall
+, mkRequestTransformer = ./mkRequestTransformer.dhall
+, mkIPRestriction = ./mkIPRestriction.dhall
+, correlationId = ./correlationId.dhall
+}