aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorClement Delafargue <clement.delafargue@fretlink.com>2019-10-03 11:31:56 +0200
committerClement Delafargue <clement.delafargue@fretlink.com>2019-10-03 11:31:56 +0200
commit25bf64cbc9a8ed4fef36c15756f9d7f8e96e2d06 (patch)
treed6ffd754b83687e45db23522aa8273218071732e
parentcfcebcd5f0c7a99ab60de773e67e7ee35e8b0f0a (diff)
downloadansible-kong-app-polykinds.tar.gz
ansible-kong-app-polykinds.tar.zst
ansible-kong-app-polykinds.zip
upgrade dhall to 1.26.1 and merge types and termspolykinds
Previously, types were flattened and terms were nested (as are the directories). For consistency, I made the types nested as well.
-rw-r--r--.travis.yml2
-rw-r--r--dhall-1.26.1.nix (renamed from dhall-1.21.0.nix)2
-rw-r--r--dhall/.gitignore1
-rw-r--r--dhall/Config.dhall3
-rw-r--r--dhall/package.dhall4
-rw-r--r--dhall/server/Server.dhall9
-rw-r--r--dhall/server/functions.dhall1
-rw-r--r--dhall/server/mkServer.dhall17
-rw-r--r--dhall/server/package.dhall21
-rw-r--r--dhall/server/service/Route.dhall (renamed from dhall/server/service/route/Route.dhall)0
-rw-r--r--dhall/server/service/Service.dhall4
-rw-r--r--dhall/server/service/functions.dhall1
-rw-r--r--dhall/server/service/package.dhall12
-rw-r--r--dhall/server/service/plugin/CorrelationId.dhall23
-rw-r--r--dhall/server/service/plugin/correlationId.dhall23
-rw-r--r--dhall/server/service/plugin/functions.dhall9
-rw-r--r--dhall/server/service/plugin/package.dhall6
17 files changed, 73 insertions, 65 deletions
diff --git a/.travis.yml b/.travis.yml
index 029c1a9..7bf8ed8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,7 +7,7 @@ sudo: false
7install: 7install:
8 # Install ansible 8 # Install ansible
9 - nix-env -i python2.7-ansible python2.7-ansible-lint 9 - nix-env -i python2.7-ansible python2.7-ansible-lint
10 - nix-env -if ./dhall-1.21.0.nix 10 - nix-env -if ./dhall-1.26.1.nix
11 11
12 # Check ansible version 12 # Check ansible version
13 - ansible --version 13 - ansible --version
diff --git a/dhall-1.21.0.nix b/dhall-1.26.1.nix
index e53369b..918a528 100644
--- a/dhall-1.21.0.nix
+++ b/dhall-1.26.1.nix
@@ -19,4 +19,4 @@ let
19 ''; 19 '';
20 }; 20 };
21in 21in
22 mkVersion "1.21.0" "0x7q6v1y62fq6724kx1hcfp1fcqv3lbv33ji6jzfd5y316a31r77" 22 mkVersion "1.26.1" "0sl4r3mfairgd6kn26hs1r1lkh8rn992grd73078rhqf5w90ag05"
diff --git a/dhall/.gitignore b/dhall/.gitignore
new file mode 100644
index 0000000..8f5fd87
--- /dev/null
+++ b/dhall/.gitignore
@@ -0,0 +1 @@
.history
diff --git a/dhall/Config.dhall b/dhall/Config.dhall
index f1a28fc..dad94f9 100644
--- a/dhall/Config.dhall
+++ b/dhall/Config.dhall
@@ -1 +1,2 @@
1let Server = ./server/Server.dhall in { kong_servers : List Server } 1let Server = ./server/package.dhall in { kong_servers : List Server.Type }
2
diff --git a/dhall/package.dhall b/dhall/package.dhall
new file mode 100644
index 0000000..53461ae
--- /dev/null
+++ b/dhall/package.dhall
@@ -0,0 +1,4 @@
1{ Vault = ./Vault.dhall
2, Config = ./Config.dhall
3, Server = ./server/package.dhall
4}
diff --git a/dhall/server/Server.dhall b/dhall/server/Server.dhall
deleted file mode 100644
index beddd7d..0000000
--- a/dhall/server/Server.dhall
+++ /dev/null
@@ -1,9 +0,0 @@
1 let Service = ./service/Service.dhall
2
3in { kong_app_admin_url :
4 Text
5 , kong_app_admin_apikey :
6 Text
7 , services :
8 List Service
9 }
diff --git a/dhall/server/functions.dhall b/dhall/server/functions.dhall
deleted file mode 100644
index 2775fb9..0000000
--- a/dhall/server/functions.dhall
+++ /dev/null
@@ -1 +0,0 @@
1{ Service = ./service/functions.dhall, mkServer = ./mkServer.dhall }
diff --git a/dhall/server/mkServer.dhall b/dhall/server/mkServer.dhall
deleted file mode 100644
index f02055b..0000000
--- a/dhall/server/mkServer.dhall
+++ /dev/null
@@ -1,17 +0,0 @@
1 let Server = ./Server.dhall
2
3in let Service = ./service/Service.dhall
4
5in let Vault = ./../Vault.dhall
6
7in λ(vault : Vault)
8 → λ(adminUrl : Text)
9 → λ(services : List Service)
10 → { kong_app_admin_url =
11 adminUrl
12 , kong_app_admin_apikey =
13 vault.appAdminApiKey
14 , services =
15 services
16 }
17 : Server
diff --git a/dhall/server/package.dhall b/dhall/server/package.dhall
new file mode 100644
index 0000000..e9e398c
--- /dev/null
+++ b/dhall/server/package.dhall
@@ -0,0 +1,21 @@
1let Service = ./service/package.dhall
2
3let Server =
4 { kong_app_admin_url : Text
5 , kong_app_admin_apikey : Text
6 , services : List Service.Type
7 }
8
9let Vault = ./../Vault.dhall
10
11let mkServer =
12 λ(vault : Vault)
13 → λ(adminUrl : Text)
14 → λ(services : List Service.Type)
15 → { kong_app_admin_url = adminUrl
16 , kong_app_admin_apikey = vault.appAdminApiKey
17 , services = services
18 }
19 : Server
20
21in { Service = Service, Type = Server, mkServer = mkServer }
diff --git a/dhall/server/service/route/Route.dhall b/dhall/server/service/Route.dhall
index c0fa1a9..c0fa1a9 100644
--- a/dhall/server/service/route/Route.dhall
+++ b/dhall/server/service/Route.dhall
diff --git a/dhall/server/service/Service.dhall b/dhall/server/service/Service.dhall
index f238553..7fb1ef4 100644
--- a/dhall/server/service/Service.dhall
+++ b/dhall/server/service/Service.dhall
@@ -1,5 +1,5 @@
1 let Plugin = ./plugin/Plugin.dhall 1let Plugin = ./plugin/Plugin.dhall
2 2
3in let Route = ./route/Route.dhall 3let Route = ./Route.dhall
4 4
5in { name : Text, url : Text, plugins : List Plugin, routes : List Route } 5in { 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
index 08f25c0..0000000
--- a/dhall/server/service/functions.dhall
+++ /dev/null
@@ -1 +0,0 @@
1{ Plugin = ./plugin/functions.dhall }
diff --git a/dhall/server/service/package.dhall b/dhall/server/service/package.dhall
new file mode 100644
index 0000000..05bbe37
--- /dev/null
+++ b/dhall/server/service/package.dhall
@@ -0,0 +1,12 @@
1let Plugin = ./plugin/package.dhall
2
3let Route = ./Route.dhall
4
5let Service =
6 { name : Text
7 , url : Text
8 , plugins : List Plugin.Type
9 , routes : List Route
10 }
11
12in { 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
index fc69f4f..0000000
--- a/dhall/server/service/plugin/CorrelationId.dhall
+++ /dev/null
@@ -1,23 +0,0 @@
1let Plugin = ./Plugin.dhall
2
3let config = ./Config.dhall
4
5in λ(generator : Optional Text)
6 → { name =
7 "correlation-id"
8 , config =
9 config.CorrelationId
10 { header_name =
11 "X-correl"
12 , echo_downstream =
13 True
14 , generator =
15 Optional/fold
16 Text
17 generator
18 Text
19 (λ(t : Text) → t)
20 "uuid#counter"
21 }
22 }
23 : Plugin
diff --git a/dhall/server/service/plugin/correlationId.dhall b/dhall/server/service/plugin/correlationId.dhall
new file mode 100644
index 0000000..d5d5928
--- /dev/null
+++ b/dhall/server/service/plugin/correlationId.dhall
@@ -0,0 +1,23 @@
1let Plugin = ./Plugin.dhall
2
3let config = ./Config.dhall
4
5in λ(generator : Optional Text)
6 → { name =
7 "correlation-id"
8 , config =
9 config.CorrelationId
10 { header_name =
11 "X-correl"
12 , echo_downstream =
13 True
14 , generator =
15 Optional/fold
16 Text
17 generator
18 Text
19 (λ(t : Text) → t)
20 "uuid#counter"
21 }
22 }
23 : Plugin
diff --git a/dhall/server/service/plugin/functions.dhall b/dhall/server/service/plugin/functions.dhall
deleted file mode 100644
index dcf2c9a..0000000
--- a/dhall/server/service/plugin/functions.dhall
+++ /dev/null
@@ -1,9 +0,0 @@
1{ mkRequestTermination =
2 ./mkRequestTermination.dhall
3, mkRequestTransformer =
4 ./mkRequestTransformer.dhall
5, mkIPRestriction =
6 ./mkIPRestriction.dhall
7, CorrelationId =
8 ./CorrelationId.dhall
9}
diff --git a/dhall/server/service/plugin/package.dhall b/dhall/server/service/plugin/package.dhall
new file mode 100644
index 0000000..872c53b
--- /dev/null
+++ b/dhall/server/service/plugin/package.dhall
@@ -0,0 +1,6 @@
1{ Type = ./Plugin.dhall
2, mkRequestTermination = ./mkRequestTermination.dhall
3, mkRequestTransformer = ./mkRequestTransformer.dhall
4, mkIPRestriction = ./mkIPRestriction.dhall
5, correlationId = ./correlationId.dhall
6}