aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--dhall-1.18.0.nix16
-rw-r--r--dhall-1.21.0.nix22
-rw-r--r--dhall/server/service/plugin/CorrelationId.dhall16
-rw-r--r--dhall/server/service/plugin/mkIPRestriction.dhall16
-rw-r--r--dhall/server/service/plugin/mkRequestTermination.dhall34
-rw-r--r--dhall/server/service/plugin/mkRequestTransformer.dhall16
7 files changed, 64 insertions, 58 deletions
diff --git a/.travis.yml b/.travis.yml
index f18b9b3..029c1a9 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.18.0.nix 10 - nix-env -if ./dhall-1.21.0.nix
11 11
12 # Check ansible version 12 # Check ansible version
13 - ansible --version 13 - ansible --version
diff --git a/dhall-1.18.0.nix b/dhall-1.18.0.nix
deleted file mode 100644
index d6522bd..0000000
--- a/dhall-1.18.0.nix
+++ /dev/null
@@ -1,16 +0,0 @@
1{ pkgs ? import <nixpkgs> {} }: with pkgs;
2
3stdenv.mkDerivation rec {
4 name = "dhall-${version}";
5 version = "1.18.0";
6 phases = [ "installPhase "];
7 src = fetchurl {
8 url = "https://github.com/dhall-lang/dhall-haskell/releases/download/${version}/dhall-${version}-x86_64-linux.tar.bz2";
9 sha256 = "0jvw6ss96xifb21mzpvfjzvaffcnpj0jhpc4rd36cl2r22800qgx";
10 };
11 installPhase = ''
12 mkdir -p $out/bin
13 tar -xjf $src
14 mv bin/dhall $out/bin/
15 '';
16}
diff --git a/dhall-1.21.0.nix b/dhall-1.21.0.nix
new file mode 100644
index 0000000..e53369b
--- /dev/null
+++ b/dhall-1.21.0.nix
@@ -0,0 +1,22 @@
1{ pkgs ? import <nixpkgs> {} }: with pkgs;
2
3let
4 mkVersion =
5 version: sha256:
6 stdenv.mkDerivation {
7 name = "dhall-${version}";
8 inherit version;
9 src = fetchurl {
10 url = "https://github.com/dhall-lang/dhall-haskell/releases/download/${version}/dhall-${version}-x86_64-linux.tar.bz2";
11 inherit sha256;
12 };
13 unpackPhase = ''
14 tar -xjf $src
15 '';
16 installPhase = ''
17 mkdir -p $out/bin
18 mv bin/dhall $out/bin/
19 '';
20 };
21in
22 mkVersion "1.21.0" "0x7q6v1y62fq6724kx1hcfp1fcqv3lbv33ji6jzfd5y316a31r77"
diff --git a/dhall/server/service/plugin/CorrelationId.dhall b/dhall/server/service/plugin/CorrelationId.dhall
index d96bfc9..655cd8d 100644
--- a/dhall/server/service/plugin/CorrelationId.dhall
+++ b/dhall/server/service/plugin/CorrelationId.dhall
@@ -1,11 +1,11 @@
1 let Plugin = ./Plugin.dhall 1let Plugin = ./Plugin.dhall
2 2
3in let config = constructors ./Config.dhall 3let config = ./Config.dhall
4 4
5in { name = 5in { name =
6 "correlation-id" 6 "correlation-id"
7 , config = 7 , config =
8 config.CorrelationId 8 config.CorrelationId
9 { header_name = "X-correl", echo_downstream = True } 9 { header_name = "X-correl", echo_downstream = True }
10 } 10 }
11 : Plugin 11 : Plugin
diff --git a/dhall/server/service/plugin/mkIPRestriction.dhall b/dhall/server/service/plugin/mkIPRestriction.dhall
index f803769..a27e5d9 100644
--- a/dhall/server/service/plugin/mkIPRestriction.dhall
+++ b/dhall/server/service/plugin/mkIPRestriction.dhall
@@ -1,11 +1,11 @@
1 let Plugin = ./Plugin.dhall 1let Plugin = ./Plugin.dhall
2 2
3in let config = constructors ./Config.dhall 3let config = ./Config.dhall
4 4
5in λ(whiteList : Text) 5in λ(whiteList : Text)
6 → { name = 6 → { name =
7 "ip-restriction" 7 "ip-restriction"
8 , config = 8 , config =
9 config.IPRestriction { whitelist = whiteList } 9 config.IPRestriction { whitelist = whiteList }
10 } 10 }
11 : Plugin 11 : Plugin
diff --git a/dhall/server/service/plugin/mkRequestTermination.dhall b/dhall/server/service/plugin/mkRequestTermination.dhall
index aff538f..1d047d7 100644
--- a/dhall/server/service/plugin/mkRequestTermination.dhall
+++ b/dhall/server/service/plugin/mkRequestTermination.dhall
@@ -1,20 +1,20 @@
1 let Plugin = ./Plugin.dhall 1let Plugin = ./Plugin.dhall
2 2
3in let config = constructors ./Config.dhall 3let config = ./Config.dhall
4 4
5in λ(statusCode : Natural) 5in λ(statusCode : Natural)
6 → λ(contentType : Text) 6 → λ(contentType : Text)
7 → λ(body : Text) 7 → λ(body : Text)
8 → { name = 8 → { name =
9 "request-termination" 9 "request-termination"
10 , config = 10 , config =
11 config.RequestTermination 11 config.RequestTermination
12 { status_code = 12 { status_code =
13 statusCode 13 statusCode
14 , content_type = 14 , content_type =
15 contentType 15 contentType
16 , body = 16 , body =
17 body 17 body
18 } 18 }
19 } 19 }
20 : Plugin 20 : Plugin
diff --git a/dhall/server/service/plugin/mkRequestTransformer.dhall b/dhall/server/service/plugin/mkRequestTransformer.dhall
index 1d8d608..488ecdd 100644
--- a/dhall/server/service/plugin/mkRequestTransformer.dhall
+++ b/dhall/server/service/plugin/mkRequestTransformer.dhall
@@ -1,11 +1,11 @@
1let Plugin = ./Plugin.dhall 1let Plugin = ./Plugin.dhall
2 2
3in let config = constructors ./Config.dhall 3let config = ./Config.dhall
4 4
5 in λ(header : Text) 5in λ(header : Text)
6 → { name = 6 → { name =
7 "request-transformer" 7 "request-transformer"
8 , config = 8 , config =
9 config.RequestTransformer { add = { headers = [ header ] } } 9 config.RequestTransformer { add = { headers = [ header ] } }
10 } 10 }
11 : Plugin \ No newline at end of file 11 : Plugin