├── .gitignore ├── .gitmodules ├── .projectile ├── LICENSE ├── README.md ├── bin ├── ci.appshop ├── ci.common └── update-versions.sh ├── boris-git.toml ├── boris.toml ├── doc └── RepresentingPaths.md ├── framework ├── Setup.hs ├── ghci ├── mafia ├── master-with-test.toml └── master.toml ├── mismi-autoscaling-core ├── .ghci ├── LICENSE ├── ambiata-mismi-autoscaling-core.cabal ├── ambiata-mismi-autoscaling-core.lock-7.10.2 ├── ambiata-mismi-autoscaling-core.lock-8.0.2 ├── mafia ├── master.toml ├── src │ └── Mismi │ │ └── Autoscaling │ │ └── Core │ │ └── Data.hs └── test │ ├── Test │ └── Mismi │ │ └── Autoscaling │ │ └── Core │ │ ├── Arbitrary.hs │ │ └── Data.hs │ ├── ambiata-mismi-autoscaling-core-test.cabal │ ├── ambiata-mismi-autoscaling-core-test.lock-7.10.2 │ └── test.hs ├── mismi-autoscaling ├── .ghci ├── LICENSE ├── README.md ├── ambiata-mismi-autoscaling.cabal ├── ambiata-mismi-autoscaling.lock-7.10.2 ├── ambiata-mismi-autoscaling.lock-8.0.2 ├── ambiata-mismi-autoscaling.submodules ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── Autoscaling.hs │ │ └── Autoscaling │ │ ├── Amazonka.hs │ │ ├── Commands.hs │ │ ├── Data.hs │ │ └── Error.hs └── test │ ├── Test │ ├── IO │ │ └── Mismi │ │ │ └── Autoscaling │ │ │ └── Commands.hs │ └── Mismi │ │ └── Autoscaling │ │ ├── Control.hs │ │ └── Data.hs │ ├── ambiata-mismi-autoscaling-test.cabal │ ├── ambiata-mismi-autoscaling-test.lock-7.10.2 │ ├── ambiata-mismi-autoscaling-test.submodules │ ├── test-io.hs │ └── test.hs ├── mismi-cli ├── .ghci ├── LICENSE ├── Setup.hs ├── _s3.zsh ├── ambiata-mismi-cli.cabal ├── ambiata-mismi-cli.lock-7.10.2 ├── ambiata-mismi-cli.lock-8.0.2 ├── mafia ├── main │ └── s3.hs ├── master.toml ├── s3-completion.bash └── test │ ├── cli │ ├── core │ │ └── runner.sh │ ├── exit │ │ └── run │ ├── sync │ │ └── run │ ├── usage │ │ ├── expected │ │ └── run │ └── work │ │ └── run │ └── test-cli.hs ├── mismi-cloudwatch-logs ├── LICENSE ├── ambiata-mismi-cloudwatch-logs.cabal ├── ambiata-mismi-cloudwatch-logs.lock-7.10.2 ├── ambiata-mismi-cloudwatch-logs.lock-8.0.2 ├── ambiata-mismi-cloudwatch-logs.submodules ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── CloudwatchLogs.hs │ │ └── CloudwatchLogs │ │ └── Amazonka.hs └── test │ ├── ambiata-mismi-cloudwatch-logs-test.cabal │ ├── ambiata-mismi-cloudwatch-logs-test.submodules │ └── test.hs ├── mismi-cloudwatch ├── .ghci ├── LICENSE ├── ambiata-mismi-cloudwatch.cabal ├── ambiata-mismi-cloudwatch.lock-7.10.2 ├── ambiata-mismi-cloudwatch.lock-8.0.2 ├── ambiata-mismi-cloudwatch.submodules ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── Cloudwatch.hs │ │ └── Cloudwatch │ │ └── Amazonka.hs └── test │ ├── ambiata-mismi-cloudwatch-test.cabal │ ├── ambiata-mismi-cloudwatch-test.submodules │ └── test.hs ├── mismi-core ├── .ghci ├── LICENSE ├── ambiata-mismi-core.cabal ├── ambiata-mismi-core.lock-7.10.2 ├── ambiata-mismi-core.lock-8.0.2 ├── mafia ├── master.toml ├── src │ ├── Mismi.hs │ └── Mismi │ │ ├── Amazonka.hs │ │ ├── Control.hs │ │ ├── Data.hs │ │ └── Environment.hs └── test │ ├── Test │ ├── Mismi.hs │ └── Mismi │ │ ├── Arbitrary.hs │ │ ├── Control.hs │ │ └── Data.hs │ ├── ambiata-mismi-core-test.cabal │ ├── ambiata-mismi-core-test.lock-7.10.2 │ ├── ambiata-mismi-core-test.submodules │ └── test.hs ├── mismi-dynamodb ├── .ghci ├── LICENSE ├── ambiata-mismi-dynamodb.cabal ├── ambiata-mismi-dynamodb.lock-7.10.2 ├── mafia ├── master.toml └── src │ └── Mismi │ └── DynamoDB │ ├── Amazonka.hs │ └── Control.hs ├── mismi-ec2-core ├── .ghci ├── .gitignore ├── LICENSE ├── ambiata-mismi-ec2-core.cabal ├── ambiata-mismi-ec2-core.lock-7.10.2 ├── ambiata-mismi-ec2-core.lock-8.0.2 ├── mafia ├── master.toml ├── scripts │ ├── .gitignore │ ├── gen-ec2-core.sh │ ├── gen-ec2.sh │ ├── gen.sh │ └── generate-storage.py ├── src │ └── Mismi │ │ └── EC2 │ │ └── Core │ │ ├── Data.hs │ │ ├── Device.hs │ │ ├── Ec2Types.hs │ │ ├── InstTypeToZone.hs │ │ └── MismiTypes.hs └── test │ ├── Test │ └── Mismi │ │ └── EC2 │ │ └── Core │ │ ├── Arbitrary.hs │ │ └── Data.hs │ ├── ambiata-mismi-ec2-core-test.cabal │ └── test.hs ├── mismi-ec2 ├── .ghci ├── LICENSE ├── ambiata-mismi-ec2.cabal ├── ambiata-mismi-ec2.lock-7.10.2 ├── ambiata-mismi-ec2.lock-8.0.2 ├── ambiata-mismi-ec2.submodules ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── EC2.hs │ │ └── EC2 │ │ ├── Amazonka.hs │ │ ├── Commands.hs │ │ ├── Data.hs │ │ └── Metadata.hs └── test │ ├── Test │ ├── IO │ │ └── Mismi │ │ │ └── EC2 │ │ │ └── Commands.hs │ └── Mismi │ │ └── EC2 │ │ └── Data.hs │ ├── ambiata-mismi-ec2-test.submodules │ ├── test-io.hs │ └── test.hs ├── mismi-elb ├── LICENSE ├── ambiata-mismi-elb.cabal ├── ambiata-mismi-elb.lock-7.10.2 ├── ambiata-mismi-elb.lock-8.0.2 ├── ambiata-mismi-elb.submodules ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── ELB.hs │ │ └── ELB │ │ └── Amazonka.hs └── test │ ├── ambiata-mismi-elb-test.cabal │ ├── ambiata-mismi-elb-test.submodules │ └── test.hs ├── mismi-emr ├── LICENSE ├── ambiata-mismi-emr.cabal ├── ambiata-mismi-emr.lock-7.10.2 ├── ambiata-mismi-emr.lock-8.0.2 ├── ambiata-mismi-emr.submodules ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── EMR.hs │ │ └── EMR │ │ └── Amazonka.hs └── test │ ├── ambiata-mismi-emr-test.cabal │ ├── ambiata-mismi-emr-test.submodules │ └── test.hs ├── mismi-iam-core ├── .ghci ├── LICENSE ├── ambiata-mismi-iam-core.cabal ├── ambiata-mismi-iam-core.lock-7.10.2 ├── ambiata-mismi-iam-core.lock-8.0.2 ├── mafia ├── master.toml └── src │ └── Mismi │ └── IAM │ └── Core │ └── Data.hs ├── mismi-iam ├── .ghci ├── LICENSE ├── ambiata-mismi-iam.cabal ├── ambiata-mismi-iam.lock-7.10.2 ├── ambiata-mismi-iam.lock-8.0.2 ├── ambiata-mismi-iam.submodules ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── IAM.hs │ │ └── IAM │ │ └── Amazonka.hs └── test │ ├── ambiata-mismi-iam-test.cabal │ ├── ambiata-mismi-iam-test.submodules │ └── test.hs ├── mismi-kernel ├── .ghci ├── LICENSE ├── ambiata-mismi-kernel.cabal ├── ambiata-mismi-kernel.lock-7.10.2 ├── ambiata-mismi-kernel.lock-8.0.2 ├── mafia ├── master.toml ├── src │ └── Mismi │ │ └── Kernel │ │ └── Data.hs └── test │ ├── Test │ └── Mismi │ │ └── Kernel │ │ ├── Arbitrary.hs │ │ └── Data.hs │ ├── ambiata-mismi-kernel-test.cabal │ └── test.hs ├── mismi-openssl ├── .ghci ├── LICENSE ├── ambiata-mismi-openssl.cabal ├── ambiata-mismi-openssl.lock-7.10.2 ├── ambiata-mismi-openssl.lock-8.0.2 ├── mafia ├── master.toml └── src │ └── Mismi │ ├── OpenSSL.hs │ └── OpenSSL │ ├── Control.hs │ └── Environment.hs ├── mismi-rds-core ├── .ghci ├── LICENSE ├── ambiata-mismi-rds-core.cabal ├── ambiata-mismi-rds-core.lock-7.10.2 ├── ambiata-mismi-rds-core.lock-8.0.2 ├── mafia ├── master.toml ├── src │ └── Mismi │ │ └── RDS │ │ └── Core │ │ └── Data.hs └── test │ └── test.hs ├── mismi-rds ├── .ghci ├── LICENSE ├── ambiata-mismi-rds.cabal ├── ambiata-mismi-rds.lock-7.10.2 ├── ambiata-mismi-rds.lock-8.0.2 ├── ambiata-mismi-rds.submodules ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── RDS.hs │ │ └── RDS │ │ └── Amazonka.hs └── test │ ├── ambiata-mismi-rds-test.cabal │ ├── ambiata-mismi-rds-test.submodules │ └── test.hs ├── mismi-s3-core ├── .ghci ├── LICENSE ├── ambiata-mismi-s3-core.cabal ├── ambiata-mismi-s3-core.lock-7.10.2 ├── ambiata-mismi-s3-core.lock-8.0.2 ├── mafia ├── master.toml ├── src │ └── Mismi │ │ └── S3 │ │ └── Core │ │ └── Data.hs └── test │ ├── Test │ └── Mismi │ │ └── S3 │ │ └── Core │ │ ├── Arbitrary.hs │ │ └── Data.hs │ ├── ambiata-mismi-s3-core-test.cabal │ └── test.hs ├── mismi-s3 ├── .ghci ├── LICENSE ├── ambiata-mismi-s3.cabal ├── ambiata-mismi-s3.lock-7.10.2 ├── ambiata-mismi-s3.lock-8.0.2 ├── ambiata-mismi-s3.submodules ├── doc │ └── benchmarks.md ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── S3.hs │ │ └── S3 │ │ ├── Amazonka.hs │ │ ├── Commands.hs │ │ ├── Data.hs │ │ ├── Internal.hs │ │ └── Patch │ │ ├── Network.hs │ │ └── PutObjectACL.hs └── test │ ├── Test │ ├── IO │ │ └── Mismi │ │ │ └── S3 │ │ │ ├── Commands.hs │ │ │ └── Internal.hs │ ├── Mismi │ │ ├── Amazonka.hs │ │ ├── S3.hs │ │ └── S3 │ │ │ ├── Arbitrary.hs │ │ │ ├── Commands.hs │ │ │ ├── Control.hs │ │ │ └── Internal.hs │ └── Reliability │ │ ├── Mismi │ │ └── S3 │ │ │ └── Commands.hs │ │ └── Reliability.hs │ ├── ambiata-mismi-s3-test.cabal │ ├── ambiata-mismi-s3-test.lock-7.10.2 │ ├── bench.hs │ ├── test-io.hs │ ├── test-reliability.hs │ └── test.hs ├── mismi-sqs-core ├── .ghci ├── LICENSE ├── ambiata-mismi-sqs-core.cabal ├── ambiata-mismi-sqs-core.lock-7.10.2 ├── ambiata-mismi-sqs-core.lock-8.0.2 ├── mafia ├── master.toml ├── src │ └── Mismi │ │ └── SQS │ │ └── Core │ │ └── Data.hs └── test │ ├── Test │ └── Mismi │ │ └── SQS │ │ └── Core │ │ └── Arbitrary.hs │ ├── ambiata-mismi-sqs-core-test.cabal │ └── test.hs ├── mismi-sqs ├── .ghci ├── LICENSE ├── ambiata-mismi-sqs.cabal ├── ambiata-mismi-sqs.lock-7.10.2 ├── ambiata-mismi-sqs.lock-8.0.2 ├── ambiata-mismi-sqs.submodules ├── mafia ├── master.toml ├── src │ └── Mismi │ │ ├── SQS.hs │ │ └── SQS │ │ ├── Amazonka.hs │ │ ├── Commands.hs │ │ └── Data.hs └── test │ ├── Test │ ├── IO │ │ └── Mismi │ │ │ └── SQS │ │ │ ├── Aws │ │ │ └── Commands.hs │ │ │ ├── Commands.hs │ │ │ └── Control.hs │ └── Mismi │ │ ├── SQS.hs │ │ └── SQS │ │ └── Arbitrary.hs │ ├── ambiata-mismi-sqs-test.cabal │ ├── ambiata-mismi-sqs-test.lock-7.10.2 │ ├── test-io.hs │ └── test.hs └── mismi-sts ├── .ghci ├── LICENSE ├── ambiata-mismi-sts.cabal ├── ambiata-mismi-sts.lock-7.10.2 ├── ambiata-mismi-sts.lock-8.0.2 ├── ambiata-mismi-sts.submodules ├── mafia ├── master.toml ├── src └── Mismi │ ├── STS.hs │ └── STS │ └── Amazonka.hs └── test ├── ambiata-mismi-sts-test.cabal ├── ambiata-mismi-sts-test.submodules └── test.hs /.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | dist 3 | cabal-dev 4 | gen 5 | *.o 6 | *.hi 7 | *.chi 8 | *.chs.h 9 | .virthualenv 10 | .cabal-sandbox 11 | cabal.sandbox.config 12 | *tmp 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/p"] 2 | path = lib/p 3 | url = git@github.com:ambiata/p.git 4 | [submodule "lib/disorder"] 5 | path = lib/disorder 6 | url = git@github.com:ambiata/disorder.hs 7 | [submodule "lib/x"] 8 | path = lib/x 9 | url = git@github.com:ambiata/x 10 | [submodule "lib/twine"] 11 | path = lib/twine 12 | url = git@github.com:ambiata/twine 13 | [submodule "lib/amazonka"] 14 | path = lib/amazonka 15 | url = git@github.com:ambiata/amazonka 16 | branch = ambiata 17 | -------------------------------------------------------------------------------- /.projectile: -------------------------------------------------------------------------------- 1 | -/*/dist 2 | -/*/.cabal-sandbox 3 | -/lib 4 | -/.cabal-sandbox 5 | -/dist 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /bin/ci.appshop: -------------------------------------------------------------------------------- 1 | #!/bin/sh -exu 2 | 3 | $(dirname $0)/ci.common mismi-cli 4 | 5 | VERSION=$(cat $(dirname $0)/../mismi-cli/gen/version.txt) 6 | aws s3 --region=ap-southeast-2 cp mismi-cli/dist/build/s3/s3 s3://ambiata-app/s3/$VERSION/s3-$VERSION 7 | aws s3 --region=ap-southeast-2 cp mismi-cli/s3-completion.bash s3://ambiata-app/s3/$VERSION/s3-$VERSION-completion.bash 8 | aws s3 --region=ap-southeast-2 cp mismi-cli/_s3.zsh s3://ambiata-app/s3/$VERSION/_s3-${VERSION}.zsh 9 | -------------------------------------------------------------------------------- /bin/ci.common: -------------------------------------------------------------------------------- 1 | #!/bin/sh -exu 2 | 3 | PROJECT=${1:?"'ci.common' requires a single argument, specifying the mismi sub-project."} 4 | 5 | export LC_COLLATE=en_US.UTF-8 6 | export LANG=en_US.UTF-8 7 | 8 | git submodule init 9 | git submodule sync 10 | git submodule update 11 | 12 | cd $PROJECT 13 | 14 | ./mafia update || exit $? 15 | ./mafia build || exit $? 16 | ./mafia testci || exit $? 17 | -------------------------------------------------------------------------------- /bin/update-versions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | find $(git rev-parse --show-toplevel) -maxdepth 3 -name 'ambiata-mismi-*.cabal' \ 3 | | xargs -n1 \ 4 | sed -i -E "s;^(version: +).*;\1${1};" 5 | -------------------------------------------------------------------------------- /boris-git.toml: -------------------------------------------------------------------------------- 1 | [boris] 2 | version = 1 3 | 4 | [build.dist-*] 5 | git = "refs/heads/master" 6 | 7 | [build.branches-*] 8 | git = "refs/heads/topic/*" 9 | 10 | [build.all-*] 11 | git = "refs/heads/**" 12 | -------------------------------------------------------------------------------- /framework/ghci: -------------------------------------------------------------------------------- 1 | :set prompt "λ> " 2 | :set -Wall 3 | :set -XOverloadedStrings 4 | :set -XScopedTypeVariables 5 | -------------------------------------------------------------------------------- /framework/mafia: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | : ${MAFIA_HOME:=$HOME/.mafia} 4 | : ${MAFIA_VERSIONS:=$MAFIA_HOME/versions} 5 | : ${MAFIA_GIT_URL:="https://github.com/ambiata/mafia"} 6 | : ${MAFIA_GIT_BRANCH:="ambiata"} 7 | 8 | latest_version () { 9 | git ls-remote ${MAFIA_GIT_URL} | grep "refs/heads/$MAFIA_GIT_BRANCH" | cut -f 1 10 | } 11 | 12 | build_version() { 13 | MAFIA_VERSION="$1" 14 | MAFIA_TEMP=$(mktemp -d 2>/dev/null || mktemp -d -t 'exec_mafia') 15 | MAFIA_FILE=mafia-$MAFIA_VERSION 16 | MAFIA_PATH=$MAFIA_VERSIONS/$MAFIA_FILE 17 | mkdir -p $MAFIA_VERSIONS 18 | echo "Building $MAFIA_FILE in $MAFIA_TEMP" 19 | git clone ${MAFIA_GIT_URL} $MAFIA_TEMP 20 | git --git-dir="$MAFIA_TEMP/.git" --work-tree="$MAFIA_TEMP" reset --hard $MAFIA_VERSION || { 21 | echo "mafia version ($MAFIA_VERSION) could not be found." >&2 22 | exit 1 23 | } 24 | (cd "$MAFIA_TEMP" && ./bin/bootstrap) || { 25 | got=$? 26 | echo "mafia version ($MAFIA_VERSION) could not be built." >&2 27 | exit "$got" 28 | } 29 | chmod +x "$MAFIA_TEMP/.cabal-sandbox/bin/mafia" 30 | # Ensure executable is on same file-system so final mv is atomic. 31 | mv -f "$MAFIA_TEMP/.cabal-sandbox/bin/mafia" "$MAFIA_PATH.$$" 32 | mv "$MAFIA_PATH.$$" "$MAFIA_PATH" || { 33 | rm -f "$MAFIA_PATH.$$" 34 | echo "INFO: mafia version ($MAFIA_VERSION) already exists not overiding," >&2 35 | echo "INFO: this is expected if parallel builds of the same version of" >&2 36 | echo "INFO: mafia occur, we are playing by first in, wins." >&2 37 | exit 0 38 | } 39 | } 40 | 41 | enable_version() { 42 | if [ $# -eq 0 ]; then 43 | MAFIA_VERSION="$(latest_version)" 44 | echo "INFO: No explicit mafia version requested installing latest ($MAFIA_VERSION)." >&2 45 | else 46 | MAFIA_VERSION="$1" 47 | fi 48 | [ -x "${MAFIA_VERSIONS}/mafia-$MAFIA_VERSION" ] || build_version "$MAFIA_VERSION" 49 | ln -sf "${MAFIA_VERSIONS}/mafia-$MAFIA_VERSION" "${MAFIA_VERSIONS}/mafia" 50 | } 51 | 52 | exec_mafia () { 53 | [ -x "${MAFIA_VERSIONS}/mafia" ] || enable_version 54 | "${MAFIA_VERSIONS}/mafia" "$@" 55 | } 56 | 57 | # 58 | # The actual start of the script..... 59 | # 60 | 61 | case "${1:-}" in 62 | upgrade) shift; enable_version "$@" ;; 63 | *) exec_mafia "$@" 64 | esac 65 | -------------------------------------------------------------------------------- /framework/master-with-test.toml: -------------------------------------------------------------------------------- 1 | [master] 2 | runner = "s3://ambiata-dispensary-v2/dist/master/master-haskell/linux/x86_64/20190522002346-e28326d/master-haskell-20190522002346-e28326d" 3 | version = 1 4 | sha1 = "8736bd36b35b88909893e565f97ae5f91c009fd1" 5 | 6 | [global] 7 | CACHE = "true" 8 | CABAL_VERSION = "1.24.0.2" 9 | 10 | [build.dist-7-10] 11 | HADDOCK = "true" 12 | HADDOCK_S3 = "$AMBIATA_HADDOCK_MASTER" 13 | GHC_VERSION = "7.10.2" 14 | 15 | [build.branches-7-10] 16 | HADDOCK = "true" 17 | HADDOCK_S3 = "$AMBIATA_HADDOCK_BRANCHES" 18 | GHC_VERSION = "7.10.2" 19 | 20 | [build.dist-8-0] 21 | GHC_VERSION = "8.0.2" 22 | 23 | [build.branches-8-0] 24 | GHC_VERSION = "8.0.2" 25 | 26 | [build.dist-7-10-cabal-test] 27 | GHC_VERSION = "7.10.2" 28 | TEST = "false" 29 | CABAL_TEST = "true" 30 | 31 | [build.branches-7-10-cabal-test] 32 | GHC_VERSION = "7.10.2" 33 | TEST = "false" 34 | CABAL_TEST = "true" 35 | 36 | [build.dist-8-0-cabal-test] 37 | GHC_VERSION = "8.0.2" 38 | TEST = "false" 39 | CABAL_TEST = "true" 40 | 41 | [build.branches-8-0-cabal-test] 42 | GHC_VERSION = "8.0.2" 43 | TEST = "false" 44 | CABAL_TEST = "true" 45 | -------------------------------------------------------------------------------- /framework/master.toml: -------------------------------------------------------------------------------- 1 | [master] 2 | runner = "s3://ambiata-dispensary-v2/dist/master/master-haskell/linux/x86_64/20190117000143-201595f/master-haskell-20190117000143-201595f" 3 | version = 1 4 | sha1 = "3ba53248015b00824f90ca497b5d3bcce5699608" 5 | 6 | [global] 7 | CACHE = "true" 8 | 9 | [build.dist-7-10] 10 | HADDOCK = "true" 11 | HADDOCK_S3 = "$AMBIATA_HADDOCK_MASTER" 12 | GHC_VERSION = "7.10.2" 13 | CABAL_VERSION = "1.24.0.2" 14 | 15 | [build.branches-7-10] 16 | HADDOCK = "true" 17 | HADDOCK_S3 = "$AMBIATA_HADDOCK_BRANCHES" 18 | GHC_VERSION = "7.10.2" 19 | CABAL_VERSION = "1.24.0.2" 20 | 21 | [build.dist-8-0] 22 | GHC_VERSION = "8.0.2" 23 | CABAL_VERSION = "1.24.0.2" 24 | 25 | [build.branches-8-0] 26 | GHC_VERSION = "8.0.2" 27 | CABAL_VERSION = "1.24.0.2" 28 | -------------------------------------------------------------------------------- /mismi-autoscaling-core/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-autoscaling-core/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-autoscaling-core/ambiata-mismi-autoscaling-core.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-autoscaling-core 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-autoscaling-core. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , ambiata-mismi-ec2-core 19 | , ambiata-mismi-iam-core 20 | , semigroups >= 0.16 && < 0.19 21 | , text == 1.2.* 22 | , time >= 1.4 && < 1.9 23 | 24 | ghc-options: 25 | -Wall 26 | 27 | hs-source-dirs: 28 | src 29 | 30 | 31 | exposed-modules: 32 | Mismi.Autoscaling.Core.Data 33 | 34 | test-suite test 35 | type: exitcode-stdio-1.0 36 | main-is: test.hs 37 | ghc-options: -Wall -threaded -O2 38 | hs-source-dirs: test 39 | build-depends: base 40 | , ambiata-disorder-core 41 | , ambiata-disorder-corpus 42 | , ambiata-p 43 | , ambiata-mismi-autoscaling-core 44 | , ambiata-mismi-ec2-core 45 | , ambiata-mismi-ec2-core-test 46 | , semigroups >= 0.16 && < 0.19 47 | , text 48 | , time 49 | , QuickCheck >= 2.7 && < 2.12 50 | , quickcheck-instances == 0.3.* 51 | -------------------------------------------------------------------------------- /mismi-autoscaling-core/ambiata-mismi-autoscaling-core.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.5.4 3 | base64-bytestring == 1.0.0.1 4 | bifunctors == 5.3 5 | comonad == 5 6 | contravariant == 1.4 7 | distributive == 0.5.2 8 | hashable == 1.2.6.0 9 | ieee754 == 0.7.9 10 | integer-logarithms == 1.0.1 11 | old-locale == 1.0.0.7 12 | old-time == 1.1.0.3 13 | primitive == 0.6.2.0 14 | QuickCheck == 2.8.2 15 | quickcheck-instances == 0.3.12 16 | quickcheck-text == 0.1.2.1 17 | random == 1.1 18 | scientific == 0.3.4.11 19 | semigroups == 0.18.2 20 | semigroups -bytestring-builder 21 | StateVar == 1.1.0.4 22 | stm == 2.4.4.1 23 | tagged == 0.8.5 24 | text == 1.2.2.1 25 | tf-random == 0.5 26 | transformers-compat == 0.5.1.4 27 | unordered-containers == 0.2.8.0 28 | vector == 0.12.0.1 29 | void == 0.7.2 30 | -------------------------------------------------------------------------------- /mismi-autoscaling-core/ambiata-mismi-autoscaling-core.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.6 3 | base64-bytestring == 1.0.0.1 4 | bifunctors == 5.3 5 | cabal-doctest == 1 6 | comonad == 5 7 | contravariant == 1.4 8 | distributive == 0.5.2 9 | hashable == 1.2.6.0 10 | ieee754 == 0.8.0 11 | integer-logarithms == 1.0.1 12 | old-locale == 1.0.0.7 13 | old-time == 1.1.0.3 14 | primitive == 0.6.2.0 15 | QuickCheck == 2.8.2 16 | quickcheck-instances == 0.3.12 17 | quickcheck-text == 0.1.2.1 18 | random == 1.1 19 | scientific == 0.3.4.12 20 | semigroups == 0.18.2 21 | StateVar == 1.1.0.4 22 | stm == 2.4.4.1 23 | tagged == 0.8.5 24 | text == 1.2.2.1 25 | tf-random == 0.5 26 | transformers-compat == 0.5.1.4 27 | unordered-containers == 0.2.8.0 28 | vector == 0.12.0.1 29 | void == 0.7.2 30 | -------------------------------------------------------------------------------- /mismi-autoscaling-core/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-autoscaling-core/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master-with-test.toml -------------------------------------------------------------------------------- /mismi-autoscaling-core/test/Test/Mismi/Autoscaling/Core/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE TemplateHaskell #-} 4 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 5 | module Test.Mismi.Autoscaling.Core.Data where 6 | 7 | import Mismi.Autoscaling.Core.Data 8 | 9 | import P 10 | 11 | import Test.Mismi.Autoscaling.Core.Arbitrary () 12 | import Test.QuickCheck 13 | 14 | prop_scale_in p = 15 | protectedFromScaleInFromBool (protectedFromScaleInToBool p) === p 16 | 17 | prop_propagate p = 18 | propagateFromBool (propagateToBool p) === p 19 | 20 | return [] 21 | tests = $quickCheckAll 22 | -------------------------------------------------------------------------------- /mismi-autoscaling-core/test/ambiata-mismi-autoscaling-core-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-autoscaling-core-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-disorder-core 10 | , ambiata-disorder-corpus 11 | , ambiata-p 12 | , ambiata-mismi-autoscaling-core 13 | , ambiata-mismi-ec2-core 14 | , ambiata-mismi-ec2-core-test 15 | , semigroups >= 0.16 && < 0.19 16 | , text 17 | , time 18 | , QuickCheck >= 2.7 && < 2.12 19 | , quickcheck-instances == 0.3.* 20 | 21 | 22 | exposed-modules: 23 | Test.Mismi.Autoscaling.Core.Arbitrary 24 | -------------------------------------------------------------------------------- /mismi-autoscaling-core/test/ambiata-mismi-autoscaling-core-test.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.5.4 3 | base64-bytestring == 1.0.0.1 4 | bifunctors == 5.3 5 | comonad == 5 6 | contravariant == 1.4 7 | distributive == 0.5.2 8 | hashable == 1.2.6.0 9 | ieee754 == 0.7.9 10 | integer-logarithms == 1.0.1 11 | old-locale == 1.0.0.7 12 | old-time == 1.1.0.3 13 | primitive == 0.6.2.0 14 | QuickCheck == 2.8.2 15 | quickcheck-instances == 0.3.12 16 | quickcheck-text == 0.1.2.1 17 | random == 1.1 18 | scientific == 0.3.4.11 19 | semigroups == 0.18.2 20 | semigroups -bytestring-builder 21 | StateVar == 1.1.0.4 22 | stm == 2.4.4.1 23 | tagged == 0.8.5 24 | text == 1.2.2.1 25 | tf-random == 0.5 26 | transformers-compat == 0.5.1.4 27 | unordered-containers == 0.2.8.0 28 | vector == 0.12.0.1 29 | void == 0.7.2 30 | -------------------------------------------------------------------------------- /mismi-autoscaling-core/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.Mismi.Autoscaling.Core.Data 4 | 5 | main :: IO () 6 | main = 7 | disorderMain [ 8 | Test.Mismi.Autoscaling.Core.Data.tests 9 | ] 10 | -------------------------------------------------------------------------------- /mismi-autoscaling/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-autoscaling/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-autoscaling/README.md: -------------------------------------------------------------------------------- 1 | mismi-autoscaling 2 | ================= 3 | 4 | 5 | ## Testing 6 | 7 | ### Permissions 8 | 9 | ``` 10 | "autoscaling:AttachLoadBalancers" 11 | "autoscaling:CreateAutoScalingGroup" 12 | "autoscaling:CreateLaunchConfiguration" 13 | "autoscaling:CreateOrUpdateTags" 14 | "autoscaling:DeleteAutoScalingGroup" 15 | "autoscaling:DeleteLaunchConfiguration" 16 | "autoscaling:DescribeAutoScalingGroups" 17 | "autoscaling:DescribeAutoScalingInstances" 18 | "autoscaling:DescribeLaunchConfigurations" 19 | "autoscaling:DescribeLoadBalancers" 20 | "autoscaling:DescribeTags" 21 | "autoscaling:DetachLoadBalancers" 22 | "autoscaling:SetDesiredHealth" 23 | "autoscaling:UpdateAutoScalingGroup" 24 | ``` 25 | 26 | ### Options 27 | 28 | ``` 29 | `AWS_TEST_SECURITY_GROUP` - defaults to "ci.ci.node" 30 | `AWS_TEST_IMAGE_ID` - defaults to "ami-a1abbfc2" 31 | `AWS_TEST_IAM_ROLE` - defaults to "ci.ci.node" 32 | ``` 33 | -------------------------------------------------------------------------------- /mismi-autoscaling/ambiata-mismi-autoscaling.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-autoscaling/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-autoscaling/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master-with-test.toml -------------------------------------------------------------------------------- /mismi-autoscaling/src/Mismi/Autoscaling.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.Autoscaling ( 3 | module X 4 | ) where 5 | 6 | import Mismi.Autoscaling.Data as X 7 | import Mismi.Autoscaling.Commands as X 8 | -------------------------------------------------------------------------------- /mismi-autoscaling/src/Mismi/Autoscaling/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.Autoscaling.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Network.AWS.AutoScaling as AWS 7 | -------------------------------------------------------------------------------- /mismi-autoscaling/test/Test/Mismi/Autoscaling/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE TemplateHaskell #-} 4 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 5 | module Test.Mismi.Autoscaling.Data where 6 | 7 | import Mismi.Autoscaling.Data 8 | 9 | import P 10 | 11 | import Test.QuickCheck 12 | import Test.QuickCheck.Instances () 13 | 14 | prop_parse_protection_error = conjoin [ 15 | parseProtectionError "The instance i-ef2f5d40 is not part of Auto Scaling group stewed.27197.animal." 16 | === InstanceProtectionNotFound 17 | , parseProtectionError "The instance i-ef2f5d40 is not in InService or EnteringStandby or Standby." 18 | === InstanceProtectionInvalidState 19 | ] 20 | 21 | prop_parse_protection_error_unknown u = 22 | parseProtectionError u === InstanceProtectionUnknownError u 23 | 24 | return [] 25 | tests = $quickCheckAll 26 | -------------------------------------------------------------------------------- /mismi-autoscaling/test/ambiata-mismi-autoscaling-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-autoscaling-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-disorder-core 10 | , ambiata-disorder-corpus 11 | , ambiata-mismi-core 12 | , ambiata-mismi-core-test 13 | , ambiata-mismi-autoscaling 14 | , ambiata-mismi-autoscaling-core 15 | , ambiata-mismi-autoscaling-core-test 16 | , ambiata-mismi-ec2-core 17 | , ambiata-mismi-iam-core 18 | , ambiata-p 19 | , ambiata-twine 20 | , ambiata-x-eithert 21 | , retry == 0.7.* 22 | , text == 1.2.* 23 | , transformers >= 0.3.1 && < 0.6 24 | , QuickCheck >= 2.7 && < 2.12 25 | , quickcheck-instances == 0.3.* 26 | 27 | exposed-modules: 28 | Test.Mismi.Autoscaling.Control 29 | -------------------------------------------------------------------------------- /mismi-autoscaling/test/ambiata-mismi-autoscaling-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-autoscaling 2 | mismi-core 3 | mismi-ec2/test 4 | -------------------------------------------------------------------------------- /mismi-autoscaling/test/test-io.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.IO.Mismi.Autoscaling.Commands 4 | import Test.Mismi (enableTests) 5 | 6 | main :: IO () 7 | main = 8 | disorderMain =<< enableTests "AWS_TEST_AUTOSCALING" [] [ 9 | Test.IO.Mismi.Autoscaling.Commands.tests 10 | ] 11 | -------------------------------------------------------------------------------- /mismi-autoscaling/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.Mismi.Autoscaling.Data 4 | 5 | main :: IO () 6 | main = 7 | disorderMain [ 8 | Test.Mismi.Autoscaling.Data.tests 9 | ] 10 | -------------------------------------------------------------------------------- /mismi-cli/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-cli/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-cli/Setup.hs: -------------------------------------------------------------------------------- 1 | ../framework/Setup.hs -------------------------------------------------------------------------------- /mismi-cli/_s3.zsh: -------------------------------------------------------------------------------- 1 | #compdef s3 2 | 3 | if (($CURRENT == 2)); then 4 | local -a commands 5 | # We're completing the first word after "s3" -- the command. 6 | commands=("${(@f)$( s3 --help | sed '1,/^Available commands/d' | awk '{ printf "%s:",$1; for (i=2; i<=NF; i++) printf "%s ",$i; print "" }' )}") 7 | _describe -t commands 'commands' commands 8 | else 9 | local cmdline 10 | 11 | index=$((CURRENT - 1)) 12 | request=(--bash-completion-index $index) 13 | for arg in ${words[@]}; do 14 | request=(${request[@]} --bash-completion-word $arg) 15 | done 16 | 17 | completions=($( s3 "${request[@]}" )) 18 | 19 | for word in $completions; do 20 | local -a parts lines 21 | 22 | # just show the tail of the filter 23 | # in the completion list 24 | parts=(${(s,/,)word}) 25 | 26 | if [[ $word[-1] == "/" ]]; then 27 | # for words ending in a slash treat the 28 | # it as a suffix which is overwritten when 29 | # the user types a character 30 | desc=($parts[-1]/) 31 | compadd -S \/ -q -d desc -- $word[0,-2] 32 | else 33 | desc=($parts[-1]) 34 | compadd -d desc -- $word 35 | fi 36 | done 37 | fi 38 | -------------------------------------------------------------------------------- /mismi-cli/ambiata-mismi-cli.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-cli 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.24 11 | build-type: Custom 12 | description: mismi-s3. 13 | 14 | custom-setup 15 | setup-depends: 16 | base 17 | , Cabal < 2.1 && >= 1.24 18 | executable s3 19 | main-is: ../main/s3.hs 20 | ghc-options: -Wall -threaded -O2 21 | hs-source-dirs: gen 22 | build-depends: base >= 3 && < 5 23 | , ambiata-mismi-core 24 | , ambiata-mismi-openssl 25 | , ambiata-mismi-s3 26 | , ambiata-mismi-s3-core 27 | , ambiata-p 28 | , ambiata-x-optparse 29 | , ambiata-x-eithert 30 | , bytestring == 0.10.* 31 | , conduit 32 | , containers == 0.5.* 33 | , exceptions 34 | , filepath 35 | , lens >= 4.8 && < 4.16 36 | , optparse-applicative >= 0.11 && < 0.13 37 | , resourcet 38 | , text 39 | , transformers 40 | , unix 41 | 42 | test-suite test-cli 43 | type: exitcode-stdio-1.0 44 | 45 | main-is: test-cli.hs 46 | 47 | ghc-options: -Wall -threaded -O2 48 | 49 | hs-source-dirs: 50 | test 51 | 52 | build-depends: 53 | base >= 3 && < 5 54 | , ambiata-disorder-core 55 | -------------------------------------------------------------------------------- /mismi-cli/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-cli/master.toml: -------------------------------------------------------------------------------- 1 | [master] 2 | runner = "s3://ambiata-dispensary-v2/dist/master/master-haskell/linux/x86_64/20190117000143-201595f/master-haskell-20190117000143-201595f" 3 | version = 1 4 | sha1 = "3ba53248015b00824f90ca497b5d3bcce5699608" 5 | 6 | [global] 7 | CACHE = "true" 8 | CABAL_VERSION = "1.24.0.2" 9 | 10 | [build.dist-7-10] 11 | GHC_VERSION = "7.10.2" 12 | 13 | [build.branches-7-10] 14 | GHC_VERSION = "7.10.2" 15 | 16 | [build.dist-8-0] 17 | GHC_VERSION = "8.0.2" 18 | PUBLISH = "true" 19 | PUBLISH_S3 = "$AMBIATA_ARTEFACTS_MASTER" 20 | PUBLISH_EXECUTABLES = "s3" 21 | 22 | [build.branches-8-0] 23 | GHC_VERSION = "8.0.2" 24 | PUBLISH = "true" 25 | PUBLISH_S3 = "$AMBIATA_ARTEFACTS_BRANCHES" 26 | PUBLISH_EXECUTABLES = "s3" 27 | -------------------------------------------------------------------------------- /mismi-cli/s3-completion.bash: -------------------------------------------------------------------------------- 1 | _s3() 2 | { 3 | local cur colonprefixes 4 | 5 | COMPREPLY=() 6 | cur=${COMP_WORDS[COMP_CWORD]} 7 | 8 | CMDLINE=(--bash-completion-index $COMP_CWORD) 9 | for arg in ${COMP_WORDS[@]}; do 10 | CMDLINE=(${CMDLINE[@]} --bash-completion-word $arg) 11 | done 12 | 13 | colonprefixes=${cur%"${cur##*:}"} 14 | 15 | COMPREPLY=( $(s3 "${CMDLINE[@]}") ) 16 | 17 | local i=${#COMPREPLY[*]} 18 | while [ $((--i)) -ge 0 ]; do 19 | COMPREPLY[$i]=${COMPREPLY[$i]#"$colonprefixes"} 20 | done 21 | } 22 | 23 | complete -F _s3 s3 24 | -------------------------------------------------------------------------------- /mismi-cli/test/cli/core/runner.sh: -------------------------------------------------------------------------------- 1 | MISMI="${1:-./dist/build/s3/s3}" 2 | 3 | type "$MISMI" > /dev/null 2>&1 || { 4 | echo "No mismi executable specified on command line or on path." 5 | exit 1 6 | } 7 | 8 | ROOT=$(dirname "$0")/../../.. 9 | ROOT=$(cd "$ROOT" > /dev/null 2>&1 && pwd) 10 | TMP=${ROOT}/tmp 11 | TEST=${TMP}/test/$$ 12 | mkdir -p ${TEST} 13 | 14 | cleanup () { 15 | echo "Cleaning up (${TEST})" 16 | echo "Cleaning up (s3://ambiata-dev-view/test/mismi/cli/$HOSTNAME/$$/)" 17 | rm -rf "${TEST}" 18 | aws s3 rm --recursive "s3://ambiata-dev-view/test/mismi/cli/$HOSTNAME/$$/" 19 | } 20 | 21 | trap cleanup SIGHUP SIGINT SIGQUIT SIGTERM 22 | 23 | banner () { 24 | echo 25 | echo == "$*" == 26 | echo == "Running in ${TEST}" == 27 | echo 28 | } 29 | 30 | unique_s3_url () { 31 | echo "s3://ambiata-dev-view/test/mismi/cli/$HOSTNAME/$$/${1:-notset}" 32 | } 33 | 34 | exit_cleanup() { 35 | cleanup 36 | exit ${1:-1} 37 | } 38 | -------------------------------------------------------------------------------- /mismi-cli/test/cli/exit/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eu 2 | 3 | . $(dirname $0)/../core/runner.sh 4 | 5 | banner Check exit codes 6 | ####################### 7 | 8 | 9 | s3=$(unique_s3_url) 10 | 11 | ! $MISMI upload ${TEST}/nothing $s3 2> /dev/null 12 | ! $MISMI upload $s3 ${TEST}/nothing 2> /dev/null 13 | ! $MISMI download $s3 ${TEST}/nothing 2> /dev/null 14 | ! $MISMI download ${TEST}/nothing $s3 2> /dev/null 15 | ! $MISMI exists $s3 2> /dev/null 16 | ! $MISMI move $s3 $s3 2> /dev/null 17 | ! $MISMI copy $s3 $s3 2> /dev/null 18 | ! $MISMI read $s3 2> /dev/null 19 | ! $MISMI size $s3 2> /dev/null 20 | ! $MISMI sync $s3 $s3 2> /dev/null 21 | 22 | echo "PASSED [Exit codes]" 23 | -------------------------------------------------------------------------------- /mismi-cli/test/cli/sync/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eu 2 | 3 | . $(dirname $0)/../core/runner.sh 4 | 5 | banner Sync tests 6 | ################# 7 | 8 | 9 | S3=$(unique_s3_url source) 10 | S3OUT=$(unique_s3_url destination) 11 | 12 | 13 | 14 | echo "blah" > ${TEST}/file 15 | 16 | $MISMI write $S3/file1 "foobar" || exit_cleanup $? 17 | $MISMI write $S3/file2 "foobar" || exit_cleanup $? 18 | 19 | $MISMI sync $S3 $S3OUT || exit_cleanup $? 20 | 21 | $MISMI ls $S3OUT > ${TEST}/output || exit_cleanup $? 22 | 23 | if [ $(wc -l ${TEST}/output | awk '{ print $1 }') = "2" ] && grep -q $S3OUT/file1 ${TEST}/output && grep -q $S3OUT/file2 ${TEST}/output; then 24 | echo "PASSED [sync]" 25 | else 26 | echo "" 27 | echo "Test case [sync] failed." 28 | echo "" 29 | exit_cleanup 30 | fi 31 | 32 | $MISMI write $S3/file3 "foobar" || exit_cleanup $? 33 | 34 | $MISMI sync $S3 $S3OUT --skip || exit_cleanup $? 35 | 36 | $MISMI ls $S3OUT > ${TEST}/output || exit_cleanup $? 37 | 38 | if [ $(wc -l ${TEST}/output | awk '{ print $1 }') = "3" ] && grep -q $S3OUT/file3 ${TEST}/output; then 39 | echo "PASSED [sync --skip]" 40 | else 41 | echo "" 42 | echo "Test case [sync --skip] failed." 43 | echo "" 44 | exit_cleanup 45 | fi 46 | 47 | if $(! $MISMI sync $S3 $S3OUT 2> /dev/null); then 48 | echo "PASSED [sync fail]" 49 | else 50 | echo "" 51 | echo "Test case [sync --fail] failed." 52 | echo "" 53 | exit_cleanup 54 | fi 55 | 56 | cleanup 57 | -------------------------------------------------------------------------------- /mismi-cli/test/cli/usage/expected: -------------------------------------------------------------------------------- 1 | Usage: s3 ((-v|--version) | COMMAND) 2 | 3 | Available options: 4 | -v,--version Version information 5 | -h,--help Show this help text 6 | 7 | Available commands: 8 | upload Upload a file to s3. 9 | download Download a file from s3. 10 | copy Copy a file from an S3 address to another S3 address. 11 | concat Concatenate many files together into one S3 address. 12 | move Move an S3 address to another S3 address 13 | exists Check if an address exists. 14 | delete Delete an address. 15 | write Write to an address. 16 | cat Read raw data from an address and write it to stdout. 17 | size Get the size of an address. 18 | sync Sync between two prefixes. 19 | ls Stream a recursively list of objects on a prefix. 20 | -------------------------------------------------------------------------------- /mismi-cli/test/cli/usage/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eu 2 | 3 | . $(dirname $0)/../core/runner.sh 4 | 5 | banner usage 6 | ############ 7 | 8 | EXPECTED=$(dirname $0)/expected 9 | 10 | $MISMI --help > ${TEST}/usage 11 | 12 | if diff -q ${TEST}/usage ${EXPECTED}; then 13 | echo "PASSED [usage]" 14 | else 15 | echo "Test case [usage] failed:" 16 | echo "=======" 17 | echo "" 18 | diff ${TEST}/usage ${EXPECTED} 19 | echo "" 20 | echo "=======" 21 | exit_cleanup 22 | fi 23 | -------------------------------------------------------------------------------- /mismi-cli/test/test-cli.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | main :: IO () 4 | main = 5 | disorderCliMain ["./dist/build/s3/s3"] 6 | -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/ambiata-mismi-cloudwatch-logs.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-cloudwatch-logs 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-cloudwatch-logs. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , ambiata-mismi-core 19 | , ambiata-x-eithert 20 | , amazonka >= 1.3.6 && < 1.6 21 | , amazonka-core >= 1.3.6 && < 1.6 22 | , amazonka-cloudwatch-logs >= 1.3.6 && < 1.6 23 | , bytestring == 0.10.* 24 | , conduit-extra >= 1.1.13 && < 1.2 25 | , exceptions == 0.8.* 26 | , http-client >= 0.4.18 && < 0.6 27 | , mtl >= 2.2.1 && < 2.3 28 | , text == 1.2.* 29 | , transformers >= 0.3.1 && < 0.6 30 | 31 | ghc-options: 32 | -Wall 33 | 34 | hs-source-dirs: 35 | src 36 | 37 | exposed-modules: 38 | Mismi.CloudwatchLogs 39 | Mismi.CloudwatchLogs.Amazonka 40 | 41 | test-suite test 42 | type: exitcode-stdio-1.0 43 | main-is: test.hs 44 | ghc-options: -Wall -threaded -O2 45 | hs-source-dirs: test 46 | build-depends: base 47 | , ambiata-disorder-core 48 | , ambiata-mismi-core 49 | , ambiata-mismi-cloudwatch-logs 50 | , QuickCheck >= 2.7 && < 2.12 51 | , quickcheck-instances == 0.3.* 52 | -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/ambiata-mismi-cloudwatch-logs.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/src/Mismi/CloudwatchLogs.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.CloudwatchLogs ( 3 | ) where 4 | -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/src/Mismi/CloudwatchLogs/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.CloudwatchLogs.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Network.AWS.CloudWatchLogs as AWS 7 | -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/test/ambiata-mismi-cloudwatch-logs-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-cloudwatch-logs-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-mismi-cloudwatch-logs 10 | 11 | exposed-modules: 12 | -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/test/ambiata-mismi-cloudwatch-logs-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-cloudwatch-logs 2 | mismi-core 3 | -------------------------------------------------------------------------------- /mismi-cloudwatch-logs/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | 4 | main :: IO () 5 | main = 6 | disorderMain [ 7 | ] 8 | -------------------------------------------------------------------------------- /mismi-cloudwatch/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-cloudwatch/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-cloudwatch/ambiata-mismi-cloudwatch.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-cloudwatch 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-cloudwatch. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , amazonka >= 1.3.6 && < 1.6 18 | , amazonka-core >= 1.3.6 && < 1.6 19 | , amazonka-cloudwatch >= 1.3.6 && < 1.6 20 | 21 | ghc-options: 22 | -Wall 23 | 24 | hs-source-dirs: 25 | src 26 | 27 | exposed-modules: 28 | Mismi.Cloudwatch 29 | Mismi.Cloudwatch.Amazonka 30 | 31 | test-suite test 32 | type: exitcode-stdio-1.0 33 | main-is: test.hs 34 | ghc-options: -Wall -threaded -O2 35 | hs-source-dirs: test 36 | build-depends: base 37 | , ambiata-disorder-core 38 | , ambiata-mismi-core 39 | , ambiata-mismi-cloudwatch 40 | , QuickCheck >= 2.7 && < 2.12 41 | , quickcheck-instances == 0.3.* 42 | -------------------------------------------------------------------------------- /mismi-cloudwatch/ambiata-mismi-cloudwatch.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | adjunctions == 4.3 3 | aeson == 1.1.1.0 4 | asn1-encoding == 0.9.5 5 | asn1-parse == 0.9.4 6 | asn1-types == 0.3.2 7 | async == 2.1.1.1 8 | attoparsec == 0.13.1.0 9 | base-compat == 0.9.3 10 | base-orphans == 0.6 11 | base64-bytestring == 1.0.0.1 12 | bifunctors == 5.2.1 13 | blaze-builder == 0.4.0.2 14 | blaze-html == 0.9.0.1 15 | blaze-markup == 0.8.0.0 16 | byteable == 0.1.1 17 | cabal-doctest == 1 18 | case-insensitive == 1.2.0.8 19 | cereal == 0.5.4.0 20 | comonad == 5 21 | conduit == 1.2.9.1 22 | conduit-extra == 1.1.15 23 | connection == 0.2.5 24 | contravariant == 1.4 25 | cookie == 0.4.2.1 26 | cryptonite == 0.22 27 | data-default == 0.7.1.1 28 | data-default-class == 0.1.2.0 29 | data-default-instances-containers == 0.0.1 30 | data-default-instances-dlist == 0.0.1 31 | data-default-instances-old-locale == 0.0.1 32 | distributive == 0.5.2 33 | dlist == 0.8.0.2 34 | exceptions == 0.8.3 35 | foundation == 0.0.6 36 | free == 4.12.4 37 | hashable == 1.2.6.0 38 | hourglass == 0.2.10 39 | http-client == 0.4.18.1 40 | http-client-tls == 0.2.4.1 41 | http-conduit == 2.1.7.2 42 | http-types == 0.8.6 43 | ieee754 == 0.8.0 44 | ini == 0.3.5 45 | integer-logarithms == 1.0.1 46 | kan-extensions == 5.0.1 47 | lens == 4.14 48 | lifted-base == 0.2.3.10 49 | memory == 0.14.3 50 | mime-types == 0.1.0.7 51 | mmorph == 1.0.9 52 | monad-control == 1.0.1.0 53 | mtl == 2.2.1 54 | network == 2.6.3.1 55 | network-uri == 2.6.1.0 56 | old-locale == 1.0.0.7 57 | old-time == 1.1.0.3 58 | parallel == 3.2.1.1 59 | parsec == 3.1.11 60 | pem == 0.2.2 61 | prelude-extras == 0.4.0.3 62 | primitive == 0.6.1.0 63 | profunctors == 5.2 64 | QuickCheck == 2.8.2 65 | quickcheck-instances == 0.3.12 66 | quickcheck-text == 0.1.2.1 67 | random == 1.1 68 | reflection == 2.1.2 69 | resourcet == 1.1.9 70 | retry == 0.7.4.2 71 | scientific == 0.3.4.12 72 | semigroupoids == 5.1 73 | semigroups == 0.18.2 74 | socks == 0.5.5 75 | StateVar == 1.1.0.4 76 | stm == 2.4.4.1 77 | streaming-commons == 0.1.17 78 | tagged == 0.8.5 79 | text == 1.2.2.1 80 | tf-random == 0.5 81 | time-locale-compat == 0.1.1.3 82 | time-locale-compat -old-locale 83 | tls == 1.3.10 84 | transformers-base == 0.4.4 85 | transformers-compat == 0.5.1.4 86 | unordered-containers == 0.2.8.0 87 | uuid-types == 1.0.3 88 | vector == 0.11.0.0 89 | void == 0.7.2 90 | x509 == 1.6.5 91 | x509-store == 1.6.2 92 | x509-system == 1.6.4 93 | x509-validation == 1.6.5 94 | xml-conduit == 1.4.0.4 95 | xml-types == 0.3.6 96 | zlib == 0.6.1.2 97 | -------------------------------------------------------------------------------- /mismi-cloudwatch/ambiata-mismi-cloudwatch.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-cloudwatch/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-cloudwatch/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-cloudwatch/src/Mismi/Cloudwatch.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.Cloudwatch ( 3 | ) where 4 | -------------------------------------------------------------------------------- /mismi-cloudwatch/src/Mismi/Cloudwatch/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.Cloudwatch.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Network.AWS.CloudWatch as AWS 7 | -------------------------------------------------------------------------------- /mismi-cloudwatch/test/ambiata-mismi-cloudwatch-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-cloudwatch-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-mismi-cloudwatch 10 | 11 | exposed-modules: 12 | -------------------------------------------------------------------------------- /mismi-cloudwatch/test/ambiata-mismi-cloudwatch-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-cloudwatch 2 | mismi-core 3 | -------------------------------------------------------------------------------- /mismi-cloudwatch/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | 4 | main :: IO () 5 | main = 6 | disorderMain [ 7 | ] 8 | -------------------------------------------------------------------------------- /mismi-core/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-core/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-core/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-core/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master-with-test.toml -------------------------------------------------------------------------------- /mismi-core/src/Mismi.hs: -------------------------------------------------------------------------------- 1 | module Mismi ( 2 | module X 3 | ) where 4 | 5 | import Mismi.Control as X 6 | import Mismi.Data as X 7 | import Mismi.Environment as X 8 | -------------------------------------------------------------------------------- /mismi-core/src/Mismi/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CPP #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | module Mismi.Amazonka ( 4 | module A 5 | ) where 6 | 7 | import Network.AWS as A 8 | import Network.AWS.Auth as A 9 | import Network.AWS.Data as A 10 | import Network.AWS.Error as A 11 | import Network.AWS.Waiter as A 12 | #if MIN_VERSION_amazonka(1,4,0) 13 | import Network.AWS.Prelude as A 14 | #else 15 | import Network.AWS.Prelude as A hiding ((&)) 16 | #endif 17 | -------------------------------------------------------------------------------- /mismi-core/src/Mismi/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE CPP #-} 3 | module Mismi.Data ( 4 | module Mismi.Kernel.Data 5 | , fromMismiRegion 6 | , toMismiRegion 7 | ) where 8 | 9 | import Control.Monad.Trans.AWS (Region (..)) 10 | 11 | import Mismi.Kernel.Data 12 | 13 | 14 | fromMismiRegion :: MismiRegion -> Region 15 | fromMismiRegion r = 16 | case r of 17 | IrelandRegion -> 18 | Ireland 19 | FrankfurtRegion -> 20 | Frankfurt 21 | TokyoRegion -> 22 | Tokyo 23 | SingaporeRegion -> 24 | Singapore 25 | SydneyRegion -> 26 | Sydney 27 | BeijingRegion -> 28 | Beijing 29 | NorthVirginiaRegion -> 30 | NorthVirginia 31 | NorthCaliforniaRegion -> 32 | NorthCalifornia 33 | OregonRegion -> 34 | Oregon 35 | GovCloudRegion -> 36 | GovCloud 37 | GovCloudFIPSRegion -> 38 | GovCloudFIPS 39 | SaoPauloRegion -> 40 | SaoPaulo 41 | OhioRegion -> 42 | Ohio 43 | SeoulRegion -> 44 | Seoul 45 | MumbaiRegion -> 46 | Mumbai 47 | MontrealRegion -> 48 | Montreal 49 | LondonRegion -> 50 | London 51 | 52 | toMismiRegion :: Region -> MismiRegion 53 | toMismiRegion r = 54 | case r of 55 | Ireland -> 56 | IrelandRegion 57 | Frankfurt -> 58 | FrankfurtRegion 59 | Tokyo -> 60 | TokyoRegion 61 | Singapore -> 62 | SingaporeRegion 63 | Sydney -> 64 | SydneyRegion 65 | Beijing -> 66 | BeijingRegion 67 | NorthVirginia -> 68 | NorthVirginiaRegion 69 | NorthCalifornia -> 70 | NorthCaliforniaRegion 71 | Oregon -> 72 | OregonRegion 73 | GovCloud -> 74 | GovCloudRegion 75 | GovCloudFIPS -> 76 | GovCloudFIPSRegion 77 | SaoPaulo -> 78 | SaoPauloRegion 79 | Ohio -> 80 | OhioRegion 81 | Seoul -> 82 | SeoulRegion 83 | Mumbai -> 84 | MumbaiRegion 85 | Montreal -> 86 | MontrealRegion 87 | London -> 88 | LondonRegion 89 | -------------------------------------------------------------------------------- /mismi-core/test/Test/Mismi.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Test.Mismi ( 4 | testAWS 5 | , enableTests 6 | , runAWSDefaultRegion 7 | ) where 8 | 9 | import Control.Monad.Catch (throwM) 10 | 11 | import Disorder.Core.IO (testIO) 12 | 13 | import Mismi 14 | 15 | import P 16 | import Prelude (String) 17 | 18 | import System.Environment (lookupEnv) 19 | import System.IO (IO) 20 | 21 | import Test.Mismi.Arbitrary () 22 | import Test.QuickCheck (Property, Testable) 23 | 24 | import X.Control.Monad.Trans.Either (eitherT) 25 | 26 | 27 | testAWS :: Testable a => AWS a -> Property 28 | testAWS = 29 | testIO . runAWSDefaultRegion 30 | 31 | -- Default to Sydney for tests only, production should fail without the environment variable 32 | runAWSDefaultRegion :: AWS a -> IO a 33 | runAWSDefaultRegion a = do 34 | r <- eitherT (const $ pure Sydney) pure getRegionFromEnv 35 | e <- discoverAWSEnvWithRegion r 36 | eitherT throwM pure $ runAWS e a 37 | 38 | -- Environment variable to lookup, tests to run when it is set to 39 | -- false and tests to run when when it is set to true (or missing). 40 | enableTests :: String -> [IO Bool] -> [IO Bool] -> IO [IO Bool] 41 | enableTests k false true = do 42 | d <- lookupEnv k 43 | pure $ bool false true $ 44 | maybe 45 | True 46 | (\s -> 47 | case s of 48 | "true" -> 49 | True 50 | "1" -> 51 | True 52 | "false" -> 53 | False 54 | "0" -> 55 | False 56 | _ -> 57 | True) 58 | d 59 | -------------------------------------------------------------------------------- /mismi-core/test/Test/Mismi/Arbitrary.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# OPTIONS_GHC -fno-warn-orphans #-} 4 | module Test.Mismi.Arbitrary where 5 | 6 | import Network.AWS.Types 7 | 8 | import Test.Mismi.Kernel.Arbitrary () 9 | import Test.QuickCheck 10 | import Test.QuickCheck.Instances () 11 | 12 | import Data.Text.Encoding 13 | 14 | import P 15 | 16 | instance Arbitrary Region where 17 | -- Shorter list than possible, aws doesn't support all potential Regions. 18 | arbitrary = elements [Ireland, Tokyo, Singapore, Sydney, NorthCalifornia, Oregon, NorthVirginia] 19 | 20 | instance Arbitrary AccessKey where 21 | arbitrary = AccessKey <$> (encodeUtf8 <$> arbitrary) 22 | 23 | instance Arbitrary SecretKey where 24 | arbitrary = SecretKey <$> (encodeUtf8 <$> arbitrary) 25 | 26 | instance Arbitrary SessionToken where 27 | arbitrary = SessionToken <$> (encodeUtf8 <$> arbitrary) 28 | -------------------------------------------------------------------------------- /mismi-core/test/Test/Mismi/Control.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE TemplateHaskell #-} 4 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 5 | module Test.Mismi.Control where 6 | 7 | import Control.Monad.Catch hiding (finally) 8 | import Control.Monad.IO.Class 9 | import Control.Monad.Trans.Resource 10 | 11 | import Data.IORef 12 | import Data.Text 13 | 14 | import Disorder.Core.IO 15 | 16 | import Mismi.Control 17 | 18 | import P 19 | 20 | 21 | import System.IO 22 | import System.IO.Error (userError) 23 | 24 | import Test.Mismi 25 | import Test.Mismi.Arbitrary () 26 | import Test.QuickCheck 27 | import Test.QuickCheck.Instances () 28 | 29 | 30 | prop_bracket :: [Text] -> Text -> Text -> Property 31 | prop_bracket l final action = final /= "" && action /= "" ==> testIO $ do 32 | r <- newIORef l 33 | let after' = (flip modifyIORef (final :)) 34 | let action' = (flip modifyIORef (action :)) 35 | runAWSDefaultRegion $ awsBracket (liftIO $ return r) (liftIO . after') (liftIO . action') 36 | (=== final : action : l) <$> readIORef r 37 | 38 | prop_bracket_catch :: [Text] -> Text -> Property 39 | prop_bracket_catch l final = final /= "" ==> testIO $ do 40 | r <- newIORef l 41 | let after' = (flip modifyIORef (final :)) 42 | let action' = const $ throwM (userError "") 43 | runAWSDefaultRegion $ awsBracket (liftIO $ return r) (liftIO . after') (liftIO . action') `catchIOError` (const $ return ()) 44 | (=== final : l) <$> readIORef r 45 | 46 | prop_testAWS :: Property 47 | prop_testAWS = 48 | expectFailure . Test.QuickCheck.once . testAWS $ pure False 49 | 50 | 51 | prop_finalizer = testIO $ do 52 | r <- newIORef (0 :: Int) 53 | runAWSDefaultRegion $ do 54 | void $ register (modifyIORef r (const $ 1)) 55 | (=== 1) <$> readIORef r 56 | 57 | 58 | 59 | 60 | return [] 61 | tests :: IO Bool 62 | tests = $quickCheckAll 63 | -------------------------------------------------------------------------------- /mismi-core/test/Test/Mismi/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE TemplateHaskell #-} 4 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 5 | module Test.Mismi.Data where 6 | 7 | import Disorder.Core 8 | 9 | import Mismi.Data 10 | 11 | import P 12 | 13 | import Test.Mismi.Arbitrary () 14 | 15 | import Test.QuickCheck 16 | import Test.QuickCheck.Instances () 17 | 18 | prop_tripping_region = 19 | tripping fromMismiRegion (Just . toMismiRegion) 20 | 21 | return [] 22 | tests = $quickCheckAll 23 | -------------------------------------------------------------------------------- /mismi-core/test/ambiata-mismi-core-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-core-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base >= 3 && < 6 9 | , amazonka >= 1.3.6 && < 1.6 10 | , amazonka-core >= 1.3.6 && < 1.6 11 | , ambiata-disorder-core 12 | , ambiata-disorder-corpus 13 | , ambiata-mismi-core 14 | , ambiata-mismi-kernel 15 | , ambiata-mismi-kernel-test 16 | , ambiata-p 17 | , ambiata-x-eithert 18 | , exceptions >= 0.6 && < 0.9 19 | , filepath >= 1.3 && < 1.5 20 | , http-client >= 0.4.18 && < 0.6 21 | , resourcet == 1.1.* 22 | , text == 1.2.* 23 | , transformers >= 0.3 && < 0.6 24 | , QuickCheck >= 2.7 && < 2.12 25 | , quickcheck-instances == 0.3.* 26 | , unix == 2.7.* 27 | , temporary == 1.2.* 28 | , uuid == 1.3.* 29 | 30 | exposed-modules: 31 | Test.Mismi.Arbitrary 32 | Test.Mismi 33 | -------------------------------------------------------------------------------- /mismi-core/test/ambiata-mismi-core-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | -------------------------------------------------------------------------------- /mismi-core/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.Mismi.Control 4 | import qualified Test.Mismi.Data 5 | 6 | main :: IO () 7 | main = 8 | disorderMain [ 9 | Test.Mismi.Control.tests 10 | , Test.Mismi.Data.tests 11 | ] 12 | -------------------------------------------------------------------------------- /mismi-dynamodb/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-dynamodb/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-dynamodb/ambiata-mismi-dynamodb.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-dynamodb 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-dynamodb. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 6 17 | , ambiata-p 18 | , ambiata-mismi-core 19 | , amazonka-dynamodb >= 1.4.0 && < 1.6 20 | , lens >= 4.8 && < 4.16 21 | 22 | ghc-options: 23 | -Wall 24 | 25 | hs-source-dirs: 26 | src 27 | 28 | exposed-modules: 29 | Mismi.DynamoDB.Amazonka 30 | Mismi.DynamoDB.Control 31 | -------------------------------------------------------------------------------- /mismi-dynamodb/ambiata-mismi-dynamodb.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | adjunctions == 4.3 3 | aeson == 1.1.1.0 4 | amazonka == 1.5.0 5 | amazonka-core == 1.5.0 6 | amazonka-dynamodb == 1.5.0 7 | asn1-encoding == 0.9.5 8 | asn1-parse == 0.9.4 9 | asn1-types == 0.3.2 10 | async == 2.1.1 11 | attoparsec == 0.13.1.0 12 | base-compat == 0.9.2 13 | base-orphans == 0.5.4 14 | base64-bytestring == 1.0.0.1 15 | bifunctors == 5.2.1 16 | blaze-builder == 0.4.0.2 17 | blaze-html == 0.9.0.1 18 | blaze-markup == 0.8.0.0 19 | byteable == 0.1.1 20 | case-insensitive == 1.2.0.8 21 | cereal == 0.5.4.0 22 | comonad == 5 23 | conduit == 1.2.9.1 24 | conduit-extra == 1.1.15 25 | connection == 0.2.5 26 | contravariant == 1.4 27 | cookie == 0.4.2.1 28 | cryptonite == 0.22 29 | data-default == 0.7.1.1 30 | data-default-class == 0.1.2.0 31 | data-default-instances-containers == 0.0.1 32 | data-default-instances-dlist == 0.0.1 33 | data-default-instances-old-locale == 0.0.1 34 | distributive == 0.5.2 35 | dlist == 0.8.0.2 36 | exceptions == 0.8.3 37 | fail == 4.9.0.0 38 | foundation == 0.0.6 39 | free == 4.12.4 40 | hashable == 1.2.6.0 41 | hourglass == 0.2.10 42 | http-client == 0.4.18.1 43 | http-client-tls == 0.2.4.1 44 | http-conduit == 2.1.7.2 45 | http-types == 0.8.6 46 | ini == 0.3.5 47 | integer-logarithms == 1.0.1 48 | kan-extensions == 5.0.1 49 | lens == 4.14 50 | lifted-base == 0.2.3.10 51 | memory == 0.14.3 52 | mime-types == 0.1.0.7 53 | mmorph == 1.0.9 54 | monad-control == 1.0.1.0 55 | mtl == 2.2.1 56 | network == 2.6.3.1 57 | network-uri == 2.6.1.0 58 | old-locale == 1.0.0.7 59 | parallel == 3.2.1.1 60 | parsec == 3.1.11 61 | pem == 0.2.2 62 | prelude-extras == 0.4.0.3 63 | primitive == 0.6.1.0 64 | profunctors == 5.2 65 | random == 1.1 66 | reflection == 2.1.2 67 | resourcet == 1.1.9 68 | retry == 0.7.4.2 69 | scientific == 0.3.4.11 70 | semigroupoids == 5.1 71 | semigroups == 0.18.2 72 | semigroups -bytestring-builder 73 | socks == 0.5.5 74 | StateVar == 1.1.0.4 75 | stm == 2.4.4.1 76 | streaming-commons == 0.1.17 77 | tagged == 0.8.5 78 | text == 1.2.2.1 79 | time-locale-compat == 0.1.1.3 80 | time-locale-compat -old-locale 81 | tls == 1.3.10 82 | transformers-base == 0.4.4 83 | transformers-compat == 0.5.1.4 84 | unordered-containers == 0.2.8.0 85 | uuid-types == 1.0.3 86 | vector == 0.11.0.0 87 | void == 0.7.2 88 | x509 == 1.6.5 89 | x509-store == 1.6.2 90 | x509-system == 1.6.4 91 | x509-validation == 1.6.5 92 | xml-conduit == 1.4.0.4 93 | xml-types == 0.3.6 94 | zlib == 0.6.1.2 95 | -------------------------------------------------------------------------------- /mismi-dynamodb/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-dynamodb/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-dynamodb/src/Mismi/DynamoDB/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Mismi.DynamoDB.Amazonka ( 4 | module AWS 5 | ) where 6 | 7 | 8 | import Network.AWS.DynamoDB as AWS 9 | -------------------------------------------------------------------------------- /mismi-dynamodb/src/Mismi/DynamoDB/Control.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Mismi.DynamoDB.Control ( 4 | configureRetries 5 | ) where 6 | 7 | import Control.Lens (over, set, (^.), has) 8 | 9 | import Mismi (Env) 10 | import Mismi.Amazonka (serviceRetry, retryAttempts, exponentBase, configure, retryCheck, hasCode, hasStatus) 11 | 12 | import Network.AWS.DynamoDB (dynamoDB) 13 | 14 | import P 15 | 16 | -- https://github.com/brendanhay/amazonka/issues/351 17 | configureRetries :: Env -> Env 18 | configureRetries env = 19 | let 20 | check e = 21 | let 22 | check' = dynamoDB ^. serviceRetry . retryCheck 23 | in 24 | case check' e of 25 | Nothing -> 26 | case has (hasCode "ProvisionedThroughputExceeded" . hasStatus 400) e of 27 | True -> 28 | Just "throughput_exceeded_x" 29 | False -> 30 | Nothing 31 | Just x -> 32 | Just x 33 | in 34 | flip configure env . 35 | flip (over serviceRetry) dynamoDB $ 36 | set retryAttempts 7 . 37 | set exponentBase 0.6 . 38 | set retryCheck check 39 | -------------------------------------------------------------------------------- /mismi-ec2-core/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-ec2-core/.gitignore: -------------------------------------------------------------------------------- 1 | scripts/*.hs 2 | 3 | -------------------------------------------------------------------------------- /mismi-ec2-core/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-ec2-core/ambiata-mismi-ec2-core.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-ec2-core 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-ec2-core. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , base64-bytestring == 1.0.* 19 | , text == 1.2.* 20 | 21 | ghc-options: 22 | -Wall 23 | 24 | hs-source-dirs: 25 | src 26 | 27 | 28 | exposed-modules: 29 | Mismi.EC2.Core.Data 30 | Mismi.EC2.Core.Ec2Types 31 | Mismi.EC2.Core.Device 32 | Mismi.EC2.Core.MismiTypes 33 | Mismi.EC2.Core.InstTypeToZone 34 | 35 | test-suite test 36 | type: exitcode-stdio-1.0 37 | main-is: test.hs 38 | ghc-options: -Wall -threaded -O2 39 | hs-source-dirs: test 40 | build-depends: base 41 | , ambiata-disorder-core 42 | , ambiata-disorder-corpus 43 | , ambiata-mismi-ec2-core 44 | , ambiata-p 45 | , text 46 | , QuickCheck >= 2.7 && < 2.12 47 | , quickcheck-instances == 0.3.* 48 | -------------------------------------------------------------------------------- /mismi-ec2-core/ambiata-mismi-ec2-core.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.5.4 3 | base64-bytestring == 1.0.0.1 4 | bifunctors == 5.3 5 | comonad == 5 6 | contravariant == 1.4 7 | distributive == 0.5.2 8 | hashable == 1.2.6.0 9 | ieee754 == 0.7.9 10 | integer-logarithms == 1.0.1 11 | old-locale == 1.0.0.7 12 | old-time == 1.1.0.3 13 | primitive == 0.6.2.0 14 | QuickCheck == 2.8.2 15 | quickcheck-instances == 0.3.12 16 | quickcheck-text == 0.1.2.1 17 | random == 1.1 18 | scientific == 0.3.4.11 19 | semigroups == 0.18.2 20 | semigroups -bytestring-builder 21 | StateVar == 1.1.0.4 22 | stm == 2.4.4.1 23 | tagged == 0.8.5 24 | text == 1.2.2.1 25 | tf-random == 0.5 26 | transformers-compat == 0.5.1.4 27 | unordered-containers == 0.2.8.0 28 | vector == 0.12.0.1 29 | void == 0.7.2 30 | -------------------------------------------------------------------------------- /mismi-ec2-core/ambiata-mismi-ec2-core.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.6 3 | base64-bytestring == 1.0.0.1 4 | bifunctors == 5.3 5 | cabal-doctest == 1 6 | comonad == 5 7 | contravariant == 1.4 8 | distributive == 0.5.2 9 | hashable == 1.2.6.0 10 | ieee754 == 0.8.0 11 | integer-logarithms == 1.0.1 12 | old-locale == 1.0.0.7 13 | old-time == 1.1.0.3 14 | primitive == 0.6.2.0 15 | QuickCheck == 2.8.2 16 | quickcheck-instances == 0.3.12 17 | quickcheck-text == 0.1.2.1 18 | random == 1.1 19 | scientific == 0.3.4.12 20 | semigroups == 0.18.2 21 | StateVar == 1.1.0.4 22 | stm == 2.4.4.1 23 | tagged == 0.8.5 24 | text == 1.2.2.1 25 | tf-random == 0.5 26 | transformers-compat == 0.5.1.4 27 | unordered-containers == 0.2.8.0 28 | vector == 0.12.0.1 29 | void == 0.7.2 30 | -------------------------------------------------------------------------------- /mismi-ec2-core/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-ec2-core/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master-with-test.toml -------------------------------------------------------------------------------- /mismi-ec2-core/scripts/.gitignore: -------------------------------------------------------------------------------- 1 | *.csv 2 | -------------------------------------------------------------------------------- /mismi-ec2-core/scripts/gen-ec2-core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | EC2_TYPES=$(cat ../../lib/amazonka/amazonka-ec2/gen/Network/AWS/EC2/Types/Sum.hs | sed -n '/data InstanceType/,/ deriving.*/{ 4 | p 5 | }' \ 6 | | grep -v 'data InstanceType' \ 7 | | grep -v '.*deriving' \ 8 | | sed -E 's/ +[|=] +(.*)/\1/g') 9 | 10 | function str_type() { 11 | echo $1 | tr '[:upper:]' '[:lower:]' | sed 's/_/./' 12 | } 13 | 14 | function virt_type() { 15 | if [[ $1 =~ (C1_|CC1_|CG1_|CR1_|HI1_|HS1_|M1_|M2_|CC2_) ]]; then 16 | echo 'Paravirtual' 17 | else 18 | echo 'HVM' 19 | fi 20 | } 21 | 22 | cat < MismiVirtualizationType 48 | virtualizationFor itype = 49 | case itype of' 50 | for T in $EC2_TYPES; do 51 | echo " $T ->" 52 | echo " $(virt_type $T)" 53 | done 54 | echo 55 | echo 56 | 57 | echo 'renderMismiInstanceType :: MismiInstanceType -> Text 58 | renderMismiInstanceType m = 59 | case m of' 60 | for T in $EC2_TYPES; do 61 | echo " $T ->" 62 | echo " \"$(str_type $T)\"" 63 | done 64 | echo 65 | echo 66 | 67 | echo 'parseMismiInstanceType :: Text -> Maybe MismiInstanceType 68 | parseMismiInstanceType m = 69 | case m of' 70 | for T in $EC2_TYPES; do 71 | echo " \"$(str_type $T)\" ->" 72 | echo " Just $T" 73 | done 74 | echo ' _ -> 75 | Nothing' 76 | echo 77 | echo 78 | -------------------------------------------------------------------------------- /mismi-ec2-core/scripts/gen-ec2.sh: -------------------------------------------------------------------------------- 1 | EC2_TYPES=$(cat ../../lib/amazonka/amazonka-ec2/gen/Network/AWS/EC2/Types/Sum.hs | sed -n '/data InstanceType/,/ deriving.*/{ 2 | p 3 | }' \ 4 | | grep -v 'data InstanceType' \ 5 | | grep -v '.*deriving' \ 6 | | sed -E 's/ +[|=] +(.*)/\1/g') 7 | 8 | function str_type() { 9 | echo $1 | tr '[:upper:]' '[:lower:]' | sed 's/_/./' 10 | } 11 | 12 | 13 | echo 'fromMismiInstanceType :: MismiInstanceType -> A.InstanceType 14 | fromMismiInstanceType m = 15 | case m of' 16 | for T in $EC2_TYPES; do 17 | echo " $T ->" 18 | echo " A.$T" 19 | done 20 | echo 21 | echo 22 | 23 | echo 'toMismiInstanceType :: A.InstanceType -> MismiInstanceType 24 | toMismiInstanceType i = 25 | case i of' 26 | for T in $EC2_TYPES; do 27 | echo " A.$T ->" 28 | echo " $T" 29 | done 30 | echo 31 | echo -------------------------------------------------------------------------------- /mismi-ec2-core/scripts/gen.sh: -------------------------------------------------------------------------------- 1 | EC2_TYPES=$(cat ../../lib/amazonka/amazonka-ec2/gen/Network/AWS/EC2/Types/Sum.hs | sed -n '/data InstanceType/,/ deriving.*/{ 2 | p 3 | }' \ 4 | | grep -v 'data InstanceType' \ 5 | | grep -v '.*deriving' \ 6 | | sed -E 's/ +[|=] +(.*)/\1/g') 7 | 8 | function str_type() { 9 | echo $1 | tr '[:upper:]' '[:lower:]' | sed 's/_/./' 10 | } 11 | 12 | ./gen-ec2.sh > ec2-Data.hs 13 | 14 | ./gen-ec2-core.sh > ../src/Mismi/EC2/Core/Ec2Types.hs 15 | -------------------------------------------------------------------------------- /mismi-ec2-core/src/Mismi/EC2/Core/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Mismi.EC2.Core.Data ( 4 | InstanceId (..) 5 | , UserData (..) 6 | , SecurityGroupName (..) 7 | , SecurityGroupId (..) 8 | , LoadBalancer (..) 9 | , AvailabilityZone (..) 10 | , ImageId (..) 11 | , EC2Market (..) 12 | , MismiSpotInstanceType (..) 13 | , EC2Tag (..) 14 | , MismiInstanceType (..) 15 | , MismiVirtualizationType (..) 16 | , BlockDeviceMapping (..) 17 | , encodeUserData 18 | , decodeUserData 19 | , renderVirtualization 20 | , renderVirtualizationAws 21 | , parseVirtualization 22 | , virtualizationFor 23 | , renderMismiInstanceType 24 | , parseMismiInstanceType 25 | , sydAzForInstanceType 26 | ) where 27 | 28 | import Mismi.EC2.Core.Ec2Types 29 | import Mismi.EC2.Core.MismiTypes 30 | import Mismi.EC2.Core.InstTypeToZone 31 | -------------------------------------------------------------------------------- /mismi-ec2-core/src/Mismi/EC2/Core/InstTypeToZone.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Mismi.EC2.Core.InstTypeToZone ( 4 | sydAzForInstanceType 5 | ) where 6 | 7 | import Mismi.EC2.Core.MismiTypes 8 | import Mismi.EC2.Core.Ec2Types 9 | 10 | -- | determine for az's for server types where the spot price is higher in ap-southeast-2 11 | -- very much a hack until spot price is looked up dynamically using describeSpotPriceHistory 12 | -- once implemented properly in mismi-ec2 this will be removed 13 | sydAzForInstanceType :: MismiInstanceType -> [AvailabilityZone] 14 | sydAzForInstanceType t = 15 | case t of 16 | M1_Large -> 17 | zonesAB 18 | M3_Large -> 19 | zonesAB 20 | M3_2XLarge -> 21 | zonesAB 22 | I2_2XLarge -> 23 | zonesAB 24 | I3_Large -> 25 | zonesBC 26 | I3_XLarge -> 27 | zonesBC 28 | I3_2XLarge -> 29 | zonesBC 30 | I3_4XLarge -> 31 | zonesBC 32 | I3_8XLarge -> 33 | zonesBC 34 | R3_4XLarge -> 35 | zonesAB 36 | R4_16XLarge -> 37 | zonesBC 38 | _ -> 39 | allZones 40 | where 41 | zonesAB = [ 42 | AvailabilityZone "ap-southeast-2a" 43 | , AvailabilityZone "ap-southeast-2b" 44 | ] 45 | zonesBC = [ 46 | AvailabilityZone "ap-southeast-2b" 47 | , AvailabilityZone "ap-southeast-2c" 48 | ] 49 | allZones = [ 50 | AvailabilityZone "ap-southeast-2a" 51 | , AvailabilityZone "ap-southeast-2b" 52 | , AvailabilityZone "ap-southeast-2c" 53 | ] 54 | 55 | -------------------------------------------------------------------------------- /mismi-ec2-core/test/Test/Mismi/EC2/Core/Arbitrary.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | {-# OPTIONS_GHC -fno-warn-orphans #-} 3 | module Test.Mismi.EC2.Core.Arbitrary where 4 | 5 | import qualified Data.Text as T 6 | 7 | import Disorder.Corpus 8 | 9 | import Mismi.EC2.Core.Data 10 | 11 | import P 12 | 13 | import Test.QuickCheck 14 | import Test.QuickCheck.Instances () 15 | 16 | 17 | instance Arbitrary InstanceId where 18 | arbitrary = 19 | InstanceId <$> elements muppets 20 | 21 | instance Arbitrary LoadBalancer where 22 | arbitrary = 23 | LoadBalancer <$> elements colours 24 | 25 | instance Arbitrary EC2Tag where 26 | arbitrary = 27 | EC2Tag 28 | <$> elements cooking 29 | <*> elements boats 30 | 31 | instance Arbitrary SecurityGroupName where 32 | arbitrary = 33 | SecurityGroupName <$> elements simpsons 34 | 35 | instance Arbitrary ImageId where 36 | arbitrary = 37 | ImageId 38 | <$> (T.pack . ("ami-" <>) <$> vectorOf 8 (oneof [choose ('0', '9'), choose ('a', 'z')])) 39 | 40 | instance Arbitrary EC2Market where 41 | arbitrary = 42 | oneof [ 43 | pure EC2OnDemand 44 | , EC2Spot <$> elements ["0.05", "1.10", "0.40"] <*> elements [OneTime, Persistent] 45 | ] 46 | 47 | instance Arbitrary AvailabilityZone where 48 | arbitrary = 49 | elements [ 50 | AvailabilityZone "ap-southeast-2a" 51 | , AvailabilityZone "ap-southeast-2b" 52 | , AvailabilityZone "ap-southeast-2c" 53 | ] 54 | 55 | instance Arbitrary MismiSpotInstanceType where 56 | arbitrary = 57 | arbitraryBoundedEnum 58 | 59 | instance Arbitrary MismiInstanceType where 60 | arbitrary = 61 | arbitraryBoundedEnum 62 | 63 | instance Arbitrary MismiVirtualizationType where 64 | arbitrary = 65 | arbitraryBoundedEnum 66 | -------------------------------------------------------------------------------- /mismi-ec2-core/test/Test/Mismi/EC2/Core/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE TemplateHaskell #-} 3 | {-# LANGUAGE OverloadedStrings #-} 4 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 5 | module Test.Mismi.EC2.Core.Data where 6 | 7 | import Mismi.EC2.Core.Data 8 | 9 | import P 10 | 11 | import Test.Mismi.EC2.Core.Arbitrary () 12 | import Test.QuickCheck 13 | 14 | 15 | prop_virtualization v = 16 | parseVirtualization (renderVirtualization v) === Just v 17 | 18 | prop_instance_type v = 19 | parseMismiInstanceType (renderMismiInstanceType v) === Just v 20 | 21 | return [] 22 | tests = $quickCheckAll 23 | -------------------------------------------------------------------------------- /mismi-ec2-core/test/ambiata-mismi-ec2-core-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-ec2-core-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-disorder-core 10 | , ambiata-disorder-corpus 11 | , ambiata-p 12 | , ambiata-mismi-ec2-core 13 | , text 14 | , QuickCheck >= 2.7 && < 2.12 15 | , quickcheck-instances == 0.3.* 16 | 17 | 18 | exposed-modules: 19 | Test.Mismi.EC2.Core.Arbitrary 20 | -------------------------------------------------------------------------------- /mismi-ec2-core/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.Mismi.EC2.Core.Data 4 | 5 | main :: IO () 6 | main = 7 | disorderMain [ 8 | Test.Mismi.EC2.Core.Data.tests 9 | ] 10 | -------------------------------------------------------------------------------- /mismi-ec2/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-ec2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-ec2/ambiata-mismi-ec2.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-ec2/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-ec2/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master-with-test.toml -------------------------------------------------------------------------------- /mismi-ec2/src/Mismi/EC2.hs: -------------------------------------------------------------------------------- 1 | module Mismi.EC2 ( 2 | module X 3 | ) where 4 | 5 | import Mismi.EC2.Commands as X 6 | import Mismi.EC2.Data as X 7 | import Mismi.EC2.Metadata as X 8 | -------------------------------------------------------------------------------- /mismi-ec2/src/Mismi/EC2/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.EC2.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Network.AWS.EC2 as AWS 7 | -------------------------------------------------------------------------------- /mismi-ec2/src/Mismi/EC2/Commands.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Mismi.EC2.Commands ( 4 | findSecurityGroupByName 5 | ) where 6 | 7 | import Control.Lens (view, (.~)) 8 | 9 | import Mismi.Amazonka 10 | import Mismi.EC2.Data 11 | 12 | import Mismi.EC2.Amazonka 13 | 14 | import P 15 | 16 | findSecurityGroupByName :: SecurityGroupName -> AWS (Maybe SecurityGroupId) 17 | findSecurityGroupByName (SecurityGroupName n) = do 18 | r <- send $ describeSecurityGroups & dsgsFilters .~ [filter' "group-name" & fValues .~ [n]] 19 | return . fmap (SecurityGroupId . view sgGroupId) . listToMaybe . view dsgrsSecurityGroups $ r 20 | -------------------------------------------------------------------------------- /mismi-ec2/test/Test/IO/Mismi/EC2/Commands.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE TemplateHaskell #-} 4 | module Test.IO.Mismi.EC2.Commands where 5 | 6 | import Data.Maybe 7 | 8 | import Mismi.EC2.Commands 9 | import Mismi.EC2.Data 10 | 11 | import P 12 | 13 | import System.IO (IO) 14 | 15 | import Test.Mismi 16 | import Test.QuickCheck 17 | 18 | 19 | prop_findSecurityGroupByName_found :: Property 20 | prop_findSecurityGroupByName_found = testAWS $ do 21 | mid <- findSecurityGroupByName (SecurityGroupName "ci.ci.db") 22 | return $ isJust mid 23 | 24 | prop_findSecurityGroupByName_not_found :: Property 25 | prop_findSecurityGroupByName_not_found = testAWS $ do 26 | mid <- findSecurityGroupByName (SecurityGroupName "not-found") 27 | return $ mid === Nothing 28 | 29 | 30 | return [] 31 | tests :: IO Bool 32 | tests = $forAllProperties $ quickCheckWithResult (stdArgs { maxSuccess = 2 }) 33 | -------------------------------------------------------------------------------- /mismi-ec2/test/Test/Mismi/EC2/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE TemplateHaskell #-} 3 | {-# LANGUAGE OverloadedStrings #-} 4 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 5 | module Test.Mismi.EC2.Data where 6 | 7 | import Mismi.EC2.Data 8 | 9 | import P 10 | 11 | import Test.Mismi.EC2.Core.Arbitrary () 12 | import Test.QuickCheck 13 | 14 | 15 | prop_instance_type v = 16 | toMismiInstanceType (fromMismiInstanceType v) === v 17 | 18 | prop_virtualization v = 19 | toMismiVirtualizationType (fromMismiVirtualizationType v) === v 20 | 21 | prop_tag e = 22 | toMismiTag (fromMismiTag e) === e 23 | 24 | return [] 25 | tests = $quickCheckAll 26 | -------------------------------------------------------------------------------- /mismi-ec2/test/ambiata-mismi-ec2-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-ec2 3 | -------------------------------------------------------------------------------- /mismi-ec2/test/test-io.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import Test.IO.Mismi.EC2.Commands 4 | 5 | main :: IO () 6 | main = 7 | disorderMain [ 8 | Test.IO.Mismi.EC2.Commands.tests 9 | ] 10 | -------------------------------------------------------------------------------- /mismi-ec2/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.Mismi.EC2.Data 4 | 5 | main :: IO () 6 | main = 7 | disorderMain [ 8 | Test.Mismi.EC2.Data.tests 9 | ] 10 | -------------------------------------------------------------------------------- /mismi-elb/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-elb/ambiata-mismi-elb.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-elb 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-elb. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , amazonka >= 1.3.6 && < 1.6 18 | , amazonka-core >= 1.3.6 && < 1.6 19 | , amazonka-elb >= 1.3.6 && < 1.6 20 | 21 | ghc-options: 22 | -Wall 23 | 24 | hs-source-dirs: 25 | src 26 | 27 | exposed-modules: 28 | Mismi.ELB 29 | Mismi.ELB.Amazonka 30 | 31 | test-suite test 32 | type: exitcode-stdio-1.0 33 | main-is: test.hs 34 | ghc-options: -Wall -threaded -O2 35 | hs-source-dirs: test 36 | build-depends: base 37 | , ambiata-disorder-core 38 | , ambiata-mismi-core 39 | , ambiata-mismi-elb 40 | , QuickCheck >= 2.7 && < 2.12 41 | , quickcheck-instances == 0.3.* 42 | -------------------------------------------------------------------------------- /mismi-elb/ambiata-mismi-elb.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | adjunctions == 4.3 3 | aeson == 1.1.1.0 4 | amazonka == 1.5.0 5 | amazonka-core == 1.5.0 6 | amazonka-elb == 1.5.0 7 | asn1-encoding == 0.9.5 8 | asn1-parse == 0.9.4 9 | asn1-types == 0.3.2 10 | async == 2.1.1.1 11 | attoparsec == 0.13.1.0 12 | base-compat == 0.9.3 13 | base-orphans == 0.6 14 | base64-bytestring == 1.0.0.1 15 | bifunctors == 5.2.1 16 | blaze-builder == 0.4.0.2 17 | blaze-html == 0.9.0.1 18 | blaze-markup == 0.8.0.0 19 | byteable == 0.1.1 20 | cabal-doctest == 1 21 | case-insensitive == 1.2.0.8 22 | cereal == 0.5.4.0 23 | comonad == 5 24 | conduit == 1.2.9.1 25 | conduit-extra == 1.1.15 26 | connection == 0.2.5 27 | contravariant == 1.4 28 | cookie == 0.4.2.1 29 | cryptonite == 0.22 30 | data-default == 0.7.1.1 31 | data-default-class == 0.1.2.0 32 | data-default-instances-containers == 0.0.1 33 | data-default-instances-dlist == 0.0.1 34 | data-default-instances-old-locale == 0.0.1 35 | distributive == 0.5.2 36 | dlist == 0.8.0.2 37 | exceptions == 0.8.3 38 | foundation == 0.0.6 39 | free == 4.12.4 40 | hashable == 1.2.6.0 41 | hourglass == 0.2.10 42 | http-client == 0.4.18.1 43 | http-client-tls == 0.2.4.1 44 | http-conduit == 2.1.7.2 45 | http-types == 0.8.6 46 | ieee754 == 0.8.0 47 | ini == 0.3.5 48 | integer-logarithms == 1.0.1 49 | kan-extensions == 5.0.1 50 | lens == 4.14 51 | lifted-base == 0.2.3.10 52 | memory == 0.14.3 53 | mime-types == 0.1.0.7 54 | mmorph == 1.0.9 55 | monad-control == 1.0.1.0 56 | mtl == 2.2.1 57 | network == 2.6.3.1 58 | network-uri == 2.6.1.0 59 | old-locale == 1.0.0.7 60 | old-time == 1.1.0.3 61 | parallel == 3.2.1.1 62 | parsec == 3.1.11 63 | pem == 0.2.2 64 | prelude-extras == 0.4.0.3 65 | primitive == 0.6.1.0 66 | profunctors == 5.2 67 | QuickCheck == 2.8.2 68 | quickcheck-instances == 0.3.12 69 | quickcheck-text == 0.1.2.1 70 | random == 1.1 71 | reflection == 2.1.2 72 | resourcet == 1.1.9 73 | retry == 0.7.4.2 74 | scientific == 0.3.4.12 75 | semigroupoids == 5.1 76 | semigroups == 0.18.2 77 | socks == 0.5.5 78 | StateVar == 1.1.0.4 79 | stm == 2.4.4.1 80 | streaming-commons == 0.1.17 81 | tagged == 0.8.5 82 | text == 1.2.2.1 83 | tf-random == 0.5 84 | time-locale-compat == 0.1.1.3 85 | time-locale-compat -old-locale 86 | tls == 1.3.10 87 | transformers-base == 0.4.4 88 | transformers-compat == 0.5.1.4 89 | unordered-containers == 0.2.8.0 90 | uuid-types == 1.0.3 91 | vector == 0.11.0.0 92 | void == 0.7.2 93 | x509 == 1.6.5 94 | x509-store == 1.6.2 95 | x509-system == 1.6.4 96 | x509-validation == 1.6.5 97 | xml-conduit == 1.4.0.4 98 | xml-types == 0.3.6 99 | zlib == 0.6.1.2 100 | -------------------------------------------------------------------------------- /mismi-elb/ambiata-mismi-elb.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-elb/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-elb/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-elb/src/Mismi/ELB.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.ELB ( 3 | ) where 4 | -------------------------------------------------------------------------------- /mismi-elb/src/Mismi/ELB/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.ELB.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Network.AWS.ELB as AWS 7 | -------------------------------------------------------------------------------- /mismi-elb/test/ambiata-mismi-elb-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-elb-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-mismi-elb 10 | 11 | exposed-modules: 12 | -------------------------------------------------------------------------------- /mismi-elb/test/ambiata-mismi-elb-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-elb 3 | -------------------------------------------------------------------------------- /mismi-elb/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | 4 | main :: IO () 5 | main = 6 | disorderMain [ 7 | ] 8 | -------------------------------------------------------------------------------- /mismi-emr/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-emr/ambiata-mismi-emr.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-emr 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-emr. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , amazonka >= 1.3.6 && < 1.6 18 | , amazonka-core >= 1.3.6 && < 1.6 19 | , amazonka-emr >= 1.3.6 && < 1.6 20 | 21 | 22 | ghc-options: 23 | -Wall 24 | 25 | hs-source-dirs: 26 | src 27 | 28 | exposed-modules: 29 | Mismi.EMR 30 | Mismi.EMR.Amazonka 31 | 32 | test-suite test 33 | type: exitcode-stdio-1.0 34 | main-is: test.hs 35 | ghc-options: -Wall -threaded -O2 36 | hs-source-dirs: test 37 | build-depends: base 38 | , ambiata-disorder-core 39 | , ambiata-mismi-core 40 | , ambiata-mismi-emr 41 | , QuickCheck >= 2.7 && < 2.12 42 | , quickcheck-instances == 0.3.* 43 | -------------------------------------------------------------------------------- /mismi-emr/ambiata-mismi-emr.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | adjunctions == 4.3 3 | aeson == 1.1.1.0 4 | amazonka == 1.5.0 5 | amazonka-core == 1.5.0 6 | amazonka-emr == 1.5.0 7 | asn1-encoding == 0.9.5 8 | asn1-parse == 0.9.4 9 | asn1-types == 0.3.2 10 | async == 2.1.1.1 11 | attoparsec == 0.13.1.0 12 | base-compat == 0.9.3 13 | base-orphans == 0.6 14 | base64-bytestring == 1.0.0.1 15 | bifunctors == 5.2.1 16 | blaze-builder == 0.4.0.2 17 | blaze-html == 0.9.0.1 18 | blaze-markup == 0.8.0.0 19 | byteable == 0.1.1 20 | cabal-doctest == 1 21 | case-insensitive == 1.2.0.8 22 | cereal == 0.5.4.0 23 | comonad == 5 24 | conduit == 1.2.9.1 25 | conduit-extra == 1.1.15 26 | connection == 0.2.5 27 | contravariant == 1.4 28 | cookie == 0.4.2.1 29 | cryptonite == 0.22 30 | data-default == 0.7.1.1 31 | data-default-class == 0.1.2.0 32 | data-default-instances-containers == 0.0.1 33 | data-default-instances-dlist == 0.0.1 34 | data-default-instances-old-locale == 0.0.1 35 | distributive == 0.5.2 36 | dlist == 0.8.0.2 37 | exceptions == 0.8.3 38 | foundation == 0.0.6 39 | free == 4.12.4 40 | hashable == 1.2.6.0 41 | hourglass == 0.2.10 42 | http-client == 0.4.18.1 43 | http-client-tls == 0.2.4.1 44 | http-conduit == 2.1.7.2 45 | http-types == 0.8.6 46 | ieee754 == 0.8.0 47 | ini == 0.3.5 48 | integer-logarithms == 1.0.1 49 | kan-extensions == 5.0.1 50 | lens == 4.14 51 | lifted-base == 0.2.3.10 52 | memory == 0.14.3 53 | mime-types == 0.1.0.7 54 | mmorph == 1.0.9 55 | monad-control == 1.0.1.0 56 | mtl == 2.2.1 57 | network == 2.6.3.1 58 | network-uri == 2.6.1.0 59 | old-locale == 1.0.0.7 60 | old-time == 1.1.0.3 61 | parallel == 3.2.1.1 62 | parsec == 3.1.11 63 | pem == 0.2.2 64 | prelude-extras == 0.4.0.3 65 | primitive == 0.6.1.0 66 | profunctors == 5.2 67 | QuickCheck == 2.8.2 68 | quickcheck-instances == 0.3.12 69 | quickcheck-text == 0.1.2.1 70 | random == 1.1 71 | reflection == 2.1.2 72 | resourcet == 1.1.9 73 | retry == 0.7.4.2 74 | scientific == 0.3.4.12 75 | semigroupoids == 5.1 76 | semigroups == 0.18.2 77 | socks == 0.5.5 78 | StateVar == 1.1.0.4 79 | stm == 2.4.4.1 80 | streaming-commons == 0.1.17 81 | tagged == 0.8.5 82 | text == 1.2.2.1 83 | tf-random == 0.5 84 | time-locale-compat == 0.1.1.3 85 | time-locale-compat -old-locale 86 | tls == 1.3.10 87 | transformers-base == 0.4.4 88 | transformers-compat == 0.5.1.4 89 | unordered-containers == 0.2.8.0 90 | uuid-types == 1.0.3 91 | vector == 0.11.0.0 92 | void == 0.7.2 93 | x509 == 1.6.5 94 | x509-store == 1.6.2 95 | x509-system == 1.6.4 96 | x509-validation == 1.6.5 97 | xml-conduit == 1.4.0.4 98 | xml-types == 0.3.6 99 | zlib == 0.6.1.2 100 | -------------------------------------------------------------------------------- /mismi-emr/ambiata-mismi-emr.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-emr/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-emr/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-emr/src/Mismi/EMR.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.EMR ( 3 | ) where 4 | -------------------------------------------------------------------------------- /mismi-emr/src/Mismi/EMR/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.EMR.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Network.AWS.EMR as AWS 7 | -------------------------------------------------------------------------------- /mismi-emr/test/ambiata-mismi-emr-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-emr-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-mismi-emr 10 | 11 | exposed-modules: 12 | -------------------------------------------------------------------------------- /mismi-emr/test/ambiata-mismi-emr-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-emr 3 | -------------------------------------------------------------------------------- /mismi-emr/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | 4 | main :: IO () 5 | main = 6 | disorderMain [ 7 | ] 8 | -------------------------------------------------------------------------------- /mismi-iam-core/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-iam-core/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-iam-core/ambiata-mismi-iam-core.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-iam-core 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-iam-core. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , text == 1.2.* 19 | 20 | ghc-options: 21 | -Wall 22 | 23 | hs-source-dirs: 24 | src 25 | 26 | exposed-modules: 27 | Mismi.IAM.Core.Data 28 | -------------------------------------------------------------------------------- /mismi-iam-core/ambiata-mismi-iam-core.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.5.4 3 | bifunctors == 5.3 4 | comonad == 5 5 | contravariant == 1.4 6 | distributive == 0.5.2 7 | hashable == 1.2.6.0 8 | semigroups == 0.18.2 9 | semigroups -bytestring-builder 10 | StateVar == 1.1.0.4 11 | stm == 2.4.4.1 12 | tagged == 0.8.5 13 | text == 1.2.2.1 14 | transformers-compat == 0.5.1.4 15 | unordered-containers == 0.2.8.0 16 | void == 0.7.2 17 | -------------------------------------------------------------------------------- /mismi-iam-core/ambiata-mismi-iam-core.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.6 3 | bifunctors == 5.3 4 | cabal-doctest == 1 5 | comonad == 5 6 | contravariant == 1.4 7 | distributive == 0.5.2 8 | semigroups == 0.18.2 9 | StateVar == 1.1.0.4 10 | stm == 2.4.4.1 11 | tagged == 0.8.5 12 | text == 1.2.2.1 13 | transformers-compat == 0.5.1.4 14 | void == 0.7.2 15 | -------------------------------------------------------------------------------- /mismi-iam-core/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-iam-core/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-iam-core/src/Mismi/IAM/Core/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Mismi.IAM.Core.Data ( 4 | IamRole (..) 5 | ) where 6 | 7 | import P 8 | 9 | newtype IamRole = 10 | IamRole { 11 | iamRole :: Text 12 | } deriving (Eq, Show, Ord) 13 | -------------------------------------------------------------------------------- /mismi-iam/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-iam/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-iam/ambiata-mismi-iam.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-iam 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-iam. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , ambiata-mismi-core 19 | , ambiata-x-eithert 20 | , amazonka >= 1.3.6 && < 1.6 21 | , amazonka-core >= 1.3.6 && < 1.6 22 | , amazonka-iam >= 1.3.6 && < 1.6 23 | 24 | 25 | ghc-options: 26 | -Wall 27 | 28 | hs-source-dirs: 29 | src 30 | 31 | exposed-modules: 32 | Mismi.IAM 33 | Mismi.IAM.Amazonka 34 | 35 | test-suite test 36 | type: exitcode-stdio-1.0 37 | main-is: test.hs 38 | hs-source-dirs: test 39 | ghc-options: -Wall -threaded -O2 40 | build-depends: base 41 | , ambiata-disorder-core 42 | , ambiata-mismi-core 43 | , ambiata-mismi-iam 44 | , QuickCheck >= 2.7 && < 2.12 45 | , quickcheck-instances == 0.3.* 46 | -------------------------------------------------------------------------------- /mismi-iam/ambiata-mismi-iam.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | adjunctions == 4.3 3 | aeson == 1.1.1.0 4 | amazonka == 1.5.0 5 | amazonka-core == 1.5.0 6 | amazonka-iam == 1.5.0 7 | asn1-encoding == 0.9.5 8 | asn1-parse == 0.9.4 9 | asn1-types == 0.3.2 10 | async == 2.1.1.1 11 | attoparsec == 0.13.1.0 12 | base-compat == 0.9.3 13 | base-orphans == 0.6 14 | base64-bytestring == 1.0.0.1 15 | bifunctors == 5.2.1 16 | blaze-builder == 0.4.0.2 17 | blaze-html == 0.9.0.1 18 | blaze-markup == 0.8.0.0 19 | byteable == 0.1.1 20 | cabal-doctest == 1 21 | case-insensitive == 1.2.0.8 22 | cereal == 0.5.4.0 23 | comonad == 5 24 | conduit == 1.2.9.1 25 | conduit-extra == 1.1.15 26 | connection == 0.2.5 27 | contravariant == 1.4 28 | cookie == 0.4.2.1 29 | cryptonite == 0.22 30 | data-default == 0.7.1.1 31 | data-default-class == 0.1.2.0 32 | data-default-instances-containers == 0.0.1 33 | data-default-instances-dlist == 0.0.1 34 | data-default-instances-old-locale == 0.0.1 35 | distributive == 0.5.2 36 | dlist == 0.8.0.2 37 | exceptions == 0.8.3 38 | foundation == 0.0.6 39 | free == 4.12.4 40 | hashable == 1.2.6.0 41 | hourglass == 0.2.10 42 | http-client == 0.4.18.1 43 | http-client-tls == 0.2.4.1 44 | http-conduit == 2.1.7.2 45 | http-types == 0.8.6 46 | ieee754 == 0.8.0 47 | ini == 0.3.5 48 | integer-logarithms == 1.0.1 49 | kan-extensions == 5.0.1 50 | lens == 4.14 51 | lifted-base == 0.2.3.10 52 | memory == 0.14.3 53 | mime-types == 0.1.0.7 54 | mmorph == 1.0.9 55 | monad-control == 1.0.1.0 56 | mtl == 2.2.1 57 | network == 2.6.3.1 58 | network-uri == 2.6.1.0 59 | old-locale == 1.0.0.7 60 | old-time == 1.1.0.3 61 | parallel == 3.2.1.1 62 | parsec == 3.1.11 63 | pem == 0.2.2 64 | prelude-extras == 0.4.0.3 65 | primitive == 0.6.1.0 66 | profunctors == 5.2 67 | QuickCheck == 2.8.2 68 | quickcheck-instances == 0.3.12 69 | quickcheck-text == 0.1.2.1 70 | random == 1.1 71 | reflection == 2.1.2 72 | resourcet == 1.1.9 73 | retry == 0.7.4.2 74 | scientific == 0.3.4.12 75 | semigroupoids == 5.1 76 | semigroups == 0.18.2 77 | socks == 0.5.5 78 | StateVar == 1.1.0.4 79 | stm == 2.4.4.1 80 | streaming-commons == 0.1.17 81 | tagged == 0.8.5 82 | text == 1.2.2.1 83 | tf-random == 0.5 84 | time-locale-compat == 0.1.1.3 85 | time-locale-compat -old-locale 86 | tls == 1.3.10 87 | transformers-base == 0.4.4 88 | transformers-compat == 0.5.1.4 89 | unordered-containers == 0.2.8.0 90 | uuid-types == 1.0.3 91 | vector == 0.11.0.0 92 | void == 0.7.2 93 | x509 == 1.6.5 94 | x509-store == 1.6.2 95 | x509-system == 1.6.4 96 | x509-validation == 1.6.5 97 | xml-conduit == 1.4.0.4 98 | xml-types == 0.3.6 99 | zlib == 0.6.1.2 100 | -------------------------------------------------------------------------------- /mismi-iam/ambiata-mismi-iam.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-iam/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-iam/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-iam/src/Mismi/IAM.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.IAM ( 3 | ) where 4 | -------------------------------------------------------------------------------- /mismi-iam/src/Mismi/IAM/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.IAM.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Network.AWS.IAM as AWS 7 | -------------------------------------------------------------------------------- /mismi-iam/test/ambiata-mismi-iam-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-iam-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-mismi-iam 10 | 11 | exposed-modules: 12 | -------------------------------------------------------------------------------- /mismi-iam/test/ambiata-mismi-iam-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-iam 3 | -------------------------------------------------------------------------------- /mismi-iam/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | 4 | main :: IO () 5 | main = 6 | disorderMain [ 7 | ] 8 | -------------------------------------------------------------------------------- /mismi-kernel/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-kernel/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-kernel/ambiata-mismi-kernel.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-kernel 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-kernel. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , text == 1.2.* 19 | 20 | ghc-options: 21 | -Wall 22 | 23 | hs-source-dirs: 24 | src 25 | 26 | 27 | exposed-modules: 28 | Mismi.Kernel.Data 29 | 30 | test-suite test 31 | type: exitcode-stdio-1.0 32 | main-is: test.hs 33 | ghc-options: -Wall -threaded -O2 34 | hs-source-dirs: test 35 | build-depends: base 36 | , ambiata-disorder-core 37 | , ambiata-disorder-corpus 38 | , ambiata-mismi-kernel 39 | , ambiata-p 40 | , text 41 | , QuickCheck >= 2.7 && < 2.12 42 | , quickcheck-instances == 0.3.* 43 | -------------------------------------------------------------------------------- /mismi-kernel/ambiata-mismi-kernel.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.5.4 3 | bifunctors == 5.3 4 | comonad == 5 5 | contravariant == 1.4 6 | distributive == 0.5.2 7 | hashable == 1.2.6.0 8 | ieee754 == 0.7.9 9 | integer-logarithms == 1.0.1 10 | old-locale == 1.0.0.7 11 | old-time == 1.1.0.3 12 | primitive == 0.6.2.0 13 | QuickCheck == 2.8.2 14 | quickcheck-instances == 0.3.12 15 | quickcheck-text == 0.1.2.1 16 | random == 1.1 17 | scientific == 0.3.4.11 18 | semigroups == 0.18.2 19 | semigroups -bytestring-builder 20 | StateVar == 1.1.0.4 21 | stm == 2.4.4.1 22 | tagged == 0.8.5 23 | text == 1.2.2.1 24 | tf-random == 0.5 25 | transformers-compat == 0.5.1.4 26 | unordered-containers == 0.2.8.0 27 | vector == 0.12.0.1 28 | void == 0.7.2 29 | -------------------------------------------------------------------------------- /mismi-kernel/ambiata-mismi-kernel.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.6 3 | bifunctors == 5.3 4 | cabal-doctest == 1 5 | comonad == 5 6 | contravariant == 1.4 7 | distributive == 0.5.2 8 | hashable == 1.2.6.0 9 | ieee754 == 0.8.0 10 | integer-logarithms == 1.0.1 11 | old-locale == 1.0.0.7 12 | old-time == 1.1.0.3 13 | primitive == 0.6.2.0 14 | QuickCheck == 2.8.2 15 | quickcheck-instances == 0.3.12 16 | quickcheck-text == 0.1.2.1 17 | random == 1.1 18 | scientific == 0.3.4.12 19 | semigroups == 0.18.2 20 | StateVar == 1.1.0.4 21 | stm == 2.4.4.1 22 | tagged == 0.8.5 23 | text == 1.2.2.1 24 | tf-random == 0.5 25 | transformers-compat == 0.5.1.4 26 | unordered-containers == 0.2.8.0 27 | vector == 0.12.0.1 28 | void == 0.7.2 29 | -------------------------------------------------------------------------------- /mismi-kernel/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-kernel/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master-with-test.toml -------------------------------------------------------------------------------- /mismi-kernel/test/Test/Mismi/Kernel/Arbitrary.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# OPTIONS_GHC -fno-warn-orphans #-} 3 | module Test.Mismi.Kernel.Arbitrary where 4 | 5 | import Mismi.Kernel.Data 6 | 7 | import Test.QuickCheck 8 | import Test.QuickCheck.Instances () 9 | 10 | 11 | instance Arbitrary MismiRegion where 12 | arbitrary = 13 | arbitraryBoundedEnum 14 | -------------------------------------------------------------------------------- /mismi-kernel/test/Test/Mismi/Kernel/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE TemplateHaskell #-} 4 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 5 | module Test.Mismi.Kernel.Data where 6 | 7 | import Disorder.Core 8 | 9 | import Mismi.Kernel.Data 10 | 11 | import P 12 | 13 | import Test.QuickCheck 14 | import Test.Mismi.Kernel.Arbitrary () 15 | 16 | 17 | prop_tripping_region = 18 | tripping renderMismiRegion parseMismiRegion 19 | 20 | return [] 21 | tests = $quickCheckAll 22 | -------------------------------------------------------------------------------- /mismi-kernel/test/ambiata-mismi-kernel-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-kernel-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base >= 3 && < 6 9 | , ambiata-mismi-kernel 10 | , ambiata-p 11 | , text == 1.2.* 12 | , QuickCheck >= 2.7 && < 2.12 13 | , quickcheck-instances == 0.3.* 14 | 15 | exposed-modules: 16 | Test.Mismi.Kernel.Arbitrary 17 | -------------------------------------------------------------------------------- /mismi-kernel/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | import qualified Test.Mismi.Kernel.Data 3 | main :: IO () 4 | main = 5 | disorderMain [ 6 | Test.Mismi.Kernel.Data.tests 7 | ] 8 | -------------------------------------------------------------------------------- /mismi-openssl/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-openssl/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-openssl/ambiata-mismi-openssl.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-openssl 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , amazonka >= 1.3.6 && < 1.6 18 | , amazonka-core >= 1.3.6 && < 1.6 19 | , ambiata-mismi-core 20 | , ambiata-p 21 | , ambiata-x-eithert 22 | , ambiata-x-exception 23 | , exceptions >= 0.6 && < 0.9 24 | , HsOpenSSL == 0.11.* 25 | , http-client >= 0.4.18 && < 0.6 26 | , http-client-openssl == 0.2.* 27 | , lens >= 4.8 && < 4.16 28 | , retry == 0.7.* 29 | , transformers >= 0.3.1 && < 0.6 30 | , text == 1.2.* 31 | 32 | ghc-options: 33 | -Wall 34 | 35 | hs-source-dirs: 36 | src 37 | 38 | 39 | exposed-modules: 40 | Mismi.OpenSSL 41 | Mismi.OpenSSL.Control 42 | Mismi.OpenSSL.Environment 43 | -------------------------------------------------------------------------------- /mismi-openssl/ambiata-mismi-openssl.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | adjunctions == 4.3 3 | aeson == 1.1.1.0 4 | amazonka == 1.5.0 5 | amazonka-core == 1.5.0 6 | asn1-encoding == 0.9.5 7 | asn1-parse == 0.9.4 8 | asn1-types == 0.3.2 9 | async == 2.1.1 10 | attoparsec == 0.13.1.0 11 | base-compat == 0.9.2 12 | base-orphans == 0.5.4 13 | base64-bytestring == 1.0.0.1 14 | bifunctors == 5.2.1 15 | blaze-builder == 0.4.0.2 16 | blaze-html == 0.9.0.1 17 | blaze-markup == 0.8.0.0 18 | byteable == 0.1.1 19 | case-insensitive == 1.2.0.8 20 | cereal == 0.5.4.0 21 | comonad == 5 22 | conduit == 1.2.9.1 23 | conduit-extra == 1.1.15 24 | connection == 0.2.5 25 | contravariant == 1.4 26 | cookie == 0.4.2.1 27 | cryptonite == 0.22 28 | data-default == 0.7.1.1 29 | data-default-class == 0.1.2.0 30 | data-default-instances-containers == 0.0.1 31 | data-default-instances-dlist == 0.0.1 32 | data-default-instances-old-locale == 0.0.1 33 | distributive == 0.5.2 34 | dlist == 0.8.0.2 35 | exceptions == 0.8.3 36 | fail == 4.9.0.0 37 | foundation == 0.0.6 38 | free == 4.12.4 39 | hashable == 1.2.6.0 40 | hourglass == 0.2.10 41 | HsOpenSSL == 0.11.4.6 42 | http-client == 0.4.18.1 43 | http-client-openssl == 0.2.0.5 44 | http-client-tls == 0.2.4.1 45 | http-conduit == 2.1.7.2 46 | http-types == 0.8.6 47 | ini == 0.3.5 48 | integer-logarithms == 1.0.1 49 | kan-extensions == 5.0.1 50 | lens == 4.14 51 | lifted-base == 0.2.3.10 52 | memory == 0.14.3 53 | mime-types == 0.1.0.7 54 | mmorph == 1.0.9 55 | monad-control == 1.0.1.0 56 | mtl == 2.2.1 57 | network == 2.6.3.1 58 | network-uri == 2.6.1.0 59 | old-locale == 1.0.0.7 60 | parallel == 3.2.1.1 61 | parsec == 3.1.11 62 | pem == 0.2.2 63 | prelude-extras == 0.4.0.3 64 | primitive == 0.6.1.0 65 | profunctors == 5.2 66 | random == 1.1 67 | reflection == 2.1.2 68 | resourcet == 1.1.9 69 | retry == 0.7.4.2 70 | scientific == 0.3.4.11 71 | semigroupoids == 5.1 72 | semigroups == 0.18.2 73 | semigroups -bytestring-builder 74 | socks == 0.5.5 75 | StateVar == 1.1.0.4 76 | stm == 2.4.4.1 77 | streaming-commons == 0.1.17 78 | tagged == 0.8.5 79 | text == 1.2.2.1 80 | time-locale-compat == 0.1.1.3 81 | time-locale-compat -old-locale 82 | tls == 1.3.10 83 | transformers-base == 0.4.4 84 | transformers-compat == 0.5.1.4 85 | unordered-containers == 0.2.8.0 86 | uuid-types == 1.0.3 87 | vector == 0.11.0.0 88 | void == 0.7.2 89 | x509 == 1.6.5 90 | x509-store == 1.6.2 91 | x509-system == 1.6.4 92 | x509-validation == 1.6.5 93 | xml-conduit == 1.4.0.4 94 | xml-types == 0.3.6 95 | zlib == 0.6.1.2 96 | -------------------------------------------------------------------------------- /mismi-openssl/ambiata-mismi-openssl.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | adjunctions == 4.3 3 | aeson == 1.1.1.0 4 | amazonka == 1.5.0 5 | amazonka-core == 1.5.0 6 | asn1-encoding == 0.9.5 7 | asn1-parse == 0.9.4 8 | asn1-types == 0.3.2 9 | async == 2.1.1.1 10 | attoparsec == 0.13.1.0 11 | base-compat == 0.9.3 12 | base-orphans == 0.6 13 | base64-bytestring == 1.0.0.1 14 | bifunctors == 5.2.1 15 | blaze-builder == 0.4.0.2 16 | blaze-html == 0.9.0.1 17 | blaze-markup == 0.8.0.0 18 | byteable == 0.1.1 19 | cabal-doctest == 1 20 | case-insensitive == 1.2.0.8 21 | cereal == 0.5.4.0 22 | comonad == 5 23 | conduit == 1.2.9.1 24 | conduit-extra == 1.1.15 25 | connection == 0.2.5 26 | contravariant == 1.4 27 | cookie == 0.4.2.1 28 | cryptonite == 0.22 29 | data-default == 0.7.1.1 30 | data-default-class == 0.1.2.0 31 | data-default-instances-containers == 0.0.1 32 | data-default-instances-dlist == 0.0.1 33 | data-default-instances-old-locale == 0.0.1 34 | distributive == 0.5.2 35 | dlist == 0.8.0.2 36 | exceptions == 0.8.3 37 | foundation == 0.0.6 38 | free == 4.12.4 39 | hashable == 1.2.6.0 40 | hourglass == 0.2.10 41 | HsOpenSSL == 0.11.4.6 42 | http-client == 0.4.18.1 43 | http-client-openssl == 0.2.0.5 44 | http-client-tls == 0.2.4.1 45 | http-conduit == 2.1.7.2 46 | http-types == 0.8.6 47 | ini == 0.3.5 48 | integer-logarithms == 1.0.1 49 | kan-extensions == 5.0.1 50 | lens == 4.14 51 | lifted-base == 0.2.3.10 52 | memory == 0.14.3 53 | mime-types == 0.1.0.7 54 | mmorph == 1.0.9 55 | monad-control == 1.0.1.0 56 | mtl == 2.2.1 57 | network == 2.6.3.1 58 | network-uri == 2.6.1.0 59 | old-locale == 1.0.0.7 60 | parallel == 3.2.1.1 61 | parsec == 3.1.11 62 | pem == 0.2.2 63 | prelude-extras == 0.4.0.3 64 | primitive == 0.6.1.0 65 | profunctors == 5.2 66 | random == 1.1 67 | reflection == 2.1.2 68 | resourcet == 1.1.9 69 | retry == 0.7.4.2 70 | scientific == 0.3.4.12 71 | semigroupoids == 5.1 72 | semigroups == 0.18.2 73 | socks == 0.5.5 74 | StateVar == 1.1.0.4 75 | stm == 2.4.4.1 76 | streaming-commons == 0.1.17 77 | tagged == 0.8.5 78 | text == 1.2.2.1 79 | time-locale-compat == 0.1.1.3 80 | time-locale-compat -old-locale 81 | tls == 1.3.10 82 | transformers-base == 0.4.4 83 | transformers-compat == 0.5.1.4 84 | unordered-containers == 0.2.8.0 85 | uuid-types == 1.0.3 86 | vector == 0.11.0.0 87 | void == 0.7.2 88 | x509 == 1.6.5 89 | x509-store == 1.6.2 90 | x509-system == 1.6.4 91 | x509-validation == 1.6.5 92 | xml-conduit == 1.4.0.4 93 | xml-types == 0.3.6 94 | zlib == 0.6.1.2 95 | -------------------------------------------------------------------------------- /mismi-openssl/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-openssl/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-openssl/src/Mismi/OpenSSL.hs: -------------------------------------------------------------------------------- 1 | module Mismi.OpenSSL ( 2 | module X 3 | ) where 4 | 5 | import Mismi.OpenSSL.Control as X 6 | import Mismi.OpenSSL.Environment as X 7 | -------------------------------------------------------------------------------- /mismi-openssl/src/Mismi/OpenSSL/Control.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE LambdaCase #-} 3 | {-# LANGUAGE ScopedTypeVariables #-} 4 | {-# LANGUAGE RankNTypes #-} 5 | module Mismi.OpenSSL.Control ( 6 | A.AWS 7 | , A.Error 8 | , A.AccessKey 9 | , A.SecretKey 10 | , A.SessionToken 11 | , A.Region (..) 12 | , X.withOpenSSL 13 | , C.runAWS 14 | , C.runAWST 15 | , C.runAWSTWith 16 | , C.rawRunAWS 17 | , runAWSTWithRegion 18 | , runAWSWithRegion 19 | , C.awsBracket 20 | , C.awsBracket_ 21 | , C.newEnvFromCreds 22 | , C.renderError 23 | , C.setServiceRetry 24 | , C.setRetry 25 | , C.configureRetries 26 | ) where 27 | 28 | import Control.Monad.Catch 29 | import Control.Monad.IO.Class 30 | 31 | import qualified Mismi.Control as C 32 | import Mismi.OpenSSL.Environment 33 | 34 | import Network.AWS hiding (runAWS) 35 | import qualified Network.AWS as A 36 | 37 | import qualified Network.HTTP.Client.OpenSSL as X 38 | 39 | import P 40 | 41 | import System.IO 42 | 43 | import X.Control.Monad.Trans.Either 44 | 45 | runAWSTWithRegion :: Region -> (Error -> e) -> EitherT e AWS a -> EitherT e IO a 46 | runAWSTWithRegion r err action = 47 | C.runAWSTWith (runAWSWithRegion r) err action 48 | 49 | runAWSWithRegion :: (MonadIO m, MonadCatch m) => Region -> AWS a -> EitherT Error m a 50 | runAWSWithRegion r a = do 51 | e <- liftIO $ discoverAWSEnvWithRegion r 52 | C.runAWS e a 53 | -------------------------------------------------------------------------------- /mismi-openssl/src/Mismi/OpenSSL/Environment.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Mismi.OpenSSL.Environment ( 4 | X.Env 5 | , X.Region (..) 6 | , X.RegionError (..) 7 | , X.Debugging (..) 8 | , X.renderRegionError 9 | , X.getRegionFromEnv 10 | , X.getDebugging 11 | , X.setDebugging 12 | , discoverAWSEnv 13 | , discoverAWSEnvWithRegion 14 | , discoverAWSEnvRetry 15 | , discoverAWSEnvWithRegionRetry 16 | ) where 17 | 18 | import Control.Lens ((.~)) 19 | import Control.Monad.Catch (Handler(..)) 20 | import Control.Monad.Trans.AWS (Credentials(..), Region(..), Env) 21 | import qualified Control.Monad.Trans.AWS as X 22 | import Control.Monad.Trans.Class (lift) 23 | import Control.Retry (RetryPolicyM, recovering, constantDelay, limitRetries) 24 | 25 | import Network.AWS.Env (envManager) 26 | import Network.HTTP.Client (newManager) 27 | import Network.HTTP.Client.OpenSSL (opensslManagerSettings) 28 | import Network.HTTP.Client.OpenSSL (withOpenSSL) 29 | import OpenSSL.Session (context) 30 | 31 | import Mismi.Environment (RegionError (..), newMismiEnv) 32 | import Mismi.Environment (getDebugging, setDebugging, catchAuthError) 33 | import qualified Mismi.Environment as X 34 | 35 | import P 36 | 37 | import System.IO (IO) 38 | 39 | import X.Control.Monad.Trans.Either (EitherT) 40 | 41 | discoverAWSEnv :: EitherT RegionError IO Env 42 | discoverAWSEnv = 43 | discoverAWSEnvRetry $ limitRetries 1 <> constantDelay 200000 44 | 45 | discoverAWSEnvWithRegion :: Region -> IO Env 46 | discoverAWSEnvWithRegion r = 47 | flip discoverAWSEnvWithRegionRetry r $ limitRetries 1 <> constantDelay 200000 48 | 49 | discoverAWSEnvRetry :: RetryPolicyM IO -> EitherT RegionError IO Env 50 | discoverAWSEnvRetry retry = do 51 | r <- X.getRegionFromEnv 52 | lift $ discoverAWSEnvWithRegionRetry retry r 53 | 54 | discoverAWSEnvWithRegionRetry :: RetryPolicyM IO -> Region -> IO Env 55 | discoverAWSEnvWithRegionRetry rpol r = do 56 | withOpenSSL $ pure () 57 | d <- getDebugging 58 | e <- recovering rpol [(\_ -> Handler catchAuthError)] $ \_ -> newMismiEnv r Discover 59 | m <- newManager $ opensslManagerSettings context 60 | pure $ setDebugging d (e & envManager .~ m) 61 | -------------------------------------------------------------------------------- /mismi-rds-core/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-rds-core/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-rds-core/ambiata-mismi-rds-core.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-rds-core 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-rds-core. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , text == 1.2.* 19 | 20 | ghc-options: 21 | -Wall 22 | 23 | hs-source-dirs: 24 | src 25 | 26 | 27 | exposed-modules: 28 | Mismi.RDS.Core.Data 29 | 30 | test-suite test 31 | type: exitcode-stdio-1.0 32 | main-is: test.hs 33 | ghc-options: -Wall -threaded -O2 34 | hs-source-dirs: test 35 | build-depends: base 36 | , ambiata-disorder-core 37 | , ambiata-disorder-corpus 38 | , ambiata-mismi-rds-core 39 | , ambiata-p 40 | , text 41 | , QuickCheck >= 2.7 && < 2.12 42 | , quickcheck-instances == 0.3.* 43 | -------------------------------------------------------------------------------- /mismi-rds-core/ambiata-mismi-rds-core.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.5.4 3 | bifunctors == 5.3 4 | comonad == 5 5 | contravariant == 1.4 6 | distributive == 0.5.2 7 | hashable == 1.2.6.0 8 | ieee754 == 0.7.9 9 | integer-logarithms == 1.0.1 10 | old-locale == 1.0.0.7 11 | old-time == 1.1.0.3 12 | primitive == 0.6.2.0 13 | QuickCheck == 2.8.2 14 | quickcheck-instances == 0.3.12 15 | quickcheck-text == 0.1.2.1 16 | random == 1.1 17 | scientific == 0.3.4.11 18 | semigroups == 0.18.2 19 | semigroups -bytestring-builder 20 | StateVar == 1.1.0.4 21 | stm == 2.4.4.1 22 | tagged == 0.8.5 23 | text == 1.2.2.1 24 | tf-random == 0.5 25 | transformers-compat == 0.5.1.4 26 | unordered-containers == 0.2.8.0 27 | vector == 0.12.0.1 28 | void == 0.7.2 29 | -------------------------------------------------------------------------------- /mismi-rds-core/ambiata-mismi-rds-core.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.6 3 | bifunctors == 5.3 4 | cabal-doctest == 1 5 | comonad == 5 6 | contravariant == 1.4 7 | distributive == 0.5.2 8 | hashable == 1.2.6.0 9 | ieee754 == 0.8.0 10 | integer-logarithms == 1.0.1 11 | old-locale == 1.0.0.7 12 | old-time == 1.1.0.3 13 | primitive == 0.6.2.0 14 | QuickCheck == 2.8.2 15 | quickcheck-instances == 0.3.12 16 | quickcheck-text == 0.1.2.1 17 | random == 1.1 18 | scientific == 0.3.4.12 19 | semigroups == 0.18.2 20 | StateVar == 1.1.0.4 21 | stm == 2.4.4.1 22 | tagged == 0.8.5 23 | text == 1.2.2.1 24 | tf-random == 0.5 25 | transformers-compat == 0.5.1.4 26 | unordered-containers == 0.2.8.0 27 | vector == 0.12.0.1 28 | void == 0.7.2 29 | -------------------------------------------------------------------------------- /mismi-rds-core/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-rds-core/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-rds-core/src/Mismi/RDS/Core/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Mismi.RDS.Core.Data ( 4 | ) where 5 | -------------------------------------------------------------------------------- /mismi-rds-core/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | main :: IO () 4 | main = 5 | disorderMain [ 6 | ] 7 | -------------------------------------------------------------------------------- /mismi-rds/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-rds/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-rds/ambiata-mismi-rds.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-rds 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-rds. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , ambiata-mismi-core 19 | , ambiata-x-eithert 20 | , amazonka >= 1.3.6 && < 1.6 21 | , amazonka-core >= 1.3.6 && < 1.6 22 | , amazonka-rds >= 1.3.6 && < 1.6 23 | 24 | 25 | ghc-options: 26 | -Wall 27 | 28 | hs-source-dirs: 29 | src 30 | 31 | exposed-modules: 32 | Mismi.RDS 33 | Mismi.RDS.Amazonka 34 | 35 | test-suite test 36 | type: exitcode-stdio-1.0 37 | main-is: test.hs 38 | ghc-options: -Wall -threaded -O2 39 | hs-source-dirs: test 40 | build-depends: base 41 | , ambiata-disorder-core 42 | , ambiata-mismi-core 43 | , ambiata-mismi-rds 44 | , QuickCheck >= 2.7 && < 2.12 45 | , quickcheck-instances == 0.3.* 46 | -------------------------------------------------------------------------------- /mismi-rds/ambiata-mismi-rds.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | adjunctions == 4.3 3 | aeson == 1.1.1.0 4 | amazonka == 1.5.0 5 | amazonka-core == 1.5.0 6 | amazonka-rds == 1.5.0 7 | asn1-encoding == 0.9.5 8 | asn1-parse == 0.9.4 9 | asn1-types == 0.3.2 10 | async == 2.1.1.1 11 | attoparsec == 0.13.1.0 12 | base-compat == 0.9.3 13 | base-orphans == 0.6 14 | base64-bytestring == 1.0.0.1 15 | bifunctors == 5.2.1 16 | blaze-builder == 0.4.0.2 17 | blaze-html == 0.9.0.1 18 | blaze-markup == 0.8.0.0 19 | byteable == 0.1.1 20 | cabal-doctest == 1 21 | case-insensitive == 1.2.0.8 22 | cereal == 0.5.4.0 23 | comonad == 5 24 | conduit == 1.2.9.1 25 | conduit-extra == 1.1.15 26 | connection == 0.2.5 27 | contravariant == 1.4 28 | cookie == 0.4.2.1 29 | cryptonite == 0.22 30 | data-default == 0.7.1.1 31 | data-default-class == 0.1.2.0 32 | data-default-instances-containers == 0.0.1 33 | data-default-instances-dlist == 0.0.1 34 | data-default-instances-old-locale == 0.0.1 35 | distributive == 0.5.2 36 | dlist == 0.8.0.2 37 | exceptions == 0.8.3 38 | foundation == 0.0.6 39 | free == 4.12.4 40 | hashable == 1.2.6.0 41 | hourglass == 0.2.10 42 | http-client == 0.4.18.1 43 | http-client-tls == 0.2.4.1 44 | http-conduit == 2.1.7.2 45 | http-types == 0.8.6 46 | ieee754 == 0.8.0 47 | ini == 0.3.5 48 | integer-logarithms == 1.0.1 49 | kan-extensions == 5.0.1 50 | lens == 4.14 51 | lifted-base == 0.2.3.10 52 | memory == 0.14.3 53 | mime-types == 0.1.0.7 54 | mmorph == 1.0.9 55 | monad-control == 1.0.1.0 56 | mtl == 2.2.1 57 | network == 2.6.3.1 58 | network-uri == 2.6.1.0 59 | old-locale == 1.0.0.7 60 | old-time == 1.1.0.3 61 | parallel == 3.2.1.1 62 | parsec == 3.1.11 63 | pem == 0.2.2 64 | prelude-extras == 0.4.0.3 65 | primitive == 0.6.1.0 66 | profunctors == 5.2 67 | QuickCheck == 2.8.2 68 | quickcheck-instances == 0.3.12 69 | quickcheck-text == 0.1.2.1 70 | random == 1.1 71 | reflection == 2.1.2 72 | resourcet == 1.1.9 73 | retry == 0.7.4.2 74 | scientific == 0.3.4.12 75 | semigroupoids == 5.1 76 | semigroups == 0.18.2 77 | socks == 0.5.5 78 | StateVar == 1.1.0.4 79 | stm == 2.4.4.1 80 | streaming-commons == 0.1.17 81 | tagged == 0.8.5 82 | text == 1.2.2.1 83 | tf-random == 0.5 84 | time-locale-compat == 0.1.1.3 85 | time-locale-compat -old-locale 86 | tls == 1.3.10 87 | transformers-base == 0.4.4 88 | transformers-compat == 0.5.1.4 89 | unordered-containers == 0.2.8.0 90 | uuid-types == 1.0.3 91 | vector == 0.11.0.0 92 | void == 0.7.2 93 | x509 == 1.6.5 94 | x509-store == 1.6.2 95 | x509-system == 1.6.4 96 | x509-validation == 1.6.5 97 | xml-conduit == 1.4.0.4 98 | xml-types == 0.3.6 99 | zlib == 0.6.1.2 100 | -------------------------------------------------------------------------------- /mismi-rds/ambiata-mismi-rds.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-rds/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-rds/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-rds/src/Mismi/RDS.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.RDS ( 3 | ) where 4 | -------------------------------------------------------------------------------- /mismi-rds/src/Mismi/RDS/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.RDS.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Network.AWS.RDS as AWS 7 | -------------------------------------------------------------------------------- /mismi-rds/test/ambiata-mismi-rds-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-rds-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-mismi-rds 10 | 11 | exposed-modules: 12 | -------------------------------------------------------------------------------- /mismi-rds/test/ambiata-mismi-rds-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-rds 3 | -------------------------------------------------------------------------------- /mismi-rds/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | 4 | main :: IO () 5 | main = 6 | disorderMain [ 7 | ] 8 | -------------------------------------------------------------------------------- /mismi-s3-core/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-s3-core/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-s3-core/ambiata-mismi-s3-core.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-s3-core 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-s3-core. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 6 17 | , ambiata-p 18 | , ambiata-x-show 19 | , attoparsec >= 0.12 && < 0.14 20 | , text == 1.2.* 21 | 22 | ghc-options: 23 | -Wall 24 | 25 | hs-source-dirs: 26 | src 27 | 28 | 29 | exposed-modules: 30 | Mismi.S3.Core.Data 31 | 32 | test-suite test 33 | type: exitcode-stdio-1.0 34 | main-is: test.hs 35 | ghc-options: -Wall -threaded -O2 36 | hs-source-dirs: test 37 | build-depends: base 38 | , ambiata-disorder-core 39 | , ambiata-disorder-corpus 40 | , ambiata-mismi-s3-core 41 | , ambiata-p 42 | , attoparsec 43 | , filepath >= 1.3 && < 1.5 44 | , text 45 | , QuickCheck >= 2.7 && < 2.12 46 | , quickcheck-instances == 0.3.* 47 | -------------------------------------------------------------------------------- /mismi-s3-core/ambiata-mismi-s3-core.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | attoparsec == 0.13.1.0 3 | base-orphans == 0.5.4 4 | bifunctors == 5.3 5 | comonad == 5 6 | contravariant == 1.4 7 | distributive == 0.5.2 8 | fail == 4.9.0.0 9 | hashable == 1.2.6.0 10 | ieee754 == 0.7.9 11 | integer-logarithms == 1.0.1 12 | old-locale == 1.0.0.7 13 | old-time == 1.1.0.3 14 | primitive == 0.6.2.0 15 | QuickCheck == 2.8.2 16 | quickcheck-instances == 0.3.12 17 | quickcheck-text == 0.1.2.1 18 | random == 1.1 19 | scientific == 0.3.4.11 20 | semigroups == 0.18.2 21 | semigroups -bytestring-builder 22 | StateVar == 1.1.0.4 23 | stm == 2.4.4.1 24 | tagged == 0.8.5 25 | text == 1.2.2.1 26 | tf-random == 0.5 27 | transformers-compat == 0.5.1.4 28 | unordered-containers == 0.2.8.0 29 | vector == 0.12.0.1 30 | void == 0.7.2 31 | -------------------------------------------------------------------------------- /mismi-s3-core/ambiata-mismi-s3-core.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | attoparsec == 0.13.1.0 3 | base-orphans == 0.6 4 | bifunctors == 5.3 5 | cabal-doctest == 1 6 | comonad == 5 7 | contravariant == 1.4 8 | distributive == 0.5.2 9 | hashable == 1.2.6.0 10 | ieee754 == 0.8.0 11 | integer-logarithms == 1.0.1 12 | old-locale == 1.0.0.7 13 | old-time == 1.1.0.3 14 | primitive == 0.6.2.0 15 | random == 1.1 16 | scientific == 0.3.4.12 17 | semigroups == 0.18.2 18 | StateVar == 1.1.0.4 19 | stm == 2.4.4.1 20 | tagged == 0.8.5 21 | text == 1.2.2.1 22 | tf-random == 0.5 23 | transformers-compat == 0.5.1.4 24 | unordered-containers == 0.2.8.0 25 | vector == 0.12.0.1 26 | void == 0.7.2 27 | -------------------------------------------------------------------------------- /mismi-s3-core/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-s3-core/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master-with-test.toml -------------------------------------------------------------------------------- /mismi-s3-core/test/Test/Mismi/S3/Core/Arbitrary.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# OPTIONS_GHC -fno-warn-orphans #-} 4 | module Test.Mismi.S3.Core.Arbitrary where 5 | 6 | import qualified Data.List as L 7 | import qualified Data.Text as T 8 | 9 | import Disorder.Corpus (simpsons, southpark) 10 | 11 | import Mismi.S3.Core.Data 12 | 13 | import P 14 | 15 | import Test.QuickCheck (Arbitrary (..), Gen) 16 | import qualified Test.QuickCheck as QC 17 | import Test.QuickCheck.Instances () 18 | 19 | import System.FilePath (FilePath) 20 | 21 | instance Arbitrary WriteMode where 22 | arbitrary = QC.elements [Fail, Overwrite] 23 | 24 | instance Arbitrary Bucket where 25 | arbitrary = Bucket <$> QC.elements southpark 26 | 27 | instance Arbitrary Address where 28 | arbitrary = QC.frequency [ 29 | (9, Address <$> arbitrary <*> arbitrary) 30 | , (1, flip Address (Key "") <$> arbitrary) 31 | ] 32 | 33 | instance Arbitrary Key where 34 | -- The max length of S3 Paths is 1024 - and we append some of them in the tests 35 | -- Unfortunately unicode characters aren't supported in the Haskell AWS library 36 | -- https://github.com/ambiata/vee/issues/7 37 | arbitrary = 38 | let genPath = QC.elements ["happy", "sad", ".", ":", "-"] 39 | path = do 40 | sep <- QC.elements ["-", "=", "#", ""] 41 | T.take 256 . T.intercalate "/" <$> QC.listOf1 (T.intercalate sep <$> QC.listOf1 genPath) 42 | in (Key . T.append "tests/") <$> path 43 | 44 | 45 | fileNameSizePairs :: Int -> Gen [(FilePath, Int64)] 46 | fileNameSizePairs len = do 47 | names <- QC.vectorOf len $ QC.elements simpsons 48 | lengths <- QC.vectorOf len $ QC.choose (1, 1000000000) 49 | pure $ L.zipWith3 zipper names [(0::Int) ..] lengths 50 | where 51 | zipper n i l = (n <> show i, l) 52 | -------------------------------------------------------------------------------- /mismi-s3-core/test/ambiata-mismi-s3-core-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-s3-core-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base >= 3 && < 6 9 | , ambiata-disorder-core 10 | , ambiata-disorder-corpus 11 | , ambiata-mismi-s3-core 12 | , ambiata-p 13 | , attoparsec 14 | , filepath >= 1.3 && < 1.5 15 | , text 16 | , QuickCheck >= 2.7 && < 2.12 17 | , quickcheck-instances == 0.3.* 18 | 19 | exposed-modules: 20 | Test.Mismi.S3.Core.Arbitrary 21 | -------------------------------------------------------------------------------- /mismi-s3-core/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.Mismi.S3.Core.Data 4 | 5 | 6 | main :: IO () 7 | main = 8 | disorderMain [ 9 | Test.Mismi.S3.Core.Data.tests 10 | ] 11 | -------------------------------------------------------------------------------- /mismi-s3/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-s3/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-s3/ambiata-mismi-s3.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-s3/doc/benchmarks.md: -------------------------------------------------------------------------------- 1 | # Performance 2 | 3 | ## Download 4 | 5 | # Single 6 | | Size | Duration | app | 7 | |------|----------|-----| 8 | | 7.5 gb | 1m33.736s | aws cli | 9 | | 7.5 gb | 3m13.230s | mismi | 10 | 11 | # Multipart 12 | | Size | Duration | app | 13 | |------|----------|-----| 14 | | 1 gb | 0m8s | aws cli | 15 | | 1 gb | 0m24s | mismi (single) | 16 | | 1 gb | 0m18s | mismi (chunk=100, fork=10) | 17 | 18 | 19 | ## Upload 20 | 21 | | Size | Duration | app | 22 | |------|----------|-----| 23 | | 7.5 gb | 1m54.723s | aws cli | 24 | | 7.5 gb | 1m36.056s | mismi | 25 | | 23 gb | 4m52.645s | aws cli | 26 | | 23 gb | 4m52.501s | aws cli | 27 | | 23 gb | 8m31.622s | mismi - conduit (1mb buffer) | 28 | | 23 gb | 4m58.076s | mismi - conduit (1mb buffer) | 29 | | 23 gb | 4m52.799s | mismi - conduit (1mb buffer) | 30 | | 23 gb | 11m28.957s | mismi - crazy (malloc) (4k buffer) | 31 | | 23 gb | 4m51.605s | mismi - crazy (malloc) (1mb buffer) | 32 | | 23 gb | 5m30.117s | mismi - crazy (malloc) (1mb buffer) | 33 | -------------------------------------------------------------------------------- /mismi-s3/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-s3/master.toml: -------------------------------------------------------------------------------- 1 | [master] 2 | runner = "s3://ambiata-dispensary-v2/dist/master/master-haskell/linux/x86_64/20190522002346-e28326d/master-haskell-20190522002346-e28326d" 3 | version = 1 4 | sha1 = "8736bd36b35b88909893e565f97ae5f91c009fd1" 5 | 6 | [global] 7 | CACHE = "true" 8 | CABAL_VERSION = "1.24.0.2" 9 | 10 | [build.dist-7-10-reliability] 11 | GHC_VERSION = "7.10.2" 12 | CABAL_VERSION = "1.24.0.0" 13 | TEST_RELIABILITY_SIZE = "2500" 14 | TEST_RELIABILITY_SUCCESS = "5" 15 | 16 | [build.dist-7-10] 17 | HADDOCK = "true" 18 | HADDOCK_S3 = "$AMBIATA_HADDOCK_MASTER" 19 | GHC_VERSION = "7.10.2" 20 | 21 | [build.branches-7-10] 22 | HADDOCK = "true" 23 | HADDOCK_S3 = "$AMBIATA_HADDOCK_BRANCHES" 24 | GHC_VERSION = "7.10.2" 25 | 26 | [build.dist-8-0] 27 | GHC_VERSION = "8.0.2" 28 | 29 | [build.branches-8-0] 30 | GHC_VERSION = "8.0.2" 31 | 32 | [build.dist-7-10-cabal-test] 33 | GHC_VERSION = "7.10.2" 34 | TEST = "false" 35 | CABAL_TEST = "true" 36 | 37 | [build.branches-7-10-cabal-test] 38 | GHC_VERSION = "7.10.2" 39 | TEST = "false" 40 | CABAL_TEST = "true" 41 | 42 | [build.dist-8-0-cabal-test] 43 | GHC_VERSION = "8.0.2" 44 | TEST = "false" 45 | CABAL_TEST = "true" 46 | 47 | [build.branches-8-0-cabal-test] 48 | GHC_VERSION = "8.0.2" 49 | TEST = "false" 50 | CABAL_TEST = "true" 51 | -------------------------------------------------------------------------------- /mismi-s3/src/Mismi/S3.hs: -------------------------------------------------------------------------------- 1 | module Mismi.S3 ( 2 | module X 3 | ) where 4 | 5 | import Mismi.Control as X 6 | import Mismi.S3.Commands as X 7 | import Mismi.S3.Core.Data as X 8 | import Mismi.S3.Data as X 9 | -------------------------------------------------------------------------------- /mismi-s3/src/Mismi/S3/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.S3.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Mismi.Amazonka as AWS 7 | 8 | import Network.AWS.S3 as AWS 9 | -------------------------------------------------------------------------------- /mismi-s3/src/Mismi/S3/Patch/Network.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE ScopedTypeVariables #-} 4 | module Mismi.S3.Patch.Network ( 5 | chunkedFile 6 | ) where 7 | 8 | import Control.Monad 9 | import Control.Monad.Trans.Resource 10 | import Control.Monad.IO.Class 11 | 12 | import Data.Conduit 13 | 14 | import qualified Data.ByteString as BS 15 | import qualified Data.ByteString.Lazy as LBS 16 | 17 | import Mismi.Amazonka (getFileSize, unsafeChunkedBody) 18 | 19 | import Network.AWS.Data.Body 20 | 21 | import P 22 | 23 | import System.IO 24 | 25 | chunkedFile :: MonadIO m => ChunkSize -> FilePath -> m RqBody 26 | chunkedFile c f = do 27 | n <- getFileSize f 28 | if n > toInteger c 29 | then 30 | return $ unsafeChunkedBody c n (sourceFileChunks c f) 31 | else 32 | liftIO $ (=<<) (return . toBody) $ LBS.readFile f 33 | 34 | -- Uses hGet with a specific buffer size, instead of hGetSome. 35 | sourceFileChunks :: MonadResource m 36 | => ChunkSize 37 | -> FilePath 38 | -> Source m BS.ByteString 39 | sourceFileChunks (ChunkSize sz) f = 40 | bracketP (openBinaryFile f ReadMode) hClose go 41 | where 42 | go h = do 43 | bs <- liftIO (BS.hGet h sz) 44 | unless (BS.null bs) $ do 45 | yield bs 46 | go h 47 | -------------------------------------------------------------------------------- /mismi-s3/test/Test/IO/Mismi/S3/Internal.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE ScopedTypeVariables #-} 4 | {-# LANGUAGE TemplateHaskell #-} 5 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 6 | module Test.IO.Mismi.S3.Internal where 7 | 8 | import Control.Monad.Catch (catchIOError) 9 | 10 | import Data.Text.IO as T 11 | 12 | import Disorder.Core.IO 13 | 14 | import Mismi.S3.Internal 15 | 16 | import P 17 | 18 | import System.Directory 19 | import System.IO 20 | import System.IO.Temp 21 | 22 | import Test.QuickCheck 23 | import Test.QuickCheck.Instances () 24 | 25 | 26 | prop_withFileSafe t = testIO . withSystemTempPath $ \f -> do 27 | f2 <- withFileSafe f $ \f2 -> f2 <$ T.writeFile f2 t 28 | t2 <- T.readFile f 29 | f2e <- doesFileExist f2 30 | pure $ (t, f2e) === (t2, False) 31 | 32 | prop_withFileSafe_empty = testIO . withSystemTempPath $ \f -> do 33 | f2 <- flip catchIOError (\_ -> pure Nothing) $ withFileSafe f (pure . Just) 34 | pure $ f2 === Nothing 35 | 36 | prop_withFileSafe_error = testIO . withSystemTempPath $ \f -> do 37 | flip catchIOError (\_ -> pure ()) . withFileSafe f $ \_ -> fail "" 38 | fmap not $ doesFileExist f 39 | 40 | prop_withFileSafe_error_exists t = testIO . withSystemTempPath $ \f -> do 41 | flip catchIOError (\_ -> pure ()) . withFileSafe f $ \f2 -> T.writeFile f2 t >> fail "" 42 | fmap not $ doesFileExist f 43 | 44 | 45 | withSystemTempPath :: (FilePath -> IO t) -> IO t 46 | withSystemTempPath run = 47 | withSystemTempDirectory "mismi-s3-file-safe" $ \dir -> run $ dir <> "/file" 48 | 49 | 50 | return [] 51 | tests :: IO Bool 52 | tests = $forAllProperties $ quickCheckWithResult (stdArgs { maxSuccess = 20 }) 53 | -------------------------------------------------------------------------------- /mismi-s3/test/Test/Mismi/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Test.Mismi.Amazonka ( 4 | sendMultipart 5 | , withMultipart 6 | , newMultipart 7 | ) where 8 | 9 | import Control.Monad.Catch 10 | import Control.Monad.Reader (ask) 11 | import Control.Monad.Trans.Resource 12 | 13 | import Data.Text as T 14 | import Data.Text.Encoding (encodeUtf8) 15 | 16 | import Mismi.S3 17 | import qualified Mismi.S3.Amazonka as A 18 | import Mismi.S3.Internal 19 | 20 | import P 21 | 22 | import Test.Mismi.S3 23 | import Test.QuickCheck 24 | import Test.QuickCheck.Instances () 25 | 26 | import X.Control.Monad.Trans.Either 27 | 28 | sendMultipart :: Text -> Address -> Int -> Text -> AWS () 29 | sendMultipart t a i ui = do 30 | let req = f' A.uploadPart a i ui (A.toBody $ encodeUtf8 t) 31 | void $ A.send req 32 | 33 | withMultipart :: Testable a => (Address -> Text -> AWS a) -> Property 34 | withMultipart f = 35 | testAWS $ do 36 | a <- newAddress 37 | awsBracket (createMultipartUpload a) (abortMultipart' a) (f a) 38 | 39 | newMultipart :: AWS (Address, Text) 40 | newMultipart = do 41 | a <- newAddress 42 | r <- createMultipartUpload a 43 | e <- ask 44 | void $ register (eitherT throwM pure . runAWS e $ abortMultipart' a r) 45 | void $ register (eitherT throwM pure . runAWS e $ listRecursively a >>= mapM_ delete >> delete a) 46 | pure $ (a, r) 47 | -------------------------------------------------------------------------------- /mismi-s3/test/Test/Mismi/S3/Arbitrary.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Test.Mismi.S3.Arbitrary where 3 | 4 | -- For compatibility only 5 | import Test.Mismi.S3.Core.Arbitrary () 6 | -------------------------------------------------------------------------------- /mismi-s3/test/Test/Mismi/S3/Commands.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE ScopedTypeVariables #-} 4 | {-# LANGUAGE TemplateHaskell #-} 5 | module Test.Mismi.S3.Commands where 6 | 7 | import Control.Lens ((.~)) 8 | 9 | import qualified Data.List as DL 10 | import Data.Map.Strict (Map) 11 | import qualified Data.Map.Strict as DM 12 | import Data.Time.Clock (NominalDiffTime, addUTCTime, getCurrentTime) 13 | 14 | import Disorder.Core.IO (testIO) 15 | 16 | import Mismi.S3.Commands 17 | import qualified Mismi.S3.Amazonka as A 18 | 19 | import P 20 | 21 | import System.IO 22 | 23 | import Test.Mismi.S3.Core.Arbitrary 24 | 25 | import Test.QuickCheck (Positive (..), Property, (===), quickCheckAll) 26 | import qualified Test.QuickCheck as QC 27 | import Test.QuickCheck.Instances () 28 | 29 | 30 | prop_filter_old :: Positive NominalDiffTime -> Property 31 | prop_filter_old (Positive i) = testIO $ do 32 | n <- getCurrentTime 33 | let t = addUTCTime ((-1 * ((60 * 60 * 24 * 7) + i)) :: NominalDiffTime) n 34 | r = filterOld n $ A.multipartUpload & A.muInitiated .~ Just t 35 | pure $ r === True 36 | 37 | prop_filter_failure :: Property 38 | prop_filter_failure = testIO $ do 39 | n <- getCurrentTime 40 | let r = filterOld n $ A.multipartUpload & A.muInitiated .~ Just n 41 | pure $ r === False 42 | 43 | prop_chunk_files_by_size :: Property 44 | prop_chunk_files_by_size = 45 | QC.forAll (QC.choose (2, 10)) $ \ maxFilesPerChunk -> 46 | QC.forAll (QC.choose (10, 100)) $ \ fileCount -> 47 | QC.forAll (QC.choose (1000, 10000)) $ \ maxChunkSize -> 48 | QC.forAll (fileNameSizePairs fileCount) $ \ pairs -> 49 | let chunks = chunkFilesBySize maxFilesPerChunk maxChunkSize pairs 50 | chunkSizes = DL.map (multiChunkSum (DM.fromList pairs) . DL.map fst) chunks 51 | in 52 | DL.filter (> maxChunkSize) chunkSizes === [] 53 | 54 | where 55 | multiChunkSum :: Map FilePath Int64 -> [FilePath] -> Int64 56 | multiChunkSum _ [] = 0 57 | multiChunkSum _ [_] = 0 -- Don't care about size of single file chunk. 58 | multiChunkSum sizes xs = 59 | sum $ mapMaybe (\ x -> DM.lookup x sizes) xs 60 | 61 | 62 | return [] 63 | tests :: IO Bool 64 | tests = $quickCheckAll 65 | -------------------------------------------------------------------------------- /mismi-s3/test/Test/Mismi/S3/Control.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE TemplateHaskell #-} 4 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 5 | module Test.Mismi.S3.Control where 6 | 7 | import Control.Monad.IO.Class 8 | 9 | import Mismi.S3.Commands 10 | 11 | import P 12 | 13 | import System.IO 14 | 15 | import Test.Mismi 16 | import Test.Mismi.S3 17 | import Test.QuickCheck 18 | 19 | prop_finalizer = testAWS $ do 20 | r <- liftIO . runAWSDefaultRegion $ do 21 | a <- newAddress 22 | writeOrFail a "" 23 | pure $ a 24 | e <- exists r 25 | pure $ e === False 26 | 27 | return [] 28 | tests :: IO Bool 29 | tests = $forAllProperties $ quickCheckWithResult (stdArgs { maxSuccess = 10 }) 30 | -------------------------------------------------------------------------------- /mismi-s3/test/Test/Mismi/S3/Internal.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE ScopedTypeVariables #-} 4 | {-# LANGUAGE TemplateHaskell #-} 5 | module Test.Mismi.S3.Internal where 6 | 7 | import Mismi.S3.Internal 8 | 9 | import P 10 | 11 | import System.IO 12 | 13 | import Test.QuickCheck 14 | import Test.QuickCheck.Instances () 15 | 16 | prop_chunks :: Property 17 | prop_chunks = 18 | forAll (choose (1, 10000)) $ \size -> 19 | forAll (choose (1, size)) $ \chunk -> 20 | foldl' (+) 0 (snd' <$> calculateChunks size chunk) === size 21 | 22 | prop_chunks_capped :: Property 23 | prop_chunks_capped = 24 | forAll (choose (10, 10000)) $ \size -> 25 | forAll (choose (1, size)) $ \chunk -> 26 | forAll (choose (5, 15)) $ \cap -> 27 | length (calculateChunksCapped size chunk cap) <= cap 28 | 29 | snd' :: (Int, Int, Int) -> Int 30 | snd' (_, b, _) = b 31 | 32 | return [] 33 | tests :: IO Bool 34 | tests = $quickCheckAll 35 | -------------------------------------------------------------------------------- /mismi-s3/test/Test/Reliability/Mismi/S3/Commands.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE ScopedTypeVariables #-} 4 | {-# LANGUAGE TemplateHaskell #-} 5 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 6 | module Test.Reliability.Mismi.S3.Commands where 7 | 8 | import Control.Monad.Catch 9 | import Control.Monad.IO.Class 10 | 11 | import qualified Data.Text as T 12 | import qualified Data.Text.IO as T 13 | 14 | import Disorder.Corpus 15 | 16 | import Mismi.S3 17 | 18 | import P 19 | 20 | import qualified System.Directory as D 21 | import System.FilePath (combine) 22 | import System.IO 23 | import System.IO.Error 24 | import System.IO.Temp 25 | 26 | import Test.Mismi.S3 27 | import Test.Reliability.Reliability 28 | import Test.QuickCheck 29 | import Test.QuickCheck.Instances () 30 | 31 | import X.Control.Monad.Trans.Either (runEitherT) 32 | 33 | prop_sync = forAll (elements muppets) $ \m -> testAWS' $ \a b i -> do 34 | createSmallFiles a m i 35 | r <- runEitherT $ syncWithMode OverwriteSync a b 10 36 | mapM_ (\e -> exists e >>= \e' -> when (e' == False) (throwM $ userError "Output files do not exist")) (files a m i) 37 | pure $ (isRight r) === True 38 | 39 | prop_list = forAll (elements muppets) $ \m -> testS3 $ \a i -> do 40 | createSmallFiles a m i 41 | replicateM_ 100 (list a >>= \z -> when (length z /= i) (throwM $ userError "List is not the same as original response")) 42 | pure $ True === True 43 | 44 | prop_upload_single = forAll (elements muppets) $ \m -> testS3 $ \a i -> do 45 | withSystemTempDirectory "mismi" $ \p -> do 46 | liftIO $ D.createDirectoryIfMissing True p 47 | let f = combine p $ T.unpack m 48 | liftIO $ T.writeFile f "data" 49 | mapM_ (uploadOrFail f) $ files a m i 50 | pure $ True === True 51 | 52 | return [] 53 | tests :: IO Bool 54 | tests = 55 | getMaxSuccess >>= testsN 56 | 57 | testsN :: Int -> IO Bool 58 | testsN n = 59 | $forAllProperties $ quickCheckWithResult (stdArgs { maxSuccess = n }) 60 | -------------------------------------------------------------------------------- /mismi-s3/test/Test/Reliability/Reliability.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE ScopedTypeVariables #-} 4 | {-# LANGUAGE TemplateHaskell #-} 5 | {-# OPTIONS_GHC -fno-warn-missing-signatures #-} 6 | module Test.Reliability.Reliability where 7 | 8 | import Control.Monad.IO.Class 9 | 10 | import Mismi.Control 11 | import Mismi.S3 12 | 13 | import P 14 | import qualified Prelude as P 15 | 16 | import System.IO 17 | import System.Environment 18 | 19 | import Test.Mismi 20 | import Test.Mismi.S3 21 | import Test.QuickCheck 22 | 23 | testS3 :: Testable a => (Address -> Int -> AWS a) -> Property 24 | testS3 f = testAWS $ do 25 | a <- newAddress 26 | i <- liftIO $ testSize 27 | f a i 28 | 29 | testAWS' :: Testable a => (Address -> Address -> Int -> AWS a) -> Property 30 | testAWS' f = testAWS $ do 31 | a <- newAddress 32 | b <- newAddress 33 | i <- liftIO $ testSize 34 | f a b i 35 | 36 | testSize :: IO Int 37 | testSize = do 38 | view <- lookupEnv "TEST_RELIABILITY_SIZE" 39 | let x = maybe 10 P.read view 40 | pure x 41 | 42 | getMaxSuccess :: IO Int 43 | getMaxSuccess = do 44 | view <- lookupEnv "TEST_RELIABILITY_SUCCESS" 45 | let x = maybe 5 P.read view 46 | pure x 47 | -------------------------------------------------------------------------------- /mismi-s3/test/ambiata-mismi-s3-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-s3-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base >= 3 && < 6 9 | , amazonka >= 1.3.6 && < 1.6 10 | , amazonka-core >= 1.3.6 && < 1.6 11 | , amazonka-s3 >= 1.3.6 && < 1.6 12 | , ambiata-disorder-core 13 | , ambiata-disorder-corpus 14 | , ambiata-mismi-core 15 | , ambiata-mismi-core-test 16 | , ambiata-mismi-s3 17 | , ambiata-mismi-s3-core 18 | , ambiata-mismi-s3-core-test 19 | , ambiata-p 20 | , ambiata-x-eithert 21 | , ambiata-twine 22 | , lens >= 4.8 && < 4.16 23 | , conduit == 1.2.* 24 | , time >= 1.4 && < 1.9 25 | , exceptions >= 0.6 && < 0.9 26 | , filepath >= 1.3 && < 1.5 27 | , http-client >= 0.4.18 && < 0.6 28 | , text == 1.2.* 29 | , transformers >= 0.3 && < 0.6 30 | , QuickCheck >= 2.7 && < 2.12 31 | , quickcheck-instances == 0.3.* 32 | , unix == 2.7.* 33 | , temporary == 1.2.* 34 | , uuid == 1.3.* 35 | , mtl >= 2.1 && < 2.3 36 | , resourcet 37 | , directory 38 | 39 | 40 | exposed-modules: 41 | Test.Mismi.Amazonka 42 | Test.Mismi.S3 43 | Test.Mismi.S3.Arbitrary 44 | -------------------------------------------------------------------------------- /mismi-s3/test/test-io.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.IO.Mismi.S3.Commands 4 | import qualified Test.IO.Mismi.S3.Internal 5 | import Test.Mismi (enableTests) 6 | 7 | main :: IO () 8 | main = 9 | disorderMain =<< enableTests "AWS_TEST_S3" [ 10 | Test.IO.Mismi.S3.Internal.tests 11 | ] [ 12 | Test.IO.Mismi.S3.Internal.tests 13 | , Test.IO.Mismi.S3.Commands.tests 14 | ] 15 | -------------------------------------------------------------------------------- /mismi-s3/test/test-reliability.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.Reliability.Mismi.S3.Commands 4 | 5 | 6 | main :: IO () 7 | main = 8 | disorderMain [ 9 | Test.Reliability.Mismi.S3.Commands.tests 10 | ] 11 | -------------------------------------------------------------------------------- /mismi-s3/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.Mismi.S3.Commands 4 | import qualified Test.Mismi.S3.Control 5 | import qualified Test.Mismi.S3.Internal 6 | 7 | 8 | main :: IO () 9 | main = 10 | disorderMain [ 11 | Test.Mismi.S3.Commands.tests 12 | , Test.Mismi.S3.Control.tests 13 | , Test.Mismi.S3.Internal.tests 14 | ] 15 | -------------------------------------------------------------------------------- /mismi-sqs-core/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-sqs-core/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-sqs-core/ambiata-mismi-sqs-core.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-sqs-core 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-sqs-core. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , ambiata-mismi-kernel 19 | , text == 1.2.* 20 | 21 | ghc-options: 22 | -Wall 23 | 24 | hs-source-dirs: 25 | src 26 | 27 | 28 | exposed-modules: 29 | Mismi.SQS.Core.Data 30 | 31 | test-suite test 32 | type: exitcode-stdio-1.0 33 | main-is: test.hs 34 | ghc-options: -Wall -threaded -O2 35 | hs-source-dirs: test 36 | build-depends: base 37 | , ambiata-disorder-core 38 | , ambiata-disorder-corpus 39 | , ambiata-mismi-kernel 40 | , ambiata-mismi-kernel-test 41 | , ambiata-mismi-sqs-core 42 | , ambiata-p 43 | , text 44 | , QuickCheck >= 2.7 && < 2.12 45 | , quickcheck-instances == 0.3.* 46 | -------------------------------------------------------------------------------- /mismi-sqs-core/ambiata-mismi-sqs-core.lock-7.10.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.5.4 3 | bifunctors == 5.3 4 | comonad == 5 5 | contravariant == 1.4 6 | distributive == 0.5.2 7 | hashable == 1.2.6.0 8 | ieee754 == 0.7.9 9 | integer-logarithms == 1.0.1 10 | old-locale == 1.0.0.7 11 | old-time == 1.1.0.3 12 | primitive == 0.6.2.0 13 | QuickCheck == 2.8.2 14 | quickcheck-instances == 0.3.12 15 | quickcheck-text == 0.1.2.1 16 | random == 1.1 17 | scientific == 0.3.4.11 18 | semigroups == 0.18.2 19 | semigroups -bytestring-builder 20 | StateVar == 1.1.0.4 21 | stm == 2.4.4.1 22 | tagged == 0.8.5 23 | text == 1.2.2.1 24 | tf-random == 0.5 25 | transformers-compat == 0.5.1.4 26 | unordered-containers == 0.2.8.0 27 | vector == 0.12.0.1 28 | void == 0.7.2 29 | -------------------------------------------------------------------------------- /mismi-sqs-core/ambiata-mismi-sqs-core.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | base-orphans == 0.6 3 | bifunctors == 5.3 4 | cabal-doctest == 1 5 | comonad == 5 6 | contravariant == 1.4 7 | distributive == 0.5.2 8 | hashable == 1.2.6.0 9 | ieee754 == 0.8.0 10 | integer-logarithms == 1.0.1 11 | old-locale == 1.0.0.7 12 | old-time == 1.1.0.3 13 | primitive == 0.6.2.0 14 | QuickCheck == 2.8.2 15 | quickcheck-instances == 0.3.12 16 | quickcheck-text == 0.1.2.1 17 | random == 1.1 18 | scientific == 0.3.4.12 19 | semigroups == 0.18.2 20 | StateVar == 1.1.0.4 21 | stm == 2.4.4.1 22 | tagged == 0.8.5 23 | text == 1.2.2.1 24 | tf-random == 0.5 25 | transformers-compat == 0.5.1.4 26 | unordered-containers == 0.2.8.0 27 | vector == 0.12.0.1 28 | void == 0.7.2 29 | -------------------------------------------------------------------------------- /mismi-sqs-core/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-sqs-core/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master-with-test.toml -------------------------------------------------------------------------------- /mismi-sqs-core/src/Mismi/SQS/Core/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | module Mismi.SQS.Core.Data ( 4 | QueueName (..) 5 | , Queue (..) 6 | , QueueUrl (..) 7 | , MessageId (..) 8 | ) where 9 | 10 | import Mismi.Kernel.Data (MismiRegion) 11 | 12 | import P 13 | 14 | 15 | -- Queue names are limited to 80 characters. Alphanumeric characters 16 | -- plus hyphens (-) and underscores (_) are allowed. Queue names must 17 | -- be unique within an AWS account. After you delete a queue, you can 18 | -- reuse the queue name. 19 | newtype QueueName = 20 | QueueName { 21 | renderQueueName :: Text 22 | } deriving (Eq, Show) 23 | 24 | data Queue = 25 | Queue { 26 | queueName :: QueueName 27 | , queueRegion :: MismiRegion 28 | } deriving (Eq, Show) 29 | 30 | newtype QueueUrl = 31 | QueueUrl { 32 | renderQueueUrl :: Text 33 | } deriving (Eq, Show) 34 | 35 | newtype MessageId = 36 | MessageId { 37 | renderMessageId :: Text 38 | } deriving (Eq, Show) 39 | -------------------------------------------------------------------------------- /mismi-sqs-core/test/Test/Mismi/SQS/Core/Arbitrary.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# OPTIONS_GHC -fno-warn-orphans #-} 4 | module Test.Mismi.SQS.Core.Arbitrary where 5 | 6 | import Data.Text as T 7 | 8 | import Mismi.Kernel.Data 9 | import Mismi.SQS.Core.Data 10 | 11 | import P 12 | 13 | import Test.Mismi.Kernel.Arbitrary () 14 | import Test.QuickCheck 15 | 16 | 17 | instance Arbitrary Queue where 18 | arbitrary = Queue <$> arbitrary <*> sqsRegions 19 | 20 | instance Arbitrary QueueName where 21 | arbitrary = fmap (QueueName . T.pack) . vectorOf 80 . elements 22 | $ ['a'..'z'] <> ['0'..'9'] <> "-_" 23 | 24 | sqsRegions :: Gen MismiRegion 25 | sqsRegions = 26 | elements [IrelandRegion, TokyoRegion, SingaporeRegion, SydneyRegion, NorthCaliforniaRegion, OregonRegion, NorthVirginiaRegion] 27 | -------------------------------------------------------------------------------- /mismi-sqs-core/test/ambiata-mismi-sqs-core-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-sqs-core-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base >= 3 && < 5 9 | , ambiata-disorder-core 10 | , ambiata-disorder-corpus 11 | , ambiata-mismi-kernel 12 | , ambiata-mismi-kernel-test 13 | , ambiata-mismi-sqs-core 14 | , ambiata-p 15 | , text 16 | , QuickCheck >= 2.7 && < 2.12 17 | , quickcheck-instances == 0.3.* 18 | 19 | exposed-modules: 20 | Test.Mismi.SQS.Core.Arbitrary 21 | -------------------------------------------------------------------------------- /mismi-sqs-core/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | main :: IO () 4 | main = 5 | disorderMain [ 6 | ] 7 | -------------------------------------------------------------------------------- /mismi-sqs/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-sqs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-sqs/ambiata-mismi-sqs.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-sqs/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-sqs/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master-with-test.toml -------------------------------------------------------------------------------- /mismi-sqs/src/Mismi/SQS.hs: -------------------------------------------------------------------------------- 1 | -- | Import this module to use new `amazonka`-based Mismi 2 | module Mismi.SQS ( 3 | module X 4 | ) where 5 | 6 | import Mismi as X 7 | import Mismi.SQS.Data as X 8 | import Mismi.SQS.Commands as X 9 | -------------------------------------------------------------------------------- /mismi-sqs/src/Mismi/SQS/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.SQS.Amazonka ( 3 | module A 4 | ) where 5 | 6 | import Network.AWS.Env as A hiding (within) 7 | import Network.AWS.SQS as A 8 | -------------------------------------------------------------------------------- /mismi-sqs/src/Mismi/SQS/Data.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | {-# LANGUAGE DeriveDataTypeable #-} 4 | module Mismi.SQS.Data ( 5 | QueueName(..) 6 | , Queue(..) 7 | , QueueUrl(..) 8 | , MessageId(..) 9 | , SQSError(..) 10 | , sqsErrorRender 11 | , module Mismi.SQS.Core.Data 12 | ) where 13 | 14 | import Control.Exception.Base 15 | import Data.Text 16 | import Data.Typeable 17 | import Mismi.SQS.Core.Data 18 | import P 19 | 20 | data SQSError = 21 | Invariant Text 22 | deriving (Typeable) 23 | 24 | instance Exception SQSError 25 | 26 | instance Show SQSError where 27 | show = unpack . sqsErrorRender 28 | 29 | sqsErrorRender :: SQSError -> Text 30 | sqsErrorRender (Invariant e) = 31 | "[Mismi internal error] - " <> e 32 | -------------------------------------------------------------------------------- /mismi-sqs/test/Test/IO/Mismi/SQS/Aws/Commands.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE TemplateHaskell #-} 3 | module Test.IO.Mismi.SQS.Aws.Commands where 4 | 5 | import Control.Lens 6 | import Data.Maybe 7 | import Disorder.Core.IO 8 | 9 | import qualified Mismi.SQS as A 10 | import Mismi.SQS.Aws 11 | 12 | import P 13 | 14 | import System.IO 15 | 16 | import Test.Mismi.SQS.Aws 17 | import Test.QuickCheck 18 | 19 | 20 | prop_read_compatibility :: Queue -> NonEmptyMessage -> Property 21 | prop_read_compatibility queue' (NonEmptyMessage b) = 22 | testIO . runSQSWithQueueArg (Just 0) queue' $ \q -> do 23 | void $ writeMessage q b Nothing 24 | ms <- readMessages q (Just 1) Nothing 25 | ms' <- A.readMessages q (Just 1) Nothing 26 | pure $ 27 | [b] === (mBody <$> ms) .&&. 28 | [Just b] === ((^. A.mBody) <$> ms') .&&. 29 | let ([m], [m']) = (ms, ms') 30 | in 31 | Just (mMessageId m) === m' ^. A.mMessageId .&&. 32 | Just (mMD5OfBody m) === m' ^. A.mMD5OfBody .&&. 33 | mMD5OfMessageAttributes m === m' ^. A.mMD5OfMessageAttributes 34 | 35 | 36 | return [] 37 | tests :: IO Bool 38 | tests = $forAllProperties $ quickCheckWithResult (stdArgs { maxSuccess = 2 }) 39 | -------------------------------------------------------------------------------- /mismi-sqs/test/Test/IO/Mismi/SQS/Control.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE TemplateHaskell #-} 3 | module Test.IO.Mismi.SQS.Control where 4 | 5 | import Mismi.Amazonka as M 6 | import Mismi.SQS 7 | 8 | import P 9 | 10 | import System.IO 11 | 12 | import Test.Mismi.SQS 13 | import Test.QuickCheck 14 | 15 | prop_result :: NonEmptyMessage -> Queue -> Property 16 | prop_result t (Queue q r) = testAWS . M.within (fromMismiRegion r) $ do 17 | r' <- withQueue q $ \a -> do 18 | _ <- writeMessage a (unMessage t) Nothing 19 | readMessages a (Just 1) Nothing 20 | pure $ (P.length r') === 1 21 | 22 | return [] 23 | tests :: IO Bool 24 | tests = $forAllProperties $ quickCheckWithResult (stdArgs { maxSuccess = 1 }) 25 | -------------------------------------------------------------------------------- /mismi-sqs/test/Test/Mismi/SQS.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# LANGUAGE OverloadedStrings #-} 3 | {-# LANGUAGE LambdaCase #-} 4 | module Test.Mismi.SQS ( 5 | module X 6 | , NonEmptyMessage(..) 7 | , withQueue 8 | , withQueueArg 9 | , runSQSWithQueue 10 | , runSQSWithQueueArg 11 | ) where 12 | 13 | import Data.Text 14 | 15 | import Mismi.SQS as M 16 | import qualified Mismi.Amazonka as M 17 | 18 | import Test.Mismi as X 19 | import Test.Mismi.SQS.Arbitrary () 20 | import Test.QuickCheck 21 | 22 | import P 23 | 24 | import System.IO 25 | 26 | data NonEmptyMessage = NonEmptyMessage { 27 | unMessage :: Text 28 | } deriving (Eq, Show) 29 | 30 | instance Arbitrary NonEmptyMessage where 31 | arbitrary = do 32 | -- http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html 33 | -- invalid unicode values #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF] 34 | NonEmptyMessage <$> genSQSText 35 | 36 | genSQSText :: Gen Text 37 | genSQSText = 38 | let invalid = P.concat [['\x9'],['\xA'],['\xD'], ['\x20'..'\xD7FF'], ['\xE000'..'\xFFFD'], ['\x10000'..'\x10FFFF']] 39 | in suchThat (pack . P.filter (\x -> P.elem x invalid) <$> arbitrary) (not . Data.Text.null) 40 | 41 | withQueue :: QueueName -> (QueueUrl -> AWS a) -> AWS a 42 | withQueue = withQueueArg testVisibilityTimeout 43 | 44 | withQueueArg :: Maybe Int -> QueueName -> (QueueUrl -> AWS a) -> AWS a 45 | withQueueArg v q f = 46 | awsBracket (createQueue q v) (void . deleteQueue) f 47 | 48 | 49 | runSQSWithQueue :: Queue -> (QueueUrl -> AWS a) -> IO a 50 | runSQSWithQueue = runSQSWithQueueArg testVisibilityTimeout 51 | 52 | runSQSWithQueueArg :: Maybe Int -> Queue -> (QueueUrl -> AWS a) -> IO a 53 | runSQSWithQueueArg v (Queue qn r) f = do 54 | runAWSDefaultRegion . M.within (fromMismiRegion r) $ withQueueArg v qn f 55 | 56 | testVisibilityTimeout :: Maybe Int 57 | testVisibilityTimeout = Just 8400 58 | -------------------------------------------------------------------------------- /mismi-sqs/test/Test/Mismi/SQS/Arbitrary.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | {-# OPTIONS_GHC -fno-warn-orphans #-} 3 | module Test.Mismi.SQS.Arbitrary where 4 | 5 | import Test.Mismi.Arbitrary () 6 | import Test.Mismi.SQS.Core.Arbitrary () 7 | import Test.QuickCheck () 8 | import Test.QuickCheck.Instances () 9 | -------------------------------------------------------------------------------- /mismi-sqs/test/ambiata-mismi-sqs-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-sqs-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base >= 3 && < 5 9 | , amazonka >= 1.3.6 && < 1.6 10 | , amazonka-core >= 1.3.6 && < 1.6 11 | , ambiata-disorder-core 12 | , ambiata-disorder-corpus 13 | , ambiata-mismi-core 14 | , ambiata-mismi-core-test 15 | , ambiata-mismi-sqs-core 16 | , ambiata-mismi-sqs-core-test 17 | , ambiata-mismi-sqs 18 | , ambiata-p 19 | , ambiata-x-eithert 20 | , exceptions >= 0.6 && < 0.9 21 | , filepath >= 1.3 && < 1.5 22 | , text == 1.2.* 23 | , transformers >= 0.3 && < 0.6 24 | , QuickCheck >= 2.7 && < 2.12 25 | , quickcheck-instances == 0.3.* 26 | , unix == 2.7.* 27 | , temporary == 1.2.* 28 | , uuid == 1.3.* 29 | 30 | exposed-modules: 31 | Test.Mismi.SQS 32 | Test.Mismi.SQS.Arbitrary 33 | -------------------------------------------------------------------------------- /mismi-sqs/test/test-io.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | import qualified Test.IO.Mismi.SQS.Commands 4 | import qualified Test.IO.Mismi.SQS.Control 5 | 6 | main :: IO () 7 | main = 8 | disorderMain [ 9 | Test.IO.Mismi.SQS.Commands.tests 10 | , Test.IO.Mismi.SQS.Control.tests 11 | ] 12 | -------------------------------------------------------------------------------- /mismi-sqs/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | main :: IO () 4 | main = 5 | disorderMain [ 6 | ] 7 | -------------------------------------------------------------------------------- /mismi-sts/.ghci: -------------------------------------------------------------------------------- 1 | ../framework/ghci -------------------------------------------------------------------------------- /mismi-sts/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017, Ambiata, All Rights Reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of 15 | its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /mismi-sts/ambiata-mismi-sts.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-sts 2 | version: 0.1.6 3 | license: Apache-2.0 4 | license-file: LICENSE 5 | author: Ambiata 6 | maintainer: Ambiata 7 | copyright: (c) 2015 Ambiata 8 | synopsis: AWS library 9 | category: AWS 10 | cabal-version: >= 1.8 11 | build-type: Simple 12 | description: mismi-sts. 13 | 14 | library 15 | build-depends: 16 | base >= 3 && < 5 17 | , ambiata-p 18 | , ambiata-mismi-core 19 | , ambiata-x-eithert 20 | , amazonka >= 1.3.6 && < 1.6 21 | , amazonka-core >= 1.3.6 && < 1.6 22 | , amazonka-sts >= 1.3.6 && < 1.6 23 | 24 | 25 | ghc-options: 26 | -Wall 27 | 28 | hs-source-dirs: 29 | src 30 | 31 | exposed-modules: 32 | Mismi.STS 33 | Mismi.STS.Amazonka 34 | 35 | test-suite test 36 | type: exitcode-stdio-1.0 37 | main-is: test.hs 38 | ghc-options: -Wall -threaded -O2 39 | hs-source-dirs: test 40 | build-depends: base 41 | , ambiata-disorder-core 42 | , ambiata-mismi-core 43 | , ambiata-mismi-sts 44 | , QuickCheck >= 2.7 && < 2.12 45 | , quickcheck-instances == 0.3.* 46 | -------------------------------------------------------------------------------- /mismi-sts/ambiata-mismi-sts.lock-8.0.2: -------------------------------------------------------------------------------- 1 | # mafia-lock-file-version: 0 2 | adjunctions == 4.3 3 | aeson == 1.1.1.0 4 | amazonka == 1.5.0 5 | amazonka-core == 1.5.0 6 | amazonka-sts == 1.5.0 7 | asn1-encoding == 0.9.5 8 | asn1-parse == 0.9.4 9 | asn1-types == 0.3.2 10 | async == 2.1.1.1 11 | attoparsec == 0.13.1.0 12 | base-compat == 0.9.3 13 | base-orphans == 0.6 14 | base64-bytestring == 1.0.0.1 15 | bifunctors == 5.2.1 16 | blaze-builder == 0.4.0.2 17 | blaze-html == 0.9.0.1 18 | blaze-markup == 0.8.0.0 19 | byteable == 0.1.1 20 | cabal-doctest == 1 21 | case-insensitive == 1.2.0.8 22 | cereal == 0.5.4.0 23 | comonad == 5 24 | conduit == 1.2.9.1 25 | conduit-extra == 1.1.15 26 | connection == 0.2.5 27 | contravariant == 1.4 28 | cookie == 0.4.2.1 29 | cryptonite == 0.22 30 | data-default == 0.7.1.1 31 | data-default-class == 0.1.2.0 32 | data-default-instances-containers == 0.0.1 33 | data-default-instances-dlist == 0.0.1 34 | data-default-instances-old-locale == 0.0.1 35 | distributive == 0.5.2 36 | dlist == 0.8.0.2 37 | exceptions == 0.8.3 38 | foundation == 0.0.6 39 | free == 4.12.4 40 | hashable == 1.2.6.0 41 | hourglass == 0.2.10 42 | http-client == 0.4.18.1 43 | http-client-tls == 0.2.4.1 44 | http-conduit == 2.1.7.2 45 | http-types == 0.8.6 46 | ieee754 == 0.8.0 47 | ini == 0.3.5 48 | integer-logarithms == 1.0.1 49 | kan-extensions == 5.0.1 50 | lens == 4.14 51 | lifted-base == 0.2.3.10 52 | memory == 0.14.3 53 | mime-types == 0.1.0.7 54 | mmorph == 1.0.9 55 | monad-control == 1.0.1.0 56 | mtl == 2.2.1 57 | network == 2.6.3.1 58 | network-uri == 2.6.1.0 59 | old-locale == 1.0.0.7 60 | old-time == 1.1.0.3 61 | parallel == 3.2.1.1 62 | parsec == 3.1.11 63 | pem == 0.2.2 64 | prelude-extras == 0.4.0.3 65 | primitive == 0.6.1.0 66 | profunctors == 5.2 67 | QuickCheck == 2.8.2 68 | quickcheck-instances == 0.3.12 69 | quickcheck-text == 0.1.2.1 70 | random == 1.1 71 | reflection == 2.1.2 72 | resourcet == 1.1.9 73 | retry == 0.7.4.2 74 | scientific == 0.3.4.12 75 | semigroupoids == 5.1 76 | semigroups == 0.18.2 77 | socks == 0.5.5 78 | StateVar == 1.1.0.4 79 | stm == 2.4.4.1 80 | streaming-commons == 0.1.17 81 | tagged == 0.8.5 82 | text == 1.2.2.1 83 | tf-random == 0.5 84 | time-locale-compat == 0.1.1.3 85 | time-locale-compat -old-locale 86 | tls == 1.3.10 87 | transformers-base == 0.4.4 88 | transformers-compat == 0.5.1.4 89 | unordered-containers == 0.2.8.0 90 | uuid-types == 1.0.3 91 | vector == 0.11.0.0 92 | void == 0.7.2 93 | x509 == 1.6.5 94 | x509-store == 1.6.2 95 | x509-system == 1.6.4 96 | x509-validation == 1.6.5 97 | xml-conduit == 1.4.0.4 98 | xml-types == 0.3.6 99 | zlib == 0.6.1.2 100 | -------------------------------------------------------------------------------- /mismi-sts/ambiata-mismi-sts.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-core/test 3 | -------------------------------------------------------------------------------- /mismi-sts/mafia: -------------------------------------------------------------------------------- 1 | ../framework/mafia -------------------------------------------------------------------------------- /mismi-sts/master.toml: -------------------------------------------------------------------------------- 1 | ../framework/master.toml -------------------------------------------------------------------------------- /mismi-sts/src/Mismi/STS.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.STS ( 3 | ) where 4 | -------------------------------------------------------------------------------- /mismi-sts/src/Mismi/STS/Amazonka.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | module Mismi.STS.Amazonka ( 3 | module AWS 4 | ) where 5 | 6 | import Network.AWS.STS as AWS 7 | -------------------------------------------------------------------------------- /mismi-sts/test/ambiata-mismi-sts-test.cabal: -------------------------------------------------------------------------------- 1 | name: ambiata-mismi-sts-test 2 | version: 0.1.6 3 | cabal-version: >= 1.8 4 | build-type: Simple 5 | 6 | library 7 | build-depends: 8 | base 9 | , ambiata-mismi-sts 10 | 11 | exposed-modules: 12 | -------------------------------------------------------------------------------- /mismi-sts/test/ambiata-mismi-sts-test.submodules: -------------------------------------------------------------------------------- 1 | mismi-core 2 | mismi-sts 3 | -------------------------------------------------------------------------------- /mismi-sts/test/test.hs: -------------------------------------------------------------------------------- 1 | import Disorder.Core.Main 2 | 3 | 4 | main :: IO () 5 | main = 6 | disorderMain [ 7 | ] 8 | --------------------------------------------------------------------------------