diff options
author | Clément Delafargue <39330590+clementd-fretlink@users.noreply.github.com> | 2019-10-07 09:55:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-07 09:55:50 +0200 |
commit | 027a2fa61a6044b2e967b29195312e4d98a96078 (patch) | |
tree | d6ffd754b83687e45db23522aa8273218071732e /dhall | |
parent | cfcebcd5f0c7a99ab60de773e67e7ee35e8b0f0a (diff) | |
parent | 25bf64cbc9a8ed4fef36c15756f9d7f8e96e2d06 (diff) | |
download | ansible-kong-app-0.20.tar.gz ansible-kong-app-0.20.tar.zst ansible-kong-app-0.20.zip |
Merge pull request #17 from clementd-fretlink/polykindsv0.20
upgrade dhall to 1.26.1 and merge types and terms
Diffstat (limited to 'dhall')
-rw-r--r-- | dhall/.gitignore | 1 | ||||
-rw-r--r-- | dhall/Config.dhall | 3 | ||||
-rw-r--r-- | dhall/package.dhall | 4 | ||||
-rw-r--r-- | dhall/server/Server.dhall | 9 | ||||
-rw-r--r-- | dhall/server/functions.dhall | 1 | ||||
-rw-r--r-- | dhall/server/mkServer.dhall | 17 | ||||
-rw-r--r-- | dhall/server/package.dhall | 21 | ||||
-rw-r--r-- | dhall/server/service/Route.dhall (renamed from dhall/server/service/route/Route.dhall) | 0 | ||||
-rw-r--r-- | dhall/server/service/Service.dhall | 4 | ||||
-rw-r--r-- | dhall/server/service/functions.dhall | 1 | ||||
-rw-r--r-- | dhall/server/service/package.dhall | 12 | ||||
-rw-r--r-- | dhall/server/service/plugin/CorrelationId.dhall | 23 | ||||
-rw-r--r-- | dhall/server/service/plugin/correlationId.dhall | 23 | ||||
-rw-r--r-- | dhall/server/service/plugin/functions.dhall | 9 | ||||
-rw-r--r-- | dhall/server/service/plugin/package.dhall | 6 |
15 files changed, 71 insertions, 63 deletions
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 @@ | |||
1 | let Server = ./server/Server.dhall in { kong_servers : List Server } | 1 | let 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 | |||
3 | in { 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 | |||
3 | in let Service = ./service/Service.dhall | ||
4 | |||
5 | in let Vault = ./../Vault.dhall | ||
6 | |||
7 | in λ(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 @@ | |||
1 | let Service = ./service/package.dhall | ||
2 | |||
3 | let Server = | ||
4 | { kong_app_admin_url : Text | ||
5 | , kong_app_admin_apikey : Text | ||
6 | , services : List Service.Type | ||
7 | } | ||
8 | |||
9 | let Vault = ./../Vault.dhall | ||
10 | |||
11 | let 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 | |||
21 | in { 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 | 1 | let Plugin = ./plugin/Plugin.dhall |
2 | 2 | ||
3 | in let Route = ./route/Route.dhall | 3 | let Route = ./Route.dhall |
4 | 4 | ||
5 | in { name : Text, url : Text, plugins : List Plugin, routes : List Route } | 5 | 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 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 @@ | |||
1 | let Plugin = ./plugin/package.dhall | ||
2 | |||
3 | let Route = ./Route.dhall | ||
4 | |||
5 | let Service = | ||
6 | { name : Text | ||
7 | , url : Text | ||
8 | , plugins : List Plugin.Type | ||
9 | , routes : List Route | ||
10 | } | ||
11 | |||
12 | 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 index fc69f4f..0000000 --- a/dhall/server/service/plugin/CorrelationId.dhall +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | let Plugin = ./Plugin.dhall | ||
2 | |||
3 | let config = ./Config.dhall | ||
4 | |||
5 | in λ(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 @@ | |||
1 | let Plugin = ./Plugin.dhall | ||
2 | |||
3 | let config = ./Config.dhall | ||
4 | |||
5 | in λ(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 | } | ||