From 24c95871c559e4d0a284f4c245d6e7afaeb5b9a7 Mon Sep 17 00:00:00 2001 From: Ivan Schwarz Date: Fri, 14 Jun 2019 15:41:14 +0200 Subject: Update client dependency --- .../github.com/DreamItGetIT/statuscake/.gitignore | 1 + .../github.com/DreamItGetIT/statuscake/.travis.yml | 14 +++++++ .../github.com/DreamItGetIT/statuscake/Gopkg.lock | 48 ++++++++++++++++++++++ .../github.com/DreamItGetIT/statuscake/Gopkg.toml | 38 +++++++++++++++++ .../github.com/DreamItGetIT/statuscake/README.md | 2 + vendor/github.com/DreamItGetIT/statuscake/doc.go | 12 +++++- vendor/github.com/DreamItGetIT/statuscake/makefile | 6 ++- .../DreamItGetIT/statuscake/responses.go | 2 + vendor/github.com/DreamItGetIT/statuscake/tests.go | 29 ++++++++++--- vendor/modules.txt | 2 +- 10 files changed, 145 insertions(+), 9 deletions(-) create mode 100644 vendor/github.com/DreamItGetIT/statuscake/.gitignore create mode 100644 vendor/github.com/DreamItGetIT/statuscake/.travis.yml create mode 100644 vendor/github.com/DreamItGetIT/statuscake/Gopkg.lock create mode 100644 vendor/github.com/DreamItGetIT/statuscake/Gopkg.toml (limited to 'vendor') diff --git a/vendor/github.com/DreamItGetIT/statuscake/.gitignore b/vendor/github.com/DreamItGetIT/statuscake/.gitignore new file mode 100644 index 0000000..22d0d82 --- /dev/null +++ b/vendor/github.com/DreamItGetIT/statuscake/.gitignore @@ -0,0 +1 @@ +vendor diff --git a/vendor/github.com/DreamItGetIT/statuscake/.travis.yml b/vendor/github.com/DreamItGetIT/statuscake/.travis.yml new file mode 100644 index 0000000..c7bad4e --- /dev/null +++ b/vendor/github.com/DreamItGetIT/statuscake/.travis.yml @@ -0,0 +1,14 @@ +language: go +go: + - "1.x" + +env: + - DEP_VERSION="0.5.0" + +before_install: + # Install dep + - curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep + - chmod +x $GOPATH/bin/dep + + # Install golint + - go get golang.org/x/lint/golint diff --git a/vendor/github.com/DreamItGetIT/statuscake/Gopkg.lock b/vendor/github.com/DreamItGetIT/statuscake/Gopkg.lock new file mode 100644 index 0000000..c5b189e --- /dev/null +++ b/vendor/github.com/DreamItGetIT/statuscake/Gopkg.lock @@ -0,0 +1,48 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + digest = "1:27dce89d419e7be582ae735623fb0b538012e62b08a87c0308c3b360de2a74b0" + name = "github.com/DreamItGetIT/statuscake" + packages = ["."] + pruneopts = "UT" + revision = "49ae6aae1769b896774d7e860e620f1bd8221355" + +[[projects]] + digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" + name = "github.com/davecgh/go-spew" + packages = ["spew"] + pruneopts = "UT" + revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" + version = "v1.1.1" + +[[projects]] + digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" + name = "github.com/pmezard/go-difflib" + packages = ["difflib"] + pruneopts = "UT" + revision = "792786c7400a136282c1664665ae0a8db921c6c2" + version = "v1.0.0" + +[[projects]] + digest = "1:c40d65817cdd41fac9aa7af8bed56927bb2d6d47e4fea566a74880f5c2b1c41e" + name = "github.com/stretchr/testify" + packages = [ + "assert", + "require", + ] + pruneopts = "UT" + revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" + version = "v1.2.2" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + input-imports = [ + "github.com/DreamItGetIT/statuscake", + "github.com/stretchr/testify/assert", + "github.com/stretchr/testify/require", + ] + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/DreamItGetIT/statuscake/Gopkg.toml b/vendor/github.com/DreamItGetIT/statuscake/Gopkg.toml new file mode 100644 index 0000000..b0c1687 --- /dev/null +++ b/vendor/github.com/DreamItGetIT/statuscake/Gopkg.toml @@ -0,0 +1,38 @@ +# Gopkg.toml example +# +# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[[constraint]] + branch = "master" + name = "github.com/DreamItGetIT/statuscake" + +[[constraint]] + name = "github.com/stretchr/testify" + version = "1.2.2" + +[prune] + go-tests = true + unused-packages = true diff --git a/vendor/github.com/DreamItGetIT/statuscake/README.md b/vendor/github.com/DreamItGetIT/statuscake/README.md index f1e4eaf..0806028 100644 --- a/vendor/github.com/DreamItGetIT/statuscake/README.md +++ b/vendor/github.com/DreamItGetIT/statuscake/README.md @@ -1,5 +1,7 @@ # statuscake +[![Build Status](https://travis-ci.org/DreamItGetIT/statuscake.svg?branch=master)](https://travis-ci.org/DreamItGetIT/statuscake) + `statuscake` is a Go pkg that implements a client for the [statuscake]("https://statuscake.com") API. More documentation and examples at [http://godoc.org/github.com/DreamItGetIT/statuscake](http://godoc.org/github.com/DreamItGetIT/statuscake). diff --git a/vendor/github.com/DreamItGetIT/statuscake/doc.go b/vendor/github.com/DreamItGetIT/statuscake/doc.go index fa68d94..d45680e 100644 --- a/vendor/github.com/DreamItGetIT/statuscake/doc.go +++ b/vendor/github.com/DreamItGetIT/statuscake/doc.go @@ -11,6 +11,13 @@ // log.Fatal(err) // } // +// v := url.Values{} +// v.Set("tags", "test1,test2") +// testsWithFilter, err := c.Tests().AllWithFilter(v) +// if err != nil { +// log.Fatal(err) +// } +// // // delete a `Test` // err = c.Tests().Delete(TestID) // @@ -25,7 +32,10 @@ // log.Fatal(err) // } // -// t2 := c.Tests().Update(t) +// t2, err := c.Tests().Update(t) +// if err != nil { +// log.Fatal(err) +// } // fmt.Printf("New Test created with id: %d\n", t2.TestID) // // // get Tests details diff --git a/vendor/github.com/DreamItGetIT/statuscake/makefile b/vendor/github.com/DreamItGetIT/statuscake/makefile index 946f6d9..6149bbf 100644 --- a/vendor/github.com/DreamItGetIT/statuscake/makefile +++ b/vendor/github.com/DreamItGetIT/statuscake/makefile @@ -1,6 +1,6 @@ -.PHONY: default lint test +.PHONY: default deps lint test -default: lint test +default: deps lint test lint: @golint ./... @@ -9,3 +9,5 @@ lint: test: go test ${GOTEST_ARGS} ./... +deps: + dep ensure \ No newline at end of file diff --git a/vendor/github.com/DreamItGetIT/statuscake/responses.go b/vendor/github.com/DreamItGetIT/statuscake/responses.go index e8d4af4..ec74a63 100644 --- a/vendor/github.com/DreamItGetIT/statuscake/responses.go +++ b/vendor/github.com/DreamItGetIT/statuscake/responses.go @@ -61,6 +61,7 @@ type detailResponse struct { UseJar int `json:"UseJar"` PostRaw string `json:"PostRaw"` FinalEndpoint string `json:"FinalEndpoint"` + EnableSSLWarning bool `json:"EnableSSLWarning"` FollowRedirect bool `json:"FollowRedirect"` StatusCodes []string `json:"StatusCodes"` } @@ -96,6 +97,7 @@ func (d *detailResponse) test() *Test { UseJar: d.UseJar, PostRaw: d.PostRaw, FinalEndpoint: d.FinalEndpoint, + EnableSSLAlert: d.EnableSSLWarning, FollowRedirect: d.FollowRedirect, StatusCodes: strings.Join(d.StatusCodes[:], ","), } diff --git a/vendor/github.com/DreamItGetIT/statuscake/tests.go b/vendor/github.com/DreamItGetIT/statuscake/tests.go index c6e6dd2..2a2383d 100644 --- a/vendor/github.com/DreamItGetIT/statuscake/tests.go +++ b/vendor/github.com/DreamItGetIT/statuscake/tests.go @@ -42,7 +42,7 @@ type Test struct { // Current status at last test Status string `json:"Status"` - // 7 Day Uptime + // 1 Day Uptime Uptime float64 `json:"Uptime"` // Any test locations seperated by a comma (using the Node Location IDs) @@ -75,7 +75,7 @@ type Test struct { Branding int `json:"Branding" querystring:"Branding"` // Used internally by the statuscake API - WebsiteHost string `json:"WebsiteHost"` + WebsiteHost string `json:"WebsiteHost" querystring:"WebsiteHost"` // Enable virus checking or not. 1 to enable Virus int `json:"Virus" querystring:"Virus"` @@ -110,6 +110,9 @@ type Test struct { // Use to specify the expected Final URL in the testing process FinalEndpoint string `json:"FinalEndpoint" querystring:"FinalEndpoint"` + // Use to enable SSL validation + EnableSSLAlert bool `json:"EnableSSLAlert" querystring:"EnableSSLAlert"` + // Use to specify whether redirects should be followed FollowRedirect bool `json:"FollowRedirect" querystring:"FollowRedirect"` } @@ -166,9 +169,11 @@ func (t *Test) Validate() error { e["FinalEndpoint"] = "must be a Valid URL" } - var jsonVerifiable map[string]interface{} - if json.Unmarshal([]byte(t.CustomHeader), &jsonVerifiable) != nil { - e["CustomHeader"] = "must be provided as json string" + if t.CustomHeader != "" { + var jsonVerifiable map[string]interface{} + if json.Unmarshal([]byte(t.CustomHeader), &jsonVerifiable) != nil { + e["CustomHeader"] = "must be provided as json string" + } } if len(e) > 0 { @@ -244,6 +249,7 @@ func valueToQueryStringValue(v reflect.Value) string { // Tests is a client that implements the `Tests` API. type Tests interface { All() ([]*Test, error) + AllWithFilter(url.Values) ([]*Test, error) Detail(int) (*Test, error) Update(*Test) (*Test, error) Delete(TestID int) error @@ -272,6 +278,19 @@ func (tt *tests) All() ([]*Test, error) { return tests, err } +func (tt *tests) AllWithFilter(filterOptions url.Values) ([]*Test, error) { + resp, err := tt.client.get("/Tests", filterOptions) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + var tests []*Test + err = json.NewDecoder(resp.Body).Decode(&tests) + + return tests, err +} + func (tt *tests) Update(t *Test) (*Test, error) { resp, err := tt.client.put("/Tests/Update", t.ToURLValues()) if err != nil { diff --git a/vendor/modules.txt b/vendor/modules.txt index e083517..b1009a7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -6,7 +6,7 @@ cloud.google.com/go/internal/optional cloud.google.com/go/internal/trace cloud.google.com/go/internal/version cloud.google.com/go/compute/metadata -# github.com/DreamItGetIT/statuscake v0.0.0-20180728152938-85edefcbdaa3 +# github.com/DreamItGetIT/statuscake v0.0.0-20190218105717-471b24d8edfb github.com/DreamItGetIT/statuscake # github.com/agext/levenshtein v1.2.2 github.com/agext/levenshtein -- cgit v1.2.3