aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlexandre Garand <alexandre.garand@fretlink.com>2019-08-09 16:51:13 +0200
committerAlexandre Garand <alexandre.garand@fretlink.com>2019-08-09 16:51:13 +0200
commitb74d3065f299a1953e6d21e3d48d3ce0629bcaf7 (patch)
tree0ce1b8fd1a2b3ff7d427b567111f0732faa461ec
parentebf8436f01bcacb71e3c378f08b165dfd6dd90e6 (diff)
parent464a0a808240c83e365ddc7a4c52b82ecf9b76c4 (diff)
downloadterraform-provider-statuscake-b74d3065f299a1953e6d21e3d48d3ce0629bcaf7.tar.gz
terraform-provider-statuscake-b74d3065f299a1953e6d21e3d48d3ce0629bcaf7.tar.zst
terraform-provider-statuscake-b74d3065f299a1953e6d21e3d48d3ce0629bcaf7.zip
Merge branch 'add_ssl_tests' of github.com:alexandreFre/terraform-provider-statuscake
-rw-r--r--go.mod2
-rw-r--r--go.sum66
-rw-r--r--statuscake/provider.go1
-rw-r--r--statuscake/provider_test.go3
-rw-r--r--statuscake/resource_statuscakessl.go290
-rw-r--r--statuscake/resource_statuscakessl_test.go224
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/Gopkg.lock13
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/Gopkg.toml4
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/client_test.go236
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/cmd/statuscake/main.go246
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/auth_error.json4
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/sslCreateOk.json14
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/sslDeleteOk.json4
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/sslListAllOk.json100
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/sslUpdateOk.json4
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_all_ok.json70
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_create_ok.json13
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_update_error.json13
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_update_ok.json4
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_all_ok.json23
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_delete_error.json5
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_delete_ok.json6
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_detail_ok.json39
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_error.json9
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_error_slice_of_issues.json5
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_ok.json6
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/ssl.go273
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/ssl_test.go343
-rw-r--r--vendor/github.com/DreamItGetIT/statuscake/tests_test.go422
-rw-r--r--vendor/github.com/google/go-querystring/.gitignore1
-rw-r--r--vendor/github.com/google/go-querystring/.travis.yml5
-rw-r--r--vendor/github.com/google/go-querystring/CONTRIBUTING.md67
-rw-r--r--vendor/github.com/google/go-querystring/LICENSE27
-rw-r--r--vendor/github.com/google/go-querystring/README.md37
-rw-r--r--vendor/github.com/google/go-querystring/go.mod1
-rw-r--r--vendor/github.com/google/go-querystring/query/encode.go320
-rw-r--r--vendor/github.com/google/go-querystring/query/encode_test.go328
-rw-r--r--vendor/modules.txt4
-rw-r--r--website/docs/index.html.markdown13
-rw-r--r--website/docs/r/ssl.html.markdown72
-rw-r--r--website/statuscake.erb3
41 files changed, 3255 insertions, 65 deletions
diff --git a/go.mod b/go.mod
index d999246..74c84aa 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
1module github.com/terraform-providers/terraform-provider-statuscake 1module github.com/terraform-providers/terraform-provider-statuscake
2 2
3require ( 3require (
4 github.com/DreamItGetIT/statuscake v0.0.0-20190218105717-471b24d8edfb 4 github.com/DreamItGetIT/statuscake v0.0.0-20190628135227-71a9c9823950
5 github.com/hashicorp/terraform v0.12.0 5 github.com/hashicorp/terraform v0.12.0
6) 6)
diff --git a/go.sum b/go.sum
index cc8f846..6ebf685 100644
--- a/go.sum
+++ b/go.sum
@@ -8,25 +8,22 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr
8dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= 8dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
9dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= 9dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
10git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= 10git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
11github.com/Azure/azure-sdk-for-go v21.3.0+incompatible h1:YFvAka2WKAl2xnJkYV1e1b7E2z88AgFszDzWU18ejMY=
12github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= 11github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
13github.com/Azure/go-autorest v10.15.4+incompatible h1:q+DRrRdbCnkY7f2WxQBx58TwCGkEdMAK/hkZ10g0Pzk=
14github.com/Azure/go-autorest v10.15.4+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= 12github.com/Azure/go-autorest v10.15.4+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
15github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4 h1:pSm8mp0T2OH2CPmPDPtwHPr3VAQaOwVF/JbllOPP4xA=
16github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= 13github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
17github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 14github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
18github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022 h1:y8Gs8CzNfDF5AZvjr+5UyGQvQEBL7pwo+v+wX6q9JI8=
19github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= 15github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
20github.com/DreamItGetIT/statuscake v0.0.0-20190218105717-471b24d8edfb h1:vJ3lnCyZNmSV/OKyw4d7GuZHFrUaa3FY6/NqtvRE0lw= 16github.com/DreamItGetIT/statuscake v0.0.0-20190218105717-471b24d8edfb h1:vJ3lnCyZNmSV/OKyw4d7GuZHFrUaa3FY6/NqtvRE0lw=
21github.com/DreamItGetIT/statuscake v0.0.0-20190218105717-471b24d8edfb/go.mod h1:OclNh7ZacJo61GDJablmsOZ7l8/AVtzGqP8G7baOdAs= 17github.com/DreamItGetIT/statuscake v0.0.0-20190218105717-471b24d8edfb/go.mod h1:OclNh7ZacJo61GDJablmsOZ7l8/AVtzGqP8G7baOdAs=
22github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292 h1:tuQ7w+my8a8mkwN7x2TSd7OzTjkZ7rAeSyH4xncuAMI= 18github.com/DreamItGetIT/statuscake v0.0.0-20190625125909-fc745efe187b h1:yUbHQh9UVg9muJwkgX2AaID/Yps2qUCVyeIUd8gcB4M=
19github.com/DreamItGetIT/statuscake v0.0.0-20190625125909-fc745efe187b/go.mod h1:OclNh7ZacJo61GDJablmsOZ7l8/AVtzGqP8G7baOdAs=
20github.com/DreamItGetIT/statuscake v0.0.0-20190628135227-71a9c9823950 h1:lD09IZzV8+5/Lt83alOpxo/QCnRQue0DLTrqcqk3mcE=
21github.com/DreamItGetIT/statuscake v0.0.0-20190628135227-71a9c9823950/go.mod h1:OclNh7ZacJo61GDJablmsOZ7l8/AVtzGqP8G7baOdAs=
23github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292/go.mod h1:KYCjqMOeHpNuTOiFQU6WEcTG7poCJrUs0YgyHNtn1no= 22github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292/go.mod h1:KYCjqMOeHpNuTOiFQU6WEcTG7poCJrUs0YgyHNtn1no=
24github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= 23github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw=
25github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8=
26github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= 24github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
27github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= 25github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
28github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= 26github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
29github.com/agl/ed25519 v0.0.0-20150830182803-278e1ec8e8a6 h1:LoeFxdq5zUCBQPhbQKE6zvoGwHMxCBlqwbH9+9kHoHA=
30github.com/agl/ed25519 v0.0.0-20150830182803-278e1ec8e8a6/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= 27github.com/agl/ed25519 v0.0.0-20150830182803-278e1ec8e8a6/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0=
31github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= 28github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
32github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= 29github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
@@ -38,7 +35,6 @@ github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFU
38github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= 35github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
39github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= 36github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0=
40github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= 37github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
41github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs=
42github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= 38github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
43github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= 39github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
44github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= 40github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
@@ -60,28 +56,21 @@ github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBT
60github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k= 56github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k=
61github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= 57github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
62github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 58github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
63github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d h1:aG5FcWiZTOhPQzYIxwxSR1zEOxzL32fwr1CsaCfhO6w=
64github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 59github.com/chzyer/readline v0.0.0-20161106042343-c914be64f07d/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
65github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 60github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
66github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 61github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
67github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= 62github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
68github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=
69github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= 63github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
70github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
71github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= 64github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
72github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= 65github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
73github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= 66github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
74github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
75github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 67github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
76github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 68github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
77github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 69github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
78github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
79github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 70github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
80github.com/dimchansky/utfbom v1.0.0 h1:fGC2kkf4qOoKqZ4q7iIh+Vef4ubC1c38UDsEyZynZPc=
81github.com/dimchansky/utfbom v1.0.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= 71github.com/dimchansky/utfbom v1.0.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
82github.com/dnaeon/go-vcr v0.0.0-20180920040454-5637cf3d8a31/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= 72github.com/dnaeon/go-vcr v0.0.0-20180920040454-5637cf3d8a31/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
83github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= 73github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
84github.com/dylanmei/iso8601 v0.1.0 h1:812NGQDBcqquTfH5Yeo7lwR0nzx/cKdsmf3qMjPURUI=
85github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ= 74github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ=
86github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1/go.mod h1:lcy9/2gH1jn/VCLouHA6tOEwLoNVd4GW6zhuKLmHC2Y= 75github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1/go.mod h1:lcy9/2gH1jn/VCLouHA6tOEwLoNVd4GW6zhuKLmHC2Y=
87github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= 76github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
@@ -93,7 +82,6 @@ github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aev
93github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= 82github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg=
94github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= 83github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
95github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 84github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
96github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI=
97github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 85github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
98github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= 86github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
99github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 87github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
@@ -103,7 +91,6 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb
103github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= 91github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk=
104github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 92github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
105github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 93github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
106github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
107github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 94github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
108github.com/golang/protobuf v1.3.0 h1:kbxbvI4Un1LUWKxufD+BiE6AEExYYgkQLQmLFqA1LFk= 95github.com/golang/protobuf v1.3.0 h1:kbxbvI4Un1LUWKxufD+BiE6AEExYYgkQLQmLFqA1LFk=
109github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= 96github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0=
@@ -121,11 +108,8 @@ github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK
121github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= 108github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
122github.com/googleapis/gax-go/v2 v2.0.3 h1:siORttZ36U2R/WjiJuDz8znElWBiAlO9rVt+mqJt0Cc= 109github.com/googleapis/gax-go/v2 v2.0.3 h1:siORttZ36U2R/WjiJuDz8znElWBiAlO9rVt+mqJt0Cc=
123github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= 110github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=
124github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968 h1:Pu+HW4kcQozw0QyrTTgLE+3RXNqFhQNNzhbnoLFL83c=
125github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= 111github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4=
126github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01 h1:OgCNGSnEalfkRpn//WGJHhpo7fkP+LhTpvEITZ7CkK4=
127github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01/go.mod h1:wjDF8z83zTeg5eMLml5EBSlAhbF7G8DobyI1YsMuyzw= 112github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01/go.mod h1:wjDF8z83zTeg5eMLml5EBSlAhbF7G8DobyI1YsMuyzw=
128github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
129github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 113github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
130github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= 114github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
131github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= 115github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
@@ -133,20 +117,16 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmg
133github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= 117github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
134github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= 118github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
135github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= 119github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
136github.com/hashicorp/aws-sdk-go-base v0.2.0 h1:5bjZnWCvQg9Im5CHZr9t90IaFC4uvVlMl2fTh23IoCk=
137github.com/hashicorp/aws-sdk-go-base v0.2.0/go.mod h1:ZIWACGGi0N7a4DZbf15yuE1JQORmWLtBcVM6F5SXNFU= 120github.com/hashicorp/aws-sdk-go-base v0.2.0/go.mod h1:ZIWACGGi0N7a4DZbf15yuE1JQORmWLtBcVM6F5SXNFU=
138github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089 h1:1eDpXAxTh0iPv+1kc9/gfSI2pxRERDsTk/lNGolwHn8=
139github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= 121github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI=
140github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 122github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
141github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= 123github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
142github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 124github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
143github.com/hashicorp/go-azure-helpers v0.0.0-20190129193224-166dfd221bb2 h1:VBRx+yPYUZaobnn5ANBcOUf4hhWpTHSQgftG4TcDkhI=
144github.com/hashicorp/go-azure-helpers v0.0.0-20190129193224-166dfd221bb2/go.mod h1:lu62V//auUow6k0IykxLK2DCNW8qTmpm8KqhYVWattA= 125github.com/hashicorp/go-azure-helpers v0.0.0-20190129193224-166dfd221bb2/go.mod h1:lu62V//auUow6k0IykxLK2DCNW8qTmpm8KqhYVWattA=
145github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
146github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= 126github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
147github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= 127github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig=
148github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= 128github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
149github.com/hashicorp/go-getter v1.3.0 h1:pFMSFlI9l5NaeuzkpE3L7BYk9qQ9juTAgXW/H0cqxcU= 129github.com/hashicorp/go-getter v1.3.0 h1:zVkuohrXQAfI32em/DcGmurxxVwrnJk+m5/KybEPLSw=
150github.com/hashicorp/go-getter v1.3.0/go.mod h1:/O1k/AizTN0QmfEKknCYGvICeyKUDqCYA8vvWtGWDeQ= 130github.com/hashicorp/go-getter v1.3.0/go.mod h1:/O1k/AizTN0QmfEKknCYGvICeyKUDqCYA8vvWtGWDeQ=
151github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= 131github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI=
152github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f h1:Yv9YzBlAETjy6AOX9eLBZ3nshNVRREgerT/3nvxlGho= 132github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f h1:Yv9YzBlAETjy6AOX9eLBZ3nshNVRREgerT/3nvxlGho=
@@ -158,18 +138,13 @@ github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uP
158github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= 138github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
159github.com/hashicorp/go-plugin v1.0.1-0.20190430211030-5692942914bb h1:Zg2pmmk0lrLFL85lQGt08bOUBpIBaVs6/psiAyx0c4w= 139github.com/hashicorp/go-plugin v1.0.1-0.20190430211030-5692942914bb h1:Zg2pmmk0lrLFL85lQGt08bOUBpIBaVs6/psiAyx0c4w=
160github.com/hashicorp/go-plugin v1.0.1-0.20190430211030-5692942914bb/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= 140github.com/hashicorp/go-plugin v1.0.1-0.20190430211030-5692942914bb/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
161github.com/hashicorp/go-retryablehttp v0.5.2 h1:AoISa4P4IsW0/m4T6St8Yw38gTl5GtBAgfkhYh1xAz4=
162github.com/hashicorp/go-retryablehttp v0.5.2/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= 141github.com/hashicorp/go-retryablehttp v0.5.2/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
163github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI=
164github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= 142github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
165github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= 143github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
166github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= 144github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
167github.com/hashicorp/go-slug v0.3.0 h1:L0c+AvH/J64iMNF4VqRaRku2DMTEuHioPVS7kMjWIU8=
168github.com/hashicorp/go-slug v0.3.0/go.mod h1:I5tq5Lv0E2xcNXNkmx7BSfzi1PsJ2cNjs3cC3LwyhK8= 145github.com/hashicorp/go-slug v0.3.0/go.mod h1:I5tq5Lv0E2xcNXNkmx7BSfzi1PsJ2cNjs3cC3LwyhK8=
169github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= 146github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
170github.com/hashicorp/go-tfe v0.3.16 h1:GS2yv580p0co4j3FBVaC6Zahd9mxdCGehhJ0qqzFMH0=
171github.com/hashicorp/go-tfe v0.3.16/go.mod h1:SuPHR+OcxvzBZNye7nGPfwZTEyd3rWPfLVbCgyZPezM= 147github.com/hashicorp/go-tfe v0.3.16/go.mod h1:SuPHR+OcxvzBZNye7nGPfwZTEyd3rWPfLVbCgyZPezM=
172github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCSnM=
173github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 148github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
174github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= 149github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
175github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 150github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
@@ -187,7 +162,7 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI
187github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= 162github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
188github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= 163github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE=
189github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= 164github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE=
190github.com/hashicorp/terraform v0.12.0 h1:It2vmod2dBMB4+r+aUW2Afx0HlftyUwzNsNH3I2vrJ8= 165github.com/hashicorp/terraform v0.12.0 h1:B5lTDWSdEbbjxrTZQ8GdsDlH7FnDrIvF42GykbhQ6tA=
191github.com/hashicorp/terraform v0.12.0/go.mod h1:Ke0ig9gGZ8rhV6OddAhBYt5nXmpvXsuNQQ8w9qYBZfU= 166github.com/hashicorp/terraform v0.12.0/go.mod h1:Ke0ig9gGZ8rhV6OddAhBYt5nXmpvXsuNQQ8w9qYBZfU=
192github.com/hashicorp/terraform-config-inspect v0.0.0-20190327195015-8022a2663a70 h1:oZm5nE11yhzsTRz/YrUyDMSvixePqjoZihwn8ipuOYI= 167github.com/hashicorp/terraform-config-inspect v0.0.0-20190327195015-8022a2663a70 h1:oZm5nE11yhzsTRz/YrUyDMSvixePqjoZihwn8ipuOYI=
193github.com/hashicorp/terraform-config-inspect v0.0.0-20190327195015-8022a2663a70/go.mod h1:ItvqtvbC3K23FFET62ZwnkwtpbKZm8t8eMcWjmVVjD8= 168github.com/hashicorp/terraform-config-inspect v0.0.0-20190327195015-8022a2663a70/go.mod h1:ItvqtvbC3K23FFET62ZwnkwtpbKZm8t8eMcWjmVVjD8=
@@ -201,14 +176,10 @@ github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht
201github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= 176github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
202github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= 177github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
203github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= 178github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
204github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 h1:kie3qOosvRKqwij2HGzXWffwpXvcqfPPXRUw8I4F/mg=
205github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= 179github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA=
206github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE=
207github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 180github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
208github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= 181github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
209github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA=
210github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= 182github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
211github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba h1:NARVGAAgEXvoMeNPHhPFt1SBt1VMznA3Gnz9d0qj+co=
212github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= 183github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M=
213github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 184github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
214github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 185github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -220,15 +191,10 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
220github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 191github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
221github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= 192github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4=
222github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= 193github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
223github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
224github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= 194github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
225github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82 h1:wnfcqULT+N2seWf6y4yHzmi7GD2kNx4Ute0qArktD48=
226github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82/go.mod h1:y54tfGmO3NKssKveTEFFzH8C/akrSOy/iW9qEAUDV84= 195github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82/go.mod h1:y54tfGmO3NKssKveTEFFzH8C/akrSOy/iW9qEAUDV84=
227github.com/marstr/guid v1.1.0 h1:/M4H/1G4avsieL6BbUwCOBzulmoeKVP5ux/3mQNnbyI=
228github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= 196github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
229github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9 h1:SmVbOZFWAlyQshuMfOkiAx1f5oUTsOGG5IXplAEYeeM=
230github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= 197github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc=
231github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b h1:/1RFh2SLCJ+tEnT73+Fh5R2AO89sQqs8ba7o+hx1G0Y=
232github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b/go.mod h1:wr1VqkwW0AB5JS0QLy5GpVMS9E3VtRoSYXUYyVk46KY= 198github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b/go.mod h1:wr1VqkwW0AB5JS0QLy5GpVMS9E3VtRoSYXUYyVk46KY=
233github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= 199github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
234github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= 200github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
@@ -238,7 +204,6 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
238github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= 204github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw=
239github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 205github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
240github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= 206github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
241github.com/mattn/go-shellwords v1.0.4 h1:xmZZyxuP+bYKAKkA9ABYXVNJ+G/Wf3R8d8vAP3LDJJk=
242github.com/mattn/go-shellwords v1.0.4/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= 207github.com/mattn/go-shellwords v1.0.4/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
243github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 208github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
244github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= 209github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
@@ -251,12 +216,10 @@ github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMK
251github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= 216github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
252github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0= 217github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=
253github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 218github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
254github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb h1:GRiLv4rgyqjqzxbhJke65IYUf4NCOOvrPOJbV/sPxkM=
255github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb/go.mod h1:OaY7UOoTkkrX3wRwjpYRKafIkkyeD0UtweSHAWWiqQM= 219github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb/go.mod h1:OaY7UOoTkkrX3wRwjpYRKafIkkyeD0UtweSHAWWiqQM=
256github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= 220github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
257github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= 221github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
258github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= 222github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
259github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=
260github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= 223github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
261github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= 224github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
262github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= 225github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
@@ -264,15 +227,12 @@ github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9
264github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= 227github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
265github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= 228github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
266github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 229github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
267github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4 h1:jw9tsdJ1FQmUkyTXdIF/nByTX+mMnnp16glnvGZMsC4=
268github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4/go.mod h1:YYMf4xtQnR8LRC0vKi3afvQ5QwRPQ17zjcpkBCufb+I= 230github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4/go.mod h1:YYMf4xtQnR8LRC0vKi3afvQ5QwRPQ17zjcpkBCufb+I=
269github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51 h1:eD92Am0Qf3rqhsOeA1zwBHSfRkoHrt4o6uORamdmJP8=
270github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo= 231github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo=
271github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= 232github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
272github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 233github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
273github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= 234github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
274github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= 235github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
275github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ=
276github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= 236github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U=
277github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= 237github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
278github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= 238github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
@@ -280,10 +240,8 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
280github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 240github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
281github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 241github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
282github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= 242github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
283github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58 h1:m3CEgv3ah1Rhy82L+c0QG/U3VyY1UsvsIdkh0/rU97Y=
284github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk= 243github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
285github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= 244github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
286github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17 h1:chPfVn+gpAM5CTpTyVU9j8J+xgRGwmoDlNDLjKnJiYo=
287github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 245github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
288github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 246github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
289github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 247github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -295,7 +253,6 @@ github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:
295github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= 253github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
296github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 254github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
297github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= 255github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
298github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
299github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= 256github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
300github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= 257github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
301github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= 258github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
@@ -323,7 +280,6 @@ github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.
323github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= 280github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=
324github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= 281github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
325github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= 282github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A=
326github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
327github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 283github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
328github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= 284github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
329github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= 285github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
@@ -336,23 +292,18 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
336github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 292github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
337github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 293github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
338github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 294github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
339github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d h1:Z4EH+5EffvBEhh37F0C0DnpklTMh00JOkjW5zK3ofBI=
340github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= 295github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw=
341github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= 296github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
342github.com/terraform-providers/terraform-provider-openstack v1.15.0 h1:adpjqej+F8BAX9dHmuPF47sUIkgifeqBu6p7iCsyj0Y=
343github.com/terraform-providers/terraform-provider-openstack v1.15.0/go.mod h1:2aQ6n/BtChAl1y2S60vebhyJyZXBsuAI5G4+lHrT1Ew= 297github.com/terraform-providers/terraform-provider-openstack v1.15.0/go.mod h1:2aQ6n/BtChAl1y2S60vebhyJyZXBsuAI5G4+lHrT1Ew=
344github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= 298github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
345github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 h1:cMjKdf4PxEBN9K5HaD9UMW8gkTbM0kMzkTa9SJe0WNQ=
346github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= 299github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
347github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok= 300github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok=
348github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= 301github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
349github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= 302github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
350github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU= 303github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU=
351github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= 304github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
352github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70=
353github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= 305github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4=
354github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= 306github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
355github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557 h1:Jpn2j6wHkC9wJv5iMfJhKqrZJx3TahFx+7sbZ7zQdxs=
356github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= 307github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
357github.com/zclconf/go-cty v0.0.0-20181129180422-88fbe721e0f8/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= 308github.com/zclconf/go-cty v0.0.0-20181129180422-88fbe721e0f8/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
358github.com/zclconf/go-cty v0.0.0-20190426224007-b18a157db9e2/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= 309github.com/zclconf/go-cty v0.0.0-20190426224007-b18a157db9e2/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
@@ -398,7 +349,6 @@ golang.org/x/oauth2 v0.0.0-20190220154721-9b3c75971fc9/go.mod h1:gOpvHmFTYa4Iltr
398golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= 349golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw=
399golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 350golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
400golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 351golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
401golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
402golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 352golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
403golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= 353golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
404golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 354golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -415,15 +365,12 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h
415golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 365golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
416golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 h1:vsphBvatvfbhlb4PO1BYSr9dzugGxJ/SQHoNufZJq1w= 366golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82 h1:vsphBvatvfbhlb4PO1BYSr9dzugGxJ/SQHoNufZJq1w=
417golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 367golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
418golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
419golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 368golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
420golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 369golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
421golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 370golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
422golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 371golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
423golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 372golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
424golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg=
425golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 373golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
426golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
427golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 374golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
428golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 375golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
429golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 376golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -456,7 +403,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy
456gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 403gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
457gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 404gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
458gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 405gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
459gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
460gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 406gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
461grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= 407grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
462honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 408honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/statuscake/provider.go b/statuscake/provider.go
index 93c691f..7f38d7f 100644
--- a/statuscake/provider.go
+++ b/statuscake/provider.go
@@ -25,6 +25,7 @@ func Provider() terraform.ResourceProvider {
25 25
26 ResourcesMap: map[string]*schema.Resource{ 26 ResourcesMap: map[string]*schema.Resource{
27 "statuscake_test": resourceStatusCakeTest(), 27 "statuscake_test": resourceStatusCakeTest(),
28 "statuscake_ssl": resourceStatusCakeSsl(),
28 }, 29 },
29 30
30 ConfigureFunc: providerConfigure, 31 ConfigureFunc: providerConfigure,
diff --git a/statuscake/provider_test.go b/statuscake/provider_test.go
index b1da050..4537960 100644
--- a/statuscake/provider_test.go
+++ b/statuscake/provider_test.go
@@ -38,4 +38,7 @@ func testAccPreCheck(t *testing.T) {
38 if v := os.Getenv("STATUSCAKE_TEST_CONTACT_GROUP_ID"); v == "" { 38 if v := os.Getenv("STATUSCAKE_TEST_CONTACT_GROUP_ID"); v == "" {
39 t.Fatal("STATUSCAKE_TEST_CONTACT_GROUP_ID must be set for acceptance tests") 39 t.Fatal("STATUSCAKE_TEST_CONTACT_GROUP_ID must be set for acceptance tests")
40 } 40 }
41 if v := os.Getenv("STATUSCAKE_SSL_CONTACT_GROUP_ID"); v == "" {
42 t.Fatal("STATUSCAKE_SSL_CONTACT_GROUP_ID must be set for acceptance tests")
43 }
41} 44}
diff --git a/statuscake/resource_statuscakessl.go b/statuscake/resource_statuscakessl.go
new file mode 100644
index 0000000..2ee50e6
--- /dev/null
+++ b/statuscake/resource_statuscakessl.go
@@ -0,0 +1,290 @@
1package statuscake
2
3import (
4 "fmt"
5 "strconv"
6
7 "github.com/DreamItGetIT/statuscake"
8 "github.com/hashicorp/terraform/helper/schema"
9 "log"
10 "strings"
11)
12
13func resourceStatusCakeSsl() *schema.Resource {
14 return &schema.Resource{
15 Create: CreateSsl,
16 Update: UpdateSsl,
17 Delete: DeleteSsl,
18 Read: ReadSsl,
19 Importer: &schema.ResourceImporter{
20 State: schema.ImportStatePassthrough,
21 },
22
23 Schema: map[string]*schema.Schema{
24 "ssl_id": {
25 Type: schema.TypeString,
26 Computed: true,
27 },
28
29 "domain": {
30 Type: schema.TypeString,
31 Required: true,
32 },
33
34 "contact_groups": {
35 Type: schema.TypeSet,
36 Elem: &schema.Schema{Type: schema.TypeString},
37 Optional: true,
38 Computed: true,
39 ConflictsWith: []string{"contact_groups_c"},
40 },
41
42 "contact_groups_c": {
43 Type: schema.TypeString,
44 Optional: true,
45 Computed: true,
46 ConflictsWith: []string{"contact_groups"},
47 },
48
49 "checkrate": {
50 Type: schema.TypeInt,
51 Required: true,
52 },
53
54 "alert_at": {
55 Type: schema.TypeString,
56 Required: true,
57 },
58
59 "alert_reminder": {
60 Type: schema.TypeBool,
61 Required: true,
62 },
63
64 "alert_expiry": {
65 Type: schema.TypeBool,
66 Required: true,
67 },
68
69 "alert_broken": {
70 Type: schema.TypeBool,
71 Required: true,
72 },
73
74 "alert_mixed": {
75 Type: schema.TypeBool,
76 Required: true,
77 },
78
79 "paused": {
80 Type: schema.TypeBool,
81 Computed: true,
82 },
83
84 "issuer_cn": {
85 Type: schema.TypeString,
86 Computed: true,
87 },
88
89 "cert_score": {
90 Type: schema.TypeString,
91 Computed: true,
92 },
93
94 "cipher_score": {
95 Type: schema.TypeString,
96 Computed: true,
97 },
98
99 "cert_status": {
100 Type: schema.TypeString,
101 Computed: true,
102 },
103
104 "cipher": {
105 Type: schema.TypeString,
106 Computed: true,
107 },
108
109 "valid_from_utc": {
110 Type: schema.TypeString,
111 Computed: true,
112 },
113
114 "valid_until_utc": {
115 Type: schema.TypeString,
116 Computed: true,
117 },
118
119 "mixed_content": {
120 Type: schema.TypeList,
121 Elem: &schema.Schema{
122 Type: schema.TypeMap,
123 Elem: &schema.Schema{Type: schema.TypeString},
124 },
125 Computed: true,
126 },
127
128 "flags": {
129 Type: schema.TypeMap,
130 Elem: &schema.Schema{Type: schema.TypeBool},
131 Computed: true,
132 },
133
134 "last_reminder": {
135 Type: schema.TypeInt,
136 Computed: true,
137 },
138
139 "last_updated_utc": {
140 Type: schema.TypeString,
141 Computed: true,
142 },
143 },
144 }
145}
146
147func CreateSsl(d *schema.ResourceData, meta interface{}) error {
148 client := meta.(*statuscake.Client)
149
150 if v, ok := d.GetOk("contact_groups"); ok {
151 d.Set("contact_groups_c", strings.Join(castSetToSliceStrings(v.(*schema.Set).List()), ","))
152 }
153
154 newSsl := &statuscake.PartialSsl{
155 Domain: d.Get("domain").(string),
156 Checkrate: strconv.Itoa(d.Get("checkrate").(int)),
157 ContactGroupsC: d.Get("contact_groups_c").(string),
158 AlertReminder: d.Get("alert_reminder").(bool),
159 AlertExpiry: d.Get("alert_expiry").(bool),
160 AlertBroken: d.Get("alert_broken").(bool),
161 AlertMixed: d.Get("alert_mixed").(bool),
162 AlertAt: d.Get("alert_at").(string),
163 }
164
165 log.Printf("[DEBUG] Creating new StatusCake Ssl: %s", d.Get("domain").(string))
166
167 response, err := statuscake.NewSsls(client).Create(newSsl)
168 if err != nil {
169 return fmt.Errorf("Error creating StatusCake Ssl: %s", err.Error())
170 }
171
172 d.Set("ssl_id", response.ID)
173 d.Set("paused", response.Paused)
174 d.Set("issuer_cn", response.IssuerCn)
175 d.Set("cert_score", response.CertScore)
176 d.Set("cipher_score", response.CipherScore)
177 d.Set("cert_status", response.CertStatus)
178 d.Set("cipher", response.Cipher)
179 d.Set("valid_from_utc", response.ValidFromUtc)
180 d.Set("valid_until_utc", response.ValidUntilUtc)
181 d.Set("mixed_content", response.MixedContent)
182 d.Set("flags", response.Flags)
183 d.Set("last_reminder", response.LastReminder)
184 d.Set("last_updated_utc", response.LastUpdatedUtc)
185 d.SetId(response.ID)
186
187 return ReadSsl(d, meta)
188}
189
190func UpdateSsl(d *schema.ResourceData, meta interface{}) error {
191 client := meta.(*statuscake.Client)
192
193 params := getStatusCakeSslInput(d)
194
195 log.Printf("[DEBUG] StatusCake Ssl Update for %s", d.Id())
196 _, err := statuscake.NewSsls(client).Update(params)
197 if err != nil {
198 return fmt.Errorf("Error Updating StatusCake Ssl: %s", err.Error())
199 }
200 return nil
201}
202
203func DeleteSsl(d *schema.ResourceData, meta interface{}) error {
204 client := meta.(*statuscake.Client)
205
206 log.Printf("[DEBUG] Deleting StatusCake Ssl: %s", d.Id())
207 err := statuscake.NewSsls(client).Delete(d.Id())
208
209 return err
210}
211
212func ReadSsl(d *schema.ResourceData, meta interface{}) error {
213 client := meta.(*statuscake.Client)
214
215 response, err := statuscake.NewSsls(client).Detail(d.Id())
216 if err != nil {
217 return fmt.Errorf("Error Getting StatusCake Ssl Details for %s: Error: %s", d.Id(), err)
218 }
219 d.Set("domain", response.Domain)
220 d.Set("checkrate", response.Checkrate)
221 d.Set("contact_groups_c", response.ContactGroupsC)
222 d.Set("alert_reminder", response.AlertReminder)
223 d.Set("alert_expiry", response.AlertExpiry)
224 d.Set("alert_broken", response.AlertBroken)
225 d.Set("alert_mixed", response.AlertMixed)
226 d.Set("alert_at", response.AlertAt)
227 d.Set("ssl_id", response.ID)
228 d.Set("contact_groups", response.ContactGroups)
229 d.Set("paused", response.Paused)
230 d.Set("issuer_cn", response.IssuerCn)
231 d.Set("cert_score", response.CertScore)
232 d.Set("cipher_score", response.CipherScore)
233 d.Set("cert_status", response.CertStatus)
234 d.Set("cipher", response.Cipher)
235 d.Set("valid_from_utc", response.ValidFromUtc)
236 d.Set("valid_until_utc", response.ValidUntilUtc)
237 d.Set("mixed_content", response.MixedContent)
238 d.Set("flags", response.Flags)
239 d.Set("last_reminder", response.LastReminder)
240 d.Set("last_updated_utc", response.LastUpdatedUtc)
241 d.SetId(response.ID)
242
243 return nil
244}
245
246func getStatusCakeSslInput(d *schema.ResourceData) *statuscake.PartialSsl {
247 sslId, parseErr := strconv.Atoi(d.Id())
248 if parseErr != nil {
249 log.Printf("[DEBUG] Error Parsing StatusCake Id: %s", d.Id())
250 }
251 ssl := &statuscake.PartialSsl{
252 ID: sslId,
253 }
254
255 if v, ok := d.GetOk("domain"); ok {
256 ssl.Domain = v.(string)
257 }
258
259 if v, ok := d.GetOk("checkrate"); ok {
260 ssl.Checkrate = strconv.Itoa(v.(int))
261 }
262
263 if v, ok := d.GetOk("contact_groups"); ok {
264 ssl.ContactGroupsC = strings.Join(castSetToSliceStrings(v.(*schema.Set).List()), ",")
265 } else if v, ok := d.GetOk("contact_groups_c"); ok {
266 ssl.ContactGroupsC = v.(string)
267 }
268
269 if v, ok := d.GetOk("alert_reminder"); ok {
270 ssl.AlertReminder = v.(bool)
271 }
272
273 if v, ok := d.GetOk("alert_expiry"); ok {
274 ssl.AlertExpiry = v.(bool)
275 }
276
277 if v, ok := d.GetOk("alert_broken"); ok {
278 ssl.AlertBroken = v.(bool)
279 }
280
281 if v, ok := d.GetOk("alert_mixed"); ok {
282 ssl.AlertMixed = v.(bool)
283 }
284
285 if v, ok := d.GetOk("alert_at"); ok {
286 ssl.AlertAt = v.(string)
287 }
288
289 return ssl
290}
diff --git a/statuscake/resource_statuscakessl_test.go b/statuscake/resource_statuscakessl_test.go
new file mode 100644
index 0000000..fa48bad
--- /dev/null
+++ b/statuscake/resource_statuscakessl_test.go
@@ -0,0 +1,224 @@
1package statuscake
2
3import (
4 "fmt"
5 "github.com/DreamItGetIT/statuscake"
6 "github.com/hashicorp/terraform/helper/resource"
7 "github.com/hashicorp/terraform/terraform"
8 "os"
9 "strconv"
10 "testing"
11)
12
13func TestAccStatusCakeSsl_basic(t *testing.T) {
14 var ssl statuscake.Ssl
15
16 resource.Test(t, resource.TestCase{
17 PreCheck: func() { testAccPreCheck(t) },
18 Providers: testAccProviders,
19 CheckDestroy: testAccSslCheckDestroy(&ssl),
20 Steps: []resource.TestStep{
21 {
22 Config: interpolateTerraformTemplateSsl(testAccSslConfig_basic),
23 Check: resource.ComposeTestCheckFunc(
24 testAccSslCheckExists("statuscake_ssl.exemple", &ssl),
25 testAccSslCheckAttributes("statuscake_ssl.exemple", &ssl),
26 ),
27 },
28 },
29 })
30}
31
32func TestAccStatusCakeSsl_withUpdate(t *testing.T) {
33 var ssl statuscake.Ssl
34
35 resource.Test(t, resource.TestCase{
36 PreCheck: func() { testAccPreCheck(t) },
37 Providers: testAccProviders,
38 CheckDestroy: testAccSslCheckDestroy(&ssl),
39 Steps: []resource.TestStep{
40 {
41 Config: interpolateTerraformTemplateSsl(testAccSslConfig_basic),
42 Check: resource.ComposeTestCheckFunc(
43 testAccSslCheckExists("statuscake_ssl.exemple", &ssl),
44 testAccSslCheckAttributes("statuscake_ssl.exemple", &ssl),
45 ),
46 },
47
48 {
49 Config: testAccSslConfig_update,
50 Check: resource.ComposeTestCheckFunc(
51 testAccSslCheckExists("statuscake_ssl.exemple", &ssl),
52 testAccSslCheckAttributes("statuscake_ssl.exemple", &ssl),
53 resource.TestCheckResourceAttr("statuscake_ssl.exemple", "checkrate", "86400"),
54 resource.TestCheckResourceAttr("statuscake_ssl.exemple", "domain", "https://www.exemple.com"),
55 resource.TestCheckResourceAttr("statuscake_ssl.exemple", "contact_groups_c", ""),
56 resource.TestCheckResourceAttr("statuscake_ssl.exemple", "alert_at", "18,81,2019"),
57 resource.TestCheckResourceAttr("statuscake_ssl.exemple", "alert_reminder", "false"),
58 resource.TestCheckResourceAttr("statuscake_ssl.exemple", "alert_expiry", "false"),
59 resource.TestCheckResourceAttr("statuscake_ssl.exemple", "alert_broken", "true"),
60 resource.TestCheckResourceAttr("statuscake_ssl.exemple", "alert_mixed", "false"),
61 ),
62 },
63 },
64 })
65}
66
67func testAccSslCheckExists(rn string, ssl *statuscake.Ssl) resource.TestCheckFunc {
68 return func(s *terraform.State) error {
69 rs, ok := s.RootModule().Resources[rn]
70 if !ok {
71 return fmt.Errorf("resource not found: %s", rn)
72 }
73
74 if rs.Primary.ID == "" {
75 return fmt.Errorf("SslID not set")
76 }
77
78 client := testAccProvider.Meta().(*statuscake.Client)
79 sslId := rs.Primary.ID
80
81 gotSsl, err := statuscake.NewSsls(client).Detail(sslId)
82 if err != nil {
83 return fmt.Errorf("error getting ssl: %s", err)
84 }
85 gotSsl.LastUpdatedUtc = "0000-00-00 00:00:00" // quick fix to avoid issue with it because the state is updated before the value change but it is changed when gotSsl is created
86 *ssl = *gotSsl
87
88 return nil
89 }
90}
91
92func testAccSslCheckAttributes(rn string, ssl *statuscake.Ssl) resource.TestCheckFunc {
93 return func(s *terraform.State) error {
94 attrs := s.RootModule().Resources[rn].Primary.Attributes
95
96 check := func(key, stateValue, sslValue string) error {
97 if sslValue != stateValue {
98 return fmt.Errorf("different values for %s in state (%s) and in statuscake (%s)",
99 key, stateValue, sslValue)
100 }
101 return nil
102 }
103
104 for key, value := range attrs {
105 var err error
106
107 switch key {
108 case "domain":
109 err = check(key, value, ssl.Domain)
110 case "contact_groups_c":
111 err = check(key, value, ssl.ContactGroupsC)
112 case "checkrate":
113 err = check(key, value, strconv.Itoa(ssl.Checkrate))
114 case "alert_at":
115 err = check(key, value, ssl.AlertAt)
116 case "alert_reminder":
117 err = check(key, value, strconv.FormatBool(ssl.AlertReminder))
118 case "alert_expiry":
119 err = check(key, value, strconv.FormatBool(ssl.AlertExpiry))
120 case "alert_broken":
121 err = check(key, value, strconv.FormatBool(ssl.AlertBroken))
122 case "alert_mixed":
123 err = check(key, value, strconv.FormatBool(ssl.AlertMixed))
124 case "last_updated_utc":
125 err = check(key, value, ssl.LastUpdatedUtc)
126 case "paused":
127 err = check(key, value, strconv.FormatBool(ssl.Paused))
128 case "issuer_cn":
129 err = check(key, value, ssl.IssuerCn)
130 case "contact_groups":
131 for _, tv := range ssl.ContactGroups {
132 err = check(key, value, tv)
133 if err != nil {
134 return err
135 }
136 }
137 case "cert_score":
138 err = check(key, value, ssl.CertScore)
139 case "cert_status":
140 err = check(key, value, ssl.CertStatus)
141 case "cipher":
142 err = check(key, value, ssl.Cipher)
143 case "valid_from_utc":
144 err = check(key, value, ssl.ValidFromUtc)
145 case "valid_until_utc":
146 err = check(key, value, ssl.ValidUntilUtc)
147 case "last_reminder":
148 err = check(key, value, strconv.Itoa(ssl.LastReminder))
149 case "flags":
150 for _, tv := range ssl.Flags {
151 err = check(key, value, strconv.FormatBool(tv))
152 if err != nil {
153 return err
154 }
155 }
156
157 case "mixed_content":
158 for _, tv := range ssl.MixedContent {
159 for _, tv2 := range tv {
160 err = check(key, value, tv2)
161 if err != nil {
162 return err
163 }
164 }
165 }
166 }
167 if err != nil {
168 return err
169 }
170 }
171 return nil
172 }
173}
174
175func testAccSslCheckDestroy(ssl *statuscake.Ssl) resource.TestCheckFunc {
176 return func(s *terraform.State) error {
177 client := testAccProvider.Meta().(*statuscake.Client)
178 _, err := statuscake.NewSsls(client).Detail(ssl.ID)
179 if err == nil {
180 return fmt.Errorf("ssl still exists")
181 }
182
183 return nil
184 }
185}
186
187func interpolateTerraformTemplateSsl(template string) string {
188 sslContactGroupId := "43402"
189
190 if v := os.Getenv("STATUSCAKE_SSL_CONTACT_GROUP_ID"); v != "" {
191 sslContactGroupId = v
192 }
193 if sslContactGroupId == "-1" {
194 sslContactGroupId = ""
195 }
196
197 return fmt.Sprintf(template, sslContactGroupId)
198}
199
200const testAccSslConfig_basic = `
201resource "statuscake_ssl" "exemple" {
202 domain = "https://www.exemple.com"
203 contact_groups_c = "%s"
204 checkrate = 3600
205 alert_at = "18,71,2019"
206 alert_reminder = true
207 alert_expiry = true
208 alert_broken = false
209 alert_mixed = true
210}
211`
212
213const testAccSslConfig_update = `
214resource "statuscake_ssl" "exemple" {
215 domain = "https://www.exemple.com"
216 contact_groups_c = ""
217 checkrate = 86400
218 alert_at = "18,81,2019"
219 alert_reminder = false
220 alert_expiry = false
221 alert_broken = true
222 alert_mixed = false
223}
224`
diff --git a/vendor/github.com/DreamItGetIT/statuscake/Gopkg.lock b/vendor/github.com/DreamItGetIT/statuscake/Gopkg.lock
index c5b189e..b433daf 100644
--- a/vendor/github.com/DreamItGetIT/statuscake/Gopkg.lock
+++ b/vendor/github.com/DreamItGetIT/statuscake/Gopkg.lock
@@ -18,6 +18,14 @@
18 version = "v1.1.1" 18 version = "v1.1.1"
19 19
20[[projects]] 20[[projects]]
21 digest = "1:a63cff6b5d8b95638bfe300385d93b2a6d9d687734b863da8e09dc834510a690"
22 name = "github.com/google/go-querystring"
23 packages = ["query"]
24 pruneopts = "UT"
25 revision = "44c6ddd0a2342c386950e880b658017258da92fc"
26 version = "v1.0.0"
27
28[[projects]]
21 digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" 29 digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
22 name = "github.com/pmezard/go-difflib" 30 name = "github.com/pmezard/go-difflib"
23 packages = ["difflib"] 31 packages = ["difflib"]
@@ -30,7 +38,7 @@
30 name = "github.com/stretchr/testify" 38 name = "github.com/stretchr/testify"
31 packages = [ 39 packages = [
32 "assert", 40 "assert",
33 "require", 41 "require"
34 ] 42 ]
35 pruneopts = "UT" 43 pruneopts = "UT"
36 revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" 44 revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
@@ -41,8 +49,9 @@
41 analyzer-version = 1 49 analyzer-version = 1
42 input-imports = [ 50 input-imports = [
43 "github.com/DreamItGetIT/statuscake", 51 "github.com/DreamItGetIT/statuscake",
52 "github.com/google/go-querystring/query",
44 "github.com/stretchr/testify/assert", 53 "github.com/stretchr/testify/assert",
45 "github.com/stretchr/testify/require", 54 "github.com/stretchr/testify/require"
46 ] 55 ]
47 solver-name = "gps-cdcl" 56 solver-name = "gps-cdcl"
48 solver-version = 1 57 solver-version = 1
diff --git a/vendor/github.com/DreamItGetIT/statuscake/Gopkg.toml b/vendor/github.com/DreamItGetIT/statuscake/Gopkg.toml
index b0c1687..e02ee65 100644
--- a/vendor/github.com/DreamItGetIT/statuscake/Gopkg.toml
+++ b/vendor/github.com/DreamItGetIT/statuscake/Gopkg.toml
@@ -36,3 +36,7 @@
36[prune] 36[prune]
37 go-tests = true 37 go-tests = true
38 unused-packages = true 38 unused-packages = true
39
40[[constraint]]
41 name = "github.com/google/go-querystring"
42 version = "1.0.0"
diff --git a/vendor/github.com/DreamItGetIT/statuscake/client_test.go b/vendor/github.com/DreamItGetIT/statuscake/client_test.go
new file mode 100644
index 0000000..7c40c81
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/client_test.go
@@ -0,0 +1,236 @@
1package statuscake
2
3import (
4 "bytes"
5 "io"
6 "io/ioutil"
7 "log"
8 "net/http"
9 "net/url"
10 "os"
11 "path/filepath"
12 "testing"
13
14 "github.com/stretchr/testify/assert"
15 "github.com/stretchr/testify/require"
16)
17
18func TestAuth_validate(t *testing.T) {
19 assert := assert.New(t)
20 require := require.New(t)
21
22 auth := &Auth{}
23 err := auth.validate()
24
25 require.NotNil(err)
26 assert.Contains(err.Error(), "Username is required")
27 assert.Contains(err.Error(), "Apikey is required")
28
29 auth.Username = "foo"
30 err = auth.validate()
31
32 require.NotNil(err)
33 assert.Equal("Apikey is required", err.Error())
34
35 auth.Apikey = "bar"
36 err = auth.validate()
37 assert.Nil(err)
38}
39
40func TestClient(t *testing.T) {
41 require := require.New(t)
42 assert := assert.New(t)
43
44 c, err := New(Auth{Username: "random-user", Apikey: "my-pass"})
45 require.Nil(err)
46
47 assert.Equal("random-user", c.username)
48 assert.Equal("my-pass", c.apiKey)
49}
50
51func TestClient_newRequest(t *testing.T) {
52 assert := assert.New(t)
53 require := require.New(t)
54
55 c, err := New(Auth{Username: "random-user", Apikey: "my-pass"})
56 require.Nil(err)
57
58 r, err := c.newRequest("GET", "/hello", nil, nil)
59
60 require.Nil(err)
61 assert.Equal("GET", r.Method)
62 assert.Equal("https://app.statuscake.com/API/hello", r.URL.String())
63 assert.Equal("random-user", r.Header.Get("Username"))
64 assert.Equal("my-pass", r.Header.Get("API"))
65}
66
67func TestClient_doRequest(t *testing.T) {
68 assert := assert.New(t)
69 require := require.New(t)
70
71 c, err := New(Auth{Username: "random-user", Apikey: "my-pass"})
72 require.Nil(err)
73
74 hc := &fakeHTTPClient{StatusCode: 200}
75 c.c = hc
76
77 req, err := http.NewRequest("GET", "http://example.com/test", nil)
78 require.Nil(err)
79
80 _, err = c.doRequest(req)
81 require.Nil(err)
82
83 assert.Len(hc.requests, 1)
84 assert.Equal("http://example.com/test", hc.requests[0].URL.String())
85}
86
87func TestClient_doRequest_WithHTTPErrors(t *testing.T) {
88 assert := assert.New(t)
89 require := require.New(t)
90
91 c, err := New(Auth{Username: "random-user", Apikey: "my-pass"})
92 require.Nil(err)
93
94 hc := &fakeHTTPClient{
95 StatusCode: 500,
96 }
97 c.c = hc
98
99 req, err := http.NewRequest("GET", "http://example.com/test", nil)
100 require.Nil(err)
101
102 _, err = c.doRequest(req)
103 require.NotNil(err)
104 assert.IsType(&httpError{}, err)
105}
106
107func TestClient_doRequest_HttpAuthenticationErrors(t *testing.T) {
108 assert := assert.New(t)
109 require := require.New(t)
110
111 c, err := New(Auth{Username: "random-user", Apikey: "my-pass"})
112 require.Nil(err)
113
114 hc := &fakeHTTPClient{
115 StatusCode: 200,
116 Fixture: "auth_error.json",
117 }
118 c.c = hc
119
120 req, err := http.NewRequest("GET", "http://example.com/test", nil)
121 require.Nil(err)
122
123 _, err = c.doRequest(req)
124 require.NotNil(err)
125 assert.IsType(&AuthenticationError{}, err)
126}
127
128func TestClient_get(t *testing.T) {
129 require := require.New(t)
130 assert := assert.New(t)
131
132 c, err := New(Auth{Username: "random-user", Apikey: "my-pass"})
133 require.Nil(err)
134
135 hc := &fakeHTTPClient{}
136 c.c = hc
137
138 c.get("/hello", nil)
139 assert.Len(hc.requests, 1)
140 assert.Equal("GET", hc.requests[0].Method)
141 assert.Equal("https://app.statuscake.com/API/hello", hc.requests[0].URL.String())
142}
143
144func TestClient_put(t *testing.T) {
145 require := require.New(t)
146 assert := assert.New(t)
147
148 c, err := New(Auth{Username: "random-user", Apikey: "my-pass"})
149 require.Nil(err)
150
151 hc := &fakeHTTPClient{}
152 c.c = hc
153
154 v := url.Values{"foo": {"bar"}}
155 c.put("/hello", v)
156 assert.Len(hc.requests, 1)
157 assert.Equal("PUT", hc.requests[0].Method)
158 assert.Equal("https://app.statuscake.com/API/hello", hc.requests[0].URL.String())
159
160 b, err := ioutil.ReadAll(hc.requests[0].Body)
161 require.Nil(err)
162 assert.Equal("foo=bar", string(b))
163}
164
165func TestClient_delete(t *testing.T) {
166 require := require.New(t)
167 assert := assert.New(t)
168
169 c, err := New(Auth{Username: "random-user", Apikey: "my-pass"})
170 require.Nil(err)
171
172 hc := &fakeHTTPClient{}
173 c.c = hc
174
175 v := url.Values{"foo": {"bar"}}
176 c.delete("/hello", v)
177 assert.Len(hc.requests, 1)
178 assert.Equal("DELETE", hc.requests[0].Method)
179 assert.Equal("https://app.statuscake.com/API/hello?foo=bar", hc.requests[0].URL.String())
180}
181
182func TestClient_Tests(t *testing.T) {
183 require := require.New(t)
184 assert := assert.New(t)
185
186 c, err := New(Auth{Username: "random-user", Apikey: "my-pass"})
187 require.Nil(err)
188
189 expected := &tests{
190 client: c,
191 }
192
193 assert.Equal(expected, c.Tests())
194}
195
196type fakeBody struct {
197 io.Reader
198}
199
200func (f *fakeBody) Close() error {
201 return nil
202}
203
204type fakeHTTPClient struct {
205 StatusCode int
206 Fixture string
207 requests []*http.Request
208}
209
210func (c *fakeHTTPClient) Do(r *http.Request) (*http.Response, error) {
211 c.requests = append(c.requests, r)
212 var body []byte
213
214 if c.Fixture != "" {
215 p := filepath.Join("fixtures", c.Fixture)
216 f, err := os.Open(p)
217 if err != nil {
218 log.Fatal(err)
219 }
220 defer f.Close()
221
222 b, err := ioutil.ReadAll(f)
223 if err != nil {
224 log.Fatal(err)
225 }
226
227 body = b
228 }
229
230 resp := &http.Response{
231 StatusCode: c.StatusCode,
232 Body: &fakeBody{Reader: bytes.NewReader(body)},
233 }
234
235 return resp, nil
236}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/cmd/statuscake/main.go b/vendor/github.com/DreamItGetIT/statuscake/cmd/statuscake/main.go
new file mode 100644
index 0000000..59f41a9
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/cmd/statuscake/main.go
@@ -0,0 +1,246 @@
1package main
2
3import (
4 "fmt"
5 logpkg "log"
6 "os"
7 "strconv"
8
9 "github.com/DreamItGetIT/statuscake"
10 "strings"
11)
12
13var log *logpkg.Logger
14
15type command func(*statuscake.Client, ...string) error
16
17var commands map[string]command
18
19func init() {
20 log = logpkg.New(os.Stderr, "", 0)
21 commands = map[string]command{
22 "list": cmdList,
23 "detail": cmdDetail,
24 "delete": cmdDelete,
25 "create": cmdCreate,
26 "update": cmdUpdate,
27 }
28}
29
30func colouredStatus(s string) string {
31 switch s {
32 case "Up":
33 return fmt.Sprintf("\033[0;32m%s\033[0m", s)
34 case "Down":
35 return fmt.Sprintf("\033[0;31m%s\033[0m", s)
36 default:
37 return s
38 }
39}
40
41func getEnv(name string) string {
42 v := os.Getenv(name)
43 if v == "" {
44 log.Fatalf("`%s` env variable is required", name)
45 }
46
47 return v
48}
49
50func cmdList(c *statuscake.Client, args ...string) error {
51 tt := c.Tests()
52 tests, err := tt.All()
53 if err != nil {
54 return err
55 }
56
57 for _, t := range tests {
58 var paused string
59 if t.Paused {
60 paused = "yes"
61 } else {
62 paused = "no"
63 }
64
65 fmt.Printf("* %d: %s\n", t.TestID, colouredStatus(t.Status))
66 fmt.Printf(" WebsiteName: %s\n", t.WebsiteName)
67 fmt.Printf(" TestType: %s\n", t.TestType)
68 fmt.Printf(" Paused: %s\n", paused)
69 fmt.Printf(" ContactGroup: %s\n", fmt.Sprint(t.ContactGroup))
70 fmt.Printf(" Uptime: %f\n", t.Uptime)
71 }
72
73 return nil
74}
75
76func cmdDetail(c *statuscake.Client, args ...string) error {
77 if len(args) != 1 {
78 return fmt.Errorf("command `detail` requires a single argument `TestID`")
79 }
80
81 id, err := strconv.Atoi(args[0])
82 if err != nil {
83 return err
84 }
85
86 tt := c.Tests()
87 t, err := tt.Detail(id)
88 if err != nil {
89 return err
90 }
91
92 var paused string
93 if t.Paused {
94 paused = "yes"
95 } else {
96 paused = "no"
97 }
98
99 fmt.Printf("* %d: %s\n", t.TestID, colouredStatus(t.Status))
100 fmt.Printf(" WebsiteName: %s\n", t.WebsiteName)
101 fmt.Printf(" WebsiteURL: %s\n", t.WebsiteURL)
102 fmt.Printf(" PingURL: %s\n", t.PingURL)
103 fmt.Printf(" TestType: %s\n", t.TestType)
104 fmt.Printf(" Paused: %s\n", paused)
105 fmt.Printf(" ContactGroup: %s\n", fmt.Sprint(t.ContactGroup))
106 fmt.Printf(" Uptime: %f\n", t.Uptime)
107 fmt.Printf(" NodeLocations: %s\n", fmt.Sprint(t.NodeLocations))
108
109 return nil
110}
111
112func cmdDelete(c *statuscake.Client, args ...string) error {
113 if len(args) != 1 {
114 return fmt.Errorf("command `delete` requires a single argument `TestID`")
115 }
116
117 id, err := strconv.Atoi(args[0])
118 if err != nil {
119 return err
120 }
121
122 return c.Tests().Delete(id)
123}
124
125func askString(name string) string {
126 var v string
127
128 fmt.Printf("%s: ", name)
129 _, err := fmt.Scanln(&v)
130 if err != nil {
131 log.Fatal(err)
132 }
133
134 return v
135}
136
137func askInt(name string) int {
138 v := askString(name)
139 i, err := strconv.Atoi(v)
140 if err != nil {
141 log.Fatalf("Invalid number `%s`", v)
142 }
143
144 return i
145}
146
147func cmdCreate(c *statuscake.Client, args ...string) error {
148 websiteName := askString("WebsiteName")
149 websiteURL := askString("WebsiteURL")
150 testType := askString("TestType")
151 checkRate := askInt("CheckRate")
152 contactGroupString := askString("ContactGroup (comma separated list)")
153 contactGroup := strings.Split(contactGroupString, ",")
154 nodeLocationsString := askString("NodeLocations (comma separated list)")
155 nodeLocations := strings.Split(nodeLocationsString, ",")
156
157 t := &statuscake.Test{
158 WebsiteName: websiteName,
159 WebsiteURL: websiteURL,
160 TestType: testType,
161 CheckRate: checkRate,
162 NodeLocations: nodeLocations,
163 ContactGroup: contactGroup,
164 }
165
166 t2, err := c.Tests().Update(t)
167 if err != nil {
168 return err
169 }
170
171 fmt.Printf("CREATED: \n%+v\n", t2)
172
173 return nil
174}
175
176func cmdUpdate(c *statuscake.Client, args ...string) error {
177 if len(args) != 1 {
178 return fmt.Errorf("command `update` requires a single argument `TestID`")
179 }
180
181 id, err := strconv.Atoi(args[0])
182 if err != nil {
183 return err
184 }
185
186 tt := c.Tests()
187 t, err := tt.Detail(id)
188 if err != nil {
189 return err
190 }
191
192 t.TestID = id
193 t.WebsiteName = askString(fmt.Sprintf("WebsiteName [%s]", t.WebsiteName))
194 t.WebsiteURL = askString(fmt.Sprintf("WebsiteURL [%s]", t.WebsiteURL))
195 t.TestType = askString(fmt.Sprintf("TestType [%s]", t.TestType))
196 t.CheckRate = askInt(fmt.Sprintf("CheckRate [%d]", t.CheckRate))
197 contactGroupString := askString("ContactGroup (comma separated list)")
198 t.ContactGroup = strings.Split(contactGroupString, ",")
199 nodeLocationsString := askString("NodeLocations (comma separated list)")
200 t.NodeLocations = strings.Split(nodeLocationsString, ",")
201
202 t2, err := c.Tests().Update(t)
203 if err != nil {
204 return err
205 }
206
207 fmt.Printf("UPDATED: \n%+v\n", t2)
208
209 return nil
210}
211
212func usage() {
213 fmt.Printf("Usage:\n")
214 fmt.Printf(" %s COMMAND\n", os.Args[0])
215 fmt.Printf("Available commands:\n")
216 for k := range commands {
217 fmt.Printf(" %+v\n", k)
218 }
219}
220
221func main() {
222 username := getEnv("STATUSCAKE_USERNAME")
223 apikey := getEnv("STATUSCAKE_APIKEY")
224
225 if len(os.Args) < 2 {
226 usage()
227 os.Exit(1)
228 }
229
230 var err error
231
232 c, err := statuscake.New(statuscake.Auth{Username: username, Apikey: apikey})
233 if err != nil {
234 log.Fatal(err)
235 }
236
237 if cmd, ok := commands[os.Args[1]]; ok {
238 err = cmd(c, os.Args[2:]...)
239 } else {
240 err = fmt.Errorf("Unknown command `%s`", os.Args[1])
241 }
242
243 if err != nil {
244 log.Fatalf("Error running command `%s`: %s", os.Args[1], err.Error())
245 }
246}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/auth_error.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/auth_error.json
new file mode 100644
index 0000000..4f14be5
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/auth_error.json
@@ -0,0 +1,4 @@
1{
2 "ErrNo": 0,
3 "Error": "Can not access account. Was both Username and API Key provided?"
4}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslCreateOk.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslCreateOk.json
new file mode 100644
index 0000000..615e2db
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslCreateOk.json
@@ -0,0 +1,14 @@
1{
2 "Success": true,
3 "Message": 143616,
4 "Input": {
5 "domain": "https://www.exemple.com",
6 "checkrate": "2073600",
7 "contact_groups": "",
8 "alert_reminder": true,
9 "alert_expiry": true,
10 "alert_broken": true,
11 "alert_mixed": true,
12 "alert_at": "7,18,2019"
13 }
14}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslDeleteOk.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslDeleteOk.json
new file mode 100644
index 0000000..a394239
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslDeleteOk.json
@@ -0,0 +1,4 @@
1{
2 "Success": true,
3 "Message": "Deletion successful"
4}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslListAllOk.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslListAllOk.json
new file mode 100644
index 0000000..15c428f
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslListAllOk.json
@@ -0,0 +1,100 @@
1[
2 {
3 "id": "143615",
4 "checkrate": 2073600,
5 "paused": false,
6 "domain": "https://www.exemple.com",
7 "issuer_cn": "Let's Encrypt Authority X3",
8 "cert_score": "95",
9 "cipher_score": "100",
10 "cert_status": "CERT_OK",
11 "cipher": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
12 "valid_from_utc": "2019-05-28 01:22:00",
13 "valid_until_utc": "2019-08-26 01:22:00",
14 "mixed_content": [],
15 "flags": {
16 "is_extended": false,
17 "has_pfs": true,
18 "is_broken": false,
19 "is_expired": false,
20 "is_missing": false,
21 "is_revoked": false,
22 "has_mixed": false
23 },
24 "contact_groups": [],
25 "alert_at": "7,18,2019",
26 "last_reminder": 2019,
27 "alert_reminder": true,
28 "alert_expiry": true,
29 "alert_broken": true,
30 "alert_mixed": true,
31 "last_updated_utc": "2019-06-20 10:11:03"
32 },
33 {
34 "id": "143616",
35 "checkrate": 2073600,
36 "paused": false,
37 "domain": "https://www.exemple.com",
38 "issuer_cn": "Let's Encrypt Authority X3",
39 "cert_score": "95",
40 "cipher_score": "100",
41 "cert_status": "CERT_OK",
42 "cipher": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
43 "valid_from_utc": "2019-05-28 01:22:00",
44 "valid_until_utc": "2019-08-26 01:22:00",
45 "mixed_content": [
46 {
47 "type": "img",
48 "src": "http://example.com/image.gif"
49 }
50 ],
51 "flags": {
52 "is_extended": false,
53 "has_pfs": true,
54 "is_broken": false,
55 "is_expired": false,
56 "is_missing": false,
57 "is_revoked": false,
58 "has_mixed": false
59 },
60 "contact_groups": ["12","13","34"],
61 "alert_at": "7,18,2019",
62 "last_reminder": 2019,
63 "alert_reminder": true,
64 "alert_expiry": true,
65 "alert_broken": true,
66 "alert_mixed": true,
67 "last_updated_utc": "2019-06-20 10:23:14"
68 },
69 {
70 "id": "143617",
71 "checkrate": 2073600,
72 "paused": false,
73 "domain": "https://www.exemple.com",
74 "issuer_cn": "Let's Encrypt Authority X3",
75 "cert_score": "95",
76 "cipher_score": "100",
77 "cert_status": "CERT_OK",
78 "cipher": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
79 "valid_from_utc": "2019-05-28 01:22:00",
80 "valid_until_utc": "2019-08-26 01:22:00",
81 "mixed_content": [],
82 "flags": {
83 "is_extended": false,
84 "has_pfs": true,
85 "is_broken": false,
86 "is_expired": false,
87 "is_missing": false,
88 "is_revoked": false,
89 "has_mixed": false
90 },
91 "contact_groups": [],
92 "alert_at": "7,18,2019",
93 "last_reminder": 2019,
94 "alert_reminder": true,
95 "alert_expiry": true,
96 "alert_broken": true,
97 "alert_mixed": true,
98 "last_updated_utc": "2019-06-20 10:23:20"
99 }
100]
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslUpdateOk.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslUpdateOk.json
new file mode 100644
index 0000000..23b5932
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/sslUpdateOk.json
@@ -0,0 +1,4 @@
1{
2 "Success": true,
3 "Message": "SSL test has been updated successfully"
4}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_all_ok.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_all_ok.json
new file mode 100644
index 0000000..4dd6b51
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_all_ok.json
@@ -0,0 +1,70 @@
1[
2 {
3 "id": "12345",
4 "paused": false,
5 "domain": "https://google.com",
6 "cert_score": "95",
7 "cipher_score": "100",
8 "cert_status": "CERT_OK",
9 "cipher": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
10 "valid_from_utc": "2017-10-10 14:06:00",
11 "valid_until_utc": "2017-12-29 00:00:00",
12 "mixed_content": [
13 {
14 "type": "img",
15 "src": "http://example.com/image.gif"
16 }
17 ],
18 "flags": {
19 "is_extended": false,
20 "has_pfs": true,
21 "is_broken": false,
22 "is_expired": false,
23 "is_missing": false,
24 "is_revoked": false,
25 "is_mixed": false
26 },
27 "contact_groups": [12, 13, 14],
28 "alert_at": "1,7,30",
29 "last_reminder": 0,
30 "alert_reminder": false,
31 "alert_expiry": false,
32 "alert_broken": false,
33 "alert_mixed": false,
34 "last_updated_utc": "2017-10-24 09:02:25"
35 },
36 {
37 "id": "12346",
38 "paused": false,
39 "domain": "https://google2.com",
40 "cert_score": "95",
41 "cipher_score": "100",
42 "cert_status": "CERT_OK",
43 "cipher": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
44 "valid_from_utc": "2017-10-10 14:06:00",
45 "valid_until_utc": "2017-12-29 00:00:00",
46 "mixed_content": [
47 {
48 "type": "img",
49 "src": "http://example.com/image.gif"
50 }
51 ],
52 "flags": {
53 "is_extended": false,
54 "has_pfs": true,
55 "is_broken": false,
56 "is_expired": false,
57 "is_missing": false,
58 "is_revoked": false,
59 "is_mixed": false
60 },
61 "contact_groups": [12, 13, 14],
62 "alert_at": "1,7,30",
63 "last_reminder": 0,
64 "alert_reminder": false,
65 "alert_expiry": false,
66 "alert_broken": false,
67 "alert_mixed": false,
68 "last_updated_utc": "2017-10-24 09:02:25"
69 }
70]
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_create_ok.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_create_ok.json
new file mode 100644
index 0000000..c7734e0
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_create_ok.json
@@ -0,0 +1,13 @@
1{
2 "Success": true,
3 "Message": 12345,
4 "Input": {
5 "domain": "https://example.com",
6 "checkrate": 86400,
7 "contact_groups": "1000,2000",
8 "alert_reminder": false,
9 "alert_expiry": false,
10 "alert_broken": false,
11 "alert_at": "59,60,61"
12 }
13}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_update_error.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_update_error.json
new file mode 100644
index 0000000..5f0f4d5
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_update_error.json
@@ -0,0 +1,13 @@
1{
2 "Success": false,
3 "Message": "Error creating test",
4 "Input": {
5 "domain": "https://example.com",
6 "checkrate": 86400,
7 "contact_groups": "1000,2000",
8 "alert_reminder": false,
9 "alert_expiry": false,
10 "alert_broken": false,
11 "alert_at": "59,60,61"
12 }
13}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_update_ok.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_update_ok.json
new file mode 100644
index 0000000..f77f4f3
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/ssls_update_ok.json
@@ -0,0 +1,4 @@
1{
2 "Success": true,
3 "Message": "SSL test has been updated successfully"
4}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_all_ok.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_all_ok.json
new file mode 100644
index 0000000..dee80d4
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_all_ok.json
@@ -0,0 +1,23 @@
1[
2 {
3 "TestID": 100,
4 "Paused": false,
5 "TestType": "HTTP",
6 "WebsiteName": "www 1",
7 "ContactGroup": ["1"],
8 "Status": "Up",
9 "Uptime": 100,
10 "NodeLocations": ["foo", "bar"]
11 },
12 {
13 "TestID": 101,
14 "Paused": true,
15 "TestType": "HTTP",
16 "WebsiteName": "www 2",
17 "ContactGroup": ["2"],
18 "Status": "Down",
19 "Uptime": 0,
20 "NodeLocations": ["foo"],
21 "TestTags": ["test1", "test2"]
22 }
23]
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_delete_error.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_delete_error.json
new file mode 100644
index 0000000..6fad58e
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_delete_error.json
@@ -0,0 +1,5 @@
1{
2 "Success": false,
3 "Error": "this is an error"
4}
5
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_delete_ok.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_delete_ok.json
new file mode 100644
index 0000000..0dd279b
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_delete_ok.json
@@ -0,0 +1,6 @@
1{
2 "TestID": 6735,
3 "Affected": 1,
4 "Success": true,
5 "Message": "This Check Has Been Deleted. It can not be recovered."
6}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_detail_ok.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_detail_ok.json
new file mode 100644
index 0000000..a64989b
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_detail_ok.json
@@ -0,0 +1,39 @@
1{
2 "TestID": 6735,
3 "TestType": "HTTP",
4 "Paused": false,
5 "WebsiteName": "NL",
6 "CustomHeader": "{\"some\":{\"json\": [\"value\"]}}",
7 "UserAgent": "product/version (comment)",
8 "ContactGroups": [
9 {
10 "ID": 536,
11 "Name": "Dummy ContactGroup",
12 "Email": "github-dreamitgetit-statuscake@maildrop.cc"
13 }
14 ],
15 "ContactID": 536,
16 "Status": "Up",
17 "Uptime": 0,
18 "CheckRate": 60,
19 "Timeout": 40,
20 "LogoImage": "",
21 "WebsiteHost": "Various",
22 "NodeLocations": [
23 "foo",
24 "bar"
25 ],
26 "FindString": "",
27 "DoNotFind": false,
28 "LastTested": "2013-01-20 14:38:18",
29 "NextLocation": "USNY",
30 "Processing": false,
31 "ProcessingState": "Pretest",
32 "ProcessingOn": "dalas.localdomain",
33 "DownTimes": "0",
34 "UseJar": 0,
35 "PostRaw": "",
36 "FinalEndpoint": "",
37 "EnableSSLWarning": false,
38 "FollowRedirect": false
39}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_error.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_error.json
new file mode 100644
index 0000000..a76c5eb
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_error.json
@@ -0,0 +1,9 @@
1{
2 "Issues": {
3 "WebsiteName": "issue a",
4 "WebsiteURL": "issue b",
5 "CheckRate": "issue c"
6 },
7 "Success": false,
8 "Message": "Required Data is Missing."
9}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_error_slice_of_issues.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_error_slice_of_issues.json
new file mode 100644
index 0000000..02e98eb
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_error_slice_of_issues.json
@@ -0,0 +1,5 @@
1{
2 "Issues": ["hello", "world"],
3 "Success": false,
4 "Message": "Required Data is Missing."
5}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_ok.json b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_ok.json
new file mode 100644
index 0000000..7c2dee2
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/fixtures/tests_update_ok.json
@@ -0,0 +1,6 @@
1{
2 "Issues": {},
3 "Success": true,
4 "Message": "",
5 "InsertID": 1234
6}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/ssl.go b/vendor/github.com/DreamItGetIT/statuscake/ssl.go
new file mode 100644
index 0000000..3f73d8d
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/ssl.go
@@ -0,0 +1,273 @@
1package statuscake
2
3import (
4 "encoding/json"
5 "fmt"
6 "net/url"
7 "strings"
8 "strconv"
9
10 "github.com/google/go-querystring/query"
11)
12
13//Ssl represent the data received by the API with GET
14type Ssl struct {
15 ID string `json:"id" url:"id,omitempty"`
16 Domain string `json:"domain" url:"domain,omitempty"`
17 Checkrate int `json:"checkrate" url:"checkrate,omitempty"`
18 ContactGroupsC string ` url:"contact_groups,omitempty"`
19 AlertAt string `json:"alert_at" url:"alert_at,omitempty"`
20 AlertReminder bool `json:"alert_reminder" url:"alert_expiry,omitempty"`
21 AlertExpiry bool `json:"alert_expiry" url:"alert_reminder,omitempty"`
22 AlertBroken bool `json:"alert_broken" url:"alert_broken,omitempty"`
23 AlertMixed bool `json:"alert_mixed" url:"alert_mixed,omitempty"`
24 Paused bool `json:"paused"`
25 IssuerCn string `json:"issuer_cn"`
26 CertScore string `json:"cert_score"`
27 CipherScore string `json:"cipher_score"`
28 CertStatus string `json:"cert_status"`
29 Cipher string `json:"cipher"`
30 ValidFromUtc string `json:"valid_from_utc"`
31 ValidUntilUtc string `json:"valid_until_utc"`
32 MixedContent []map[string]string `json:"mixed_content"`
33 Flags map[string]bool `json:"flags"`
34 ContactGroups []string `json:"contact_groups"`
35 LastReminder int `json:"last_reminder"`
36 LastUpdatedUtc string `json:"last_updated_utc"`
37}
38
39//PartialSsl represent a ssl test creation or modification
40type PartialSsl struct {
41 ID int
42 Domain string
43 Checkrate string
44 ContactGroupsC string
45 AlertAt string
46 AlertExpiry bool
47 AlertReminder bool
48 AlertBroken bool
49 AlertMixed bool
50}
51
52type createSsl struct {
53 ID int `url:"id,omitempty"`
54 Domain string `url:"domain" json:"domain"`
55 Checkrate string `url:"checkrate" json:"checkrate"`
56 ContactGroupsC string `url:"contact_groups" json:"contact_groups"`
57 AlertAt string `url:"alert_at" json:"alert_at"`
58 AlertExpiry bool `url:"alert_expiry" json:"alert_expiry"`
59 AlertReminder bool `url:"alert_reminder" json:"alert_reminder"`
60 AlertBroken bool `url:"alert_broken" json:"alert_broken"`
61 AlertMixed bool `url:"alert_mixed" json:"alert_mixed"`
62}
63
64type updateSsl struct {
65 ID int `url:"id"`
66 Domain string `url:"domain" json:"domain"`
67 Checkrate string `url:"checkrate" json:"checkrate"`
68 ContactGroupsC string `url:"contact_groups" json:"contact_groups"`
69 AlertAt string `url:"alert_at" json:"alert_at"`
70 AlertExpiry bool `url:"alert_expiry" json:"alert_expiry"`
71 AlertReminder bool `url:"alert_reminder" json:"alert_reminder"`
72 AlertBroken bool `url:"alert_broken" json:"alert_broken"`
73 AlertMixed bool `url:"alert_mixed" json:"alert_mixed"`
74}
75
76
77type sslUpdateResponse struct {
78 Success bool `json:"Success"`
79 Message interface{} `json:"Message"`
80}
81
82type sslCreateResponse struct {
83 Success bool `json:"Success"`
84 Message interface{} `json:"Message"`
85 Input createSsl `json:"Input"`
86}
87
88//Ssls represent the actions done wit the API
89type Ssls interface {
90 All() ([]*Ssl, error)
91 completeSsl(*PartialSsl) (*Ssl, error)
92 Detail(string) (*Ssl, error)
93 Update(*PartialSsl) (*Ssl, error)
94 UpdatePartial(*PartialSsl) (*PartialSsl, error)
95 Delete(ID string) error
96 CreatePartial(*PartialSsl) (*PartialSsl, error)
97 Create(*PartialSsl) (*Ssl, error)
98}
99
100func consolidateSsl(s *Ssl) {
101 (*s).ContactGroupsC = strings.Trim(strings.Join(strings.Fields(fmt.Sprint((*s).ContactGroups)), ","), "[]")
102}
103
104func findSsl(responses []*Ssl, id string) (*Ssl, error) {
105 var response *Ssl
106 for _, elem := range responses {
107 if (*elem).ID == id {
108 return elem, nil
109 }
110 }
111 return response, fmt.Errorf("%s Not found", id)
112}
113
114func (tt *ssls) completeSsl(s *PartialSsl) (*Ssl, error) {
115 full, err := tt.Detail(strconv.Itoa((*s).ID))
116 if err != nil {
117 return nil, err
118 }
119 (*full).ContactGroups = strings.Split((*s).ContactGroupsC,",")
120 return full, nil
121}
122
123//Partial return a PartialSsl corresponding to the Ssl
124func Partial(s *Ssl) (*PartialSsl,error) {
125 if s==nil {
126 return nil,fmt.Errorf("s is nil")
127 }
128 id,err:=strconv.Atoi(s.ID)
129 if(err!=nil){
130 return nil,err
131 }
132 return &PartialSsl{
133 ID: id,
134 Domain: s.Domain,
135 Checkrate: strconv.Itoa(s.Checkrate),
136 ContactGroupsC: s.ContactGroupsC,
137 AlertReminder: s.AlertReminder,
138 AlertExpiry: s.AlertExpiry,
139 AlertBroken: s.AlertBroken,
140 AlertMixed: s.AlertMixed,
141 AlertAt: s.AlertAt,
142 },nil
143
144}
145
146type ssls struct {
147 client apiClient
148}
149
150//NewSsls return a new ssls
151func NewSsls(c apiClient) Ssls {
152 return &ssls{
153 client: c,
154 }
155}
156
157//All return a list of all the ssl from the API
158func (tt *ssls) All() ([]*Ssl, error) {
159 rawResponse, err := tt.client.get("/SSL", nil)
160 if err != nil {
161 return nil, fmt.Errorf("Error getting StatusCake Ssl: %s", err.Error())
162 }
163 var getResponse []*Ssl
164 err = json.NewDecoder(rawResponse.Body).Decode(&getResponse)
165 if err != nil {
166 return nil, err
167 }
168
169 for ssl := range getResponse {
170 consolidateSsl(getResponse[ssl])
171 }
172
173 return getResponse, err
174}
175
176//Detail return the ssl corresponding to the id
177func (tt *ssls) Detail(id string) (*Ssl, error) {
178 responses, err := tt.All()
179 if err != nil {
180 return nil, err
181 }
182 mySsl, errF := findSsl(responses, id)
183 if errF != nil {
184 return nil, errF
185 }
186 return mySsl, nil
187}
188
189//Update update the API with s and create one if s.ID=0 then return the corresponding Ssl
190func (tt *ssls) Update(s *PartialSsl) (*Ssl, error) {
191 var err error
192 s, err = tt.UpdatePartial(s)
193 if err!= nil {
194 return nil, err
195 }
196 return tt.completeSsl(s)
197}
198
199//UpdatePartial update the API with s and create one if s.ID=0 then return the corresponding PartialSsl
200func (tt *ssls) UpdatePartial(s *PartialSsl) (*PartialSsl, error) {
201
202 if((*s).ID == 0){
203 return tt.CreatePartial(s)
204 }
205 var v url.Values
206
207 v, _ = query.Values(updateSsl(*s))
208
209 rawResponse, err := tt.client.put("/SSL/Update", v)
210 if err != nil {
211 return nil, fmt.Errorf("Error creating StatusCake Ssl: %s", err.Error())
212 }
213
214 var updateResponse sslUpdateResponse
215 err = json.NewDecoder(rawResponse.Body).Decode(&updateResponse)
216 if err != nil {
217 return nil, err
218 }
219
220 if !updateResponse.Success {
221 return nil, fmt.Errorf("%s", updateResponse.Message.(string))
222 }
223
224
225 return s, nil
226}
227
228//Delete delete the ssl which ID is id
229func (tt *ssls) Delete(id string) error {
230 _, err := tt.client.delete("/SSL/Update", url.Values{"id": {fmt.Sprint(id)}})
231 if err != nil {
232 return err
233 }
234
235 return nil
236}
237
238//Create create the ssl whith the data in s and return the Ssl created
239func (tt *ssls) Create(s *PartialSsl) (*Ssl, error) {
240 var err error
241 s, err = tt.CreatePartial(s)
242 if err!= nil {
243 return nil, err
244 }
245 return tt.completeSsl(s)
246}
247
248//CreatePartial create the ssl whith the data in s and return the PartialSsl created
249func (tt *ssls) CreatePartial(s *PartialSsl) (*PartialSsl, error) {
250 (*s).ID=0
251 var v url.Values
252 v, _ = query.Values(createSsl(*s))
253
254 rawResponse, err := tt.client.put("/SSL/Update", v)
255 if err != nil {
256 return nil, fmt.Errorf("Error creating StatusCake Ssl: %s", err.Error())
257 }
258
259 var createResponse sslCreateResponse
260 err = json.NewDecoder(rawResponse.Body).Decode(&createResponse)
261 if err != nil {
262 return nil, err
263 }
264
265 if !createResponse.Success {
266 return nil, fmt.Errorf("%s", createResponse.Message.(string))
267 }
268 *s = PartialSsl(createResponse.Input)
269 (*s).ID = int(createResponse.Message.(float64))
270
271 return s,nil
272}
273
diff --git a/vendor/github.com/DreamItGetIT/statuscake/ssl_test.go b/vendor/github.com/DreamItGetIT/statuscake/ssl_test.go
new file mode 100644
index 0000000..48a961c
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/ssl_test.go
@@ -0,0 +1,343 @@
1package statuscake
2
3import (
4 "testing"
5 //"fmt"
6 "github.com/stretchr/testify/assert"
7 "github.com/stretchr/testify/require"
8 "net/url"
9)
10
11func TestSsl_All(t *testing.T) {
12 assert := assert.New(t)
13 require := require.New(t)
14
15 c := &fakeAPIClient{
16 fixture: "sslListAllOk.json",
17 }
18 tt := NewSsls(c)
19 ssls, err := tt.All()
20 require.Nil(err)
21
22 assert.Equal("/SSL", c.sentRequestPath)
23 assert.Equal("GET", c.sentRequestMethod)
24 assert.Nil(c.sentRequestValues)
25 assert.Len(ssls, 3)
26 mixed := make(map[string]string)
27 flags := make(map[string]bool)
28 flags["is_extended"] = false
29 flags["has_pfs"] = true
30 flags["is_broken"] = false
31 flags["is_expired"] = false
32 flags["is_missing"] = false
33 flags["is_revoked"] = false
34 flags["has_mixed"] = false
35 expectedTest := &Ssl{
36 ID: "143615",
37 Checkrate: 2073600,
38 Paused: false,
39 Domain: "https://www.exemple.com",
40 IssuerCn: "Let's Encrypt Authority X3",
41 CertScore: "95",
42 CipherScore: "100",
43 CertStatus: "CERT_OK",
44 Cipher: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
45 ValidFromUtc: "2019-05-28 01:22:00",
46 ValidUntilUtc: "2019-08-26 01:22:00",
47 MixedContent: []map[string]string{},
48 Flags: flags,
49 ContactGroups: []string{},
50 ContactGroupsC: "",
51 AlertAt: "7,18,2019",
52 LastReminder: 2019,
53 AlertReminder: true,
54 AlertExpiry: true,
55 AlertBroken: true,
56 AlertMixed: true,
57 LastUpdatedUtc: "2019-06-20 10:11:03",
58 }
59 assert.Equal(expectedTest, ssls[0])
60
61 expectedTest.ID="143617"
62 expectedTest.LastUpdatedUtc="2019-06-20 10:23:20"
63 assert.Equal(expectedTest, ssls[2])
64
65 expectedTest.ID="143616"
66 expectedTest.LastUpdatedUtc="2019-06-20 10:23:14"
67 mixed["type"]="img"
68 mixed["src"]="http://example.com/image.gif"
69 expectedTest.MixedContent=[]map[string]string{mixed}
70 expectedTest.ContactGroupsC="12,13,34"
71 expectedTest.ContactGroups=[]string{"12","13","34"}
72 assert.Equal(expectedTest, ssls[1])
73}
74
75func TestSsls_Detail_OK(t *testing.T) {
76 assert := assert.New(t)
77 require := require.New(t)
78
79 c := &fakeAPIClient{
80 fixture: "sslListAllOk.json",
81 }
82 tt := NewSsls(c)
83
84 ssl, err := tt.Detail("143616")
85 require.Nil(err)
86 assert.Equal("/SSL", c.sentRequestPath)
87 assert.Equal("GET", c.sentRequestMethod)
88 assert.Nil(c.sentRequestValues)
89
90 mixed := make(map[string]string)
91 flags := make(map[string]bool)
92
93 mixed["type"]="img"
94 mixed["src"]="http://example.com/image.gif"
95
96 flags["is_extended"] = false
97 flags["has_pfs"] = true
98 flags["is_broken"] = false
99 flags["is_expired"] = false
100 flags["is_missing"] = false
101 flags["is_revoked"] = false
102 flags["has_mixed"] = false
103 expectedTest := &Ssl{
104 ID: "143616",
105 Checkrate: 2073600,
106 Paused: false,
107 Domain: "https://www.exemple.com",
108 IssuerCn: "Let's Encrypt Authority X3",
109 CertScore: "95",
110 CipherScore: "100",
111 CertStatus: "CERT_OK",
112 Cipher: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
113 ValidFromUtc: "2019-05-28 01:22:00",
114 ValidUntilUtc: "2019-08-26 01:22:00",
115 MixedContent: []map[string]string{mixed},
116 Flags: flags,
117 ContactGroups: []string{"12","13","34"},
118 ContactGroupsC: "12,13,34",
119 AlertAt: "7,18,2019",
120 LastReminder: 2019,
121 AlertReminder: true,
122 AlertExpiry: true,
123 AlertBroken: true,
124 AlertMixed: true,
125 LastUpdatedUtc: "2019-06-20 10:23:14",
126 }
127
128 assert.Equal(expectedTest, ssl)
129}
130
131func TestSsls_CreatePartial_OK(t *testing.T) {
132 assert := assert.New(t)
133 require := require.New(t)
134
135 c := &fakeAPIClient{
136 fixture: "sslCreateOk.json",
137 }
138 tt := NewSsls(c)
139 partial := &PartialSsl{
140 Domain: "https://www.exemple.com",
141 Checkrate: "2073600",
142 ContactGroupsC: "",
143 AlertReminder: true,
144 AlertExpiry: true,
145 AlertBroken: true,
146 AlertMixed: true,
147 AlertAt: "7,18,2019",
148 }
149 expectedRes := &PartialSsl {
150 ID: 143616,
151 Domain: "https://www.exemple.com",
152 Checkrate: "2073600",
153 ContactGroupsC: "",
154 AlertReminder: true,
155 AlertExpiry: true,
156 AlertBroken: true,
157 AlertMixed: true,
158 AlertAt: "7,18,2019",
159 }
160 res, err := tt.CreatePartial(partial)
161 require.Nil(err)
162 assert.Equal("/SSL/Update", c.sentRequestPath)
163 assert.Equal("PUT", c.sentRequestMethod)
164 assert.Equal(c.sentRequestValues,url.Values(url.Values{"domain":[]string{"https://www.exemple.com"}, "checkrate":[]string{"2073600"}, "contact_groups":[]string{""}, "alert_at":[]string{"7,18,2019"}, "alert_expiry":[]string{"true"}, "alert_reminder":[]string{"true"}, "alert_broken":[]string{"true"}, "alert_mixed":[]string{"true"}}))
165
166 assert.Equal(expectedRes, res)
167}
168
169func TestSsls_UpdatePartial_OK(t *testing.T) {
170 assert := assert.New(t)
171 require := require.New(t)
172
173 c := &fakeAPIClient{
174 fixture: "sslUpdateOk.json",
175 }
176 tt := NewSsls(c)
177 partial := &PartialSsl{
178 ID: 143616,
179 Domain: "https://www.exemple.com",
180 Checkrate: "2073600",
181 ContactGroupsC: "",
182 AlertReminder: false,
183 AlertExpiry: true,
184 AlertBroken: true,
185 AlertMixed: true,
186 AlertAt: "7,18,2019",
187 }
188 expectedRes := &PartialSsl {
189 ID: 143616,
190 Domain: "https://www.exemple.com",
191 Checkrate: "2073600",
192 ContactGroupsC: "",
193 AlertReminder: false,
194 AlertExpiry: true,
195 AlertBroken: true,
196 AlertMixed: true,
197 AlertAt: "7,18,2019",
198 }
199 res, err := tt.UpdatePartial(partial)
200 require.Nil(err)
201 assert.Equal(expectedRes, res)
202 assert.Equal("/SSL/Update", c.sentRequestPath)
203 assert.Equal("PUT", c.sentRequestMethod)
204 assert.Equal(c.sentRequestValues,url.Values(url.Values{"id":[]string{"143616"},"domain":[]string{"https://www.exemple.com"}, "checkrate":[]string{"2073600"}, "contact_groups":[]string{""}, "alert_at":[]string{"7,18,2019"}, "alert_expiry":[]string{"true"}, "alert_reminder":[]string{"false"}, "alert_broken":[]string{"true"}, "alert_mixed":[]string{"true"}}))
205}
206
207func TestSsl_complete_OK(t *testing.T) {
208 assert := assert.New(t)
209 require := require.New(t)
210
211 c := &fakeAPIClient{
212 fixture: "sslListAllOk.json",
213 }
214 tt := NewSsls(c)
215
216 partial := &PartialSsl {
217 ID: 143616,
218 Domain: "https://www.exemple.com",
219 Checkrate: "2073600",
220 ContactGroupsC: "12,13,34",
221 AlertReminder: true,
222 AlertExpiry: true,
223 AlertBroken: true,
224 AlertMixed: true,
225 AlertAt: "7,18,2019",
226 }
227 full, err := tt.completeSsl(partial)
228 require.Nil(err)
229 mixed := make(map[string]string)
230 flags := make(map[string]bool)
231
232 mixed["type"]="img"
233 mixed["src"]="http://example.com/image.gif"
234
235 flags["is_extended"] = false
236 flags["has_pfs"] = true
237 flags["is_broken"] = false
238 flags["is_expired"] = false
239 flags["is_missing"] = false
240 flags["is_revoked"] = false
241 flags["has_mixed"] = false
242 expectedTest := &Ssl{
243 ID: "143616",
244 Checkrate: 2073600,
245 Paused: false,
246 Domain: "https://www.exemple.com",
247 IssuerCn: "Let's Encrypt Authority X3",
248 CertScore: "95",
249 CipherScore: "100",
250 CertStatus: "CERT_OK",
251 Cipher: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
252 ValidFromUtc: "2019-05-28 01:22:00",
253 ValidUntilUtc: "2019-08-26 01:22:00",
254 MixedContent: []map[string]string{mixed},
255 Flags: flags,
256 ContactGroups: []string{"12","13","34"},
257 ContactGroupsC: "12,13,34",
258 AlertAt: "7,18,2019",
259 LastReminder: 2019,
260 AlertReminder: true,
261 AlertExpiry: true,
262 AlertBroken: true,
263 AlertMixed: true,
264 LastUpdatedUtc: "2019-06-20 10:23:14",
265 }
266
267 assert.Equal(expectedTest, full)
268
269}
270
271func TestSsl_partial_OK(t *testing.T) {
272 assert := assert.New(t)
273 require := require.New(t)
274
275 mixed := make(map[string]string)
276 flags := make(map[string]bool)
277
278 mixed["type"]="img"
279 mixed["src"]="http://example.com/image.gif"
280
281 flags["is_extended"] = false
282 flags["has_pfs"] = true
283 flags["is_broken"] = false
284 flags["is_expired"] = false
285 flags["is_missing"] = false
286 flags["is_revoked"] = false
287 flags["has_mixed"] = false
288 full := &Ssl{
289 ID: "143616",
290 Checkrate: 2073600,
291 Paused: false,
292 Domain: "https://www.exemple.com",
293 IssuerCn: "Let's Encrypt Authority X3",
294 CertScore: "95",
295 CipherScore: "100",
296 CertStatus: "CERT_OK",
297 Cipher: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
298 ValidFromUtc: "2019-05-28 01:22:00",
299 ValidUntilUtc: "2019-08-26 01:22:00",
300 MixedContent: []map[string]string{mixed},
301 Flags: flags,
302 ContactGroups: []string{"12","13","34"},
303 ContactGroupsC: "12,13,34",
304 AlertAt: "7,18,2019",
305 LastReminder: 2019,
306 AlertReminder: true,
307 AlertExpiry: true,
308 AlertBroken: true,
309 AlertMixed: true,
310 LastUpdatedUtc: "2019-06-20 10:23:14",
311 }
312 expectedTest:=&PartialSsl {
313 ID: 143616,
314 Domain: "https://www.exemple.com",
315 Checkrate: "2073600",
316 ContactGroupsC: "12,13,34",
317 AlertReminder: true,
318 AlertExpiry: true,
319 AlertBroken: true,
320 AlertMixed: true,
321 AlertAt: "7,18,2019",
322 }
323 partial,err:=Partial(full)
324 require.Nil(err)
325 assert.Equal(expectedTest, partial)
326
327}
328
329func TestSsls_Delete_OK(t *testing.T) {
330 assert := assert.New(t)
331 require := require.New(t)
332
333 c := &fakeAPIClient{
334 fixture: "sslDeleteOk.json",
335 }
336 tt := NewSsls(c)
337
338 err := tt.Delete("143616")
339 require.Nil(err)
340 assert.Equal("/SSL/Update", c.sentRequestPath)
341 assert.Equal("DELETE", c.sentRequestMethod)
342 assert.Equal(c.sentRequestValues,url.Values(url.Values{"id":[]string{"143616"},},))
343}
diff --git a/vendor/github.com/DreamItGetIT/statuscake/tests_test.go b/vendor/github.com/DreamItGetIT/statuscake/tests_test.go
new file mode 100644
index 0000000..efeb720
--- /dev/null
+++ b/vendor/github.com/DreamItGetIT/statuscake/tests_test.go
@@ -0,0 +1,422 @@
1package statuscake
2
3import (
4 "bytes"
5 "encoding/json"
6 "io/ioutil"
7 "log"
8 "net/http"
9 "net/url"
10 "os"
11 "path/filepath"
12 "strings"
13 "testing"
14
15 "github.com/stretchr/testify/assert"
16 "github.com/stretchr/testify/require"
17)
18
19func TestTest_Validate(t *testing.T) {
20 assert := assert.New(t)
21 require := require.New(t)
22
23 test := &Test{
24 Timeout: 200,
25 Confirmation: 100,
26 Public: 200,
27 Virus: 200,
28 TestType: "FTP",
29 RealBrowser: 100,
30 TriggerRate: 100,
31 CheckRate: 100000,
32 CustomHeader: "here be dragons",
33 WebsiteName: "",
34 WebsiteURL: "",
35 }
36
37 err := test.Validate()
38 require.NotNil(err)
39
40 message := err.Error()
41 assert.Contains(message, "WebsiteName is required")
42 assert.Contains(message, "WebsiteURL is required")
43 assert.Contains(message, "Timeout must be 0 or between 6 and 99")
44 assert.Contains(message, "Confirmation must be between 0 and 9")
45 assert.Contains(message, "CheckRate must be between 0 and 23999")
46 assert.Contains(message, "Public must be 0 or 1")
47 assert.Contains(message, "Virus must be 0 or 1")
48 assert.Contains(message, "TestType must be HTTP, TCP, or PING")
49 assert.Contains(message, "RealBrowser must be 0 or 1")
50 assert.Contains(message, "TriggerRate must be between 0 and 59")
51 assert.Contains(message, "CustomHeader must be provided as json string")
52
53 test.Timeout = 10
54 test.Confirmation = 2
55 test.Public = 1
56 test.Virus = 1
57 test.TestType = "HTTP"
58 test.RealBrowser = 1
59 test.TriggerRate = 50
60 test.CheckRate = 10
61 test.WebsiteName = "Foo"
62 test.WebsiteURL = "http://example.com"
63 test.CustomHeader = `{"test": 15}`
64 test.NodeLocations = []string{"foo", "bar"}
65
66 err = test.Validate()
67 assert.Nil(err)
68}
69
70func TestTest_ToURLValues(t *testing.T) {
71 assert := assert.New(t)
72
73 test := &Test{
74 TestID: 123,
75 Paused: true,
76 WebsiteName: "Foo Bar",
77 CustomHeader: `{"some":{"json": ["value"]}}`,
78 WebsiteURL: "http://example.com",
79 Port: 3000,
80 NodeLocations: []string{"foo", "bar"},
81 Timeout: 11,
82 PingURL: "http://example.com/ping",
83 Confirmation: 1,
84 CheckRate: 500,
85 BasicUser: "myuser",
86 BasicPass: "mypass",
87 Public: 1,
88 LogoImage: "http://example.com/logo.jpg",
89 Branding: 1,
90 WebsiteHost: "hoster",
91 Virus: 1,
92 FindString: "hello",
93 DoNotFind: true,
94 TestType: "HTTP",
95 RealBrowser: 1,
96 TriggerRate: 50,
97 TestTags: []string{"tag1", "tag2"},
98 StatusCodes: "500",
99 EnableSSLAlert: false,
100 FollowRedirect: false,
101 }
102
103 expected := url.Values{
104 "TestID": {"123"},
105 "Paused": {"1"},
106 "WebsiteName": {"Foo Bar"},
107 "WebsiteURL": {"http://example.com"},
108 "CustomHeader": {`{"some":{"json": ["value"]}}`},
109 "Port": {"3000"},
110 "NodeLocations": {"foo,bar"},
111 "Timeout": {"11"},
112 "PingURL": {"http://example.com/ping"},
113 "ContactGroup": {""},
114 "Confirmation": {"1"},
115 "CheckRate": {"500"},
116 "BasicUser": {"myuser"},
117 "BasicPass": {"mypass"},
118 "Public": {"1"},
119 "LogoImage": {"http://example.com/logo.jpg"},
120 "Branding": {"1"},
121 "WebsiteHost": {"hoster"},
122 "Virus": {"1"},
123 "FindString": {"hello"},
124 "DoNotFind": {"1"},
125 "TestType": {"HTTP"},
126 "RealBrowser": {"1"},
127 "TriggerRate": {"50"},
128 "TestTags": {"tag1,tag2"},
129 "StatusCodes": {"500"},
130 "UseJar": {"0"},
131 "PostRaw": {""},
132 "FinalEndpoint": {""},
133 "EnableSSLAlert": {"0"},
134 "FollowRedirect": {"0"},
135 }
136
137 assert.Equal(expected, test.ToURLValues())
138
139 test.TestID = 0
140 delete(expected, "TestID")
141
142 assert.Equal(expected.Encode(), test.ToURLValues().Encode())
143}
144
145func TestTests_All(t *testing.T) {
146 assert := assert.New(t)
147 require := require.New(t)
148
149 c := &fakeAPIClient{
150 fixture: "tests_all_ok.json",
151 }
152 tt := newTests(c)
153 tests, err := tt.All()
154 require.Nil(err)
155
156 assert.Equal("/Tests", c.sentRequestPath)
157 assert.Equal("GET", c.sentRequestMethod)
158 assert.Nil(c.sentRequestValues)
159 assert.Len(tests, 2)
160
161 expectedTest := &Test{
162 TestID: 100,
163 Paused: false,
164 TestType: "HTTP",
165 WebsiteName: "www 1",
166 ContactGroup: []string{"1"},
167 Status: "Up",
168 Uptime: 100,
169 NodeLocations: []string{"foo", "bar"},
170 }
171 assert.Equal(expectedTest, tests[0])
172
173 expectedTest = &Test{
174 TestID: 101,
175 Paused: true,
176 TestType: "HTTP",
177 WebsiteName: "www 2",
178 ContactGroup: []string{"2"},
179 Status: "Down",
180 Uptime: 0,
181 NodeLocations: []string{"foo"},
182 TestTags: []string{"test1", "test2"},
183 }
184 assert.Equal(expectedTest, tests[1])
185}
186
187func TestTests_AllWithFilter(t *testing.T) {
188 assert := assert.New(t)
189 require := require.New(t)
190
191 c := &fakeAPIClient{
192 fixture: "tests_all_ok.json",
193 }
194
195 v := url.Values{}
196 v.Set("tags", "test1,test2")
197 tt := newTests(c)
198 tests, err := tt.AllWithFilter(v)
199 require.Nil(err)
200
201 assert.Equal("/Tests", c.sentRequestPath)
202 assert.Equal("GET", c.sentRequestMethod)
203 assert.NotNil(c.sentRequestValues)
204 assert.Len(tests, 1)
205
206 expectedTest := &Test{
207 TestID: 101,
208 Paused: true,
209 TestType: "HTTP",
210 WebsiteName: "www 2",
211 ContactGroup: []string{"2"},
212 Status: "Down",
213 Uptime: 0,
214 NodeLocations: []string{"foo"},
215 TestTags: []string{"test1", "test2"},
216 }
217 assert.Equal(expectedTest, tests[0])
218}
219
220func TestTests_Update_OK(t *testing.T) {
221 assert := assert.New(t)
222 require := require.New(t)
223
224 c := &fakeAPIClient{
225 fixture: "tests_update_ok.json",
226 }
227 tt := newTests(c)
228
229 test1 := &Test{
230 WebsiteName: "foo",
231 }
232
233 test2, err := tt.Update(test1)
234 require.Nil(err)
235
236 assert.Equal("/Tests/Update", c.sentRequestPath)
237 assert.Equal("PUT", c.sentRequestMethod)
238 assert.NotNil(c.sentRequestValues)
239 assert.NotNil(test2)
240
241 assert.Equal(1234, test2.TestID)
242}
243
244func TestTests_Update_Error(t *testing.T) {
245 assert := assert.New(t)
246 require := require.New(t)
247
248 c := &fakeAPIClient{
249 fixture: "tests_update_error.json",
250 }
251 tt := newTests(c)
252
253 test1 := &Test{
254 WebsiteName: "foo",
255 }
256
257 test2, err := tt.Update(test1)
258 assert.Nil(test2)
259
260 require.NotNil(err)
261 assert.IsType(&updateError{}, err)
262 assert.Contains(err.Error(), "issue a")
263}
264
265func TestTests_Update_ErrorWithSliceOfIssues(t *testing.T) {
266 assert := assert.New(t)
267 require := require.New(t)
268
269 c := &fakeAPIClient{
270 fixture: "tests_update_error_slice_of_issues.json",
271 }
272 tt := newTests(c)
273
274 test1 := &Test{
275 WebsiteName: "foo",
276 }
277
278 test2, err := tt.Update(test1)
279 assert.Nil(test2)
280
281 require.NotNil(err)
282 assert.IsType(&updateError{}, err)
283 assert.Equal("Required Data is Missing., hello, world", err.Error())
284}
285
286func TestTests_Delete_OK(t *testing.T) {
287 assert := assert.New(t)
288 require := require.New(t)
289
290 c := &fakeAPIClient{
291 fixture: "tests_delete_ok.json",
292 }
293 tt := newTests(c)
294
295 err := tt.Delete(1234)
296 require.Nil(err)
297
298 assert.Equal("/Tests/Details", c.sentRequestPath)
299 assert.Equal("DELETE", c.sentRequestMethod)
300 assert.Equal(url.Values{"TestID": {"1234"}}, c.sentRequestValues)
301}
302
303func TestTests_Delete_Error(t *testing.T) {
304 assert := assert.New(t)
305 require := require.New(t)
306
307 c := &fakeAPIClient{
308 fixture: "tests_delete_error.json",
309 }
310 tt := newTests(c)
311
312 err := tt.Delete(1234)
313 require.NotNil(err)
314 assert.Equal("this is an error", err.Error())
315}
316
317func TestTests_Detail_OK(t *testing.T) {
318 assert := assert.New(t)
319 require := require.New(t)
320
321 c := &fakeAPIClient{
322 fixture: "tests_detail_ok.json",
323 }
324 tt := newTests(c)
325
326 test, err := tt.Detail(1234)
327 require.Nil(err)
328
329 assert.Equal("/Tests/Details", c.sentRequestPath)
330 assert.Equal("GET", c.sentRequestMethod)
331 assert.Equal(url.Values{"TestID": {"1234"}}, c.sentRequestValues)
332
333 assert.Equal(test.TestID, 6735)
334 assert.Equal(test.TestType, "HTTP")
335 assert.Equal(test.Paused, false)
336 assert.Equal(test.WebsiteName, "NL")
337 assert.Equal(test.CustomHeader, `{"some":{"json": ["value"]}}`)
338 assert.Equal(test.UserAgent, "product/version (comment)")
339 assert.Equal(test.ContactGroup, []string{"536"})
340 assert.Equal(test.Status, "Up")
341 assert.Equal(test.Uptime, 0.0)
342 assert.Equal(test.CheckRate, 60)
343 assert.Equal(test.Timeout, 40)
344 assert.Equal(test.LogoImage, "")
345 assert.Equal(test.WebsiteHost, "Various")
346 assert.Equal(test.FindString, "")
347 assert.Equal(test.DoNotFind, false)
348 assert.Equal(test.NodeLocations, []string{"foo", "bar"})
349}
350
351type fakeAPIClient struct {
352 sentRequestPath string
353 sentRequestMethod string
354 sentRequestValues url.Values
355 fixture string
356}
357
358func (c *fakeAPIClient) put(path string, v url.Values) (*http.Response, error) {
359 return c.all("PUT", path, v)
360}
361
362func (c *fakeAPIClient) delete(path string, v url.Values) (*http.Response, error) {
363 return c.all("DELETE", path, v)
364}
365
366func (c *fakeAPIClient) get(path string, v url.Values) (*http.Response, error) {
367 return c.all("GET", path, v)
368}
369
370func (c *fakeAPIClient) all(method string, path string, v url.Values) (*http.Response, error) {
371 c.sentRequestMethod = method
372 c.sentRequestPath = path
373 c.sentRequestValues = v
374
375 p := filepath.Join("fixtures", c.fixture)
376 f, err := os.Open(p)
377 if err != nil {
378 log.Fatal(err)
379 }
380
381 var resp *http.Response
382 if len(c.sentRequestValues.Get("tags")) > 0 {
383 var storedResponses []Test
384 var returnResponses []Test
385 byteValue, _ := ioutil.ReadAll(f)
386 json.Unmarshal(byteValue, &storedResponses)
387 requestedTags := strings.Split(c.sentRequestValues.Get("tags"), ",")
388
389 for _, storedResponse := range storedResponses {
390 if len(requestedTags) > len(storedResponse.TestTags) { // if we are requesting more tags than whats stored then there are no matches
391 continue
392 }
393
394 match := true
395 for i, tag := range requestedTags {
396 if tag != storedResponse.TestTags[i] {
397 match = false
398 }
399 }
400
401 if match { // we can add it to the response now
402 returnResponses = append(returnResponses, storedResponse)
403 }
404 }
405
406 if len(returnResponses) == 0 {
407 return nil, nil
408 }
409
410 newByteValue, _ := json.Marshal(&returnResponses)
411 resp = &http.Response{
412 Body: ioutil.NopCloser(bytes.NewBuffer(newByteValue)),
413 }
414
415 } else {
416 resp = &http.Response{
417 Body: f,
418 }
419 }
420
421 return resp, nil
422}
diff --git a/vendor/github.com/google/go-querystring/.gitignore b/vendor/github.com/google/go-querystring/.gitignore
new file mode 100644
index 0000000..9ed3b07
--- /dev/null
+++ b/vendor/github.com/google/go-querystring/.gitignore
@@ -0,0 +1 @@
*.test
diff --git a/vendor/github.com/google/go-querystring/.travis.yml b/vendor/github.com/google/go-querystring/.travis.yml
new file mode 100644
index 0000000..881d087
--- /dev/null
+++ b/vendor/github.com/google/go-querystring/.travis.yml
@@ -0,0 +1,5 @@
1language: go
2
3go:
4 - 1.x
5 - 1.11.x
diff --git a/vendor/github.com/google/go-querystring/CONTRIBUTING.md b/vendor/github.com/google/go-querystring/CONTRIBUTING.md
new file mode 100644
index 0000000..51cf5cd
--- /dev/null
+++ b/vendor/github.com/google/go-querystring/CONTRIBUTING.md
@@ -0,0 +1,67 @@
1# How to contribute #
2
3We'd love to accept your patches and contributions to this project. There are
4a just a few small guidelines you need to follow.
5
6
7## Contributor License Agreement ##
8
9Contributions to any Google project must be accompanied by a Contributor
10License Agreement. This is not a copyright **assignment**, it simply gives
11Google permission to use and redistribute your contributions as part of the
12project.
13
14 * If you are an individual writing original source code and you're sure you
15 own the intellectual property, then you'll need to sign an [individual
16 CLA][].
17
18 * If you work for a company that wants to allow you to contribute your work,
19 then you'll need to sign a [corporate CLA][].
20
21You generally only need to submit a CLA once, so if you've already submitted
22one (even if it was for a different project), you probably don't need to do it
23again.
24
25[individual CLA]: https://developers.google.com/open-source/cla/individual
26[corporate CLA]: https://developers.google.com/open-source/cla/corporate
27
28
29## Submitting a patch ##
30
31 1. It's generally best to start by opening a new issue describing the bug or
32 feature you're intending to fix. Even if you think it's relatively minor,
33 it's helpful to know what people are working on. Mention in the initial
34 issue that you are planning to work on that bug or feature so that it can
35 be assigned to you.
36
37 1. Follow the normal process of [forking][] the project, and setup a new
38 branch to work in. It's important that each group of changes be done in
39 separate branches in order to ensure that a pull request only includes the
40 commits related to that bug or feature.
41
42 1. Go makes it very simple to ensure properly formatted code, so always run
43 `go fmt` on your code before committing it. You should also run
44 [golint][] over your code. As noted in the [golint readme][], it's not
45 strictly necessary that your code be completely "lint-free", but this will
46 help you find common style issues.
47
48 1. Any significant changes should almost always be accompanied by tests. The
49 project already has good test coverage, so look at some of the existing
50 tests if you're unsure how to go about it. [gocov][] and [gocov-html][]
51 are invaluable tools for seeing which parts of your code aren't being
52 exercised by your tests.
53
54 1. Do your best to have [well-formed commit messages][] for each change.
55 This provides consistency throughout the project, and ensures that commit
56 messages are able to be formatted properly by various git tools.
57
58 1. Finally, push the commits to your fork and submit a [pull request][].
59
60[forking]: https://help.github.com/articles/fork-a-repo
61[golint]: https://github.com/golang/lint
62[golint readme]: https://github.com/golang/lint/blob/master/README
63[gocov]: https://github.com/axw/gocov
64[gocov-html]: https://github.com/matm/gocov-html
65[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
66[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits
67[pull request]: https://help.github.com/articles/creating-a-pull-request
diff --git a/vendor/github.com/google/go-querystring/LICENSE b/vendor/github.com/google/go-querystring/LICENSE
new file mode 100644
index 0000000..ae121a1
--- /dev/null
+++ b/vendor/github.com/google/go-querystring/LICENSE
@@ -0,0 +1,27 @@
1Copyright (c) 2013 Google. All rights reserved.
2
3Redistribution and use in source and binary forms, with or without
4modification, are permitted provided that the following conditions are
5met:
6
7 * Redistributions of source code must retain the above copyright
8notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above
10copyright notice, this list of conditions and the following disclaimer
11in the documentation and/or other materials provided with the
12distribution.
13 * Neither the name of Google Inc. nor the names of its
14contributors may be used to endorse or promote products derived from
15this software without specific prior written permission.
16
17THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/google/go-querystring/README.md b/vendor/github.com/google/go-querystring/README.md
new file mode 100644
index 0000000..0e600be
--- /dev/null
+++ b/vendor/github.com/google/go-querystring/README.md
@@ -0,0 +1,37 @@
1# go-querystring #
2
3[![GoDoc](https://godoc.org/github.com/google/go-querystring/query?status.svg)](https://godoc.org/github.com/google/go-querystring/query) [![Build Status](https://travis-ci.org/google/go-querystring.svg?branch=master)](https://travis-ci.org/google/go-querystring)
4
5go-querystring is Go library for encoding structs into URL query parameters.
6
7## Usage ##
8
9```go
10import "github.com/google/go-querystring/query"
11```
12
13go-querystring is designed to assist in scenarios where you want to construct a
14URL using a struct that represents the URL query parameters. You might do this
15to enforce the type safety of your parameters, for example, as is done in the
16[go-github][] library.
17
18The query package exports a single `Values()` function. A simple example:
19
20```go
21type Options struct {
22 Query string `url:"q"`
23 ShowAll bool `url:"all"`
24 Page int `url:"page"`
25}
26
27opt := Options{ "foo", true, 2 }
28v, _ := query.Values(opt)
29fmt.Print(v.Encode()) // will output: "q=foo&all=true&page=2"
30```
31
32[go-github]: https://github.com/google/go-github/commit/994f6f8405f052a117d2d0b500054341048fbb08
33
34## License ##
35
36This library is distributed under the BSD-style license found in the [LICENSE](./LICENSE)
37file.
diff --git a/vendor/github.com/google/go-querystring/go.mod b/vendor/github.com/google/go-querystring/go.mod
new file mode 100644
index 0000000..45dca2d
--- /dev/null
+++ b/vendor/github.com/google/go-querystring/go.mod
@@ -0,0 +1 @@
module github.com/google/go-querystring
diff --git a/vendor/github.com/google/go-querystring/query/encode.go b/vendor/github.com/google/go-querystring/query/encode.go
new file mode 100644
index 0000000..37080b1
--- /dev/null
+++ b/vendor/github.com/google/go-querystring/query/encode.go
@@ -0,0 +1,320 @@
1// Copyright 2013 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Package query implements encoding of structs into URL query parameters.
6//
7// As a simple example:
8//
9// type Options struct {
10// Query string `url:"q"`
11// ShowAll bool `url:"all"`
12// Page int `url:"page"`
13// }
14//
15// opt := Options{ "foo", true, 2 }
16// v, _ := query.Values(opt)
17// fmt.Print(v.Encode()) // will output: "q=foo&all=true&page=2"
18//
19// The exact mapping between Go values and url.Values is described in the
20// documentation for the Values() function.
21package query
22
23import (
24 "bytes"
25 "fmt"
26 "net/url"
27 "reflect"
28 "strconv"
29 "strings"
30 "time"
31)
32
33var timeType = reflect.TypeOf(time.Time{})
34
35var encoderType = reflect.TypeOf(new(Encoder)).Elem()
36
37// Encoder is an interface implemented by any type that wishes to encode
38// itself into URL values in a non-standard way.
39type Encoder interface {
40 EncodeValues(key string, v *url.Values) error
41}
42
43// Values returns the url.Values encoding of v.
44//
45// Values expects to be passed a struct, and traverses it recursively using the
46// following encoding rules.
47//
48// Each exported struct field is encoded as a URL parameter unless
49//
50// - the field's tag is "-", or
51// - the field is empty and its tag specifies the "omitempty" option
52//
53// The empty values are false, 0, any nil pointer or interface value, any array
54// slice, map, or string of length zero, and any time.Time that returns true
55// for IsZero().
56//
57// The URL parameter name defaults to the struct field name but can be
58// specified in the struct field's tag value. The "url" key in the struct
59// field's tag value is the key name, followed by an optional comma and
60// options. For example:
61//
62// // Field is ignored by this package.
63// Field int `url:"-"`
64//
65// // Field appears as URL parameter "myName".
66// Field int `url:"myName"`
67//
68// // Field appears as URL parameter "myName" and the field is omitted if
69// // its value is empty
70// Field int `url:"myName,omitempty"`
71//
72// // Field appears as URL parameter "Field" (the default), but the field
73// // is skipped if empty. Note the leading comma.
74// Field int `url:",omitempty"`
75//
76// For encoding individual field values, the following type-dependent rules
77// apply:
78//
79// Boolean values default to encoding as the strings "true" or "false".
80// Including the "int" option signals that the field should be encoded as the
81// strings "1" or "0".
82//
83// time.Time values default to encoding as RFC3339 timestamps. Including the
84// "unix" option signals that the field should be encoded as a Unix time (see
85// time.Unix())
86//
87// Slice and Array values default to encoding as multiple URL values of the
88// same name. Including the "comma" option signals that the field should be
89// encoded as a single comma-delimited value. Including the "space" option
90// similarly encodes the value as a single space-delimited string. Including
91// the "semicolon" option will encode the value as a semicolon-delimited string.
92// Including the "brackets" option signals that the multiple URL values should
93// have "[]" appended to the value name. "numbered" will append a number to
94// the end of each incidence of the value name, example:
95// name0=value0&name1=value1, etc.
96//
97// Anonymous struct fields are usually encoded as if their inner exported
98// fields were fields in the outer struct, subject to the standard Go
99// visibility rules. An anonymous struct field with a name given in its URL
100// tag is treated as having that name, rather than being anonymous.
101//
102// Non-nil pointer values are encoded as the value pointed to.
103//
104// Nested structs are encoded including parent fields in value names for
105// scoping. e.g:
106//
107// "user[name]=acme&user[addr][postcode]=1234&user[addr][city]=SFO"
108//
109// All other values are encoded using their default string representation.
110//
111// Multiple fields that encode to the same URL parameter name will be included
112// as multiple URL values of the same name.
113func Values(v interface{}) (url.Values, error) {
114 values := make(url.Values)
115 val := reflect.ValueOf(v)
116 for val.Kind() == reflect.Ptr {
117 if val.IsNil() {
118 return values, nil
119 }
120 val = val.Elem()
121 }
122
123 if v == nil {
124 return values, nil
125 }
126
127 if val.Kind() != reflect.Struct {
128 return nil, fmt.Errorf("query: Values() expects struct input. Got %v", val.Kind())
129 }
130
131 err := reflectValue(values, val, "")
132 return values, err
133}
134
135// reflectValue populates the values parameter from the struct fields in val.
136// Embedded structs are followed recursively (using the rules defined in the
137// Values function documentation) breadth-first.
138func reflectValue(values url.Values, val reflect.Value, scope string) error {
139 var embedded []reflect.Value
140
141 typ := val.Type()
142 for i := 0; i < typ.NumField(); i++ {
143 sf := typ.Field(i)
144 if sf.PkgPath != "" && !sf.Anonymous { // unexported
145 continue
146 }
147
148 sv := val.Field(i)
149 tag := sf.Tag.Get("url")
150 if tag == "-" {
151 continue
152 }
153 name, opts := parseTag(tag)
154 if name == "" {
155 if sf.Anonymous && sv.Kind() == reflect.Struct {
156 // save embedded struct for later processing
157 embedded = append(embedded, sv)
158 continue
159 }
160
161 name = sf.Name
162 }
163
164 if scope != "" {
165 name = scope + "[" + name + "]"
166 }
167
168 if opts.Contains("omitempty") && isEmptyValue(sv) {
169 continue
170 }
171
172 if sv.Type().Implements(encoderType) {
173 if !reflect.Indirect(sv).IsValid() {
174 sv = reflect.New(sv.Type().Elem())
175 }
176
177 m := sv.Interface().(Encoder)
178 if err := m.EncodeValues(name, &values); err != nil {
179 return err
180 }
181 continue
182 }
183
184 if sv.Kind() == reflect.Slice || sv.Kind() == reflect.Array {
185 var del byte
186 if opts.Contains("comma") {
187 del = ','
188 } else if opts.Contains("space") {
189 del = ' '
190 } else if opts.Contains("semicolon") {
191 del = ';'
192 } else if opts.Contains("brackets") {
193 name = name + "[]"
194 }
195
196 if del != 0 {
197 s := new(bytes.Buffer)
198 first := true
199 for i := 0; i < sv.Len(); i++ {
200 if first {
201 first = false
202 } else {
203 s.WriteByte(del)
204 }
205 s.WriteString(valueString(sv.Index(i), opts))
206 }
207 values.Add(name, s.String())
208 } else {
209 for i := 0; i < sv.Len(); i++ {
210 k := name
211 if opts.Contains("numbered") {
212 k = fmt.Sprintf("%s%d", name, i)
213 }
214 values.Add(k, valueString(sv.Index(i), opts))
215 }
216 }
217 continue
218 }
219
220 for sv.Kind() == reflect.Ptr {
221 if sv.IsNil() {
222 break
223 }
224 sv = sv.Elem()
225 }
226
227 if sv.Type() == timeType {
228 values.Add(name, valueString(sv, opts))
229 continue
230 }
231
232 if sv.Kind() == reflect.Struct {
233 reflectValue(values, sv, name)
234 continue
235 }
236
237 values.Add(name, valueString(sv, opts))
238 }
239
240 for _, f := range embedded {
241 if err := reflectValue(values, f, scope); err != nil {
242 return err
243 }
244 }
245
246 return nil
247}
248
249// valueString returns the string representation of a value.
250func valueString(v reflect.Value, opts tagOptions) string {
251 for v.Kind() == reflect.Ptr {
252 if v.IsNil() {
253 return ""
254 }
255 v = v.Elem()
256 }
257
258 if v.Kind() == reflect.Bool && opts.Contains("int") {
259 if v.Bool() {
260 return "1"
261 }
262 return "0"
263 }
264
265 if v.Type() == timeType {
266 t := v.Interface().(time.Time)
267 if opts.Contains("unix") {
268 return strconv.FormatInt(t.Unix(), 10)
269 }
270 return t.Format(time.RFC3339)
271 }
272
273 return fmt.Sprint(v.Interface())
274}
275
276// isEmptyValue checks if a value should be considered empty for the purposes
277// of omitting fields with the "omitempty" option.
278func isEmptyValue(v reflect.Value) bool {
279 switch v.Kind() {
280 case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
281 return v.Len() == 0
282 case reflect.Bool:
283 return !v.Bool()
284 case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
285 return v.Int() == 0
286 case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
287 return v.Uint() == 0
288 case reflect.Float32, reflect.Float64:
289 return v.Float() == 0
290 case reflect.Interface, reflect.Ptr:
291 return v.IsNil()
292 }
293
294 if v.Type() == timeType {
295 return v.Interface().(time.Time).IsZero()
296 }
297
298 return false
299}
300
301// tagOptions is the string following a comma in a struct field's "url" tag, or
302// the empty string. It does not include the leading comma.
303type tagOptions []string
304
305// parseTag splits a struct field's url tag into its name and comma-separated
306// options.
307func parseTag(tag string) (string, tagOptions) {
308 s := strings.Split(tag, ",")
309 return s[0], s[1:]
310}
311
312// Contains checks whether the tagOptions contains the specified option.
313func (o tagOptions) Contains(option string) bool {
314 for _, s := range o {
315 if s == option {
316 return true
317 }
318 }
319 return false
320}
diff --git a/vendor/github.com/google/go-querystring/query/encode_test.go b/vendor/github.com/google/go-querystring/query/encode_test.go
new file mode 100644
index 0000000..77bea5a
--- /dev/null
+++ b/vendor/github.com/google/go-querystring/query/encode_test.go
@@ -0,0 +1,328 @@
1// Copyright 2013 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package query
6
7import (
8 "fmt"
9 "net/url"
10 "reflect"
11 "testing"
12 "time"
13)
14
15type Nested struct {
16 A SubNested `url:"a"`
17 B *SubNested `url:"b"`
18 Ptr *SubNested `url:"ptr,omitempty"`
19}
20
21type SubNested struct {
22 Value string `url:"value"`
23}
24
25func TestValues_types(t *testing.T) {
26 str := "string"
27 strPtr := &str
28 timeVal := time.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC)
29
30 tests := []struct {
31 in interface{}
32 want url.Values
33 }{
34 {
35 // basic primitives
36 struct {
37 A string
38 B int
39 C uint
40 D float32
41 E bool
42 }{},
43 url.Values{
44 "A": {""},
45 "B": {"0"},
46 "C": {"0"},
47 "D": {"0"},
48 "E": {"false"},
49 },
50 },
51 {
52 // pointers
53 struct {
54 A *string
55 B *int
56 C **string
57 D *time.Time
58 }{
59 A: strPtr,
60 C: &strPtr,
61 D: &timeVal,
62 },
63 url.Values{
64 "A": {str},
65 "B": {""},
66 "C": {str},
67 "D": {"2000-01-01T12:34:56Z"},
68 },
69 },
70 {
71 // slices and arrays
72 struct {
73 A []string
74 B []string `url:",comma"`
75 C []string `url:",space"`
76 D [2]string
77 E [2]string `url:",comma"`
78 F [2]string `url:",space"`
79 G []*string `url:",space"`
80 H []bool `url:",int,space"`
81 I []string `url:",brackets"`
82 J []string `url:",semicolon"`
83 K []string `url:",numbered"`
84 }{
85 A: []string{"a", "b"},
86 B: []string{"a", "b"},
87 C: []string{"a", "b"},
88 D: [2]string{"a", "b"},
89 E: [2]string{"a", "b"},
90 F: [2]string{"a", "b"},
91 G: []*string{&str, &str},
92 H: []bool{true, false},
93 I: []string{"a", "b"},
94 J: []string{"a", "b"},
95 K: []string{"a", "b"},
96 },
97 url.Values{
98 "A": {"a", "b"},
99 "B": {"a,b"},
100 "C": {"a b"},
101 "D": {"a", "b"},
102 "E": {"a,b"},
103 "F": {"a b"},
104 "G": {"string string"},
105 "H": {"1 0"},
106 "I[]": {"a", "b"},
107 "J": {"a;b"},
108 "K0": {"a"},
109 "K1": {"b"},
110 },
111 },
112 {
113 // other types
114 struct {
115 A time.Time
116 B time.Time `url:",unix"`
117 C bool `url:",int"`
118 D bool `url:",int"`
119 }{
120 A: time.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC),
121 B: time.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC),
122 C: true,
123 D: false,
124 },
125 url.Values{
126 "A": {"2000-01-01T12:34:56Z"},
127 "B": {"946730096"},
128 "C": {"1"},
129 "D": {"0"},
130 },
131 },
132 {
133 struct {
134 Nest Nested `url:"nest"`
135 }{
136 Nested{
137 A: SubNested{
138 Value: "that",
139 },
140 },
141 },
142 url.Values{
143 "nest[a][value]": {"that"},
144 "nest[b]": {""},
145 },
146 },
147 {
148 struct {
149 Nest Nested `url:"nest"`
150 }{
151 Nested{
152 Ptr: &SubNested{
153 Value: "that",
154 },
155 },
156 },
157 url.Values{
158 "nest[a][value]": {""},
159 "nest[b]": {""},
160 "nest[ptr][value]": {"that"},
161 },
162 },
163 {
164 nil,
165 url.Values{},
166 },
167 }
168
169 for i, tt := range tests {
170 v, err := Values(tt.in)
171 if err != nil {
172 t.Errorf("%d. Values(%q) returned error: %v", i, tt.in, err)
173 }
174
175 if !reflect.DeepEqual(tt.want, v) {
176 t.Errorf("%d. Values(%q) returned %v, want %v", i, tt.in, v, tt.want)
177 }
178 }
179}
180
181func TestValues_omitEmpty(t *testing.T) {
182 str := ""
183 s := struct {
184 a string
185 A string
186 B string `url:",omitempty"`
187 C string `url:"-"`
188 D string `url:"omitempty"` // actually named omitempty, not an option
189 E *string `url:",omitempty"`
190 }{E: &str}
191
192 v, err := Values(s)
193 if err != nil {
194 t.Errorf("Values(%v) returned error: %v", s, err)
195 }
196
197 want := url.Values{
198 "A": {""},
199 "omitempty": {""},
200 "E": {""}, // E is included because the pointer is not empty, even though the string being pointed to is
201 }
202 if !reflect.DeepEqual(want, v) {
203 t.Errorf("Values(%v) returned %v, want %v", s, v, want)
204 }
205}
206
207type A struct {
208 B
209}
210
211type B struct {
212 C string
213}
214
215type D struct {
216 B
217 C string
218}
219
220type e struct {
221 B
222 C string
223}
224
225type F struct {
226 e
227}
228
229func TestValues_embeddedStructs(t *testing.T) {
230 tests := []struct {
231 in interface{}
232 want url.Values
233 }{
234 {
235 A{B{C: "foo"}},
236 url.Values{"C": {"foo"}},
237 },
238 {
239 D{B: B{C: "bar"}, C: "foo"},
240 url.Values{"C": {"foo", "bar"}},
241 },
242 {
243 F{e{B: B{C: "bar"}, C: "foo"}}, // With unexported embed
244 url.Values{"C": {"foo", "bar"}},
245 },
246 }
247
248 for i, tt := range tests {
249 v, err := Values(tt.in)
250 if err != nil {
251 t.Errorf("%d. Values(%q) returned error: %v", i, tt.in, err)
252 }
253
254 if !reflect.DeepEqual(tt.want, v) {
255 t.Errorf("%d. Values(%q) returned %v, want %v", i, tt.in, v, tt.want)
256 }
257 }
258}
259
260func TestValues_invalidInput(t *testing.T) {
261 _, err := Values("")
262 if err == nil {
263 t.Errorf("expected Values() to return an error on invalid input")
264 }
265}
266
267type EncodedArgs []string
268
269func (m EncodedArgs) EncodeValues(key string, v *url.Values) error {
270 for i, arg := range m {
271 v.Set(fmt.Sprintf("%s.%d", key, i), arg)
272 }
273 return nil
274}
275
276func TestValues_Marshaler(t *testing.T) {
277 s := struct {
278 Args EncodedArgs `url:"arg"`
279 }{[]string{"a", "b", "c"}}
280 v, err := Values(s)
281 if err != nil {
282 t.Errorf("Values(%q) returned error: %v", s, err)
283 }
284
285 want := url.Values{
286 "arg.0": {"a"},
287 "arg.1": {"b"},
288 "arg.2": {"c"},
289 }
290 if !reflect.DeepEqual(want, v) {
291 t.Errorf("Values(%q) returned %v, want %v", s, v, want)
292 }
293}
294
295func TestValues_MarshalerWithNilPointer(t *testing.T) {
296 s := struct {
297 Args *EncodedArgs `url:"arg"`
298 }{}
299 v, err := Values(s)
300 if err != nil {
301 t.Errorf("Values(%v) returned error: %v", s, err)
302 }
303
304 want := url.Values{}
305 if !reflect.DeepEqual(want, v) {
306 t.Errorf("Values(%v) returned %v, want %v", s, v, want)
307 }
308}
309
310func TestTagParsing(t *testing.T) {
311 name, opts := parseTag("field,foobar,foo")
312 if name != "field" {
313 t.Fatalf("name = %q, want field", name)
314 }
315 for _, tt := range []struct {
316 opt string
317 want bool
318 }{
319 {"foobar", true},
320 {"foo", true},
321 {"bar", false},
322 {"field", false},
323 } {
324 if opts.Contains(tt.opt) != tt.want {
325 t.Errorf("Contains(%q) = %v", tt.opt, !tt.want)
326 }
327 }
328}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b1009a7..d93cd37 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -6,7 +6,7 @@ cloud.google.com/go/internal/optional
6cloud.google.com/go/internal/trace 6cloud.google.com/go/internal/trace
7cloud.google.com/go/internal/version 7cloud.google.com/go/internal/version
8cloud.google.com/go/compute/metadata 8cloud.google.com/go/compute/metadata
9# github.com/DreamItGetIT/statuscake v0.0.0-20190218105717-471b24d8edfb 9# github.com/DreamItGetIT/statuscake v0.0.0-20190625125909-fc745efe187b
10github.com/DreamItGetIT/statuscake 10github.com/DreamItGetIT/statuscake
11# github.com/agext/levenshtein v1.2.2 11# github.com/agext/levenshtein v1.2.2
12github.com/agext/levenshtein 12github.com/agext/levenshtein
@@ -73,6 +73,8 @@ github.com/google/go-cmp/cmp
73github.com/google/go-cmp/cmp/internal/diff 73github.com/google/go-cmp/cmp/internal/diff
74github.com/google/go-cmp/cmp/internal/function 74github.com/google/go-cmp/cmp/internal/function
75github.com/google/go-cmp/cmp/internal/value 75github.com/google/go-cmp/cmp/internal/value
76# github.com/google/go-querystring v1.0.0
77github.com/google/go-querystring/query
76# github.com/googleapis/gax-go/v2 v2.0.3 78# github.com/googleapis/gax-go/v2 v2.0.3
77github.com/googleapis/gax-go/v2 79github.com/googleapis/gax-go/v2
78# github.com/hashicorp/errwrap v1.0.0 80# github.com/hashicorp/errwrap v1.0.0
diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown
index d25a866..db2e56d 100644
--- a/website/docs/index.html.markdown
+++ b/website/docs/index.html.markdown
@@ -3,7 +3,7 @@ layout: "statuscake"
3page_title: "Provider: StatusCake" 3page_title: "Provider: StatusCake"
4sidebar_current: "docs-statuscake-index" 4sidebar_current: "docs-statuscake-index"
5description: |- 5description: |-
6 The StatusCake provider configures tests in StatusCake. 6 The StatusCake provider configures tests and in StatusCake.
7--- 7---
8 8
9# StatusCake Provider 9# StatusCake Provider
@@ -36,4 +36,15 @@ resource "statuscake_test" "google" {
36 check_rate = 300 36 check_rate = 300
37 contact_id = 12345 37 contact_id = 12345
38} 38}
39
40resource "statuscake_ssl" "google" {
41 domain = "https://www.google.com"
42 contact_groups_c = "3,12"
43 checkrate = 3600
44 alert_at = "18,71,344"
45 alert_reminder = true
46 alert_expiry = true
47 alert_broken = false
48 alert_mixed = true
49}
39``` 50```
diff --git a/website/docs/r/ssl.html.markdown b/website/docs/r/ssl.html.markdown
new file mode 100644
index 0000000..4b768dd
--- /dev/null
+++ b/website/docs/r/ssl.html.markdown
@@ -0,0 +1,72 @@
1---
2layout: "statuscake"
3page_title: "StatusCake: statuscake_ssl"
4sidebar_current: "docs-statuscake-ssl"
5description: |-
6 The statuscake_ssl resource allows StatusCake ssl tests to be managed by Terraform.
7---
8
9# statuscake\_ssl
10
11The ssl resource allows StatusCake ssl tests to be managed by Terraform.
12
13## Example Usage
14
15```hcl
16resource "statuscake_ssl" "google" {
17 domain = "https://www.google.com"
18 contact_groups_c = "3,12"
19 checkrate = 3600
20 alert_at = "18,71,344"
21 alert_reminder = true
22 alert_expiry = true
23 alert_broken = false
24 alert_mixed = true
25}
26```
27
28## Argument Reference
29
30The following arguments are supported:
31
32* `domain` - (Required) URL to check, has to start with https://
33* `contact_groups_c` - (Required) Contactgroup IDs, separated by a comma. Can be an empty string
34* `checkrate` - (Required) Checkrate in seconds. Accepted: [300, 600, 1800, 3600, 86400, 2073600]
35* `alert_at` - (Required) When you wish to receive reminders. Must be exactly 3 numeric values seperated by commas
36* `alert_reminder` - (Required) Set to true to enable reminder alerts. False to disable. Also see alert_at
37* `alert_expiry` - (Required) Set to true to enable expiration alerts. False to disable
38* `alert_broken` - (Required) Set to true to enable broken alerts. False to disable
39* `alert_mixed` - (Required) Set to true to enable mixed content alerts. False to disable
40
41## Attributes Reference
42
43The following attribute is exported:
44
45* `ssl_id` - A unique identifier for the ssl test.
46* `issuer_cn` -
47* `paused` - Whether the test has been paused (Administrative only)
48* `cert_score` - Certificate score in %
49* `cipher_score` - Cipher strength in %
50* `cert_status` - Certificate status
51* `cipher` - Cipher code (SSL spec)
52* `valid_from_utc` - Certificate Validity Start (In UTC/GMT+0)
53* `valid_until_utc` - Certificate Validity End (In UTC/GMT+0)
54* `mixed_content` - Mixed content if present. Empty array if not.
55* `last_reminder` - The last reminder to be detected (days)
56* `last_updated_utc` - When the certificate has last been updated (Either by user action or by testing)
57* `flags` :
58 * `is_extended` : Certificate has an Extended Validation certificate
59 * `has_pfs` : Certificate has Perfect Forward Secrecy enabled
60 * `is_broken` : Certificate has errors
61 * `is_expired` : Certificate is expired
62 * `is_missing` : Certificate not present
63 * `is_revoked` : Certificate has been revoked by CA
64 * `is_mixed` : Website contains Mixed Content
65
66## Import
67
68StatusCake ssl tests can be imported using the ssl id, e.g.
69
70```
71tf import statuscake_ssl.example 123
72```
diff --git a/website/statuscake.erb b/website/statuscake.erb
index d5edf59..652552f 100644
--- a/website/statuscake.erb
+++ b/website/statuscake.erb
@@ -16,6 +16,9 @@
16 <li<%= sidebar_current("docs-statuscake-test") %>> 16 <li<%= sidebar_current("docs-statuscake-test") %>>
17 <a href="/docs/providers/statuscake/r/test.html">statuscake_test</a> 17 <a href="/docs/providers/statuscake/r/test.html">statuscake_test</a>
18 </li> 18 </li>
19 <li<%= sidebar_current("docs-statuscake-ssl") %>>
20 <a href="/docs/providers/statuscake/r/ssl.html">statuscake_ssl</a>
21 </li>
19 </ul> 22 </ul>
20 </li> 23 </li>
21 </ul> 24 </ul>