diff --git a/frontend/src/components/Dashboard/Variables.vue b/frontend/src/components/Dashboard/Variables.vue
index 3dc1ec9d..d60d1f19 100644
--- a/frontend/src/components/Dashboard/Variables.vue
+++ b/frontend/src/components/Dashboard/Variables.vue
@@ -4,7 +4,7 @@
You can insert dynamic fields within the notifier payloads for some notifiers.
- Checkout the Service struct and the Failures struct and create variables in golang template format.
+ Checkout the Service struct and the Failures struct and create variables in golang template format.
diff --git a/frontend/src/components/Index/Footer.vue b/frontend/src/components/Index/Footer.vue
index f4bf4f31..eff3e58d 100644
--- a/frontend/src/components/Index/Footer.vue
+++ b/frontend/src/components/Index/Footer.vue
@@ -6,7 +6,7 @@
{{$t('dashboard')}}
-
+
Statping v{{core.version}} made with
diff --git a/frontend/src/components/Index/Header.vue b/frontend/src/components/Index/Header.vue
index 3d534889..3957a4c6 100644
--- a/frontend/src/components/Index/Header.vue
+++ b/frontend/src/components/Index/Header.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/frontend/src/components/Service/ServiceTopStats.vue b/frontend/src/components/Service/ServiceTopStats.vue
index 9104b549..0a9a48ef 100644
--- a/frontend/src/components/Service/ServiceTopStats.vue
+++ b/frontend/src/components/Service/ServiceTopStats.vue
@@ -6,11 +6,11 @@
{{service.online_24_hours}} %
- {{$t('last_uptime', [24, $tc('hour', 24)])}}
+ {{$t('last_uptime')}} 24 {{$tc('hour', 24)}}
{{service.online_7_days}} %
- {{$t('last_uptime', [7, $tc('day', 7)])}}
+ {{$t('last_uptime')}} 7 {{$tc('day', 7)}}
diff --git a/frontend/src/forms/CoreSettings.vue b/frontend/src/forms/CoreSettings.vue
index 0f394af9..ac09e3de 100644
--- a/frontend/src/forms/CoreSettings.vue
+++ b/frontend/src/forms/CoreSettings.vue
@@ -1,7 +1,7 @@
diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue
index 678ca796..9112a655 100644
--- a/frontend/src/pages/Login.vue
+++ b/frontend/src/pages/Login.vue
@@ -2,7 +2,7 @@
-
+
diff --git a/frontend/src/pages/Logs.vue b/frontend/src/pages/Logs.vue
index 293f84df..e5536823 100644
--- a/frontend/src/pages/Logs.vue
+++ b/frontend/src/pages/Logs.vue
@@ -61,7 +61,7 @@ export default {
const ts = data.match(/[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]/gm)
return {
time: ts[0],
- message: data.split(ts+": ")[1]
+ message: data.split(ts+": ")[1] || ''
}
},
cleanLog(l) {
diff --git a/frontend/src/pages/Settings.vue b/frontend/src/pages/Settings.vue
index e6e5be97..77494623 100644
--- a/frontend/src/pages/Settings.vue
+++ b/frontend/src/pages/Settings.vue
@@ -8,10 +8,10 @@
Update {{github.tag_name}} Available
@@ -46,26 +46,30 @@
- Statping {{$t('links')}}
+ Statping-ng {{$t('links')}}
-
+
+ Statping-ng
+
+
+
{{$t('docs')}}
-
+
API {{$t('docs')}}
-
+
{{$t('changelog')}}
-
+
{{$t('repo')}}
- Statping v{{core.version}}
- {{core.commit.slice(0,8)}}
+ Statping-ng v{{core.version}}
+ {{core.commit.slice(0,8)}}
diff --git a/frontend/vue.config.js b/frontend/vue.config.js
index 8a3ee963..4887eb6c 100644
--- a/frontend/vue.config.js
+++ b/frontend/vue.config.js
@@ -1,13 +1,13 @@
module.exports = {
- baseUrl: '/',
+ publicPath: '/',
assetsDir: 'assets',
filenameHashing: false,
- productionTip: process.env.NODE_ENV !== 'production',
- devtools: process.env.NODE_ENV !== 'production',
- performance: process.env.NODE_ENV !== 'production',
+ // productionTip: process.env.NODE_ENV !== 'production',
+ // devtools: process.env.NODE_ENV !== 'production',
+ // performance: process.env.NODE_ENV !== 'production',
devServer: {
disableHostCheck: true,
- proxyTable: {
+ proxy: {
'/api': {
logLevel: 'debug',
target: 'http://0.0.0.0:8585',
diff --git a/go.mod b/go.mod
index 45da8dd3..4e2a4e4d 100644
--- a/go.mod
+++ b/go.mod
@@ -1,10 +1,10 @@
-module github.com/statping/statping
+module github.com/statping-ng/statping-ng
-// +heroku goVersion go1.14
-go 1.14
+// +heroku goVersion go1.17
+go 1.17
require (
- github.com/GeertJohan/go.rice v1.0.0
+ github.com/GeertJohan/go.rice v1.0.2
github.com/aws/aws-sdk-go v1.30.20
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fatih/structs v1.1.0
@@ -12,8 +12,7 @@ require (
github.com/foomo/tlsconfig v0.0.0-20180418120404-b67861b076c9
github.com/getsentry/sentry-go v0.5.1
github.com/go-mail/mail v2.3.1+incompatible
- github.com/golang/protobuf v1.4.2 // indirect
- github.com/google/go-cmp v0.5.1 // indirect
+ github.com/go-ping/ping v1.1.0
github.com/gorilla/mux v1.7.4
github.com/hako/durafmt v0.0.0-20200605151348-3a43fc422dd9
github.com/jinzhu/gorm v1.9.12
@@ -23,20 +22,111 @@ require (
github.com/sirupsen/logrus v1.6.0
github.com/spf13/cobra v1.0.0
github.com/spf13/viper v1.6.3
- github.com/statping/emails v1.0.0
- github.com/stretchr/objx v0.2.0 // indirect
+ github.com/statping-ng/emails v1.0.3
github.com/stretchr/testify v1.6.1
github.com/t-tiger/gorm-bulk-insert/v2 v2.0.1
- go.uber.org/atomic v1.6.0 // indirect
- golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
- golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 // indirect
- golang.org/x/net v0.0.0-20200904194848-62affa334b73 // indirect
+ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
- golang.org/x/text v0.3.3 // indirect
- golang.org/x/tools v0.0.0-20201012192620-5bd05386311b // indirect
- google.golang.org/appengine v1.6.6 // indirect
google.golang.org/grpc v1.28.1
- google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/yaml.v2 v2.3.0
)
+
+require (
+ cloud.google.com/go v0.56.0 // indirect
+ github.com/Azure/azure-sdk-for-go v41.3.0+incompatible // indirect
+ github.com/Azure/go-autorest/autorest v0.10.0 // indirect
+ github.com/Azure/go-autorest/autorest/adal v0.8.3 // indirect
+ github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 // indirect
+ github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 // indirect
+ github.com/Azure/go-autorest/autorest/date v0.2.0 // indirect
+ github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect
+ github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
+ github.com/Azure/go-autorest/logger v0.1.0 // indirect
+ github.com/Azure/go-autorest/tracing v0.5.0 // indirect
+ github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 // indirect
+ github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.11 // indirect
+ github.com/aliyun/alibaba-cloud-sdk-go v1.61.131 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/cenkalti/backoff/v4 v4.0.2 // indirect
+ github.com/cloudflare/cloudflare-go v0.11.6 // indirect
+ github.com/cpu/goacmedns v0.0.2 // indirect
+ github.com/daaku/go.zipexe v1.0.0 // indirect
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/dimchansky/utfbom v1.1.0 // indirect
+ github.com/dnsimple/dnsimple-go v0.60.0 // indirect
+ github.com/exoscale/egoscale v0.18.1 // indirect
+ github.com/fsnotify/fsnotify v1.5.1 // indirect
+ github.com/go-acme/lego/v3 v3.7.0 // indirect
+ github.com/go-errors/errors v1.0.2 // indirect
+ github.com/go-resty/resty/v2 v2.2.0 // indirect
+ github.com/go-sql-driver/mysql v1.5.0 // indirect
+ github.com/gofrs/uuid v3.2.0+incompatible // indirect
+ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
+ github.com/golang/protobuf v1.4.2 // indirect
+ github.com/google/go-querystring v1.0.0 // indirect
+ github.com/google/uuid v1.3.0 // indirect
+ github.com/googleapis/gax-go/v2 v2.0.5 // indirect
+ github.com/gophercloud/gophercloud v0.10.0 // indirect
+ github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
+ github.com/hashicorp/go-retryablehttp v0.6.6 // indirect
+ github.com/hashicorp/hcl v1.0.0 // indirect
+ github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df // indirect
+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
+ github.com/jinzhu/inflection v1.0.0 // indirect
+ github.com/jmespath/go-jmespath v0.3.0 // indirect
+ github.com/json-iterator/go v1.1.9 // indirect
+ github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b // indirect
+ github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
+ github.com/labbsr0x/bindman-dns-webhook v1.0.2 // indirect
+ github.com/labbsr0x/goh v1.0.1 // indirect
+ github.com/lextoumbourou/goodhosts v2.1.0+incompatible // indirect
+ github.com/lib/pq v1.3.0 // indirect
+ github.com/linode/linodego v0.14.0 // indirect
+ github.com/liquidweb/liquidweb-go v1.6.1 // indirect
+ github.com/magiconair/properties v1.8.1 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
+ github.com/miekg/dns v1.1.29 // indirect
+ github.com/mitchellh/go-homedir v1.1.0 // indirect
+ github.com/mitchellh/mapstructure v1.2.2 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.1 // indirect
+ github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04 // indirect
+ github.com/nrdcg/auroradns v1.0.1 // indirect
+ github.com/nrdcg/dnspod-go v0.4.0 // indirect
+ github.com/nrdcg/goinwx v0.6.1 // indirect
+ github.com/nrdcg/namesilo v0.2.1 // indirect
+ github.com/oracle/oci-go-sdk v17.4.0+incompatible // indirect
+ github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014 // indirect
+ github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
+ github.com/pelletier/go-toml v1.7.0 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect
+ github.com/prometheus/common v0.6.0 // indirect
+ github.com/prometheus/procfs v0.0.3 // indirect
+ github.com/sacloud/libsacloud v1.36.1 // indirect
+ github.com/spf13/afero v1.2.2 // indirect
+ github.com/spf13/cast v1.3.1 // indirect
+ github.com/spf13/jwalterweatherman v1.1.0 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ github.com/subosito/gotenv v1.2.0 // indirect
+ github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7 // indirect
+ github.com/transip/gotransip/v6 v6.0.2 // indirect
+ github.com/vultr/govultr v0.3.3 // indirect
+ go.opencensus.io v0.22.3 // indirect
+ go.uber.org/ratelimit v0.1.0 // indirect
+ golang.org/x/net v0.2.0 // indirect
+ golang.org/x/sync v0.1.0 // indirect
+ golang.org/x/sys v0.2.0 // indirect
+ golang.org/x/text v0.4.0 // indirect
+ golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect
+ google.golang.org/api v0.21.0 // indirect
+ google.golang.org/appengine v1.6.6 // indirect
+ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
+ google.golang.org/protobuf v1.25.0 // indirect
+ gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
+ gopkg.in/ini.v1 v1.55.0 // indirect
+ gopkg.in/ns1/ns1-go.v2 v2.3.0 // indirect
+ gopkg.in/square/go-jose.v2 v2.5.0 // indirect
+ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
+)
diff --git a/go.sum b/go.sum
index 60a74354..dec75f9e 100755
--- a/go.sum
+++ b/go.sum
@@ -1,4 +1,3 @@
-cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
@@ -74,16 +73,15 @@ github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EF
github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w=
github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1MRDJM=
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
-github.com/GeertJohan/go.incremental v1.0.0 h1:7AH+pY1XUgQE4Y1HcXYaMqAI0m9yrFqo/jt0CW30vsg=
github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0=
-github.com/GeertJohan/go.rice v1.0.0 h1:KkI6O9uMaQU3VEKaj01ulavtF7o1fWT7+pk/4voiMLQ=
github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0=
+github.com/GeertJohan/go.rice v1.0.2 h1:PtRw+Tg3oa3HYwiDBZyvOJ8LdIyf6lAovJJtr7YOAYk=
+github.com/GeertJohan/go.rice v1.0.2/go.mod h1:af5vUNlDNkCjOZeSGFgIJxDje9qdjsO6hshx0gTmZt4=
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 h1:xPMsUicZ3iosVPSIP7bW5EcGUzjiiMl1OYTe14y/R24=
github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks=
-github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398 h1:WDC6ySpJzbxGWFh4aMxFFC28wwGp5pEuoTtvA4q/qQ4=
github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
@@ -91,7 +89,6 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY
github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.8/go.mod h1:aVvklgKsPENRkl29bNwrHISa1F+YLGTHArMxZMBqWM8=
github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.11 h1:QGjNHMwoPYxE5NpOAc8kpd2KTY293/oFk5BWdjkza+k=
github.com/akamai/AkamaiOPEN-edgegrid-golang v0.9.11/go.mod h1:L+HB2uBoDgi3+r1pJEJcbGwyyHhd2QXaGsKLbDwtm8Q=
-github.com/akavel/rsrc v0.8.0 h1:zjWn7ukO9Kc5Q62DOJCcxGpXC18RawVtYAGdz2aLlfw=
github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
@@ -104,7 +101,6 @@ github.com/aws/aws-sdk-go v1.30.20 h1:ktsy2vodSZxz/arYqo7DlpkIeNohHL+4Rmjdo7YGtr
github.com/aws/aws-sdk-go v1.30.20/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
-github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
@@ -113,7 +109,6 @@ github.com/cenkalti/backoff/v4 v4.0.2 h1:JIufpQLbh4DkbQoii76ItQIUFzevQSqOLZca4ea
github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg=
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
@@ -134,10 +129,8 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpu/goacmedns v0.0.2 h1:hYAgjnPu7HogTgb8trqQouR/RrBgXq1TPBgmxbK9eRA=
github.com/cpu/goacmedns v0.0.2/go.mod h1:4MipLkI+qScwqtVxcNO6okBhbgRrr7/tKXUSgSL0teQ=
-github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY=
@@ -145,7 +138,6 @@ github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CL
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM=
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/denisenkom/go-mssqldb v0.0.0-20200206145737-bbfc9a55622e h1:LzwWXEScfcTu7vUZNlDDWDARoSGEtvlDKK2BYHowNeE=
github.com/denisenkom/go-mssqldb v0.0.0-20200206145737-bbfc9a55622e/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
@@ -160,7 +152,6 @@ github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s9
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/dnsimple/dnsimple-go v0.60.0 h1:N+q+ML1CZGf+5r4udu9Opy7WJNtOaFT9aM86Af9gLhk=
github.com/dnsimple/dnsimple-go v0.60.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg=
-github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
@@ -183,10 +174,10 @@ github.com/foomo/simplecert v1.7.5 h1:5654G52nAaFGdIjQsjCbccqkQraN9oa2qvh4Ugtc+r
github.com/foomo/simplecert v1.7.5/go.mod h1:RojYROT3nMm8GtJZAPUz0sM5YuSQ/6MIdZvtLTqsxbc=
github.com/foomo/tlsconfig v0.0.0-20180418120404-b67861b076c9 h1:RPOsDNbnDUFaSt/3bCxUsaGCJsKqA6dGubevl20nE9g=
github.com/foomo/tlsconfig v0.0.0-20180418120404-b67861b076c9/go.mod h1:OdiGKKgTAfMv7x9Hh9qYFueue77tr09LUAxwy2+M8wY=
-github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
+github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc=
github.com/getsentry/sentry-go v0.5.1 h1:MIPe7ScHADsrK2vznqmhksIUFxq7m0JfTh+ZIMkI+VQ=
github.com/getsentry/sentry-go v0.5.1/go.mod h1:B8H7x8TYDPkeWPRzGpIiFO97LZP6rL8A3hEt8lUItMw=
@@ -197,7 +188,6 @@ github.com/go-acme/lego/v3 v3.7.0 h1:qC5/8/CbltyAE8fGLE6bGlqucj7pXc/vBxiLwLOsmAQ
github.com/go-acme/lego/v3 v3.7.0/go.mod h1:4eDjjYkAsDXyNcwN8IhhZAwxz9Ltiks1Zmpv0q20J7A=
github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s=
-github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-errors/errors v1.0.2 h1:xMxH9j2fNg/L4hLn/4y3M0IUsn0M6Wbu/Uh9QlOfBh4=
github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
@@ -210,10 +200,11 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V
github.com/go-mail/mail v2.3.1+incompatible h1:UzNOn0k5lpfVtO31cK3hn6I4VEVGhe3lX8AJBAxXExM=
github.com/go-mail/mail v2.3.1+incompatible/go.mod h1:VPWjmmNyRsWXQZHVHT3g0YbIINUkSmuKOiLIDkWbL6M=
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
+github.com/go-ping/ping v1.1.0 h1:3MCGhVX4fyEUuhsfwPrsEdQw6xspHkv5zHsiSoDFZYw=
+github.com/go-ping/ping v1.1.0/go.mod h1:xIFjORFzTxqIV/tDVGO4eDy/bLuSyawEeojSm3GfRGk=
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8=
github.com/go-resty/resty/v2 v2.2.0 h1:vgZ1cdblp8Aw4jZj3ZsKh6yKAlMg3CHMrqFSFFd+jgY=
github.com/go-resty/resty/v2 v2.2.0/go.mod h1:nYW/8rxqQCmI3bPz9Fsmjbr2FBjGuR2Mzt6kDh3zZ7w=
-github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
@@ -223,7 +214,6 @@ github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6Wezm
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
-github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
@@ -244,23 +234,19 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls=
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
-github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/gomarkdown/markdown v0.0.0-20200820230800-3724143f5294 h1:rSb2ZQZ3B1rlWBWamxobyn0jTuGZHbPO5Rmjw48uWRM=
github.com/gomarkdown/markdown v0.0.0-20200820230800-3724143f5294/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@@ -268,7 +254,6 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
@@ -283,8 +268,10 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
-github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
+github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
@@ -325,20 +312,15 @@ github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhK
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/iris-contrib/blackfriday v2.0.0+incompatible h1:o5sHQHHm0ToHUlAJSTjW9UWicjJSDDauOOQ2AHuIVp4=
github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI=
-github.com/iris-contrib/go.uuid v2.0.0+incompatible h1:XZubAYg61/JwnJNbZilGjf3b3pB80+OQg2qf6c8BfWE=
github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI=
-github.com/iris-contrib/schema v0.0.1 h1:10g/WnoRR+U+XXHWKBHeNy/+tZmM2kcAVGLOsz+yaDA=
github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw=
-github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jinzhu/gorm v1.9.12 h1:Drgk1clyWT9t9ERbzHza6Mj/8FY/CqMyVzOiHviMo6Q=
github.com/jinzhu/gorm v1.9.12/go.mod h1:vhTjlKSJUTWNtcbQtrMBFCxy7eXTzeCAzfL5fBZT/Qs=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
-github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M=
github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E=
github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
@@ -347,7 +329,6 @@ github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2
github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
-github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
@@ -361,26 +342,19 @@ github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVE
github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
-github.com/kataras/golog v0.0.9 h1:J7Dl82843nbKQDrQM/abbNJZvQjS6PfmkkffhOTXEpM=
github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk=
-github.com/kataras/iris/v12 v12.0.1 h1:Wo5S7GMWv5OAzJmvFTvss/C4TS1W0uo6LkDlSymT4rM=
github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U=
github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw=
-github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d h1:V5Rs9ztEWdp58oayPq/ulmlqJJZeJP6pP79uP3qjcao=
github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
-github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
-github.com/klauspost/compress v1.9.0 h1:GhthINjveNZAdFUD8QoQYfjxnOONZgztK/Yr6M23UTY=
github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/kolo/xmlrpc v0.0.0-20190717152603-07c4ee3fd181/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ=
github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b h1:DzHy0GlWeF0KAglaTMY7Q+khIFoG8toHP+wLFBVBQJc=
github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ=
-github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
-github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -398,7 +372,6 @@ github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvf
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/lextoumbourou/goodhosts v2.1.0+incompatible h1:1U1p5Z1wrXl23/fW/GY4zdTbQ8UJbyvrkPbqAZ6tzbw=
github.com/lextoumbourou/goodhosts v2.1.0+incompatible/go.mod h1:89s48k108X3gKDWn8AHk3gUzUGTcMZCCAOsE4QU1bbo=
-github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4=
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU=
github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
@@ -412,17 +385,14 @@ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP
github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
-github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg=
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
-github.com/mattn/go-sqlite3 v2.0.1+incompatible h1:xQ15muvnzGBHpIpdrNi1DA5x0+TcBZzsIDwmw9uTHzw=
github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
@@ -432,7 +402,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg=
github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ=
-github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s=
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
github.com/miekg/dns v1.1.29 h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg=
@@ -440,7 +409,6 @@ github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0=
-github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4=
github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
@@ -457,12 +425,11 @@ github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04/go.mod h1:5sN+Lt1CaY
github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM=
github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
-github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
-github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229 h1:E2B8qYyeSgv5MXpmzZXRNp8IAQ4vjxIjhpAf5hv/tAg=
github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E=
+github.com/nkovacs/streamquote v1.0.0/go.mod h1:BN+NaZ2CmdKqUuTUXUEm9j95B2TRbpOWpxbJYzzgUsc=
github.com/nrdcg/auroradns v1.0.1 h1:m/kBq83Xvy3cU261MOknd8BdnOk12q4lAWM+kOdsC2Y=
github.com/nrdcg/auroradns v1.0.1/go.mod h1:y4pc0i9QXYlFCWrhWrUSIETnZgrf4KuwjDIWmmXo3JI=
github.com/nrdcg/dnspod-go v0.4.0 h1:c/jn1mLZNKF3/osJ6mz3QPxTudvPArXTjpkmYj0uK6U=
@@ -487,7 +454,6 @@ github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014 h1:37VE5TYj2m/FLA9SNr4z
github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014/go.mod h1:joRatxRJaZBsY3JAOEMcoOp05CnZzsx4scTxi95DHyQ=
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
-github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI=
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
@@ -502,7 +468,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
-github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8=
@@ -514,14 +479,12 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCb
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo=
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE=
@@ -531,23 +494,17 @@ github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKc
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
-github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sacloud/libsacloud v1.26.1/go.mod h1:79ZwATmHLIFZIMd7sxA3LwzVy/B77uj3LDoToVTxDoQ=
github.com/sacloud/libsacloud v1.36.1 h1:tCpFjWsvu/2Im8/SDmRZ49SttVXy7nHerobRc1LU9pI=
github.com/sacloud/libsacloud v1.36.1/go.mod h1:P7YAOVmnIn3DKHqCZcUKYUXmSwGBm3yS7IBEjKVSrjg=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
-github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
-github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
-github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
-github.com/sirupsen/logrus v1.5.0 h1:1N5EYkVAPEywqZRJd7cwnRtCb6xJx7NH3T3WUTF980Q=
github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo=
github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
@@ -559,23 +516,18 @@ github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIK
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
-github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
-github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
-github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
-github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
-github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
@@ -583,18 +535,18 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs=
github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw=
-github.com/statping/emails v1.0.0 h1:90hGweEhr8wIFiy34KCkiFqGJlkug2gAQLVR6oSCFNU=
+github.com/statping-ng/emails v1.0.3 h1:33YIG+OT/r7DtXSkoYhnt0rFEtR1KQGBkw3GeZDaQIk=
+github.com/statping-ng/emails v1.0.3/go.mod h1:ulCTLCuyypX6vuyjGtrFD5RRvQhVmV17zyIgR53oYgo=
+github.com/statping-ng/statping-ng v0.90.77/go.mod h1:dqjpNrrd4spZyRn9qZFDp9pD2nzEFmX7wY4x/stYXLY=
github.com/statping/emails v1.0.0/go.mod h1:xFU85jXaiWQadqHqu/jDrGsAn6WPSk1WgKyTVuFm0TI=
github.com/statping/statping v0.90.64/go.mod h1:lbyNPB73IjWtnommV4wSejYfgUT1yLhhqelMjl1ZBb8=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
@@ -602,9 +554,7 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/t-tiger/gorm-bulk-insert/v2 v2.0.1 h1:HGVkRrwDCbmSP6h1CoBDj6l/mhnvsP5JbYaQ4ss0R6o=
github.com/t-tiger/gorm-bulk-insert/v2 v2.0.1/go.mod h1:I3xbaE9ud9/TEXzehwkHx86SyJwqeSNsX2X5oV61jIg=
-github.com/tdewolff/minify/v2 v2.8.0 h1:t3tOPWkTpKhsgxm3IM9Sy8hE2eIt30Oaa+2havJGGIE=
github.com/tdewolff/minify/v2 v2.8.0/go.mod h1:6zN8VLhMfFxNrwHROcboYNo2+huPNu4SV8DPh3PUQ8E=
-github.com/tdewolff/parse/v2 v2.4.4 h1:uMdbQRtYbKR/msP9CbI7li9wK6pionYiH6s7ipltyGY=
github.com/tdewolff/parse/v2 v2.4.4/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho=
github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7 h1:CpHxIaZzVy26GqJn8ptRyto8fuoYOd1v0fXm9bG3wQ8=
@@ -621,18 +571,14 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX
github.com/urfave/cli v1.22.3/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
-github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w=
-github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8=
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
github.com/vultr/govultr v0.1.4/go.mod h1:9H008Uxr/C4vFNGLqKx232C206GL0PBHzOP0809bGNA=
github.com/vultr/govultr v0.3.3 h1:fVaF4h9u3VzTXxFsxvgBUCiM52EiahLqAPkizamLzYM=
github.com/vultr/govultr v0.3.3/go.mod h1:TUuUizMOFc7z+PNMssb6iGjKjQfpw5arIaOLfocVudQ=
-github.com/wellington/go-libsass v0.9.2 h1:6Ims04UDdBs6/CGSVK5JC8FNikR5ssrsMMKE/uaO5Q8=
github.com/wellington/go-libsass v0.9.2/go.mod h1:mxgxgam0N0E+NAUMHLcu20Ccfc3mVpDkyrLDayqfiTs=
-github.com/wellington/sass v0.0.0-20160911051022-cab90b3986d6 h1:qPS12y9iMXyKr2flmOG7RgiyUGkQxQibp1hx7uug9IQ=
github.com/wellington/sass v0.0.0-20160911051022-cab90b3986d6/go.mod h1:ncYBwTYUjmb7N+sZbf8WJYynLivoqFL+U2f8uOX2Yzk=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
@@ -645,6 +591,7 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDf
github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
@@ -654,7 +601,6 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
@@ -679,12 +625,11 @@ golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200406173513-056763e48d71 h1:DOmugCavvUtnUD114C1Wh+UgTgQZ4pMLzXxi1pSt+/Y=
golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200420201142-3c4aac89819a h1:y6sBfNd1b9Wy08a6K1Z1DZc4aXABUN5TKjkYhz7UKmo=
golang.org/x/crypto v0.0.0-20200420201142-3c4aac89819a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -706,7 +651,6 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
@@ -716,8 +660,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 h1:xUIPaMhvROX9dhPvRCenIJtU78+lbEenGbgqB5hfHCQ=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -738,7 +682,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190930134127-c5a3c61f89f3/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -747,17 +690,17 @@ golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200904194848-62affa334b73 h1:MXfv8rhZWmFeqX3GNZRsd6vOLoaCHjYEX3qkRo3YBUA=
golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
+golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -770,10 +713,12 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180622082034-63fc586f45fe/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -796,7 +741,6 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -812,18 +756,27 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f h1:gWF768j/LaZugp8dyS4UwsslYCYz9XgFxvlgsn0n9H8=
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c h1:UIcGWL6/wpCfyGuJnRFJRurA+yj8RrW7Q6x2YMCXt6c=
golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
+golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
+golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -868,13 +821,11 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4 h1:kDtqNkeBrZb8B+atrj50B5XLHpzXXqcCdZPP/ApQ5NY=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
-golang.org/x/tools v0.0.0-20201012192620-5bd05386311b h1:Imq6ZJ3mzzAkU1yzH1aHpiF3lTs3ySLzjH8SEfFdW0A=
golang.org/x/tools v0.0.0-20201012192620-5bd05386311b/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -892,11 +843,9 @@ google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/
google.golang.org/api v0.21.0 h1:zS+Q/CJJnVlXpXQVIz+lH0ZT2lBuT2ac7XD8Y/3w6hY=
google.golang.org/api v0.21.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
-google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
@@ -906,7 +855,6 @@ google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRn
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
@@ -920,7 +868,6 @@ google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfG
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb h1:nAFaltAMbNVA0rixtwvdnqgSVLX3HFUUvMkEklmzbYM=
google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
@@ -935,7 +882,6 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.28.1 h1:C1QC6KzgSiLyBabDi87BbjaGreoRgGUF5nOyvfrAZ1k=
google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
@@ -943,18 +889,15 @@ google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLY
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
-google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
-gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -967,7 +910,6 @@ gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/R
gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0=
gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE=
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
-gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.55.0 h1:E8yzL5unfpW3M6fz/eB7Cb5MQAYSZ7GKo4Qth+N2sgQ=
@@ -985,14 +927,12 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
gopkg.in/square/go-jose.v2 v2.5.0 h1:OZ4sdq+Y+SHfYB7vfthi1Ei8b0vkP8ZPQgUfUwdUSqo=
gopkg.in/square/go-jose.v2 v2.5.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/handlers/api.go b/handlers/api.go
index cb960902..bdd2e343 100644
--- a/handlers/api.go
+++ b/handlers/api.go
@@ -2,18 +2,18 @@ package handlers
import (
"fmt"
- "github.com/statping/statping/types/checkins"
- "github.com/statping/statping/types/configs"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/groups"
- "github.com/statping/statping/types/incidents"
- "github.com/statping/statping/types/messages"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/types/users"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/checkins"
+ "github.com/statping-ng/statping-ng/types/configs"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/groups"
+ "github.com/statping-ng/statping-ng/types/incidents"
+ "github.com/statping-ng/statping-ng/types/messages"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/types/users"
+ "github.com/statping-ng/statping-ng/utils"
"net/http"
"time"
)
diff --git a/handlers/api_test.go b/handlers/api_test.go
index 47859f46..a81dadf8 100644
--- a/handlers/api_test.go
+++ b/handlers/api_test.go
@@ -5,15 +5,15 @@ import (
"encoding/json"
"fmt"
"github.com/pkg/errors"
- _ "github.com/statping/statping/notifiers"
- "github.com/statping/statping/source"
- "github.com/statping/statping/types/checkins"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/groups"
- "github.com/statping/statping/types/messages"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/types/users"
- "github.com/statping/statping/utils"
+ _ "github.com/statping-ng/statping-ng/notifiers"
+ "github.com/statping-ng/statping-ng/source"
+ "github.com/statping-ng/statping-ng/types/checkins"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/groups"
+ "github.com/statping-ng/statping-ng/types/messages"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/types/users"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io/ioutil"
diff --git a/handlers/authentication.go b/handlers/authentication.go
index 1d4e4e39..9948079a 100644
--- a/handlers/authentication.go
+++ b/handlers/authentication.go
@@ -2,9 +2,9 @@ package handlers
import (
"crypto/subtle"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/users"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/users"
+ "github.com/statping-ng/statping-ng/utils"
"net/http"
"strings"
)
diff --git a/handlers/checkin.go b/handlers/checkin.go
index d30a386f..4b5cdbca 100644
--- a/handlers/checkin.go
+++ b/handlers/checkin.go
@@ -1,13 +1,14 @@
package handlers
import (
- "github.com/gorilla/mux"
- "github.com/statping/statping/types/checkins"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
"net"
"net/http"
+
+ "github.com/gorilla/mux"
+ "github.com/statping-ng/statping-ng/types/checkins"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
func findCheckin(r *http.Request) (*checkins.Checkin, string, error) {
@@ -23,8 +24,9 @@ func findCheckin(r *http.Request) (*checkins.Checkin, string, error) {
return checkin, id, nil
}
-func apiAllCheckinsHandler(w http.ResponseWriter, r *http.Request) {
- returnJson(checkins.All(), w, r)
+func apiAllCheckinsHandler(r *http.Request) interface{} {
+ checkins := checkins.All()
+ return checkins
}
func apiCheckinHandler(w http.ResponseWriter, r *http.Request) {
diff --git a/handlers/dashboard.go b/handlers/dashboard.go
index 4d50323d..59e5d088 100644
--- a/handlers/dashboard.go
+++ b/handlers/dashboard.go
@@ -4,18 +4,18 @@ import (
"bytes"
"encoding/json"
"fmt"
- "github.com/statping/statping/source"
- "github.com/statping/statping/types/checkins"
- "github.com/statping/statping/types/configs"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/groups"
- "github.com/statping/statping/types/incidents"
- "github.com/statping/statping/types/messages"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/types/users"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/source"
+ "github.com/statping-ng/statping-ng/types/checkins"
+ "github.com/statping-ng/statping-ng/types/configs"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/groups"
+ "github.com/statping-ng/statping-ng/types/incidents"
+ "github.com/statping-ng/statping-ng/types/messages"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/types/users"
+ "github.com/statping-ng/statping-ng/utils"
"gopkg.in/yaml.v2"
"io"
"io/ioutil"
diff --git a/handlers/function.go b/handlers/function.go
index bf5b134d..20d145fb 100644
--- a/handlers/function.go
+++ b/handlers/function.go
@@ -1,9 +1,9 @@
package handlers
import (
- "github.com/statping/statping/source"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/source"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/utils"
"html/template"
"net/http"
"net/url"
diff --git a/handlers/groups.go b/handlers/groups.go
index d06e2f88..efa0e0ca 100644
--- a/handlers/groups.go
+++ b/handlers/groups.go
@@ -2,9 +2,9 @@ package handlers
import (
"github.com/gorilla/mux"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/groups"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/groups"
+ "github.com/statping-ng/statping-ng/utils"
"net/http"
)
diff --git a/handlers/groups_test.go b/handlers/groups_test.go
index 4e18fac9..84c29dbc 100644
--- a/handlers/groups_test.go
+++ b/handlers/groups_test.go
@@ -1,8 +1,8 @@
package handlers
import (
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/groups"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/groups"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/handlers/handlers.go b/handlers/handlers.go
index 1161d3b4..b143fa5c 100644
--- a/handlers/handlers.go
+++ b/handlers/handlers.go
@@ -3,14 +3,14 @@ package handlers
import (
"encoding/json"
"fmt"
- "github.com/statping/statping/types/errors"
"html/template"
"net/http"
"path"
"time"
- "github.com/statping/statping/source"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/source"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/utils"
)
const (
@@ -73,7 +73,11 @@ func IsReadAuthenticated(r *http.Request) bool {
if ok := hasAuthorizationHeader(r); ok {
return true
}
- return IsFullAuthenticated(r)
+ _, err := getJwtToken(r)
+ if err == nil {
+ return true
+ }
+ return false
}
// IsFullAuthenticated returns true if the HTTP request is authenticated. You can set the environment variable GO_ENV=test
@@ -172,13 +176,24 @@ func ExecuteResponse(w http.ResponseWriter, r *http.Request, file string, data i
if err != nil {
log.Errorln(err)
}
- render, err := source.TmplBox.String(file)
- if err != nil {
- log.Errorln(err)
- }
- // render the page requested
- if _, err := mainTemplate.Parse(render); err != nil {
- log.Errorln(err)
+
+ asset := file
+ if source.UsingAssets(utils.Directory) {
+
+ asset = utils.Directory + "/assets/" + file
+
+ if _, err := mainTemplate.ParseFiles(asset); err != nil {
+ log.Errorln(err)
+ }
+ } else {
+ render, err := source.TmplBox.String(asset)
+ if err != nil {
+ log.Errorln(err)
+ }
+ // render the page requested
+ if _, err := mainTemplate.Parse(render); err != nil {
+ log.Errorln(err)
+ }
}
// execute the template
if err := mainTemplate.Execute(w, data); err != nil {
diff --git a/handlers/incident.go b/handlers/incident.go
index eca411cb..6e1a4d95 100644
--- a/handlers/incident.go
+++ b/handlers/incident.go
@@ -2,9 +2,9 @@ package handlers
import (
"github.com/gorilla/mux"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/incidents"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/incidents"
+ "github.com/statping-ng/statping-ng/utils"
"net/http"
)
diff --git a/handlers/index.go b/handlers/index.go
index b94c5a45..8e54d6f6 100644
--- a/handlers/index.go
+++ b/handlers/index.go
@@ -1,8 +1,8 @@
package handlers
import (
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/services"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/services"
"net/http"
)
diff --git a/handlers/jwt.go b/handlers/jwt.go
index 959039b8..de2bd9f9 100644
--- a/handlers/jwt.go
+++ b/handlers/jwt.go
@@ -3,7 +3,7 @@ package handlers
import (
"github.com/dgrijalva/jwt-go"
"github.com/pkg/errors"
- "github.com/statping/statping/types/users"
+ "github.com/statping-ng/statping-ng/types/users"
"net/http"
"time"
)
diff --git a/handlers/messages.go b/handlers/messages.go
index 69b668d6..f4e5e46f 100644
--- a/handlers/messages.go
+++ b/handlers/messages.go
@@ -2,9 +2,9 @@ package handlers
import (
"github.com/gorilla/mux"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/messages"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/messages"
+ "github.com/statping-ng/statping-ng/utils"
"net/http"
)
diff --git a/handlers/middleware.go b/handlers/middleware.go
index 2f8de35a..a3b621fc 100644
--- a/handlers/middleware.go
+++ b/handlers/middleware.go
@@ -7,10 +7,10 @@ import (
"fmt"
"github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/metrics"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/metrics"
+ "github.com/statping-ng/statping-ng/utils"
"io"
"net/http"
"strings"
diff --git a/handlers/notifications.go b/handlers/notifications.go
index 8832487d..43929b16 100644
--- a/handlers/notifications.go
+++ b/handlers/notifications.go
@@ -1,29 +1,29 @@
package handlers
import (
- "github.com/gorilla/mux"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/services"
"net/http"
"sort"
+
+ "github.com/gorilla/mux"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/services"
)
-func apiNotifiersHandler(w http.ResponseWriter, r *http.Request) {
+func apiAllNotifiersHandler(r *http.Request) interface{} {
var notifs []notifications.Notification
for _, n := range services.AllNotifiers() {
notif := n.Select()
no, err := notifications.Find(notif.Method)
if err != nil {
log.Error(err)
- sendErrorJson(err, w, r)
}
notif.UpdateFields(no)
notifs = append(notifs, *notif)
}
sort.Sort(notifications.NotificationOrder(notifs))
- returnJson(notifs, w, r)
+ return notifs
}
func apiNotifierGetHandler(w http.ResponseWriter, r *http.Request) {
diff --git a/handlers/notifiers_test.go b/handlers/notifiers_test.go
index 598cd22b..10d69201 100644
--- a/handlers/notifiers_test.go
+++ b/handlers/notifiers_test.go
@@ -3,9 +3,9 @@ package handlers
import (
"testing"
- "github.com/statping/statping/notifiers"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/notifiers"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/handlers/oauth.go b/handlers/oauth.go
index 9aa4119b..f6e71cb8 100644
--- a/handlers/oauth.go
+++ b/handlers/oauth.go
@@ -3,10 +3,10 @@ package handlers
import (
"fmt"
"github.com/gorilla/mux"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/users"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/users"
"golang.org/x/oauth2"
"net/http"
)
diff --git a/handlers/oauth_custom.go b/handlers/oauth_custom.go
index 09e0e03f..a4422b01 100644
--- a/handlers/oauth_custom.go
+++ b/handlers/oauth_custom.go
@@ -1,8 +1,8 @@
package handlers
import (
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/errors"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/errors"
"golang.org/x/oauth2"
"net/http"
"strings"
diff --git a/handlers/oauth_github.go b/handlers/oauth_github.go
index fe753938..ffc635fa 100644
--- a/handlers/oauth_github.go
+++ b/handlers/oauth_github.go
@@ -2,9 +2,9 @@ package handlers
import (
"encoding/json"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/utils"
"golang.org/x/oauth2"
"golang.org/x/oauth2/github"
"net/http"
diff --git a/handlers/oauth_google.go b/handlers/oauth_google.go
index d3f81edd..824d8bdf 100644
--- a/handlers/oauth_google.go
+++ b/handlers/oauth_google.go
@@ -2,9 +2,9 @@ package handlers
import (
"encoding/json"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/utils"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"net/http"
diff --git a/handlers/oauth_slack.go b/handlers/oauth_slack.go
index bb482f88..cccdfa92 100644
--- a/handlers/oauth_slack.go
+++ b/handlers/oauth_slack.go
@@ -3,9 +3,9 @@ package handlers
import (
"encoding/json"
"fmt"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/utils"
"golang.org/x/oauth2"
"golang.org/x/oauth2/slack"
"net/http"
diff --git a/handlers/routes.go b/handlers/routes.go
index 7408c7c4..83447caa 100644
--- a/handlers/routes.go
+++ b/handlers/routes.go
@@ -1,15 +1,16 @@
package handlers
import (
- "github.com/gorilla/mux"
- "github.com/prometheus/client_golang/prometheus/promhttp"
- "github.com/statping/statping/source"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/utils"
"net/http"
"net/http/pprof"
- _ "github.com/statping/statping/types/metrics"
+ "github.com/gorilla/mux"
+ "github.com/prometheus/client_golang/prometheus/promhttp"
+ "github.com/statping-ng/statping-ng/source"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/utils"
+
+ _ "github.com/statping-ng/statping-ng/types/metrics"
)
var (
@@ -146,7 +147,7 @@ func Router() *mux.Router {
api.Handle("/api/incidents/{id}/updates/{uid}", authenticated(apiDeleteIncidentUpdateHandler, false)).Methods("DELETE")
// API USER Routes
- api.Handle("/api/users", authenticated(apiAllUsersHandler, false)).Methods("GET")
+ api.Handle("/api/users", scoped(apiAllUsersHandler)).Methods("GET")
api.Handle("/api/users", authenticated(apiCreateUsersHandler, false)).Methods("POST")
api.Handle("/api/users/token", http.HandlerFunc(apiCheckUserTokenHandler)).Methods("POST")
api.Handle("/api/users/{id}", authenticated(apiUserHandler, false)).Methods("GET")
@@ -154,7 +155,7 @@ func Router() *mux.Router {
api.Handle("/api/users/{id}", authenticated(apiUserDeleteHandler, false)).Methods("DELETE")
// API NOTIFIER Routes
- api.Handle("/api/notifiers", authenticated(apiNotifiersHandler, false)).Methods("GET")
+ api.Handle("/api/notifiers", scoped(apiAllNotifiersHandler)).Methods("GET")
api.Handle("/api/notifier/{notifier}", authenticated(apiNotifierGetHandler, false)).Methods("GET")
api.Handle("/api/notifier/{notifier}", authenticated(apiNotifierUpdateHandler, false)).Methods("POST")
api.Handle("/api/notifier/{notifier}/test", authenticated(testNotificationHandler, false)).Methods("POST")
@@ -167,7 +168,7 @@ func Router() *mux.Router {
api.Handle("/api/messages/{id}", authenticated(apiMessageDeleteHandler, false)).Methods("DELETE")
// API CHECKIN Routes
- api.Handle("/api/checkins", authenticated(apiAllCheckinsHandler, false)).Methods("GET")
+ api.Handle("/api/checkins", scoped(apiAllCheckinsHandler)).Methods("GET")
api.Handle("/api/checkins", authenticated(checkinCreateHandler, false)).Methods("POST")
api.Handle("/api/checkins/{api}", authenticated(apiCheckinHandler, false)).Methods("GET")
api.Handle("/api/checkins/{api}", authenticated(checkinDeleteHandler, false)).Methods("DELETE")
diff --git a/handlers/server.go b/handlers/server.go
index 32c4cb5e..68df76a2 100644
--- a/handlers/server.go
+++ b/handlers/server.go
@@ -5,7 +5,7 @@ import (
"fmt"
"github.com/foomo/simplecert"
"github.com/foomo/tlsconfig"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"net/http"
"strings"
)
diff --git a/handlers/services.go b/handlers/services.go
index f1e8590f..2de29f4b 100644
--- a/handlers/services.go
+++ b/handlers/services.go
@@ -2,12 +2,12 @@ package handlers
import (
"github.com/gorilla/mux"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/hits"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/hits"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"net/http"
)
diff --git a/handlers/services_test.go b/handlers/services_test.go
index 981c8b85..5b1b0d40 100644
--- a/handlers/services_test.go
+++ b/handlers/services_test.go
@@ -4,10 +4,10 @@ import (
"encoding/json"
"fmt"
"github.com/pkg/errors"
- "github.com/statping/statping/types"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"net/http/httptest"
diff --git a/handlers/setup.go b/handlers/setup.go
index 1f940eee..44d3fed5 100644
--- a/handlers/setup.go
+++ b/handlers/setup.go
@@ -2,12 +2,12 @@ package handlers
import (
"errors"
- "github.com/statping/statping/notifiers"
- "github.com/statping/statping/types/configs"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/notifiers"
+ "github.com/statping-ng/statping-ng/types/configs"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"net/http"
"net/url"
"strconv"
diff --git a/handlers/theme_test.go b/handlers/theme_test.go
index cd863ebb..e6004381 100644
--- a/handlers/theme_test.go
+++ b/handlers/theme_test.go
@@ -1,8 +1,8 @@
package handlers
import (
- "github.com/statping/statping/source"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/source"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"testing"
)
diff --git a/handlers/users.go b/handlers/users.go
index 94d58bd9..fc3d940b 100644
--- a/handlers/users.go
+++ b/handlers/users.go
@@ -2,11 +2,12 @@ package handlers
import (
"fmt"
- "github.com/gorilla/mux"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/users"
- "github.com/statping/statping/utils"
"net/http"
+
+ "github.com/gorilla/mux"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/users"
+ "github.com/statping-ng/statping-ng/utils"
)
func findUser(r *http.Request) (*users.User, int64, error) {
@@ -75,9 +76,9 @@ func apiUserDeleteHandler(w http.ResponseWriter, r *http.Request) {
sendJsonAction(user, "delete", w, r)
}
-func apiAllUsersHandler(w http.ResponseWriter, r *http.Request) {
+func apiAllUsersHandler(r *http.Request) interface{} {
allUsers := users.All()
- returnJson(allUsers, w, r)
+ return allUsers
}
func apiCheckUserTokenHandler(w http.ResponseWriter, r *http.Request) {
diff --git a/handlers/users_test.go b/handlers/users_test.go
index 4ecd6b84..e0b62206 100644
--- a/handlers/users_test.go
+++ b/handlers/users_test.go
@@ -1,7 +1,7 @@
package handlers
import (
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"net/url"
diff --git a/install.sh b/install.sh
index cbbdab4c..a7ae50a3 100755
--- a/install.sh
+++ b/install.sh
@@ -12,7 +12,7 @@ cyan="\033[36m"
white="\033[37m"
gpg_key=64B9C6AAE2D55278
gpgurl=https://statping.com/statping.gpg
-repo=https://github.com/statping/statping
+repo=https://github.com/statping-ng/statping-ng
statping_get_tarball() {
fext='tar.gz'
@@ -24,7 +24,7 @@ statping_get_tarball() {
printf "$cyan> Downloading latest version for $OS $ARCH...\n$url $reset\n"
# Get both the tarball and its GPG signature
tarball_tmp=`mktemp -t statping.tar.gz.XXXXXXXXXX`
- if curl --fail -L -o "$tarball_tmp" "$url"; then
+ if curl --fail -L -s -o "$tarball_tmp" "$url"; then
# All this dance is because `tar --strip=1` does not work everywhere
temp=$(mktemp -d statping.XXXXXXXXXX)
if [ ${OS} == 'windows' ]; then
@@ -32,11 +32,11 @@ statping_get_tarball() {
else
tar xzf $tarball_tmp -C "$temp"
fi
- printf "$green> Installing to $DEST/statping\n"
+ printf "$green> Installing to $DEST/statping-ng\n"
mv "$temp"/statping "$DEST"
rm -rf "$temp"
rm $tarball_tmp*
- printf "$cyan> Statping is now installed! $reset\n"
+ printf "$cyan> Statping-ng is now installed! $reset\n"
printf "$white> Repo: $repo $reset\n"
printf "$white> Wiki: $repo/wiki $reset\n"
printf "$white> Issues: $repo/issues $reset\n"
@@ -55,9 +55,9 @@ statping_brew_install() {
if [[ -z "$(command -v brew --version)" ]]; then
printf "${white}Using Brew to install!$reset\n"
printf "${yellow}---> brew tap statping/statping$reset\n"
- brew tap statping/statping
+ brew tap statping-ng/statping-ng
printf "${yellow}---> brew install statping$reset\n"
- brew install statping
+ brew install statping-ng
printf "${green}Brew installation is complete!$reset\n"
printf "${yellow}You can use 'brew upgrade' to upgrade Statping next time.$reset\n"
else
@@ -66,7 +66,7 @@ statping_brew_install() {
}
statping_install() {
- printf "${white}Installing Statping!$reset\n"
+ printf "${white}Installing Statping-ng!$reset\n"
getOS
getArch
statping_get_tarball $OS $ARCH
diff --git a/notifiers/amazon_sns.go b/notifiers/amazon_sns.go
index a507ece2..c3f0c927 100644
--- a/notifiers/amazon_sns.go
+++ b/notifiers/amazon_sns.go
@@ -8,12 +8,12 @@ import (
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sns"
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/null"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/services"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/services"
)
var _ notifier.Notifier = (*amazonSNS)(nil)
diff --git a/notifiers/amazon_sns_test.go b/notifiers/amazon_sns_test.go
index c9988c3e..b34fa61c 100644
--- a/notifiers/amazon_sns_test.go
+++ b/notifiers/amazon_sns_test.go
@@ -4,13 +4,13 @@ import (
"testing"
"time"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/notifiers/command.go b/notifiers/command.go
index 6f482b74..fef5e628 100644
--- a/notifiers/command.go
+++ b/notifiers/command.go
@@ -1,13 +1,13 @@
package notifiers
import (
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"strings"
"time"
)
diff --git a/notifiers/command_test.go b/notifiers/command_test.go
index bb86b3b8..292e568c 100644
--- a/notifiers/command_test.go
+++ b/notifiers/command_test.go
@@ -4,13 +4,13 @@ import (
"testing"
"time"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/notifiers/discord.go b/notifiers/discord.go
index 0431b3a2..bee52f85 100644
--- a/notifiers/discord.go
+++ b/notifiers/discord.go
@@ -7,12 +7,12 @@ import (
"strings"
"time"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
var _ notifier.Notifier = (*discord)(nil)
diff --git a/notifiers/discord_test.go b/notifiers/discord_test.go
index a4171416..96463a94 100644
--- a/notifiers/discord_test.go
+++ b/notifiers/discord_test.go
@@ -1,13 +1,13 @@
package notifiers
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/notifiers/email.go b/notifiers/email.go
index dd012024..c5b61390 100644
--- a/notifiers/email.go
+++ b/notifiers/email.go
@@ -5,13 +5,13 @@ import (
"fmt"
"github.com/go-mail/mail"
- "github.com/statping/emails"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/emails"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
var _ notifier.Notifier = (*emailer)(nil)
diff --git a/notifiers/email_test.go b/notifiers/email_test.go
index d873335a..3702441c 100644
--- a/notifiers/email_test.go
+++ b/notifiers/email_test.go
@@ -1,13 +1,13 @@
package notifiers
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/notifiers/generate.go b/notifiers/generate.go
index b156167d..babc067d 100644
--- a/notifiers/generate.go
+++ b/notifiers/generate.go
@@ -1,3 +1,4 @@
+//go:build ignore
// +build ignore
package main
@@ -9,7 +10,7 @@ import (
"os"
"time"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/tdewolff/minify/v2"
"github.com/tdewolff/minify/v2/html"
)
diff --git a/notifiers/gotify.go b/notifiers/gotify.go
index 9c9c0f71..e2df1fdb 100644
--- a/notifiers/gotify.go
+++ b/notifiers/gotify.go
@@ -4,13 +4,13 @@ import (
"strings"
"time"
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/null"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
var _ notifier.Notifier = (*gotify)(nil)
diff --git a/notifiers/gotify_test.go b/notifiers/gotify_test.go
index e93ff516..34465e65 100644
--- a/notifiers/gotify_test.go
+++ b/notifiers/gotify_test.go
@@ -4,13 +4,13 @@ import (
"testing"
"time"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/notifiers/line_notify.go b/notifiers/line_notify.go
index b0dbf304..d29f2d25 100644
--- a/notifiers/line_notify.go
+++ b/notifiers/line_notify.go
@@ -2,11 +2,11 @@ package notifiers
import (
"fmt"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"net/url"
"strings"
"time"
diff --git a/notifiers/mattermost.go b/notifiers/mattermost.go
new file mode 100644
index 00000000..dec0af20
--- /dev/null
+++ b/notifiers/mattermost.go
@@ -0,0 +1,98 @@
+package notifiers
+
+import (
+ "bytes"
+ "errors"
+ "strings"
+ "time"
+
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
+)
+
+var _ notifier.Notifier = (*mattermost)(nil)
+
+const (
+ mattermostMethod = "mattermost"
+)
+
+type mattermost struct {
+ *notifications.Notification
+}
+
+func (s *mattermost) Select() *notifications.Notification {
+ return s.Notification
+}
+
+var mattermoster = &mattermost{¬ifications.Notification{
+ Method: mattermostMethod,
+ Title: "Mattermost",
+ Description: "Send notifications to your mattermost channel when a service is offline. Insert your Incoming webhook URL for your channel to receive notifications. Based on the Mattermost API .",
+ Author: "Adam Boutcher",
+ AuthorUrl: "https://github.com/adamboutcher",
+ Delay: time.Duration(10 * time.Second),
+ Icon: "far fa-comments",
+ SuccessData: null.NewNullString(`{"icon_emoji":":white_check_mark:", "text": "The service {{.Service.Name}} is back online."}`),
+ FailureData: null.NewNullString(`{"icon_emoji":":x:", "text": "The service {{.Service.Name}} has gone offline."}`),
+ DataType: "json",
+ RequestInfo: "Mattermost allows you to customize your own messages with many complex components.",
+ Limits: 60,
+ Form: []notifications.NotificationForm{{
+ Type: "text",
+ Title: "Incoming Webhook Url",
+ Placeholder: "https://mattermost.example.com/hooks/abcd1234efgh5678ijkl9012xy",
+ SmallText: "Incoming Webhook URL generated on your mattermost server.",
+ DbField: "Host",
+ Required: true,
+ }}},
+}
+
+// Send will send a HTTP Post to the mattermost webhooker API. It accepts type: string
+func (s *mattermost) sendMattermost(msg string) (string, error) {
+ resp, _, err := utils.HttpRequest(s.Host.String, "POST", "application/json", nil, strings.NewReader(msg), time.Duration(10*time.Second), true, nil)
+ if err != nil {
+ return "", err
+ }
+ return string(resp), nil
+}
+
+func (s *mattermost) OnTest() (string, error) {
+ example := services.Example(true)
+ testMsg := ReplaceVars(s.SuccessData.String, example, failures.Failure{})
+ contents, resp, err := utils.HttpRequest(s.Host.String, "POST", "application/json", nil, bytes.NewBuffer([]byte(testMsg)), time.Duration(10*time.Second), true, nil)
+ if err != nil {
+ return "", err
+ }
+ defer resp.Body.Close()
+ if string(contents) != "ok" {
+ return string(contents), errors.New("the mattermost response was incorrect, check the URL")
+ }
+ return string(contents), nil
+}
+
+// OnFailure will trigger failing service
+func (s *mattermost) OnFailure(srv services.Service, f failures.Failure) (string, error) {
+ msg := ReplaceVars(s.FailureData.String, srv, f)
+ out, err := s.sendMattermost(msg)
+ return out, err
+}
+
+// OnSuccess will trigger successful service
+func (s *mattermost) OnSuccess(srv services.Service) (string, error) {
+ msg := ReplaceVars(s.SuccessData.String, srv, failures.Failure{})
+ out, err := s.sendMattermost(msg)
+ return out, err
+}
+
+// OnSave will trigger when this notifier is saved
+func (s *mattermost) OnSave() (string, error) {
+ return "", nil
+}
+
+func (s *mattermost) Valid(values notifications.Values) error {
+ return nil
+}
diff --git a/notifiers/mattermost_test.go b/notifiers/mattermost_test.go
new file mode 100644
index 00000000..e49366fe
--- /dev/null
+++ b/notifiers/mattermost_test.go
@@ -0,0 +1,70 @@
+package notifiers
+
+import (
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+ "testing"
+ "time"
+)
+
+var (
+ MATTERMOST_URL string
+)
+
+func TestMattermostNotifier(t *testing.T) {
+ err := utils.InitLogs()
+ require.Nil(t, err)
+
+ t.Parallel()
+ db, err := database.OpenTester()
+ require.Nil(t, err)
+ db.AutoMigrate(¬ifications.Notification{})
+ notifications.SetDB(db)
+ core.Example()
+
+ MATTERMOST_URL = utils.Params.GetString("MATTERMOST_URL")
+ if MATTERMOST_URL == "" {
+ t.Log("mattermost notifier testing skipped, missing MATTERMOST_URL environment variable")
+ t.SkipNow()
+ }
+
+ mattermoster.Host = null.NewNullString(MATTERMOST_URL)
+ mattermoster.Enabled = null.NewNullBool(true)
+
+ t.Run("Load mattermost", func(t *testing.T) {
+ mattermoster.Host = null.NewNullString(MATTERMOST_URL)
+ mattermoster.Delay = 100 * time.Millisecond
+ mattermoster.Limits = 3
+ Add(mattermoster)
+ assert.Equal(t, "Adam Boutcher", mattermoster.Author)
+ assert.Equal(t, MATTERMOST_URL, mattermoster.Host.String)
+ })
+
+ t.Run("mattermost Within Limits", func(t *testing.T) {
+ ok := mattermoster.CanSend()
+ assert.True(t, ok)
+ })
+
+ t.Run("mattermost OnSave", func(t *testing.T) {
+ _, err := mattermoster.OnSave()
+ assert.Nil(t, err)
+ })
+
+ t.Run("mattermost OnFailure", func(t *testing.T) {
+ _, err := mattermoster.OnFailure(services.Example(false), failures.Example())
+ assert.Nil(t, err)
+ })
+
+ t.Run("mattermost OnSuccess", func(t *testing.T) {
+ _, err := mattermoster.OnSuccess(services.Example(true))
+ assert.Nil(t, err)
+ })
+
+}
diff --git a/notifiers/mobile.go b/notifiers/mobile.go
index 1096df11..3cc58823 100644
--- a/notifiers/mobile.go
+++ b/notifiers/mobile.go
@@ -4,11 +4,11 @@ import (
"bytes"
"encoding/json"
"fmt"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
diff --git a/notifiers/mobile_test.go b/notifiers/mobile_test.go
index b53ee849..af35ed11 100644
--- a/notifiers/mobile_test.go
+++ b/notifiers/mobile_test.go
@@ -1,13 +1,13 @@
package notifiers
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/notifiers/notifiers.go b/notifiers/notifiers.go
index 4443b1ca..fe740aed 100644
--- a/notifiers/notifiers.go
+++ b/notifiers/notifiers.go
@@ -5,10 +5,10 @@ import (
"html/template"
"time"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
//go:generate go run generate.go
@@ -26,6 +26,7 @@ type replacer struct {
func InitNotifiers() {
Add(
slacker,
+ mattermoster,
Command,
Discorder,
email,
@@ -35,7 +36,6 @@ func InitNotifiers() {
Webhook,
Mobile,
Pushover,
- statpingMailer,
Gotify,
AmazonSNS,
)
diff --git a/notifiers/notifiers_test.go b/notifiers/notifiers_test.go
index 376bb132..0ebe1ad1 100644
--- a/notifiers/notifiers_test.go
+++ b/notifiers/notifiers_test.go
@@ -3,8 +3,8 @@ package notifiers
import (
"testing"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/services"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/services"
"github.com/stretchr/testify/assert"
)
diff --git a/notifiers/pushover.go b/notifiers/pushover.go
index 4c8e0906..1bde4ad0 100644
--- a/notifiers/pushover.go
+++ b/notifiers/pushover.go
@@ -6,12 +6,12 @@ import (
"strings"
"time"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
const (
diff --git a/notifiers/pushover_test.go b/notifiers/pushover_test.go
index 658b94d3..3f189019 100644
--- a/notifiers/pushover_test.go
+++ b/notifiers/pushover_test.go
@@ -1,13 +1,13 @@
package notifiers
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/notifiers/slack.go b/notifiers/slack.go
index 05b45bb2..b344eaa8 100644
--- a/notifiers/slack.go
+++ b/notifiers/slack.go
@@ -6,12 +6,12 @@ import (
"strings"
"time"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
var _ notifier.Notifier = (*slack)(nil)
diff --git a/notifiers/slack_test.go b/notifiers/slack_test.go
index 4ed28bce..4314c6ba 100644
--- a/notifiers/slack_test.go
+++ b/notifiers/slack_test.go
@@ -1,13 +1,13 @@
package notifiers
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/notifiers/statping_emailer.go b/notifiers/statping_emailer.go
deleted file mode 100644
index 3fc82afc..00000000
--- a/notifiers/statping_emailer.go
+++ /dev/null
@@ -1,106 +0,0 @@
-package notifiers
-
-import (
- "bytes"
- "encoding/json"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
- "time"
-)
-
-var _ notifier.Notifier = (*statpingEmailer)(nil)
-
-const (
- statpingEmailerName = "statping_emailer"
- statpingEmailerHost = "https://news.statping.com"
-)
-
-type statpingEmailer struct {
- *notifications.Notification
-}
-
-func (s *statpingEmailer) Select() *notifications.Notification {
- return s.Notification
-}
-
-func (s *statpingEmailer) Valid(values notifications.Values) error {
- return nil
-}
-
-var statpingMailer = &statpingEmailer{¬ifications.Notification{
- Method: statpingEmailerName,
- Title: "Email",
- Description: "Send an email when a service becomes offline or back online using Statping's email service. You will need to verify your email address.",
- Author: "Hunter Long",
- AuthorUrl: "https://github.com/hunterlong",
- Delay: time.Duration(10 * time.Second),
- Icon: "fas envelope-square",
- Limits: 60,
- Form: []notifications.NotificationForm{{
- Type: "email",
- Title: "Send to Email Address",
- Placeholder: "info@statping.com",
- DbField: "Host",
- Required: true,
- }}},
-}
-
-// Send will send a HTTP Post to the slack webhooker API. It accepts type: string
-func (s *statpingEmailer) sendStatpingEmail(msg statpingMail) (string, error) {
- data, _ := json.Marshal(msg)
- resp, _, err := utils.HttpRequest(statpingEmailerHost+"/notifier", "POST", "application/json", nil, bytes.NewBuffer(data), time.Duration(10*time.Second), true, nil)
- if err != nil {
- return "", err
- }
- return string(resp), nil
-}
-
-func (s *statpingEmailer) OnTest() (string, error) {
- return "", nil
-}
-
-type statpingMail struct {
- Email string `json:"email"`
- Core core.Core `json:"core,omitempty"`
- Service services.Service `json:"service,omitempty"`
- Failure failures.Failure `json:"failure,omitempty"`
-}
-
-// OnFailure will trigger failing service
-func (s *statpingEmailer) OnFailure(srv services.Service, f failures.Failure) (string, error) {
- ee := statpingMail{
- Email: s.Host.String,
- Core: *core.App,
- Service: srv,
- Failure: f,
- }
- return s.sendStatpingEmail(ee)
-}
-
-// OnSuccess will trigger successful service
-func (s *statpingEmailer) OnSuccess(srv services.Service) (string, error) {
- ee := statpingMail{
- Email: s.Host.String,
- Core: *core.App,
- Service: srv,
- Failure: failures.Failure{},
- }
- return s.sendStatpingEmail(ee)
-}
-
-// OnSave will trigger when this notifier is saved
-func (s *statpingEmailer) OnSave() (string, error) {
- ee := statpingMail{
- Email: s.Host.String,
- Core: *core.App,
- Service: services.Service{},
- Failure: failures.Failure{},
- }
- out, err := s.sendStatpingEmail(ee)
- log.Println("statping emailer response", out)
- return out, err
-}
diff --git a/notifiers/statping_emailer_test.go b/notifiers/statping_emailer_test.go
deleted file mode 100644
index 8cf71227..00000000
--- a/notifiers/statping_emailer_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package notifiers
-
-import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
- "testing"
- "time"
-)
-
-var (
- testEmail string
-)
-
-func TestStatpingEmailerNotifier(t *testing.T) {
- err := utils.InitLogs()
- require.Nil(t, err)
-
- t.Parallel()
- db, err := database.OpenTester()
- require.Nil(t, err)
- db.AutoMigrate(¬ifications.Notification{})
- notifications.SetDB(db)
- core.Example()
-
- testEmail = utils.Params.GetString("TEST_EMAIL")
- statpingMailer.Host = null.NewNullString(testEmail)
- statpingMailer.Enabled = null.NewNullBool(true)
-
- if testEmail == "" {
- t.Log("statping email notifier testing skipped, missing TEST_EMAIL environment variable")
- t.SkipNow()
- }
-
- t.Run("Load statping emailer", func(t *testing.T) {
- statpingMailer.Host = null.NewNullString(testEmail)
- statpingMailer.Delay = time.Duration(100 * time.Millisecond)
- statpingMailer.Limits = 3
- Add(statpingMailer)
- assert.Equal(t, "Hunter Long", statpingMailer.Author)
- assert.Equal(t, testEmail, statpingMailer.Host.String)
- })
-
- t.Run("statping emailer Within Limits", func(t *testing.T) {
- ok := statpingMailer.CanSend()
- assert.True(t, ok)
- })
-
- t.Run("statping emailer OnSave", func(t *testing.T) {
- _, err := statpingMailer.OnSave()
- assert.Nil(t, err)
- })
-
- t.Run("statping emailer OnFailure", func(t *testing.T) {
- _, err := statpingMailer.OnFailure(services.Example(false), failures.Example())
- assert.Nil(t, err)
- })
-
- t.Run("statping emailer OnSuccess", func(t *testing.T) {
- _, err := statpingMailer.OnSuccess(services.Example(true))
- assert.Nil(t, err)
- })
-
-}
diff --git a/notifiers/telegram.go b/notifiers/telegram.go
index 6223c1c1..ee2558dc 100644
--- a/notifiers/telegram.go
+++ b/notifiers/telegram.go
@@ -8,12 +8,12 @@ import (
"strings"
"time"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
var _ notifier.Notifier = (*telegram)(nil)
@@ -52,8 +52,8 @@ var Telegram = &telegram{¬ifications.Notification{
}, {
Type: "text",
Title: "Channel",
- Placeholder: "@statping_channel",
- SmallText: "Insert your Telegram Channel including the @ symbol. The bot will need to be an administrator of this channel.",
+ Placeholder: "@statping_channel/-123123512312",
+ SmallText: "Insert your Telegram Channel including the @ symbol. The bot will need to be an administrator of this channel. You can also supply a chat_id.",
DbField: "var1",
Required: true,
}}},
diff --git a/notifiers/telegram_test.go b/notifiers/telegram_test.go
index cc06857f..d2fd6570 100644
--- a/notifiers/telegram_test.go
+++ b/notifiers/telegram_test.go
@@ -1,13 +1,13 @@
package notifiers
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/notifiers/twilio.go b/notifiers/twilio.go
index 5b613e2f..c589c92f 100644
--- a/notifiers/twilio.go
+++ b/notifiers/twilio.go
@@ -9,12 +9,12 @@ import (
"strings"
"time"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
var _ notifier.Notifier = (*twilio)(nil)
diff --git a/notifiers/twilio_test.go b/notifiers/twilio_test.go
index 5510b6cd..4cf48e67 100644
--- a/notifiers/twilio_test.go
+++ b/notifiers/twilio_test.go
@@ -1,13 +1,13 @@
package notifiers
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/notifiers/webhook.go b/notifiers/webhook.go
index 3831718a..2b2c5b2d 100644
--- a/notifiers/webhook.go
+++ b/notifiers/webhook.go
@@ -3,16 +3,17 @@ package notifiers
import (
"bytes"
"fmt"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/notifier"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
"io/ioutil"
"net/http"
"strings"
"time"
+
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/notifier"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
)
var _ notifier.Notifier = (*webhooker)(nil)
@@ -85,15 +86,30 @@ func (w *webhooker) Valid(values notifications.Values) error {
}
func (w *webhooker) sendHttpWebhook(body string) (*http.Response, error) {
- utils.Log.Infoln(fmt.Sprintf("sending body: '%v' to %v as a %v request", body, w.Host.String, w.Var1.String))
client := new(http.Client)
client.Timeout = 10 * time.Second
req, err := http.NewRequest(w.Var1.String, w.Host.String, bytes.NewBufferString(body))
if err != nil {
return nil, err
}
+ if w.ApiKey.String != "" {
+ req.Header.Add("Content-Type", w.ApiKey.String)
+ } else {
+ req.Header.Add("Content-Type", "application/json")
+ }
+ req.Header.Set("User-Agent", "Statping-ng")
+ req.Header.Set("Statping-Version", utils.Params.GetString("VERSION"))
+
+ var customHeaders []string
+
if w.ApiSecret.String != "" {
- keyVal := strings.SplitN(w.ApiSecret.String, "=", 2)
+ customHeaders = strings.Split(w.ApiSecret.String, ",")
+ } else {
+ customHeaders = nil
+ }
+
+ for _, h := range customHeaders {
+ keyVal := strings.SplitN(h, "=", 2)
if len(keyVal) == 2 {
if keyVal[0] != "" && keyVal[1] != "" {
if strings.ToLower(keyVal[0]) == "host" {
@@ -104,13 +120,7 @@ func (w *webhooker) sendHttpWebhook(body string) (*http.Response, error) {
}
}
}
- if w.ApiKey.String != "" {
- req.Header.Add("Content-Type", w.ApiKey.String)
- } else {
- req.Header.Add("Content-Type", "application/json")
- }
- req.Header.Set("User-Agent", "Statping")
- req.Header.Set("Statping-Version", utils.Params.GetString("VERSION"))
+
resp, err := client.Do(req)
if err != nil {
return nil, err
diff --git a/notifiers/webhook_test.go b/notifiers/webhook_test.go
index 88456e67..603e5c7b 100644
--- a/notifiers/webhook_test.go
+++ b/notifiers/webhook_test.go
@@ -3,13 +3,13 @@ package notifiers
import (
"testing"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 5d2c34a3..96ae07fc 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,27 +1,31 @@
-name: statping
-version-script: cat version.txt
+name: statping-ng
version: "stable"
-summary: Statping Server Monitoring with Status Page
-description: >
+version-script: cat version.txt
+summary: Statping-ng Server Monitoring with Status Page
+description: |
An easy to use Status Page for your websites and applications.
Statping will automatically fetch the application and render a beautiful
status page with tons of features for you to build an even better status page.
This Status Page generator allows you to use MySQL, Postgres, or SQLite
on multiple operating systems.
+base: core18
+build-base: core18
type: app
confinement: strict
grade: stable
+license: GPL-3.0
architectures:
+ - build-on: i386
- build-on: amd64
- build-on: armhf
- build-on: arm64
- - build-on: i386
apps:
statping:
- command: statping
+ command: bin/statping
+ daemon: simple
plugs:
- home
- network
@@ -32,12 +36,10 @@ parts:
source: .
plugin: nil
override-build: |
- apt-get update
- apt-get install -y curl
- curl -o- -L https://statping.com/install.sh | bash
- mv /usr/local/bin/statping ./
+ curl -o- -L https://raw.githubusercontent.com/adamboutcher/statping-ng/dev/install.sh | bash
build-packages:
- - git
- - gcc
- - make
- - sed
+ - tar
+ - curl
+ - bash
+ organize:
+ /usr/local/bin/statping: bin/
diff --git a/source/doc.go b/source/doc.go
index ed4b3c60..f1c4d5c8 100644
--- a/source/doc.go
+++ b/source/doc.go
@@ -13,5 +13,5 @@
// sass source/scss/base.scss source/css/base.css
// cd source && rice embed-go
//
-// More info on: https://github.com/statping/statping
+// More info on: https://github.com/adamboutcher/statping-ng
package source
diff --git a/source/generate_help.go b/source/generate_help.go
index 6bccd7cf..6d069c29 100644
--- a/source/generate_help.go
+++ b/source/generate_help.go
@@ -16,7 +16,7 @@ import (
"time"
)
-const wikiUrl = "https://github.com/statping/statping.wiki"
+const wikiUrl = "https://github.com/statping-ng/statping-ng.wiki"
var vue = `
diff --git a/source/source.go b/source/source.go
index ad2d22f5..544ed1a1 100644
--- a/source/source.go
+++ b/source/source.go
@@ -8,7 +8,7 @@ import (
"fmt"
"github.com/GeertJohan/go.rice"
"github.com/pkg/errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"os"
"os/exec"
"path/filepath"
@@ -30,6 +30,7 @@ var (
"scss/mobile.scss",
"scss/variables.scss",
"robots.txt",
+ "base.gohtml",
}
)
@@ -174,7 +175,7 @@ func DeleteAllAssets(folder string) error {
// CopyAllToPublic will copy all the files in a rice box into a local folder
func CopyAllToPublic(box *rice.Box) error {
exclude := map[string]bool{
- "base.gohtml": true,
+ // "base.gohtml": true,
"index.html": true,
}
diff --git a/source/source_test.go b/source/source_test.go
index 95712f22..3921973f 100644
--- a/source/source_test.go
+++ b/source/source_test.go
@@ -1,7 +1,7 @@
package source
import (
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/source/statping-ng.wiki b/source/statping-ng.wiki
new file mode 160000
index 00000000..a42b2a64
--- /dev/null
+++ b/source/statping-ng.wiki
@@ -0,0 +1 @@
+Subproject commit a42b2a641164e4c714fc09d6e08fcd6f7d0e5fb4
diff --git a/source/wiki.go b/source/wiki.go
index dcc949d4..6635f98f 100644
--- a/source/wiki.go
+++ b/source/wiki.go
@@ -6,4 +6,4 @@
package source
// CompiledWiki contains all of the Statping Wiki pages from the Github Wiki repo.
-var CompiledWiki = []byte("
Types of Monitoring Features Start Statping Linux Mac Windows AWS EC2 Docker Mobile App Heroku API Makefile Notifiers Notifier Events Notifier Example Prometheus Exporter SSL Config with .env File Static Export Statping Plugins Statuper Build and Test Contributing PGP Signature Testing Deployment \n\n
Types of Monitoring \nYou can monitor your application by using a simple HTTP GET to the endpoint to return back a response and status code. Normally you want a 200 status code on an HTTP request. You might want to require a 404 or 500 error as a response code though. With each service you can include a Timeout in seconds to work with your long running services.\n\n# HTTP Endpoints with Custom POST\nFor more advanced monitoring you can add a data as a HTTP POST request. This is useful for automatically submitting JSON, or making sure your signup form is working correctly.\n\n
\n \n
\n\nWith a HTTP service, you can POST a JSON string to your endpoint to retrieve any type of response back. You can then use Regex in the Expected Response field to parse a custom response that exactly matches your status requirements. \n\n# TCP/UDP Services\nFor other services that don't use HTTP, you can monitor any type of service by using the PORT of the service. If you're Ethereum Blockchain server is running on 8545, you can use TCP to monitor your server. With a TCP service, you can monitor your Docker containers, or remove service running on a custom port. You don't need to include `http` in the endpoint field, just IP or Hostname.\n\n
\n \n
\n\n# ICMP Service\nYou can send a [ICMP](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol) (ping) to an endpoint rather than HTTP/TCP/UDP request for a quick response.\n\n\n
Features \nStatping is a great Status Page that can be deployed with 0 effort.\n\n# 3 Different Databases\nYou can use MySQL, Postgres, or SQLite as a database for your Statping status page. The server will automatically upgrade your database tables depending on which database you have.\n\n# Easy to Startup\nStatping is an extremely easy to setup website monitoring tool without fussing with dependencies or packages. Simply download and install the precompile binary for your operating system. Statping works on Windows, Mac, Linux, Docker, and even the Raspberry Pi.\n\n# Plugins\nStatping is an awesome Status Page generator that allows you to create your own plugins with Golang Plugins! You don't need to request a PR or even tell us about your plugin. Plugin's are compiled and then send as a binary to the Statping `/plugins` folder. Test your plugins using the `statup test plugin` command, checkout the [Plugin Wiki](https://github.com/statping/statping/wiki/Statping-Plugins) to see detailed information about creating plugins.\n\n# No Maintenance\nMany other website monitoring applications will collect data until the server fails because of hard drive is 100% full. Statping will automatically delete records to make sure your server will stay UP for years. The EC2 AMI Image is a great way to host your status page without worrying about it crashing one day. Statping will automatically upgrade its software when you reboot your computer.\n\n# Email & Slack Notifications\nReceive email notifications if your website or application goes offline. Statping includes SMTP connections so you can use AWS SES, or any other SMTP emailing service. Go in the Email Settings in Settings to configure these options.\n\n# Prometheus Exporter\nIf you want a deeper view of your applications status, you can use Grafana and Prometheus to graph all types of data about your services. Read more about the [Prometheus Exporter](https://github.com/statping/statping/wiki/Prometheus-Exporter)\n\n
Start Statping \n\n\n
Linux \n# Installing on Linux\nInstalling Statping on Linux can be done by downloading the latest tar.gz file, unzipping, and running the executable. You can also install using [Snapcraft](https://snapcraft.io/) for Ubuntu systems.\n\n```shell\ncurl -o- -L https://statping.com/install.sh | bash\n```\n\n## Install using Snapcraft\n\n[](https://snapcraft.io/statping)\n\nIf you are using [snap](https://snapcraft.io/statping), you can simply run this command to install Statping.\n```shell\nsudo snap install statping\n```\n\n# Compiling SCSS for Custom Theme\nStatping requires `sass` to be installed to the local machine to compile SCSS into CSS if you want to use the Custom Theme features. \n\n- Apt: `apt install ruby-sass -y`\n- Node: `npm install sass -g`\n- Ruby: `gem install sass`\n\n## Systemd Service\nSetting up a systemd service is a great way to make sure your Statping server will automatically reboot when needed. You can use the file below for your service. You should have Statping already installed by this step.\n###### /etc/systemd/system/statping.service\n```\n[Unit]\nDescription=Statping Server\nAfter=network.target\nAfter=systemd-user-sessions.service\nAfter=network-online.target\n\n[Service]\nType=simple\nRestart=always\nExecStart=/usr/local/bin/statping\nWorkingDirectory=/usr/local/bin\n\n[Install]\nWantedBy=multi-user.target\n```\nThen you can enable and start your systemd service with:\n```\nsystemctl daemon-reload\n\nsystemctl enable statping.service\n\nsystemctl start statping\n```\nYou're Statping server will now automatically restart when your server restarts.\n\n## Raspberry Pi\nYou can even run Statping on your Raspberry Pi by installing the precompiled binary from [Latest Releases](https://github.com/statping/statping/releases/latest). For the Raspberry Pi 3 you'll want to download the `statping-linux-arm7.tar.gz` file. Be sure to change `VERSION` to the latest version in Releases, and include the 'v'.\n\n```\nVERSION=$(curl -s \"https://github.com/statping/statping/releases/latest\" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}')\nwget https://github.com/statping/statping/releases/download/$VERSION/statping-linux-arm7.tar.gz\ntar -xvzf statping-linux-arm7.tar.gz\nchmod +x statping\nmv statping /usr/local/bin/statping\n\nstatping version\n``` \n\n## Alpine Linux\nThe Docker image is using the Statping Alpine binary since it's so incredibly small. You can run it on your own alpine image by downloading `statping-linux-alpine.tar.gz` from [Latest Releases](https://github.com/statping/statping/releases/latest).\n\n
Mac \n# Installing on Mac\nStatping includes an easy to use [Homebrew Formula](https://github.com/hunterlong/homebrew-statping) to quick get your Status Page up and running locally. Statping on brew is automatically generated for each new release to master. Install with the commands below,\n###### Using Homebrew\n```bash\nbrew tap statping/statping\nbrew install statping\n```\n###### Using the Terminal\n```shell\ncurl -o- -L https://statping.com/install.sh | bash\n```\n\n
\n \n
\n\nOnce you've installed it, checkout which version you have by running `statping version`.\n\n# Compiling SCSS for Custom Theme\nStatping requires `sass` to be installed to the local machine to compile SCSS into CSS if you want to use the Custom Theme features. \n\n- Node: `npm install sass -g`\n- Ruby: `gem install sass`\n\n\n
Windows \n# Installing on Windows\nCurrently, Statping only works on Windows 64-bit computers. Just download the exe file from [Latest Releases](https://github.com/statping/statping/releases/latest) and run it in your command prompt. It will create a HTTP server on port 8080, so you can visit `http://localhost:8080` to see your Statping Status Page.\n\n# Compiling SCSS for Custom Theme\nStatping requires `sass` to be installed to the local machine to compile SCSS into CSS if you want to use the Custom Theme features. \n\n- Node: `npm install sass -g`\n- Ruby: `gem install sass`\n\n# Running Statping as a Service\nTo ensure Statping is always running, it can be installed to run as a service on a Windows machine. The easiest way to do that is by using NSSM, the [Non-Sucking Service Manager](https://nssm.cc/download). Download and unzip the compressed file to a location on your machine running Statping to get started:\n1. Open an administrative command prompt.\n2. Change to the folder that contains the 64 bit version of NSSM.\n3. Type \"nssm install Statping\" and press enter.\n4. For the properties, use the following as an example:\n Path: C:\\Program Files\\Statping\\statping.exe\n Startup directory: C:\\Program Files\\Statping\n5. Click \"Install\".\n6. Launch the windows services manager.\n7. Run Statping.\n\n## Known Issues with Windows\nUnfortunately, Statping only works on Windows 64-bit processors. If you have more than 4gb of ram, there's a good chance you already have a 64-bit processor. Download the [Latest Releases](https://github.com/statping/statping/releases/latest) of Statping, extract the ZIP file, then double click on the `statping.exe` file. You can use a SQLite database for a quick setup, or connect to a local/remote Postgres or MySQL database server.\n\n
AWS EC2 \nRunning Statping on the smallest EC2 server is very quick using the AWS AMI Image. The AWS AMI Image will automatically start a Statping Docker container that will automatically update to the latest version. Once the EC2 is booted, you can go to the Public DNS domain to view the Statping installation page. The Statping root folder is located at: `/statping` on the server.\n\n# AMI Image\nChoose the correct AMI Image ID based on your AWS region.\n- us-east-1 `ami-09ccd23d9c7afba61` (Virginia)\n- us-east-2 `ami-0c6c9b714a501cdb3` (Ohio)\n- us-west-1 `ami-02159cc1fc701a77e` (California)\n- us-west-2 `ami-007c6990949f5ccee` (Oregon)\n- eu-central-1 `ami-06e252d6d8b0c2f1f` (Frankfurt)\n\n# Upgrading Staping\nYou can upgrade the Statping executable by running the commands below on your EC2 instance.\n```\nVERSION=$(curl -s \"https://github.com/statping/statping/releases/latest\" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}')\nwget https://github.com/statping/statping/releases/download/$VERSION/statping-linux-x64.tar.gz\ntar -xvzf statping-linux-x64.tar.gz\nchmod +x statping\nmv statping /usr/local/bin/statping\n```\nYou can test the version number by running `statping version`.\n\n# Instructions\n\n### 1. Create an EC2 instance from AMI Image\nGo to the main EC2 dashboard and click 'Launch Instance'. Then type `Statping` inside the search field for 'Community AMI'. Once you've found it in your region, click Select!\n\n
\n\n### 2. Get the Public DNS for EC2 Instance\nCopy the 'Public DNS' URL and paste it into your browser.\n\n
\n\n### 3. Setup Statping\nUse SQLite if you don't want to connect to a remote MySQL or Postgres database.\n\n
\n\n# EC2 Server Features\nRunning your Statping server on a small EC2 instance is perfect for most users. Below you'll find some commands to get up and running in seconds.\n- Super cheap on the t2.nano (~$4.60 monthly)\n- Small usage, 8gb of hard drive\n- Automatic SSL certificate if you require it\n- Automatic reboot when the server needs it\n- Automatic database cleanup, so you'll never be at 100% full.\n- Automatic docker containers/images removal\n\n## Create Security Groups\nUsing the AWS CLI you can copy and paste the commands below to auto create everything for you. The server opens port 80 and 443.\n```bash\naws ec2 create-security-group --group-name StatpingPublicHTTP --description \"Statping HTTP Server on port 80 and 443\"\n# will response back a Group ID. Copy ID and use it for --group-id below.\n```\n```bash\nGROUPS=sg-7e8b830f\naws ec2 authorize-security-group-ingress --group-id $GROUPS --protocol tcp --port 80 --cidr 0.0.0.0/0\naws ec2 authorize-security-group-ingress --group-id $GROUPS --protocol tcp --port 443 --cidr 0.0.0.0/0\n```\n## Create EC2 without SSL\nOnce your server has started, go to the EC2 Public DNS endpoint. You should be redirected to /setup to continue your installation process! The database information is already inputed for you.\n```bash\nGROUPS=sg-7e8b830f\nKEY=MYKEYHERE\nAMI_IMAGE=ami-7be8a103\n\naws ec2 run-instances \\\n --image-id $AMI_IMAGE \\\n --count 1 --instance-type t2.nano \\\n --key-name $KEY \\\n --security-group-ids $GROUPS\n```\n## Create EC2 with Automatic SSL Certification\nStart a Statping server with an SSL cert that will automatically regenerate when it's near expiration time. You'll need to point your domain's A record (IP address) or CNAME (public DNS endpoint) to use this feature.\n\n```bash\nwget https://raw.githubusercontent.com/hunterlong/statping/master/dev/ec2-ssl.sh\n```\n\n```bash\n# edit the contents inside of ec2-ssl.sh then continue\nLETSENCRYPT_HOST=\"status.MYDOMAIN.com\"\nLETSENCRYPT_EMAIL=\"noreply@MYEMAIL.com\"\n```\nEdit ec2-ssl.sh and insert your domain you want to use, then run command below. Use the Security Group ID that you used above for --security-group-ids\n```\nGROUPS=sg-7e8b830f\nAMI_IMAGE=ami-7be8a103\nKEY=MYKEYHERE\n\naws ec2 run-instances \\\n --user-data file://ec2-ssl.sh \\\n --image-id $AMI_IMAGE \\\n --count 1 --instance-type t2.nano \\\n --key-name $KEY \\\n --security-group-ids $GROUPS\n```\n\n### EC2 Server Specs\n- t2.nano ($4.60 monthly)\n- 8gb SSD Memory\n- 0.5gb RAM\n- Docker with Docker Compose installed\n- Running Statping, NGINX, and Postgres\n- boot scripts to automatically clean unused containers.\n\n\n\n
Docker \nStatping is easily ran on Docker with the light weight Alpine linux image. View on [Docker Hub](https://hub.docker.com/r/hunterlong/statping).\n\n[](https://microbadger.com/images/hunterlong/statping) [](https://hub.docker.com/r/hunterlong/statping/builds/)\n\n# Latest Docker Image\nThe `latest` Docker image uses Alpine Linux to keep it ultra small.\n```bash\ndocker run -d \\\n -p 8080:8080 \\\n --restart always \\\n hunterlong/statping\n```\n\n# Mounting Volume\nYou can mount a volume to the `/app` Statping directory. This folder will contain `logs`, `config.yml`, and static assets if you want to edit the SCSS/CSS. \n```bash\ndocker run -d \\\n -p 8080:8080 \\\n -v /mydir/statping:/app \\\n --restart always \\\n hunterlong/statping\n```\n\n# Attach a SSL Certificate\nWhen you mount `server.crt` and `server.key` to the `/app` directory, Statping will run a HTTPS server on port 443. Checkout the [SSL Wiki](https://github.com/statping/statping/wiki/SSL) documentation to see more information about this.\n```bash\ndocker run -d \\\n -p 443:443 \\\n -v /mydir/domain.crt:/app/server.crt \\\n -v /mydir/domain.key:/app/server.key \\\n -v /mydir:/app \\\n --restart always \\\n hunterlong/statping\n```\n\n# Development Docker Image\nIf you want to run Statping that was build from the source, use the `dev` Docker image.\n```bash\ndocker run -d -p 8080:8080 hunterlong/statping:dev\n```\n\n# Cypress Testing Docker Image\nThis Docker image will pull the latest version of Statping and test the web interface with [Cypress](https://www.cypress.io/).\n```bash\ndocker run -it -p 8080:8080 hunterlong/statping:cypress\n```\n\n#### Or use Docker Compose\nThis Docker Compose file inlcudes NGINX, Postgres, and Statping.\n\n### Docker Compose with NGINX and Postgres\nOnce you initiate the `docker-compose.yml` file below go to http://localhost and you'll be forwarded to the /setup page. \nDatabase Authentication\n- database: `postgres`\n- port: `5432`\n- username: `statup`\n- password: `password123`\n- database: `statup`\n\n```yaml\nversion: '2.3'\n\nservices:\n\n nginx:\n container_name: nginx\n image: jwilder/nginx-proxy\n ports:\n - 0.0.0.0:80:80\n - 0.0.0.0:443:443\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/tmp/docker.sock:ro\n - ./statup/nginx/certs:/etc/nginx/certs:ro\n - ./statup/nginx/vhost:/etc/nginx/vhost.d\n - ./statup/nginx/html:/usr/share/nginx/html:ro\n - ./statup/nginx/dhparam:/etc/nginx/dhparam\n environment:\n DEFAULT_HOST: localhost\n\n statup:\n container_name: statup\n image: hunterlong/statping:latest\n restart: always\n networks:\n - internet\n - database\n depends_on:\n - postgres\n volumes:\n - ./statup/app:/app\n environment:\n VIRTUAL_HOST: localhost\n VIRTUAL_PORT: 8080\n DB_CONN: postgres\n DB_HOST: postgres\n DB_USER: statup\n DB_PASS: password123\n DB_DATABASE: statup\n NAME: EC2 Example\n DESCRIPTION: This is a Statping Docker Compose instance\n\n postgres:\n container_name: postgres\n image: postgres:10\n restart: always\n networks:\n - database\n volumes:\n - ./statup/postgres:/var/lib/postgresql/data\n environment:\n POSTGRES_PASSWORD: password123\n POSTGRES_USER: statup\n POSTGRES_DB: statup\n\nnetworks:\n internet:\n driver: bridge\n database:\n driver: bridge\n```\nOr a simple wget...\n```bash\nwget https://raw.githubusercontent.com/hunterlong/statping/master/servers/docker-compose.yml\ndocker-compose up -d\n```\n\n### Docker Compose with Automatic SSL\nYou can automatically start a Statping server with automatic SSL encryption using this docker-compose file. First point your domain's DNS to the Statping server, and then run this docker-compose command with DOMAIN and EMAIL. Email is for letsencrypt services.\n```bash\nwget https://raw.githubusercontent.com/hunterlong/statping/master/servers/docker-compose-ssl.yml\n\nLETSENCRYPT_HOST=mydomain.com \\\n LETSENCRYPT_EMAIL=info@mydomain.com \\\n docker-compose -f docker-compose-ssl.yml up -d\n```\n\n#### Full docker-compose with Automatic SSL\n\n```yaml\nversion: '2.3'\n\nservices:\n\n nginx:\n container_name: nginx\n image: jwilder/nginx-proxy\n ports:\n - 0.0.0.0:80:80\n - 0.0.0.0:443:443\n labels:\n - \"com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy\"\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/tmp/docker.sock:ro\n - ./statup/nginx/certs:/etc/nginx/certs:ro\n - ./statup/nginx/vhost:/etc/nginx/vhost.d\n - ./statup/nginx/html:/usr/share/nginx/html:ro\n - ./statup/nginx/dhparam:/etc/nginx/dhparam\n environment:\n DEFAULT_HOST: ${LETSENCRYPT_HOST}\n\n letsencrypt:\n container_name: letsencrypt\n image: jrcs/letsencrypt-nginx-proxy-companion\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock:ro\n - ./statup/nginx/certs:/etc/nginx/certs\n - ./statup/nginx/vhost:/etc/nginx/vhost.d\n - ./statup/nginx/html:/usr/share/nginx/html\n - ./statup/nginx/dhparam:/etc/nginx/dhparam\n\n statup:\n container_name: statup\n image: hunterlong/statping:latest\n restart: always\n networks:\n - internet\n - database\n depends_on:\n - postgres\n volumes:\n - ./statup/app:/app\n environment:\n VIRTUAL_HOST: ${LETSENCRYPT_HOST}\n VIRTUAL_PORT: 8080\n LETSENCRYPT_HOST: ${LETSENCRYPT_HOST}\n LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}\n DB_CONN: postgres\n DB_HOST: postgres\n DB_USER: statup\n DB_PASS: password123\n DB_DATABASE: statup\n NAME: SSL Example\n DESCRIPTION: This Status Status Page should be running ${LETSENCRYPT_HOST} with SSL.\n\n postgres:\n container_name: postgres\n image: postgres:10\n restart: always\n networks:\n - database\n volumes:\n - ./statup/postgres:/var/lib/postgresql/data\n environment:\n POSTGRES_PASSWORD: password123\n POSTGRES_USER: statup\n POSTGRES_DB: statup\n\nnetworks:\n internet:\n driver: bridge\n database:\n driver: bridge\n```\n\n
Mobile App \nStatping has a free mobile app so you can monitor your websites and applications without the need of a computer. \n\n\n\n
\n \n \n
\n\n
\n \n
\n\n\n
Heroku \nYou can now instantly deploy your Statping instance on a free Heroku container. Simply click the deploy button below and get up in running within seconds. This Heroku deployment is based on the Statping Docker image so you will have all the great features including SASS and all the notifiers without any setup. \n\n[](https://heroku.com/deploy?template=https://github.com/statping/statping/tree/master)\n\nView the live Heroku Statping instance at: [https://statping.herokuapp.com](https://statping.herokuapp.com)\n\n# Database Configuration\nYou will need to deploy a Postgres database to your instance and insert some configuration variables. View the image below to see what environment variable you need to configure. If you insert `DB_CONN`, Statping will attempt to automatically connect to the database without the need for the `config.yml` file. \n\n\n\n\n
API \nStatping includes a RESTFUL API so you can view, update, and edit your services with easy to use routes. You can currently view, update and delete services, view, create, update users, and get detailed information about the Statping instance. To make life easy, try out a Postman or Swagger JSON file and use it on your Statping Server.\n\n
\nPostman | Postman JSON Export | Swagger Export \n
\n\n## Authentication\nAuthentication uses the Statping API Secret to accept remote requests. You can find the API Secret in the Settings page of your Statping server. To send requests to your Statping API, include a Authorization Header when you send the request. The API will accept any one of the headers below.\n\n- HTTP Header: `Authorization: API SECRET HERE`\n- HTTP Header: `Authorization: Bearer API SECRET HERE`\n\n## Main Route `/api`\nThe main API route will show you all services and failures along with them.\n\n## Services\nThe services API endpoint will show you detailed information about services and will allow you to edit/delete services with POST/DELETE http methods.\n\n### Viewing All Services\n- Endpoint: `/api/services`\n- Method: `GET`\n- Response: Array of [Services](https://github.com/statping/statping/wiki/API#service-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\n### Viewing Service\n- Endpoint: `/api/services/{id}`\n- Method: `GET`\n- Response: [Service](https://github.com/statping/statping/wiki/API#service-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\n### Updating Service\n- Endpoint: `/api/services/{id}`\n- Method: `POST`\n- Response: [Service](https://github.com/statping/statping/wiki/API#service-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nPOST Data:\n```json\n{\n \"name\": \"Updated Service\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 15,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0\n}\n```\n\n### Create New Service\n- Endpoint: `/api/services`\n- Method: `POST`\n- Response: [Service](https://github.com/statping/statping/wiki/API#service-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nPOST Data:\n```json\n{\n \"name\": \"Create New Service\",\n \"domain\": \"https://www.coogger.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 15,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0\n}\n```\n\n### Deleting Service\n- Endpoint: `/api/services/{id}`\n- Method: `DELETE`\n- Response: [Object Response](https://github.com/statping/statping/wiki/API#object-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nResponse:\n```json\n{\n \"status\": \"success\",\n \"id\": 4,\n \"type\": \"service\",\n \"method\": \"delete\"\n}\n```\n\n## Users\nThe users API endpoint will show you users that are registered inside your Statping instance.\n\n### View All Users\n- Endpoint: `/api/users`\n- Method: `GET`\n- Response: Array of [Users](https://github.com/statping/statping/wiki/API#user-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\n### Viewing User\n- Endpoint: `/api/users/{id}`\n- Method: `GET`\n- Response: [User](https://github.com/statping/statping/wiki/API#user-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\n### Creating New User\n- Endpoint: `/api/users`\n- Method: `POST`\n- Response: [User](https://github.com/statping/statping/wiki/API#user-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nPOST Data:\n```json\n{\n \"username\": \"newadmin\",\n \"email\": \"info@email.com\",\n \"password\": \"password123\",\n \"admin\": true\n}\n```\n\n### Updating User\n- Endpoint: `/api/users/{id}`\n- Method: `POST`\n- Response: [User](https://github.com/statping/statping/wiki/API#user-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nPOST Data:\n```json\n{\n \"username\": \"updatedadmin\",\n \"email\": \"info@email.com\",\n \"password\": \"password123\",\n \"admin\": true\n}\n```\n\n### Deleting User\n- Endpoint: `/api/services/{id}`\n- Method: `DELETE`\n- Response: [Object Response](https://github.com/statping/statping/wiki/API#object-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nResponse:\n```json\n{\n \"status\": \"success\",\n \"id\": 3,\n \"type\": \"user\",\n \"method\": \"delete\"\n}\n```\n\n# Service Response\n```json\n{\n \"id\": 8,\n \"name\": \"Test Service 0\",\n \"domain\": \"https://status.coinapp.io\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 1,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 30,\n \"order_id\": 0,\n \"created_at\": \"2018-09-12T09:07:03.045832088-07:00\",\n \"updated_at\": \"2018-09-12T09:07:03.046114305-07:00\",\n \"online\": false,\n \"latency\": 0.031411064,\n \"24_hours_online\": 0,\n \"avg_response\": \"\",\n \"status_code\": 502,\n \"last_online\": \"0001-01-01T00:00:00Z\",\n \"dns_lookup_time\": 0.001727175,\n \"failures\": [\n {\n \"id\": 5187,\n \"issue\": \"HTTP Status Code 502 did not match 200\",\n \"created_at\": \"2018-09-12T10:41:46.292277471-07:00\"\n },\n {\n \"id\": 5188,\n \"issue\": \"HTTP Status Code 502 did not match 200\",\n \"created_at\": \"2018-09-12T10:41:47.337659862-07:00\"\n }\n ]\n}\n```\n\n# User Response\n```json\n{\n \"id\": 1,\n \"username\": \"admin\",\n \"api_key\": \"02f324450a631980121e8fd6ea7dfe4a7c685a2f\",\n \"admin\": true,\n \"created_at\": \"2018-09-12T09:06:53.906398511-07:00\",\n \"updated_at\": \"2018-09-12T09:06:54.972440207-07:00\"\n}\n```\n\n# Object Response\n```json\n{\n \"type\": \"service\",\n \"id\": 19,\n \"method\": \"delete\",\n \"status\": \"success\"\n}\n```\n\n# Main API Response\n```json\n{\n \"name\": \"Awesome Status\",\n \"description\": \"An awesome status page by Statping\",\n \"footer\": \"This is my custom footer\",\n \"domain\": \"https://demo.statping.com\",\n \"version\": \"v0.56\",\n \"migration_id\": 1536768413,\n \"created_at\": \"2018-09-12T09:06:53.905374829-07:00\",\n \"updated_at\": \"2018-09-12T09:07:01.654201225-07:00\",\n \"database\": \"sqlite\",\n \"started_on\": \"2018-09-12T10:43:07.760729349-07:00\",\n \"services\": [\n {\n \"id\": 1,\n \"name\": \"Google\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 10,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0,\n \"created_at\": \"2018-09-12T09:06:54.97549122-07:00\",\n \"updated_at\": \"2018-09-12T09:06:54.975624103-07:00\",\n \"online\": true,\n \"latency\": 0.09080986,\n \"24_hours_online\": 0,\n \"avg_response\": \"\",\n \"status_code\": 200,\n \"last_online\": \"2018-09-12T10:44:07.931990439-07:00\",\n \"dns_lookup_time\": 0.005543935\n }\n ]\n}\n```\n\n\n
Makefile \nHere's a simple list of Makefile commands you can run using `make`. The [Makefile](https://github.com/statping/statping/blob/master/Makefile) may change often, so i'll try to keep this Wiki up-to-date.\n\n- Ubuntu `apt-get install build-essential`\n- MacOSX `sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer`\n- Windows [Install Guide for GNU make utility](http://gnuwin32.sourceforge.net/packages/make.htm)\n- CentOS/RedHat `yum groupinstall \"Development Tools\"`\n\n### Commands\n```bash\nmake build # build the binary\nmake install\nmake run\nmake test\nmake coverage\nmake docs\n# Building Statping\nmake build-all\nmake build-alpine\nmake docker\nmake docker-run\nmake docker-dev\nmake docker-run-dev\nmake databases\nmake dev-deps\nmake clean\nmake compress\nmake cypress-install\nmake cypress-test\n```\n\n
Notifiers \n
\n \n
\n\nStatping includes multiple Notifiers to alert you when your services are offline. You can also create your own notifier and send a Push Request to this repo! Creating a custom notifier is pretty easy as long as you follow the requirements. A notifier will automatically be installed into the users Statping database, and form values will save without any hassles. 💃\n\n
\nExample Code | Events | View Notifiers \n \n
\n\n## Notifier Requirements\n- Must have a unique `METHOD` name\n- Struct must have `*notifier.Notification` pointer in it. \n- Must create and add your notifier variable in `init()`\n- Should have a form for user to input their variables/keys. `Form: []notifier.NotificationForm`\n\n## Notifier Interface (required)\nStatping has the `Notifier` interface which you'll need to include in your notifier. Statping includes many other events/triggers for your notifier, checkout
Notifier Events to see all of them.\n```go\n// Notifier interface is required to create a new Notifier\ntype Notifier interface {\n\tOnSave() error // OnSave is triggered when the notifier is saved\n\tSend(interface{}) error // OnSave is triggered when the notifier is saved\n\tSelect() *Notification // Select returns the *Notification for a notifier\n}\n```\n\n### Basic Interface (required)\nInclude `OnSuccess` and `OnFailure` to receive events when a service is online or offline.\n```go\n// BasicEvents includes the most minimal events, failing and successful service triggers\ntype BasicEvents interface {\n\t// OnSuccess is triggered when a service is successful\n\tOnSuccess(*services.Service)\n\t// OnFailure is triggered when a service is failing\n\tOnFailure(*services.Service, *types.Failure)\n}\n```\n\n### Test Interface\nThe OnTest method will give the front end user the ability to test your notifier without saving, the OnTest method for your notifier run the functionality to test the user's submitted parameters and respond an error if notifier is not correctly setup.\n```go\n// Tester interface will include a function to Test users settings before saving\ntype Tester interface {\n\tOnTest() error\n}\n```\nIf your notifier includes this interface, the Test button will appear.\n\n## Notifier Struct\n```go\nvar example = &Example{¬ifier.Notification{\n\tMethod: \"example\", // unique method name\n\tHost: \"http://exmaplehost.com\", // default 'host' field\n\tForm: []notifier.NotificationForm{{\n\t\tType: \"text\", // text, password, number, or email\n\t\tTitle: \"Host\", // The title of value in form\n\t\tPlaceholder: \"Insert your Host here.\", // Optional placeholder in input\n\t\tDbField: \"host\", // An accepted DbField value (read below)\n\t}},\n}\n```\n\n## Notifier Form\nInclude a form with your notifier so other users can save API keys, username, passwords, and other values. \n```go\n// NotificationForm contains the HTML fields for each variable/input you want the notifier to accept.\ntype NotificationForm struct {\n\tType string `json:\"type\"` // the html input type (text, password, email)\n\tTitle string `json:\"title\"` // include a title for ease of use\n\tPlaceholder string `json:\"placeholder\"` // add a placeholder for the input\n\tDbField string `json:\"field\"` // true variable key for input\n\tSmallText string `json:\"small_text\"` // insert small text under a html input\n\tRequired bool `json:\"required\"` // require this input on the html form\n\tIsHidden bool `json:\"hidden\"` // hide this form element from end user\n\tIsList bool `json:\"list\"` // make this form element a comma separated list\n\tIsSwitch bool `json:\"switch\"` // make the notifier a boolean true/false switch\n}\n```\n\n### Example Notifier Form\nThis is the Slack Notifier `Form` fields.\n```go\nForm: []notifier.NotificationForm{{\n\t\tType: \"text\",\n\t\tTitle: \"Incoming webhooker Url\",\n\t\tPlaceholder: \"Insert your slack webhook URL here.\",\n\t\tSmallText: \"Incoming webhooker URL from
slack Apps \",\n\t\tDbField: \"Host\",\n\t\tRequired: true,\n\t}}\n}\n```\n\n### Accepted DbField Values\nThe `notifier.NotificationForm` has a field called `DbField` which is the column to save the value into the database. Below are the acceptable DbField string names to include in your form. \n- `host` used for a URL or API endpoint\n- `username` used for a username\n- `password` used for a password\n- `port` used for a integer port number\n- `api_key` used for some kind of API key\n- `api_secret` used for some API secret\n- `var1` used for any type of string\n- `var2` used for any type of string (extra)\n\n### Form Elements\nYou can completely custom your notifications to include a detailed form. \n- `Type` is a HTML input type for your field\n- `Title` give your input element a title\n- `Placeholder` optional field if you want a placeholder in input\n- `DbField` required field to save variable into database (read above)\n- `Placeholder` optional field for inserting small hint under the input\n\n# Adding Notifiers\nTo add a notifier to the Statping application, simply append your Notifier in the `AttachNotifiers()` function inside of [core/core.go](https://github.com/statping/statping/blob/master/core/core.go).\n\n```go\n// AttachNotifiers will attach all the notifier's into the system\nfunc AttachNotifiers() error {\n\treturn notifier.AddNotifiers(\n\t\tnotifiers.Command,\n\t\tnotifiers.Discorder,\n\t\tnotifiers.Emailer,\n\t\tnotifiers.LineNotify,\n\t\tnotifiers.Mobile,\n\t\tnotifiers.Slacker,\n\t\tnotifiers.Telegram,\n\t\tnotifiers.Twilio,\n\t\tnotifiers.Webhook,\n\t)\n}\n```\n###### [AttachNotifiers](https://github.com/statping/statping/blob/master/core/core.go#L183)\n\n
Notifier Events \nEvents are handled by added interfaces for the elements you want to monitor.\n\n## Required Notifier Interface\n```go\n// Notifier interface is required to create a new Notifier\ntype Notifier interface {\n\t// Run will trigger inside of the notifier when enabled\n\tRun() error\n\t// OnSave is triggered when the notifier is saved\n\tOnSave() error\n\t// Test will run a function inside the notifier to Test if it works\n\tTest() error\n\t// Select returns the *Notification for a notifier\n\tSelect() *Notification\n}\n```\n\n## Basic Success/Failure Interface\n```go\n// BasicEvents includes the most minimal events, failing and successful service triggers\ntype BasicEvents interface {\n\t// OnSuccess is triggered when a service is successful\n\tOnSuccess(*services.Service)\n\t// OnFailure is triggered when a service is failing\n\tOnFailure(*services.Service, *types.Failure)\n}\n```\n\n\n## Service Events\n```go\n// ServiceEvents are events for Services\ntype ServiceEvents interface {\n\tOnNewService(*services.Service)\n\tOnUpdatedService(*services.Service)\n\tOnDeletedService(*services.Service)\n}\n```\n\n## User Events\n```go\n// UserEvents are events for Users\ntype UserEvents interface {\n\tOnNewUser(*types.User)\n\tOnUpdatedUser(*types.User)\n\tOnDeletedUser(*types.User)\n}\n```\n\n## Core Events\n```go\n// CoreEvents are events for the main Core app\ntype CoreEvents interface {\n\tOnUpdatedCore(*types.Core)\n}\n```\n\n## Notifier Events\n```go\n// NotifierEvents are events for other Notifiers\ntype NotifierEvents interface {\n\tOnNewNotifier(*Notification)\n\tOnUpdatedNotifier(*Notification)\n}\n```\n\n
Notifier Example \nBelow is a full example of a Statping notifier which will give you a good example of how to create your own. Insert your new notifier inside the `/notifiers` folder once your ready!\n\n```go\npackage notifiers\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/statping/statping/types\"\n \"github.com/statping/statping/core/notifier\"\n\t\"time\"\n)\n\ntype Example struct {\n\t*notifier.Notification\n}\n\nvar example = &Example{¬ifier.Notification{\n\tMethod: METHOD,\n\tTitle: \"Example\",\n\tDescription: \"Example Notifier\",\n\tAuthor: \"Hunter Long\",\n\tAuthorUrl: \"https://github.com/hunterlong\",\n\tDelay: time.Duration(5 * time.Second),\n\tForm: []notifier.NotificationForm{{\n\t\tType: \"text\",\n\t\tTitle: \"Host\",\n\t\tPlaceholder: \"Insert your Host here.\",\n\t\tDbField: \"host\",\n\t\tSmallText: \"this is where you would put the host\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"Username\",\n\t\tPlaceholder: \"Insert your Username here.\",\n\t\tDbField: \"username\",\n\t}, {\n\t\tType: \"password\",\n\t\tTitle: \"Password\",\n\t\tPlaceholder: \"Insert your Password here.\",\n\t\tDbField: \"password\",\n\t}, {\n\t\tType: \"number\",\n\t\tTitle: \"Port\",\n\t\tPlaceholder: \"Insert your Port here.\",\n\t\tDbField: \"port\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"API Key\",\n\t\tPlaceholder: \"Insert your API Key here\",\n\t\tDbField: \"api_key\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"API Secret\",\n\t\tPlaceholder: \"Insert your API Secret here\",\n\t\tDbField: \"api_secret\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"Var 1\",\n\t\tPlaceholder: \"Insert your Var1 here\",\n\t\tDbField: \"var1\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"Var2\",\n\t\tPlaceholder: \"Var2 goes here\",\n\t\tDbField: \"var2\",\n\t}},\n}}\n\n// REQUIRED init() will install/load the notifier\nfunc init() {\n\tnotifier.AddNotifier(example)\n}\n\n// REQUIRED - Send is where you would put the action's of your notifier\nfunc (n *Example) Send(msg interface{}) error {\n\tmessage := msg.(string)\n\tfmt.Printf(\"i received this string: %v\\n\", message)\n\treturn nil\n}\n\n// REQUIRED\nfunc (n *Example) Select() *notifier.Notification {\n\treturn n.Notification\n}\n\n// REQUIRED\nfunc (n *Example) OnSave() error {\n\tmsg := fmt.Sprintf(\"received on save trigger\")\n\tn.AddQueue(msg)\n\treturn nil\n}\n\n// REQUIRED\nfunc (n *Example) Test() error {\n\tmsg := fmt.Sprintf(\"received a test trigger\\n\")\n\tn.AddQueue(msg)\n\treturn nil\n}\n\n// REQUIRED - BASIC EVENT\nfunc (n *Example) OnSuccess(s *services.Service) {\n\tmsg := fmt.Sprintf(\"received a count trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// REQUIRED - BASIC EVENT\nfunc (n *Example) OnFailure(s *services.Service, f *types.Failure) {\n\tmsg := fmt.Sprintf(\"received a failure trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnNewService(s *services.Service) {\n\tmsg := fmt.Sprintf(\"received a new service trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnUpdatedService(s *services.Service) {\n\tmsg := fmt.Sprintf(\"received a update service trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnDeletedService(s *services.Service) {\n\tmsg := fmt.Sprintf(\"received a delete service trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnNewUser(s *types.User) {\n\tmsg := fmt.Sprintf(\"received a new user trigger for user: %v\\n\", s.Username)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnUpdatedUser(s *types.User) {\n\tmsg := fmt.Sprintf(\"received a updated user trigger for user: %v\\n\", s.Username)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnDeletedUser(s *types.User) {\n\tmsg := fmt.Sprintf(\"received a deleted user trigger for user: %v\\n\", s.Username)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnUpdatedCore(s *types.Core) {\n\tmsg := fmt.Sprintf(\"received a updated core trigger for core: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnNewNotifier(s *Notification) {\n\tmsg := fmt.Sprintf(\"received a new notifier trigger for notifier: %v\\n\", s.Method)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnUpdatedNotifier(s *Notification) {\n\tmsg := fmt.Sprintf(\"received a update notifier trigger for notifier: %v\\n\", s.Method)\n\tn.AddQueue(msg)\n}\n```\n\n\n
Prometheus Exporter \nStatping includes a prometheus exporter so you can have even more monitoring power with your services. The prometheus exporter can be seen on `/metrics`, simply create another exporter in your prometheus config. Use your Statping API Secret for the Authorization Bearer header, the `/metrics` URL is dedicated for Prometheus and requires the correct API Secret has `Authorization` header.\n\n# Grafana Dashboard\nStatping has a [Grafana Dashboard](https://grafana.com/dashboards/6950) that you can quickly implement if you've added your Statping service to Prometheus. Import Dashboard ID: `6950` into your Grafana dashboard and watch the metrics come in!\n\n
\n\n## Basic Prometheus Exporter\nIf you have Statping and the Prometheus server in the same Docker network, you can use the yaml config below.\n```yaml\nscrape_configs:\n - job_name: 'statping'\n scrape_interval: 30s\n bearer_token: 'SECRET API KEY HERE'\n static_configs:\n - targets: ['statping:8080']\n```\n\n## Remote URL Prometheus Exporter\nThis exporter yaml below has `scheme: https`, which you can remove if you arn't using HTTPS.\n```yaml\nscrape_configs:\n - job_name: 'statping'\n scheme: https\n scrape_interval: 30s\n bearer_token: 'SECRET API KEY HERE'\n static_configs:\n - targets: ['status.mydomain.com']\n```\n\n### `/metrics` Output\n```\nstatping_total_failures 206\nstatping_total_services 4\nstatping_service_failures{id=\"1\" name=\"Google\"} 0\nstatping_service_latency{id=\"1\" name=\"Google\"} 12\nstatping_service_online{id=\"1\" name=\"Google\"} 1\nstatping_service_status_code{id=\"1\" name=\"Google\"} 200\nstatping_service_response_length{id=\"1\" name=\"Google\"} 10777\nstatping_service_failures{id=\"2\" name=\"Statping.com\"} 0\nstatping_service_latency{id=\"2\" name=\"Statping.com\"} 3\nstatping_service_online{id=\"2\" name=\"Statping.com\"} 1\nstatping_service_status_code{id=\"2\" name=\"Statping.com\"} 200\nstatping_service_response_length{id=\"2\" name=\"Statping.com\"} 2\n```\n\n
SSL \nYou can run Statping with a valid certificate by including 2 files in the root directory. Although, I personally recommend using NGINX or Apache to serve the SSL and then have the webserver direct traffic to the Statping instance. This guide will show you how to implement SSL onto your Statping server with multiple options.\n\n## SSL Certificate with Statping\nTo run the Statping HTTP server in SSL mode, you must include 2 files in the root directory of your Statping application. The 2 files you must include are:\n- `server.crt` SSL Certificate File\n- `server.key` SSL Certificate Key File\n\nThe filenames and extensions must match the exact naming above. If these 2 files are found, Statping will automatically start the HTTP server in SSL mode using your certificates. You can also generate your own SSL certificates, but you will receive a \"ERR_CERT_AUTHORITY_INVALID\" error. To generate your own, follow the commands below:\n\n```shell\nopenssl req -new -sha256 -key server.key -out server.csr\nopenssl x509 -req -sha256 -in server.csr -signkey server.key -out server.crt -days 3650\n```\nThis will generate a self signed certificate that you can use for your Statup instance. I recommend using a web server to do SSL termination for your server though.\n\n## Choose a Web Server or Environment\n\n**Choose the environment running the Statping instance.**\n- [Docker](#docker)\n- [NGINX](#nginx)\n- [Apache](#apache)\n\n## Docker\nDocker might be the easiest way to get up and running with a SSL certificate. Below is a `docker-compose.yml` file that will run NGINX, LetEncrypt, and Statping.\n\n1. Point your domain or subdomain to the IP address of the Docker server. This would be done on CloudFlare, Route53, or some other DNS provider.\n\n2. Replace the `docker-compose.yml` contents:\n- `MY.DOMAIN.COM` with the domain you want to use\n- `MY@EMAIL.COM` with your email address\n\n3. Run the docker container by running command `docker-compose up -d`. Give a little bit of time for LetEncrypt to automatically generate your SSL certificate.\n\n###### `docker-compose.yml`\n```yaml\nversion: '2.3'\nservices:\n nginx:\n container_name: nginx\n image: jwilder/nginx-proxy\n ports:\n - 0.0.0.0:80:80\n - 0.0.0.0:443:443\n labels:\n - \"com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy\"\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/tmp/docker.sock:ro\n - ./statping/nginx/certs:/etc/nginx/certs:ro\n - ./statping/nginx/vhost:/etc/nginx/vhost.d\n - ./statping/nginx/html:/usr/share/nginx/html:ro\n - ./statping/nginx/dhparam:/etc/nginx/dhparam\n environment:\n DEFAULT_HOST: MY.DOMAIN.COM\n\n letsencrypt:\n container_name: letsencrypt\n image: jrcs/letsencrypt-nginx-proxy-companion\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock:ro\n - ./statping/nginx/certs:/etc/nginx/certs\n - ./statping/nginx/vhost:/etc/nginx/vhost.d\n - ./statping/nginx/html:/usr/share/nginx/html\n - ./statping/nginx/dhparam:/etc/nginx/dhparam\n\n statping:\n container_name: statping\n image: hunterlong/statping:latest\n restart: always\n networks:\n - internet\n depends_on:\n - nginx\n volumes:\n - ./statping/app:/app\n environment:\n VIRTUAL_HOST: MY.DOMAIN.COM\n VIRTUAL_PORT: 8080\n LETSENCRYPT_HOST: MY.DOMAIN.COM\n LETSENCRYPT_EMAIL: MY@EMAIL.COM\n\nnetworks:\n internet:\n driver: bridge\n```\n\n## NGINX\nIf you already have a NGINX web server running, you just have to add a proxy pass and your SSL certs to the nginx config or as a vhost. By default Statping runs on port 8080, you can change this port by starting server with `statping -ip 127.0.0.1 -port 9595`.\n\n- Replace `/my/absolute/directory/for/cert/server.crt` with SSL certificate file.\n- Replace `/my/absolute/directory/for/key/server.key` with SSL key file.\n- Run `service nginx restart` and try out https on your domain.\n\n##### Tutorials\n- [NGINX Guide](https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-http/)\n- [How To Set Up Nginx Load Balancing with SSL Termination](https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-load-balancing-with-ssl-termination)\n\n###### `/etc/nginx/nginx.conf`\n```\n#user nobody;\nworker_processes 1;\nevents {\n worker_connections 1024;\n}\nhttp {\n include mime.types;\n default_type application/octet-stream;\n send_timeout 1800;\n sendfile on;\n keepalive_timeout 6500;\n server {\n listen 80;\n server_name localhost;\n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Client-Verify SUCCESS;\n proxy_set_header X-Client-DN $ssl_client_s_dn;\n proxy_set_header X-SSL-Subject $ssl_client_s_dn;\n proxy_set_header X-SSL-Issuer $ssl_client_i_dn;\n proxy_read_timeout 1800;\n proxy_connect_timeout 1800;\n }\n }\n # HTTPS server\n \n server {\n listen 443;\n server_name localhost;\n \n ssl on;\n ssl_certificate /my/absolute/directory/for/cert/server.crt;\n ssl_certificate_key /my/absolute/directory/for/key/server.key;\n ssl_session_timeout 5m;\n \n ssl_protocols SSLv2 SSLv3 TLSv1;\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\n ssl_prefer_server_ciphers on;\n \n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Client-Verify SUCCESS;\n proxy_set_header X-Client-DN $ssl_client_s_dn;\n proxy_set_header X-SSL-Subject $ssl_client_s_dn;\n proxy_set_header X-SSL-Issuer $ssl_client_i_dn;\n proxy_read_timeout 1800;\n proxy_connect_timeout 1800;\n }\n }\n}\n```\n\n## Apache\n\n
Config with .env File \nIt may be useful to load your environment using a `.env` file in the root directory of your Statping server. The .env file will be automatically loaded on startup and will overwrite all values you have in config.yml.\n\nIf you have the `DB_CONN` environment variable set Statping will bypass all values in config.yml and will require you to have the other DB_* variables in place. You can pass in these environment variables without requiring a .env file.\n\n## `.env` File\n```bash\nDB_CONN=postgres\nDB_HOST=0.0.0.0\nDB_PORT=5432\nDB_USER=root\nDB_PASS=password123\nDB_DATABASE=root\n\nNAME=Demo\nDESCRIPTION=This is an awesome page\nDOMAIN=https://domain.com\nADMIN_USER=admin\nADMIN_PASSWORD=admin\nADMIN_EMAIL=info@admin.com\nUSE_CDN=true\nPOSTGRES_SSLMODE=false # enable ssl_mode for postgres (To enable use require)\nDISABLE_LOGS=false # disable logs from appearing and writing to disk\n\nIS_DOCKER=false\nIS_AWS=false\nSASS=/usr/local/bin/sass\nCMD_FILE=/bin/bash\n```\nThis .env file will include additional variables in the future, subscribe to this repo to keep up-to-date with changes and updates. \n\n
Static Export \nIf you want to use Statping as a CLI application without running a server, you can export your status page to a static HTML.\nThis export tool is very useful for people who want to export their HTML and upload/commit it to Github Pages or an FTP server.\n```dash\nstatup export\n```\n###### Creates `index.html` in the current directory with CDN asset URL's. 💃 \n\n
Statping Plugins \nSince Statping is built in Go Language we can use the [Go Plugin](https://golang.org/pkg/plugin/) feature to create dynamic plugins that run on load. Statping has an event anytime anything happens, you can create your own plugins and do any type of function. To implement your own ideas into Statping, use the plugin using the [statup/plugin](https://github.com/statping/statping/blob/master/plugin/main.go) package.\n```\ngo get github.com/statping/statping/plugin\n```\n\n## Example Plugin\nStart off with the [Example Statping Plugin](https://github.com/statping/statping_plugin) that includes all the interfaces and some custom options for you to expand on. You can include any type of function in your own plugin!\n\n
\n \n
\n\n## Building Plugins\nPlugins don't need a push request and they can be private! You'll need to compile your plugin to the Golang `.so` binary format. Once you've built your plugin, insert it into the `plugins` folder in your Statping directory and reboot the application. Clone the [Example Statping Plugin](https://github.com/statping/statping_plugin) repo and try to build it yourself!\n\n#### Build Requirements\n- You must have `main.go`\n- You must create the Plugin variable on `init()`\n\n```bash\ngit clone https://github.com/statping/statping_plugin\ncd statup-plugin\ngo build -buildmode=plugin -o example.so\n```\n###### Insert `example.so` into the `plugins` directory and reload Statping\n\n## Testing Statping Plugins\nStatping includes a couple tools to help you on your Plugin journey, you can use `statup test plugins` command to test all plugins in your `/plugins` folder. This test will attempt to parse your plugin details, and then it will send events for your plugin to be fired.\n```\nstatup test plugins\n```\n
\n \n
\n\nYour plugin should be able to parse and receive events before distributing it. The test tools creates a temporary database (SQLite) that your plugin can interact with. Statping uses [upper.io/db.v3](https://upper.io/db.v3) for database interactions. The database is passed to your plugin `OnLoad(db sqlbuilder.Database)`, so you can use the `db` variable passed here.\n\n## Statping Plugin Interface\nPlease remember Golang plugin's are very new and Statping plugin package may change and 'could' brake your plugin. Checkout the [statup/plugin package](https://github.com/statping/statping/blob/master/plugin/main.go) to see the most current interfaces.\n```go\ntype PluginActions interface {\n\tGetInfo() Info\n\tGetForm() string\n\tSetInfo(map[string]interface{}) Info\n\tRoutes() []Routing\n\tOnSave(map[string]interface{})\n\tOnFailure(map[string]interface{})\n\tOnSuccess(map[string]interface{})\n\tOnSettingsSaved(map[string]interface{})\n\tOnNewUser(map[string]interface{})\n\tOnNewService(map[string]interface{})\n\tOnUpdatedService(map[string]interface{})\n\tOnDeletedService(map[string]interface{})\n\tOnInstall(map[string]interface{})\n\tOnUninstall(map[string]interface{})\n\tOnBeforeRequest(map[string]interface{})\n\tOnAfterRequest(map[string]interface{})\n\tOnShutdown()\n\tOnLoad(sqlbuilder.Database)\n}\n```\n\n## Event Parameters\nAll event interfaces for the Statping Plugin will return a `map[string]interface{}` type, this is because the plugin package will most likely update and change in the future, but using this type will allow your plugin to continue even after updates.\n\n## Example of an Event\nKnowing what happens during an event is important for your plugin. For example, lets have an event that echo something when a service has a Failure status being issued. Checkout some example below to see how this golang plugin action works. \n\n```go\nfunc (p pkg) OnSuccess(data map[string]interface{}) {\n fmt.Println(\"Statping Example Plugin received a successful service hit! \")\n fmt.Println(\"Name: \", data[\"Name\"])\n fmt.Println(\"Domain: \", data[\"Domain\"])\n fmt.Println(\"Method: \", data[\"Method\"])\n fmt.Println(\"Latency: \", data[\"Latency\"])\n}\n```\n###### OnSuccess is fired every time a service has check it be online\n\n```go\nfunc OnFailure(service map[string]interface{}) {\n fmt.Println(\"oh no! an event is failing right now! do something!\")\n fmt.Println(service)\n}\n```\n###### OnFailure is fired every time a service is failing\n\n```go\nfunc (p pkg) OnLoad(db sqlbuilder.Database) {\n fmt.Println(\"=============================================================\")\n fmt.Printf(\" Statping Example Plugin Loaded using %v database\\n\", db.Name())\n fmt.Println(\"=============================================================\")\n}\n```\n###### OnLoad is fired after plugin is loaded into the environment\n\n\n## Interacting with Database\nThe Example Statping Plugin includes a variable `Database` that will allow you to interact with the Statping database. Checkout [database.go](https://github.com/statping/statping_plugin/blob/master/database.go) to see a full example of Create, Read, Update and then Deleting a custom Communication entry into the database.\n```go\n// Insert a new communication into database\n// once inserted, return the Communication\nfunc (c *Communication) Create() *Communication {\n\tuuid, err := CommunicationTable().Insert(c)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tc.Id = uuid.(int64)\n\treturn c\n}\n```\n\n## Custom HTTP Routes\nPlugin's can include their own HTTP route to accept GET/POST requests. Route are loaded after Statping loads all of it's Routes. Checkout [routes.go](https://github.com/statping/statping_plugin/blob/master/routes.go) on the example plugin to see a full example of how to use it.\n```go\n// You must have a Routes() method in your plugin\nfunc (p *pkg) Routes() []plugin.Routing {\n\treturn []plugin.Routing{{\n\t\tURL: \"hello\",\n\t\tMethod: \"GET\",\n\t\tHandler: CustomInfoHandler,\n\t}}\n}\n\n// This is the HTTP handler for the '/hello' URL created above\nfunc CustomInfoHandler(w http.ResponseWriter, r *http.Request) {\n\tw.WriteHeader(http.StatusOK)\n\tfmt.Fprintln(w, \"Oh Wow!!! This is cool...\")\n}\n```\n\n\n## Plugin To-Do List\n- [ ] Ability to includes assets like jpg, json, etc\n\n
Statuper \nStatping includes a simple to use installation shell script that will help you install locally, Docker, and even onto a AWS EC2 instance.\n\n
\n \n
\n\n## Installation\n```bash\ncurl -O https://assets.statup.io/statuper && chmod +x statuper\n```\n\n## Usage\n- `statuper`\n\n
Build and Test \nBuilding from the Go Language source code is pretty easy if you already have Go installed. Clone this repo and `cd` into it. \n\n### Git n' Go Get\n```bash\ngit clone https://github.com/statping/statping.git\ncd statup\ngo get -v\n```\n\n### Install go.rice\nStatping uses go.rice to compile HTML, JS, and CSS files into it's single binary output.\n```\ngo get github.com/GeertJohan/go.rice\ngo get github.com/GeertJohan/go.rice/rice\n```\n\n### Build Statping Binary\nStatping uses go.rice to compile HTML, JS, and CSS files into it's single binary output.\n```\nrice embed-go\ngo build -o statup .\n./statup version\n```\n\n### Test Coverage\nYou can also test Statio on your localhost, but it does require a MySQL, and Postgres server to be accessible since testing does create/drop tables for multiple databases. \n```\ngo test -v\n```\n\n
Contributing \nHave a feature you want to implement into Statping!? Awesome! Follow this guide to see how you can test, compile and build Statping for production use. I recommend you use `make` with this process, it will save you time and it will auto include many customized parameters to get everything working correctly.\n\n# Dependencies\nStatping has a couple of required dependencies when testing and compiling the binary. The [Makefile](https://github.com/statping/statping/blob/master/Makefile) will make these tasks a lot easier. Take a look at the Makefile to see what commands are ran. Run the command below to get setup right away.\n```bash\nmake dev-deps\n```\nList of requirements for compiling assets, building binary, and testing.\n- [Go Language](https://golang.org/) (currently `1.10.3`)\n- [Docker](https://docs.docker.com/)\n- [SASS](https://sass-lang.com/install)\n- [Cypress](https://www.cypress.io/) (only used for UI testing, `make cypress-install`)\n\n# Compiling Assets\nThis Golang project uses [rice](https://github.com/GeertJohan/go.rice) to compile static assets into a single file. The file `source/rice-box.go` is never committed to the Github repo, it is automatically created on build. Statping also requires `sass` to be installed on your local OS. To compile all the static assets run the command below:\n\n```bash\nmake compile\n```\nAfter this is complete, you'll notice the `source/rice-box.go` file has been generated. You can now continue to build, and test.\n\n# Testing\nStatping includes multiple ways to Test the application, you can run the `make` command, or the normal `go test` command. To see the full experience of your updates, you can even run Cypress tests which is in the `.dev/test` folder.\n\nStatping will run all tests in `cmd` folder on MySQL, Postgres, and SQLite databases. You can run `make databases` to automatically create MySQL and Postgres with Docker.\n\n###### Go Unit Testing:\n```bash\nmake test\n```\n\n###### Cypress UI Testing:\n```bash\nmake cypress-test\n```\n\n###### Test Everything:\n```bash\nmake test-all\n```\n\n# Build\nStatping will build on all operating systems except Windows 32-bit. I personally use [xgo](https://github.com/karalabe/xgo) to cross-compile on multiple systems using Docker. Follow the commands below to build on your local system.\n\n###### Build for local operating system:\n```bash\nmake build\n```\n\n# Compile for Production\nOnce you've tested and built locally, you can compile Statping for all available operating systems using the command below. This command will require you to have Docker.\n\n```bash\nmake build-all\n```\n\n# What Now\nEverything tested, compiled and worked out!? Awesome! 💃 You can now commit your changes, and submit a Pull Request with the features/bugs you added or removed.\n\n\n\n\n\n
PGP Signature \nYou can check if the Statping binary you downloaded is authentic by running a few commands.\n\n### Steps to Authenticate\n1. Download the Statping `tar.gz` file from [Latest Releases](https://github.com/statping/statping/releases/latest) and extract the `statping` binary and the `statup.asc` file.\n2. Run command: `gpg --verify statping.asc`\n3. You should see `Good signature from \"Hunter Long
\" [ultimate]`.\n\n# Statping Public Key\n- [https://statping.com/statping.gpg](https://statping.com/statping.gpg)\n\nYou can also download the key with the command below:\n```\nwget https://statping.com/statping.gpg\n```\n\n###### `statping.gpg`\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBFwGUYIBEADNsDY4aUOx8EoZuTRFPtjuadJzFRyKtHhw/tLlAnoFACanZPIT\nNZoRYvRR5v6lMDXdxsteDbJEOhZ1WDiKIr4OyMahPsyyH6ULzSBKgePUswa0sDef\nUnXYzPFQCzqQyQQFbp9AYfDP7dW6dTL9I6qU2NqlJvjxJiiZTAq87SmsLqHiASnI\n+ottnQuu6vJQBJz2PFIuaS1c3js/+HBbth9GK5B9YN1BIIyZoFmWKVU9HnJf+aM3\nUs6OLjjwYwWzQH38ZV84IjVXyiP9PQVhlCXeHK7XdhPZvnSP1m5Wszj/jowwY6Mz\nLgLotfL540X7yOJ7hJTFYLFBOtJdJr/3Ov8SH4HXdPFPVG+UqxsmtmPqUQ9iAxAE\njRFfkAxBvH5Szf2WZdaLnlrrOcOKJIIjZgHqalquBTAhlh5ul0lUVSSPxetwIBlW\n60L41k94NJFGDt8xOJ+122mLcywmQ1CzhDfeIKlxl6JDiVHjoRqlQQrqIoNZMV85\nrzGfrmbuwv1MXGBJoiNy3330ujOBmhQ9dQVwKpxhBKdjnAgIGM9szbUYxIkGgM1O\nU4b1WF3AF/9JOpKJ0LewslpM3BFFYnemGsHXAv3TBPqKidNdwMAiBOtNykGoXF6i\n0D6jOW/IB1da0gUA+kr5JdAOwIG7JXKhur2MO7Ncid59DL2N8RePRWj+jwARAQAB\ntB9IdW50ZXIgTG9uZyA8aW5mb0BzdGF0cGluZy5jb20+iQJOBBMBCAA4FiEEt21h\n+qbbdZRm6D2ZZLnGquLVUngFAlwGUYICGwMFCwkIBwIGFQoJCAsCBBYCAwECHgEC\nF4AACgkQZLnGquLVUnizwA//c7vmwTMq/8LYlbo37WM2kDE9AKIrz6VSMq4RhGbC\nLikH0X0epa+if79n9BZrVU/Af3aKTn7vu2J4XrvzcdCXtcsR0YmCWML2Y6OSFmhX\nw3o6woiFcp+SUWdcM/kithRun+j9sKV4akdgkdBQUdh/RMVln+radz1c6G59iTdh\nS+Ip3ObO7Gn5VnrLwxix+W9Jhg8YhDgDGEDt8e1yvjuMRY+WhjHFlwEMoE0kvQL8\nQvQH2dGD3dExWAuIL7+0xC0ZGU0PR8vRrq1ukdIsWlDY+42vvhcyPZKFFDTM/QLF\nFcCNiPSGhiK/NQq67xnRMFdh0fnqbydWj2atMpacIrheEkOt8db2/UMyDOwlIxgy\nKOG8x+yNKiG9LyvW4axRLctN608/+TbvtFo5TVOFJYxJQp4b5uz7LgJAJw7PBvfC\nbqx64BH8WGzgyGcAl9unQEtpDuxXoKvP2kbsS7hjvhK0gJgW9llpV4sRJJGApTBc\nWtbcS9DBGs3k1aZdA72bxnayD32syVz7czl4+tkRsbQZ4VgJh1yrHIDsdWQXFnYu\nEQJfCgX5HvvC13MpDUth0NWCFtWQirY3EFbIgSuhB/D5iXA+Dt1Dq5c1u7wQlUVi\nLQCU++oMGrlU3gZrnov5lnBGCEjn0O9bKQm8zmLdEcENFxUZvfPjOIY64YprZxD9\nBv65Ag0EXAZRggEQAMmjHmnvH8SvNJhku/oI96dFKen3bg9xdaFUD1vAuNglCalH\nwgXcCZd0RdobYNG46cXTzTQadtHS4hi/UBJ+oy5ZUpIRglW12eTYtqM2G11VbcQi\nj6rLITP9NIP+G1xBICSYK4UwmH55BolMEQ/1ZX0a9rESM9stDNglheCCudbMGR/1\nZYnufdEsh0yPwyC/1upZeu8LPWK62pt9mE/gccx77QTeDi5OJcRf1fPbUTCm3vSS\nwPPV2AGANodIhostjDymt5vh0tGwc7oUZZLnVdErfuctv7yMgZdiCpYu0jFy1NYf\nJgOpZasrcK7/1ozGzsfAo/sSU4kIkMwuWGgqfx5kGRK2CgU4T0i7oI6DMpOX9ZS8\ns3+oCWu83X0ofvm5R2CbjiUj2gR6JOhBQbJpCeTkLe+SFcUpnyrr7lG8B8QZHm5N\nnBi05V/s63RE3g/6WpR/fWuh+uswe01uqlSx9deW7jT49BL/MdSxwjfwLBLz/hLM\n0ld385XAd9bqMjUtp0XhZX2YORx3f/aKY7PYA62baGibb5RdPRw6viEAWU20eb+8\nX9Pa7hGmwUeal5lka4SD/TGl7wdY+g4oYP+jtKinH/ZftWA5wHTe3jWT5bdWrT2d\ne+0qA0SBkmKIDLpktvtTa19w2nfwBIwJ6fN36ZjYpOn/stxR7aRtnhSqvzxbABEB\nAAGJAjYEGAEIACAWIQS3bWH6ptt1lGboPZlkucaq4tVSeAUCXAZRggIbDAAKCRBk\nucaq4tVSeGWmD/9Pg1x6s98zdZCQa2apmUnuoQAQA9Gf2RBBuglCDGsY67wbvdHZ\n9wdFRs2QEhl2O3oFmidxthBOBRl9z62nXliLwNn1Lcy/yDfaB8wH6gMm4jn2N/z9\nvQXnyIzg8m4PItZ1p5mnY3qH5lpGF8r9Gb7tzK10rqulM2XTDojZOevlEGI6LGw8\nFjccXtNquqGZwxzytmKF3T7UBmpmt2qock8N5iJn987m6WeYmbFNc0ii0guHfdtO\nzQcItz2ngCdyvfgQPwCAoAv72ysSGhz5KZgAXRrEdcqj6Jw3ivoEUKq1aUrYncXQ\n3zC3ED6AjWOGRzjvTZzj22IVacUZ0gqx0x/oldXLOhMB9u6nFXHKj1n9nc0XHMNi\nLp9EuvQgcNLjFZGE9sxh25u9V+OhItfT/aarYEu/Xq0IkUUcdz4GehXth1/Cq1wH\nlSUie4nCs7I7OWhqMNClqP7ywElDXsQ66MCgvf01Dh64YUVjJNnyyK0QiYlCx/JQ\nZ85hNLtVXZfYqC5BRZlVFp8I8Rs2Qos9YEgn2M22+Rj+RIeD74LZFB7Q4myRvTMB\n/P466dFI83KYhwvjBYOP3jPTrV7Ky8poEGifQp2mM294CFIPS7z0z7a8+yMzcsRP\nOluFxewsEO0QNDrfFb+0gnjYlnGqOFcZjUMXbDdY5oLSPtXohynuTK1qyQ==\n=Xn0G\n-----END PGP PUBLIC KEY BLOCK-----\n```\n\n
Testing \nIf you want to test your updates with the current golang testing units, you can follow the guide below to run a full test process. Each test for Statping will run in MySQL, Postgres, and SQlite to make sure all database types work correctly.\n\n## Create Docker Databases\nThe easiest way to run the tests on all 3 databases is by starting temporary databases servers with Docker. Docker is available for Linux, Mac and Windows. You can download/install it by going to the [Docker Installation](https://docs.docker.com/install/) site.\n\n```go\ndocker run -it -d \\\n -p 3306:3306 \\\n -env MYSQL_ROOT_PASSWORD=password123 \\\n -env MYSQL_DATABASE=root mysql\n```\n\n```go\ndocker run -it -d \\\n -p 5432:5432 \\\n -env POSTGRES_PASSWORD=password123 \\\n -env POSTGRES_USER=root \\\n -env POSTGRES_DB=root postgres\n```\n\nOnce you have MySQL and Postgres running, you can begin the testing. SQLite database will automatically create a `statup.db` file and will delete after testing.\n\n## Run Tests\nInsert the database environment variables to auto connect the the databases and run the normal test command: `go test -v`. You'll see a verbose output of each test. If all tests pass, make a push request! 💃\n```go\nDB_DATABASE=root \\\n DB_USER=root \\\n DB_PASS=password123 \\\n DB_HOST=localhost \\\n go test -v\n```\n\n
Deployment \nStatping is a pretty cool server for monitoring your services. The way we deploy might be a little cooler though. Statping is using the most bleeding edge technology to release updates and distribute binary files automatically.\n\n1. Source code commits get pushed to Github\n2. [Rice](https://github.com/GeertJohan/go.rice) will compile all the static assets into 1 file (rice-box.go in source)\n3. SASS will generate a compiled version of the CSS. \n4. Statping Help page is generated by cloning the Wiki repo using `go generate`.\n5. Travis-CI tests the Golang application.\n6. Travis-CI tests the Statping API using [Postman](https://github.com/statping/statping/blob/master/source/tmpl/postman.json).\n7. If all tests are successful, Travis-CI will compile the binaries using [xgo](https://github.com/karalabe/xgo).\n8. Binaries are code signed using the official [PGP key](https://github.com/statping/statping/wiki/PGP-Signature) and compressed.\n9. [Docker](https://cloud.docker.com/repository/docker/hunterlong/statping/builds) receives a trigger to build for the `latest` tag.\n10. Travis-CI uploads the [latest release](https://github.com/statping/statping/releases) as a tagged version on Github.\n11. Travis-CI updates the [homebrew-statping](https://github.com/hunterlong/homebrew-statping) repo with the latest version.\n\nAnd that's it! Statping is ready to be shipped and installed.\n\n")
+var CompiledWiki = []byte("Types of Monitoring Features Start Statping Linux Mac Windows AWS EC2 Docker Mobile App Heroku API Makefile Notifiers Notifier Events Notifier Example Prometheus Exporter SSL Config with .env File Static Export Statping Plugins Statuper Build and Test Contributing PGP Signature Testing Deployment \n\n
Types of Monitoring \nYou can monitor your application by using a simple HTTP GET to the endpoint to return back a response and status code. Normally you want a 200 status code on an HTTP request. You might want to require a 404 or 500 error as a response code though. With each service you can include a Timeout in seconds to work with your long running services.\n\n# HTTP Endpoints with Custom POST\nFor more advanced monitoring you can add a data as a HTTP POST request. This is useful for automatically submitting JSON, or making sure your signup form is working correctly.\n\n\n \n
\n\nWith a HTTP service, you can POST a JSON string to your endpoint to retrieve any type of response back. You can then use Regex in the Expected Response field to parse a custom response that exactly matches your status requirements. \n\n# TCP/UDP Services\nFor other services that don't use HTTP, you can monitor any type of service by using the PORT of the service. If you're Ethereum Blockchain server is running on 8545, you can use TCP to monitor your server. With a TCP service, you can monitor your Docker containers, or remove service running on a custom port. You don't need to include `http` in the endpoint field, just IP or Hostname.\n\n\n \n
\n\n# ICMP Service\nYou can send a [ICMP](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol) (ping) to an endpoint rather than HTTP/TCP/UDP request for a quick response.\n\n\n
Features \nStatping is a great Status Page that can be deployed with 0 effort.\n\n# 3 Different Databases\nYou can use MySQL, Postgres, or SQLite as a database for your Statping status page. The server will automatically upgrade your database tables depending on which database you have.\n\n# Easy to Startup\nStatping is an extremely easy to setup website monitoring tool without fussing with dependencies or packages. Simply download and install the precompile binary for your operating system. Statping works on Windows, Mac, Linux, Docker, and even the Raspberry Pi.\n\n# Plugins\nStatping is an awesome Status Page generator that allows you to create your own plugins with Golang Plugins! You don't need to request a PR or even tell us about your plugin. Plugin's are compiled and then send as a binary to the Statping `/plugins` folder. Test your plugins using the `statup test plugin` command, checkout the [Plugin Wiki](https://github.com/statping-ng/statping-ng/wiki/Statping-Plugins) to see detailed information about creating plugins.\n\n# No Maintenance\nMany other website monitoring applications will collect data until the server fails because of hard drive is 100% full. Statping will automatically delete records to make sure your server will stay UP for years. The EC2 AMI Image is a great way to host your status page without worrying about it crashing one day. Statping will automatically upgrade its software when you reboot your computer.\n\n# Email & Slack Notifications\nReceive email notifications if your website or application goes offline. Statping includes SMTP connections so you can use AWS SES, or any other SMTP emailing service. Go in the Email Settings in Settings to configure these options.\n\n# Prometheus Exporter\nIf you want a deeper view of your applications status, you can use Grafana and Prometheus to graph all types of data about your services. Read more about the [Prometheus Exporter](https://github.com/statping-ng/statping-ng/wiki/Prometheus-Exporter)\n\n
Start Statping \n\n\n
Linux \n# Installing on Linux\nInstalling Statping on Linux can be done by downloading the latest tar.gz file, unzipping, and running the executable. You can also install using [Snapcraft](https://snapcraft.io/) for Ubuntu systems.\n\n```shell\ncurl -o- -L https://statping.com/install.sh | bash\n```\n\n## Install using Snapcraft\n\n[](https://snapcraft.io/statping)\n\nIf you are using [snap](https://snapcraft.io/statping), you can simply run this command to install Statping.\n```shell\nsudo snap install statping\n```\n\n# Compiling SCSS for Custom Theme\nStatping requires `sass` to be installed to the local machine to compile SCSS into CSS if you want to use the Custom Theme features. \n\n- Apt: `apt install ruby-sass -y`\n- Node: `npm install sass -g`\n- Ruby: `gem install sass`\n\n## Systemd Service\nSetting up a systemd service is a great way to make sure your Statping server will automatically reboot when needed. You can use the file below for your service. You should have Statping already installed by this step.\n###### /etc/systemd/system/statping.service\n```\n[Unit]\nDescription=Statping Server\nAfter=network.target\nAfter=systemd-user-sessions.service\nAfter=network-online.target\n\n[Service]\nType=simple\nRestart=always\nExecStart=/usr/local/bin/statping\nWorkingDirectory=/usr/local/bin\n\n[Install]\nWantedBy=multi-user.target\n```\nThen you can enable and start your systemd service with:\n```\nsystemctl daemon-reload\n\nsystemctl enable statping.service\n\nsystemctl start statping\n```\nYou're Statping server will now automatically restart when your server restarts.\n\n## Raspberry Pi\nYou can even run Statping on your Raspberry Pi by installing the precompiled binary from [Latest Releases](https://github.com/statping-ng/statping-ng/releases/latest). For the Raspberry Pi 3 you'll want to download the `statping-linux-arm7.tar.gz` file. Be sure to change `VERSION` to the latest version in Releases, and include the 'v'.\n\n```\nVERSION=$(curl -s \"https://github.com/statping-ng/statping-ng/releases/latest\" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}')\nwget https://github.com/statping-ng/statping-ng/releases/download/$VERSION/statping-linux-arm7.tar.gz\ntar -xvzf statping-linux-arm7.tar.gz\nchmod +x statping\nmv statping /usr/local/bin/statping\n\nstatping version\n``` \n\n## Alpine Linux\nThe Docker image is using the Statping Alpine binary since it's so incredibly small. You can run it on your own alpine image by downloading `statping-linux-alpine.tar.gz` from [Latest Releases](https://github.com/statping-ng/statping-ng/releases/latest).\n\n
Mac \n# Installing on Mac\nStatping includes an easy to use [Homebrew Formula](https://github.com/hunterlong/homebrew-statping) to quick get your Status Page up and running locally. Statping on brew is automatically generated for each new release to master. Install with the commands below,\n###### Using Homebrew\n```bash\nbrew tap statping/statping\nbrew install statping\n```\n###### Using the Terminal\n```shell\ncurl -o- -L https://statping.com/install.sh | bash\n```\n\n\n \n
\n\nOnce you've installed it, checkout which version you have by running `statping version`.\n\n# Compiling SCSS for Custom Theme\nStatping requires `sass` to be installed to the local machine to compile SCSS into CSS if you want to use the Custom Theme features. \n\n- Node: `npm install sass -g`\n- Ruby: `gem install sass`\n\n\n
Windows \n# Installing on Windows\nCurrently, Statping only works on Windows 64-bit computers. Just download the exe file from [Latest Releases](https://github.com/statping-ng/statping-ng/releases/latest) and run it in your command prompt. It will create a HTTP server on port 8080, so you can visit `http://localhost:8080` to see your Statping Status Page.\n\n# Compiling SCSS for Custom Theme\nStatping requires `sass` to be installed to the local machine to compile SCSS into CSS if you want to use the Custom Theme features. \n\n- Node: `npm install sass -g`\n- Ruby: `gem install sass`\n\n# Running Statping as a Service\nTo ensure Statping is always running, it can be installed to run as a service on a Windows machine. The easiest way to do that is by using NSSM, the [Non-Sucking Service Manager](https://nssm.cc/download). Download and unzip the compressed file to a location on your machine running Statping to get started:\n1. Open an administrative command prompt.\n2. Change to the folder that contains the 64 bit version of NSSM.\n3. Type \"nssm install Statping\" and press enter.\n4. For the properties, use the following as an example:\n Path: C:\\Program Files\\Statping\\statping.exe\n Startup directory: C:\\Program Files\\Statping\n5. Click \"Install\".\n6. Launch the windows services manager.\n7. Run Statping.\n\n## Known Issues with Windows\nUnfortunately, Statping only works on Windows 64-bit processors. If you have more than 4gb of ram, there's a good chance you already have a 64-bit processor. Download the [Latest Releases](https://github.com/statping-ng/statping-ng/releases/latest) of Statping, extract the ZIP file, then double click on the `statping.exe` file. You can use a SQLite database for a quick setup, or connect to a local/remote Postgres or MySQL database server.\n\n
AWS EC2 \nRunning Statping on the smallest EC2 server is very quick using the AWS AMI Image. The AWS AMI Image will automatically start a Statping Docker container that will automatically update to the latest version. Once the EC2 is booted, you can go to the Public DNS domain to view the Statping installation page. The Statping root folder is located at: `/statping` on the server.\n\n# AMI Image\nChoose the correct AMI Image ID based on your AWS region.\n- us-east-1 `ami-09ccd23d9c7afba61` (Virginia)\n- us-east-2 `ami-0c6c9b714a501cdb3` (Ohio)\n- us-west-1 `ami-02159cc1fc701a77e` (California)\n- us-west-2 `ami-007c6990949f5ccee` (Oregon)\n- eu-central-1 `ami-06e252d6d8b0c2f1f` (Frankfurt)\n\n# Upgrading Staping\nYou can upgrade the Statping executable by running the commands below on your EC2 instance.\n```\nVERSION=$(curl -s \"https://github.com/statping-ng/statping-ng/releases/latest\" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}')\nwget https://github.com/statping-ng/statping-ng/releases/download/$VERSION/statping-linux-x64.tar.gz\ntar -xvzf statping-linux-x64.tar.gz\nchmod +x statping\nmv statping /usr/local/bin/statping\n```\nYou can test the version number by running `statping version`.\n\n# Instructions\n\n### 1. Create an EC2 instance from AMI Image\nGo to the main EC2 dashboard and click 'Launch Instance'. Then type `Statping` inside the search field for 'Community AMI'. Once you've found it in your region, click Select!\n\n \n\n### 2. Get the Public DNS for EC2 Instance\nCopy the 'Public DNS' URL and paste it into your browser.\n\n \n\n### 3. Setup Statping\nUse SQLite if you don't want to connect to a remote MySQL or Postgres database.\n\n \n\n# EC2 Server Features\nRunning your Statping server on a small EC2 instance is perfect for most users. Below you'll find some commands to get up and running in seconds.\n- Super cheap on the t2.nano (~$4.60 monthly)\n- Small usage, 8gb of hard drive\n- Automatic SSL certificate if you require it\n- Automatic reboot when the server needs it\n- Automatic database cleanup, so you'll never be at 100% full.\n- Automatic docker containers/images removal\n\n## Create Security Groups\nUsing the AWS CLI you can copy and paste the commands below to auto create everything for you. The server opens port 80 and 443.\n```bash\naws ec2 create-security-group --group-name StatpingPublicHTTP --description \"Statping HTTP Server on port 80 and 443\"\n# will response back a Group ID. Copy ID and use it for --group-id below.\n```\n```bash\nGROUPS=sg-7e8b830f\naws ec2 authorize-security-group-ingress --group-id $GROUPS --protocol tcp --port 80 --cidr 0.0.0.0/0\naws ec2 authorize-security-group-ingress --group-id $GROUPS --protocol tcp --port 443 --cidr 0.0.0.0/0\n```\n## Create EC2 without SSL\nOnce your server has started, go to the EC2 Public DNS endpoint. You should be redirected to /setup to continue your installation process! The database information is already inputed for you.\n```bash\nGROUPS=sg-7e8b830f\nKEY=MYKEYHERE\nAMI_IMAGE=ami-7be8a103\n\naws ec2 run-instances \\\n --image-id $AMI_IMAGE \\\n --count 1 --instance-type t2.nano \\\n --key-name $KEY \\\n --security-group-ids $GROUPS\n```\n## Create EC2 with Automatic SSL Certification\nStart a Statping server with an SSL cert that will automatically regenerate when it's near expiration time. You'll need to point your domain's A record (IP address) or CNAME (public DNS endpoint) to use this feature.\n\n```bash\nwget https://raw.githubusercontent.com/hunterlong/statping/master/dev/ec2-ssl.sh\n```\n\n```bash\n# edit the contents inside of ec2-ssl.sh then continue\nLETSENCRYPT_HOST=\"status.MYDOMAIN.com\"\nLETSENCRYPT_EMAIL=\"noreply@MYEMAIL.com\"\n```\nEdit ec2-ssl.sh and insert your domain you want to use, then run command below. Use the Security Group ID that you used above for --security-group-ids\n```\nGROUPS=sg-7e8b830f\nAMI_IMAGE=ami-7be8a103\nKEY=MYKEYHERE\n\naws ec2 run-instances \\\n --user-data file://ec2-ssl.sh \\\n --image-id $AMI_IMAGE \\\n --count 1 --instance-type t2.nano \\\n --key-name $KEY \\\n --security-group-ids $GROUPS\n```\n\n### EC2 Server Specs\n- t2.nano ($4.60 monthly)\n- 8gb SSD Memory\n- 0.5gb RAM\n- Docker with Docker Compose installed\n- Running Statping, NGINX, and Postgres\n- boot scripts to automatically clean unused containers.\n\n\n\n
Docker \nStatping is easily ran on Docker with the light weight Alpine linux image. View on [Docker Hub](https://hub.docker.com/r/hunterlong/statping).\n\n[](https://microbadger.com/images/hunterlong/statping) [](https://hub.docker.com/r/hunterlong/statping/builds/)\n\n# Latest Docker Image\nThe `latest` Docker image uses Alpine Linux to keep it ultra small.\n```bash\ndocker run -d \\\n -p 8080:8080 \\\n --restart always \\\n hunterlong/statping\n```\n\n# Mounting Volume\nYou can mount a volume to the `/app` Statping directory. This folder will contain `logs`, `config.yml`, and static assets if you want to edit the SCSS/CSS. \n```bash\ndocker run -d \\\n -p 8080:8080 \\\n -v /mydir/statping:/app \\\n --restart always \\\n hunterlong/statping\n```\n\n# Attach a SSL Certificate\nWhen you mount `server.crt` and `server.key` to the `/app` directory, Statping will run a HTTPS server on port 443. Checkout the [SSL Wiki](https://github.com/statping-ng/statping-ng/wiki/SSL) documentation to see more information about this.\n```bash\ndocker run -d \\\n -p 443:443 \\\n -v /mydir/domain.crt:/app/server.crt \\\n -v /mydir/domain.key:/app/server.key \\\n -v /mydir:/app \\\n --restart always \\\n hunterlong/statping\n```\n\n# Development Docker Image\nIf you want to run Statping that was build from the source, use the `dev` Docker image.\n```bash\ndocker run -d -p 8080:8080 hunterlong/statping:dev\n```\n\n# Cypress Testing Docker Image\nThis Docker image will pull the latest version of Statping and test the web interface with [Cypress](https://www.cypress.io/).\n```bash\ndocker run -it -p 8080:8080 hunterlong/statping:cypress\n```\n\n#### Or use Docker Compose\nThis Docker Compose file inlcudes NGINX, Postgres, and Statping.\n\n### Docker Compose with NGINX and Postgres\nOnce you initiate the `docker-compose.yml` file below go to http://localhost and you'll be forwarded to the /setup page. \nDatabase Authentication\n- database: `postgres`\n- port: `5432`\n- username: `statup`\n- password: `password123`\n- database: `statup`\n\n```yaml\nversion: '2.3'\n\nservices:\n\n nginx:\n container_name: nginx\n image: jwilder/nginx-proxy\n ports:\n - 0.0.0.0:80:80\n - 0.0.0.0:443:443\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/tmp/docker.sock:ro\n - ./statup/nginx/certs:/etc/nginx/certs:ro\n - ./statup/nginx/vhost:/etc/nginx/vhost.d\n - ./statup/nginx/html:/usr/share/nginx/html:ro\n - ./statup/nginx/dhparam:/etc/nginx/dhparam\n environment:\n DEFAULT_HOST: localhost\n\n statup:\n container_name: statup\n image: hunterlong/statping:latest\n restart: always\n networks:\n - internet\n - database\n depends_on:\n - postgres\n volumes:\n - ./statup/app:/app\n environment:\n VIRTUAL_HOST: localhost\n VIRTUAL_PORT: 8080\n DB_CONN: postgres\n DB_HOST: postgres\n DB_USER: statup\n DB_PASS: password123\n DB_DATABASE: statup\n NAME: EC2 Example\n DESCRIPTION: This is a Statping Docker Compose instance\n\n postgres:\n container_name: postgres\n image: postgres:10\n restart: always\n networks:\n - database\n volumes:\n - ./statup/postgres:/var/lib/postgresql/data\n environment:\n POSTGRES_PASSWORD: password123\n POSTGRES_USER: statup\n POSTGRES_DB: statup\n\nnetworks:\n internet:\n driver: bridge\n database:\n driver: bridge\n```\nOr a simple wget...\n```bash\nwget https://raw.githubusercontent.com/hunterlong/statping/master/servers/docker-compose.yml\ndocker-compose up -d\n```\n\n### Docker Compose with Automatic SSL\nYou can automatically start a Statping server with automatic SSL encryption using this docker-compose file. First point your domain's DNS to the Statping server, and then run this docker-compose command with DOMAIN and EMAIL. Email is for letsencrypt services.\n```bash\nwget https://raw.githubusercontent.com/hunterlong/statping/master/servers/docker-compose-ssl.yml\n\nLETSENCRYPT_HOST=mydomain.com \\\n LETSENCRYPT_EMAIL=info@mydomain.com \\\n docker-compose -f docker-compose-ssl.yml up -d\n```\n\n#### Full docker-compose with Automatic SSL\n\n```yaml\nversion: '2.3'\n\nservices:\n\n nginx:\n container_name: nginx\n image: jwilder/nginx-proxy\n ports:\n - 0.0.0.0:80:80\n - 0.0.0.0:443:443\n labels:\n - \"com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy\"\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/tmp/docker.sock:ro\n - ./statup/nginx/certs:/etc/nginx/certs:ro\n - ./statup/nginx/vhost:/etc/nginx/vhost.d\n - ./statup/nginx/html:/usr/share/nginx/html:ro\n - ./statup/nginx/dhparam:/etc/nginx/dhparam\n environment:\n DEFAULT_HOST: ${LETSENCRYPT_HOST}\n\n letsencrypt:\n container_name: letsencrypt\n image: jrcs/letsencrypt-nginx-proxy-companion\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock:ro\n - ./statup/nginx/certs:/etc/nginx/certs\n - ./statup/nginx/vhost:/etc/nginx/vhost.d\n - ./statup/nginx/html:/usr/share/nginx/html\n - ./statup/nginx/dhparam:/etc/nginx/dhparam\n\n statup:\n container_name: statup\n image: hunterlong/statping:latest\n restart: always\n networks:\n - internet\n - database\n depends_on:\n - postgres\n volumes:\n - ./statup/app:/app\n environment:\n VIRTUAL_HOST: ${LETSENCRYPT_HOST}\n VIRTUAL_PORT: 8080\n LETSENCRYPT_HOST: ${LETSENCRYPT_HOST}\n LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}\n DB_CONN: postgres\n DB_HOST: postgres\n DB_USER: statup\n DB_PASS: password123\n DB_DATABASE: statup\n NAME: SSL Example\n DESCRIPTION: This Status Status Page should be running ${LETSENCRYPT_HOST} with SSL.\n\n postgres:\n container_name: postgres\n image: postgres:10\n restart: always\n networks:\n - database\n volumes:\n - ./statup/postgres:/var/lib/postgresql/data\n environment:\n POSTGRES_PASSWORD: password123\n POSTGRES_USER: statup\n POSTGRES_DB: statup\n\nnetworks:\n internet:\n driver: bridge\n database:\n driver: bridge\n```\n\n
Mobile App \nStatping has a free mobile app so you can monitor your websites and applications without the need of a computer. \n\n\n\n\n \n \n
\n\n\n \n
\n\n\n
Heroku \nYou can now instantly deploy your Statping instance on a free Heroku container. Simply click the deploy button below and get up in running within seconds. This Heroku deployment is based on the Statping Docker image so you will have all the great features including SASS and all the notifiers without any setup. \n\n[](https://heroku.com/deploy?template=https://github.com/statping-ng/statping-ng/tree/master)\n\nView the live Heroku Statping instance at: [https://statping.herokuapp.com](https://statping.herokuapp.com)\n\n# Database Configuration\nYou will need to deploy a Postgres database to your instance and insert some configuration variables. View the image below to see what environment variable you need to configure. If you insert `DB_CONN`, Statping will attempt to automatically connect to the database without the need for the `config.yml` file. \n\n\n\n\n
API \nStatping includes a RESTFUL API so you can view, update, and edit your services with easy to use routes. You can currently view, update and delete services, view, create, update users, and get detailed information about the Statping instance. To make life easy, try out a Postman or Swagger JSON file and use it on your Statping Server.\n\n\nPostman | Postman JSON Export | Swagger Export \n
\n\n## Authentication\nAuthentication uses the Statping API Secret to accept remote requests. You can find the API Secret in the Settings page of your Statping server. To send requests to your Statping API, include a Authorization Header when you send the request. The API will accept any one of the headers below.\n\n- HTTP Header: `Authorization: API SECRET HERE`\n- HTTP Header: `Authorization: Bearer API SECRET HERE`\n\n## Main Route `/api`\nThe main API route will show you all services and failures along with them.\n\n## Services\nThe services API endpoint will show you detailed information about services and will allow you to edit/delete services with POST/DELETE http methods.\n\n### Viewing All Services\n- Endpoint: `/api/services`\n- Method: `GET`\n- Response: Array of [Services](https://github.com/statping-ng/statping-ng/wiki/API#service-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\n### Viewing Service\n- Endpoint: `/api/services/{id}`\n- Method: `GET`\n- Response: [Service](https://github.com/statping-ng/statping-ng/wiki/API#service-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\n### Updating Service\n- Endpoint: `/api/services/{id}`\n- Method: `POST`\n- Response: [Service](https://github.com/statping-ng/statping-ng/wiki/API#service-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nPOST Data:\n```json\n{\n \"name\": \"Updated Service\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 15,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0\n}\n```\n\n### Create New Service\n- Endpoint: `/api/services`\n- Method: `POST`\n- Response: [Service](https://github.com/statping-ng/statping-ng/wiki/API#service-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nPOST Data:\n```json\n{\n \"name\": \"Create New Service\",\n \"domain\": \"https://www.coogger.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 15,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0\n}\n```\n\n### Deleting Service\n- Endpoint: `/api/services/{id}`\n- Method: `DELETE`\n- Response: [Object Response](https://github.com/statping-ng/statping-ng/wiki/API#object-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nResponse:\n```json\n{\n \"status\": \"success\",\n \"id\": 4,\n \"type\": \"service\",\n \"method\": \"delete\"\n}\n```\n\n## Users\nThe users API endpoint will show you users that are registered inside your Statping instance.\n\n### View All Users\n- Endpoint: `/api/users`\n- Method: `GET`\n- Response: Array of [Users](https://github.com/statping-ng/statping-ng/wiki/API#user-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\n### Viewing User\n- Endpoint: `/api/users/{id}`\n- Method: `GET`\n- Response: [User](https://github.com/statping-ng/statping-ng/wiki/API#user-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\n### Creating New User\n- Endpoint: `/api/users`\n- Method: `POST`\n- Response: [User](https://github.com/statping-ng/statping-ng/wiki/API#user-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nPOST Data:\n```json\n{\n \"username\": \"newadmin\",\n \"email\": \"info@email.com\",\n \"password\": \"password123\",\n \"admin\": true\n}\n```\n\n### Updating User\n- Endpoint: `/api/users/{id}`\n- Method: `POST`\n- Response: [User](https://github.com/statping-ng/statping-ng/wiki/API#user-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nPOST Data:\n```json\n{\n \"username\": \"updatedadmin\",\n \"email\": \"info@email.com\",\n \"password\": \"password123\",\n \"admin\": true\n}\n```\n\n### Deleting User\n- Endpoint: `/api/services/{id}`\n- Method: `DELETE`\n- Response: [Object Response](https://github.com/statping-ng/statping-ng/wiki/API#object-response)\n- Response Type: `application/json`\n- Request Type: `application/json`\n\nResponse:\n```json\n{\n \"status\": \"success\",\n \"id\": 3,\n \"type\": \"user\",\n \"method\": \"delete\"\n}\n```\n\n# Service Response\n```json\n{\n \"id\": 8,\n \"name\": \"Test Service 0\",\n \"domain\": \"https://status.coinapp.io\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 1,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 30,\n \"order_id\": 0,\n \"created_at\": \"2018-09-12T09:07:03.045832088-07:00\",\n \"updated_at\": \"2018-09-12T09:07:03.046114305-07:00\",\n \"online\": false,\n \"latency\": 0.031411064,\n \"24_hours_online\": 0,\n \"avg_response\": \"\",\n \"status_code\": 502,\n \"last_online\": \"0001-01-01T00:00:00Z\",\n \"dns_lookup_time\": 0.001727175,\n \"failures\": [\n {\n \"id\": 5187,\n \"issue\": \"HTTP Status Code 502 did not match 200\",\n \"created_at\": \"2018-09-12T10:41:46.292277471-07:00\"\n },\n {\n \"id\": 5188,\n \"issue\": \"HTTP Status Code 502 did not match 200\",\n \"created_at\": \"2018-09-12T10:41:47.337659862-07:00\"\n }\n ]\n}\n```\n\n# User Response\n```json\n{\n \"id\": 1,\n \"username\": \"admin\",\n \"api_key\": \"02f324450a631980121e8fd6ea7dfe4a7c685a2f\",\n \"admin\": true,\n \"created_at\": \"2018-09-12T09:06:53.906398511-07:00\",\n \"updated_at\": \"2018-09-12T09:06:54.972440207-07:00\"\n}\n```\n\n# Object Response\n```json\n{\n \"type\": \"service\",\n \"id\": 19,\n \"method\": \"delete\",\n \"status\": \"success\"\n}\n```\n\n# Main API Response\n```json\n{\n \"name\": \"Awesome Status\",\n \"description\": \"An awesome status page by Statping\",\n \"footer\": \"This is my custom footer\",\n \"domain\": \"https://demo.statping.com\",\n \"version\": \"v0.56\",\n \"migration_id\": 1536768413,\n \"created_at\": \"2018-09-12T09:06:53.905374829-07:00\",\n \"updated_at\": \"2018-09-12T09:07:01.654201225-07:00\",\n \"database\": \"sqlite\",\n \"started_on\": \"2018-09-12T10:43:07.760729349-07:00\",\n \"services\": [\n {\n \"id\": 1,\n \"name\": \"Google\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 10,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0,\n \"created_at\": \"2018-09-12T09:06:54.97549122-07:00\",\n \"updated_at\": \"2018-09-12T09:06:54.975624103-07:00\",\n \"online\": true,\n \"latency\": 0.09080986,\n \"24_hours_online\": 0,\n \"avg_response\": \"\",\n \"status_code\": 200,\n \"last_online\": \"2018-09-12T10:44:07.931990439-07:00\",\n \"dns_lookup_time\": 0.005543935\n }\n ]\n}\n```\n\n\n
Makefile \nHere's a simple list of Makefile commands you can run using `make`. The [Makefile](https://github.com/statping-ng/statping-ng/blob/master/Makefile) may change often, so i'll try to keep this Wiki up-to-date.\n\n- Ubuntu `apt-get install build-essential`\n- MacOSX `sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer`\n- Windows [Install Guide for GNU make utility](http://gnuwin32.sourceforge.net/packages/make.htm)\n- CentOS/RedHat `yum groupinstall \"Development Tools\"`\n\n### Commands\n```bash\nmake build # build the binary\nmake install\nmake run\nmake test\nmake coverage\nmake docs\n# Building Statping\nmake build-all\nmake build-alpine\nmake docker\nmake docker-run\nmake docker-dev\nmake docker-run-dev\nmake databases\nmake dev-deps\nmake clean\nmake compress\nmake cypress-install\nmake cypress-test\n```\n\n
Notifiers \n\n \n
\n\nStatping includes multiple Notifiers to alert you when your services are offline. You can also create your own notifier and send a Push Request to this repo! Creating a custom notifier is pretty easy as long as you follow the requirements. A notifier will automatically be installed into the users Statping database, and form values will save without any hassles. 💃\n\n\nExample Code | Events | View Notifiers \n \n
\n\n## Notifier Requirements\n- Must have a unique `METHOD` name\n- Struct must have `*notifier.Notification` pointer in it. \n- Must create and add your notifier variable in `init()`\n- Should have a form for user to input their variables/keys. `Form: []notifier.NotificationForm`\n\n## Notifier Interface (required)\nStatping has the `Notifier` interface which you'll need to include in your notifier. Statping includes many other events/triggers for your notifier, checkout Notifier Events to see all of them.\n```go\n// Notifier interface is required to create a new Notifier\ntype Notifier interface {\n\tOnSave() error // OnSave is triggered when the notifier is saved\n\tSend(interface{}) error // OnSave is triggered when the notifier is saved\n\tSelect() *Notification // Select returns the *Notification for a notifier\n}\n```\n\n### Basic Interface (required)\nInclude `OnSuccess` and `OnFailure` to receive events when a service is online or offline.\n```go\n// BasicEvents includes the most minimal events, failing and successful service triggers\ntype BasicEvents interface {\n\t// OnSuccess is triggered when a service is successful\n\tOnSuccess(*services.Service)\n\t// OnFailure is triggered when a service is failing\n\tOnFailure(*services.Service, *types.Failure)\n}\n```\n\n### Test Interface\nThe OnTest method will give the front end user the ability to test your notifier without saving, the OnTest method for your notifier run the functionality to test the user's submitted parameters and respond an error if notifier is not correctly setup.\n```go\n// Tester interface will include a function to Test users settings before saving\ntype Tester interface {\n\tOnTest() error\n}\n```\nIf your notifier includes this interface, the Test button will appear.\n\n## Notifier Struct\n```go\nvar example = &Example{¬ifier.Notification{\n\tMethod: \"example\", // unique method name\n\tHost: \"http://exmaplehost.com\", // default 'host' field\n\tForm: []notifier.NotificationForm{{\n\t\tType: \"text\", // text, password, number, or email\n\t\tTitle: \"Host\", // The title of value in form\n\t\tPlaceholder: \"Insert your Host here.\", // Optional placeholder in input\n\t\tDbField: \"host\", // An accepted DbField value (read below)\n\t}},\n}\n```\n\n## Notifier Form\nInclude a form with your notifier so other users can save API keys, username, passwords, and other values. \n```go\n// NotificationForm contains the HTML fields for each variable/input you want the notifier to accept.\ntype NotificationForm struct {\n\tType string `json:\"type\"` // the html input type (text, password, email)\n\tTitle string `json:\"title\"` // include a title for ease of use\n\tPlaceholder string `json:\"placeholder\"` // add a placeholder for the input\n\tDbField string `json:\"field\"` // true variable key for input\n\tSmallText string `json:\"small_text\"` // insert small text under a html input\n\tRequired bool `json:\"required\"` // require this input on the html form\n\tIsHidden bool `json:\"hidden\"` // hide this form element from end user\n\tIsList bool `json:\"list\"` // make this form element a comma separated list\n\tIsSwitch bool `json:\"switch\"` // make the notifier a boolean true/false switch\n}\n```\n\n### Example Notifier Form\nThis is the Slack Notifier `Form` fields.\n```go\nForm: []notifier.NotificationForm{{\n\t\tType: \"text\",\n\t\tTitle: \"Incoming webhooker Url\",\n\t\tPlaceholder: \"Insert your slack webhook URL here.\",\n\t\tSmallText: \"Incoming webhooker URL from slack Apps \",\n\t\tDbField: \"Host\",\n\t\tRequired: true,\n\t}}\n}\n```\n\n### Accepted DbField Values\nThe `notifier.NotificationForm` has a field called `DbField` which is the column to save the value into the database. Below are the acceptable DbField string names to include in your form. \n- `host` used for a URL or API endpoint\n- `username` used for a username\n- `password` used for a password\n- `port` used for a integer port number\n- `api_key` used for some kind of API key\n- `api_secret` used for some API secret\n- `var1` used for any type of string\n- `var2` used for any type of string (extra)\n\n### Form Elements\nYou can completely custom your notifications to include a detailed form. \n- `Type` is a HTML input type for your field\n- `Title` give your input element a title\n- `Placeholder` optional field if you want a placeholder in input\n- `DbField` required field to save variable into database (read above)\n- `Placeholder` optional field for inserting small hint under the input\n\n# Adding Notifiers\nTo add a notifier to the Statping application, simply append your Notifier in the `AttachNotifiers()` function inside of [core/core.go](https://github.com/statping-ng/statping-ng/blob/master/core/core.go).\n\n```go\n// AttachNotifiers will attach all the notifier's into the system\nfunc AttachNotifiers() error {\n\treturn notifier.AddNotifiers(\n\t\tnotifiers.Command,\n\t\tnotifiers.Discorder,\n\t\tnotifiers.Emailer,\n\t\tnotifiers.LineNotify,\n\t\tnotifiers.Mobile,\n\t\tnotifiers.Slacker,\n\t\tnotifiers.Telegram,\n\t\tnotifiers.Twilio,\n\t\tnotifiers.Webhook,\n\t)\n}\n```\n###### [AttachNotifiers](https://github.com/statping-ng/statping-ng/blob/master/core/core.go#L183)\n\n
Notifier Events \nEvents are handled by added interfaces for the elements you want to monitor.\n\n## Required Notifier Interface\n```go\n// Notifier interface is required to create a new Notifier\ntype Notifier interface {\n\t// Run will trigger inside of the notifier when enabled\n\tRun() error\n\t// OnSave is triggered when the notifier is saved\n\tOnSave() error\n\t// Test will run a function inside the notifier to Test if it works\n\tTest() error\n\t// Select returns the *Notification for a notifier\n\tSelect() *Notification\n}\n```\n\n## Basic Success/Failure Interface\n```go\n// BasicEvents includes the most minimal events, failing and successful service triggers\ntype BasicEvents interface {\n\t// OnSuccess is triggered when a service is successful\n\tOnSuccess(*services.Service)\n\t// OnFailure is triggered when a service is failing\n\tOnFailure(*services.Service, *types.Failure)\n}\n```\n\n\n## Service Events\n```go\n// ServiceEvents are events for Services\ntype ServiceEvents interface {\n\tOnNewService(*services.Service)\n\tOnUpdatedService(*services.Service)\n\tOnDeletedService(*services.Service)\n}\n```\n\n## User Events\n```go\n// UserEvents are events for Users\ntype UserEvents interface {\n\tOnNewUser(*types.User)\n\tOnUpdatedUser(*types.User)\n\tOnDeletedUser(*types.User)\n}\n```\n\n## Core Events\n```go\n// CoreEvents are events for the main Core app\ntype CoreEvents interface {\n\tOnUpdatedCore(*types.Core)\n}\n```\n\n## Notifier Events\n```go\n// NotifierEvents are events for other Notifiers\ntype NotifierEvents interface {\n\tOnNewNotifier(*Notification)\n\tOnUpdatedNotifier(*Notification)\n}\n```\n\n
Notifier Example \nBelow is a full example of a Statping notifier which will give you a good example of how to create your own. Insert your new notifier inside the `/notifiers` folder once your ready!\n\n```go\npackage notifiers\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/statping-ng/statping-ng/types\"\n \"github.com/statping-ng/statping-ng/core/notifier\"\n\t\"time\"\n)\n\ntype Example struct {\n\t*notifier.Notification\n}\n\nvar example = &Example{¬ifier.Notification{\n\tMethod: METHOD,\n\tTitle: \"Example\",\n\tDescription: \"Example Notifier\",\n\tAuthor: \"Hunter Long\",\n\tAuthorUrl: \"https://github.com/hunterlong\",\n\tDelay: time.Duration(5 * time.Second),\n\tForm: []notifier.NotificationForm{{\n\t\tType: \"text\",\n\t\tTitle: \"Host\",\n\t\tPlaceholder: \"Insert your Host here.\",\n\t\tDbField: \"host\",\n\t\tSmallText: \"this is where you would put the host\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"Username\",\n\t\tPlaceholder: \"Insert your Username here.\",\n\t\tDbField: \"username\",\n\t}, {\n\t\tType: \"password\",\n\t\tTitle: \"Password\",\n\t\tPlaceholder: \"Insert your Password here.\",\n\t\tDbField: \"password\",\n\t}, {\n\t\tType: \"number\",\n\t\tTitle: \"Port\",\n\t\tPlaceholder: \"Insert your Port here.\",\n\t\tDbField: \"port\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"API Key\",\n\t\tPlaceholder: \"Insert your API Key here\",\n\t\tDbField: \"api_key\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"API Secret\",\n\t\tPlaceholder: \"Insert your API Secret here\",\n\t\tDbField: \"api_secret\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"Var 1\",\n\t\tPlaceholder: \"Insert your Var1 here\",\n\t\tDbField: \"var1\",\n\t}, {\n\t\tType: \"text\",\n\t\tTitle: \"Var2\",\n\t\tPlaceholder: \"Var2 goes here\",\n\t\tDbField: \"var2\",\n\t}},\n}}\n\n// REQUIRED init() will install/load the notifier\nfunc init() {\n\tnotifier.AddNotifier(example)\n}\n\n// REQUIRED - Send is where you would put the action's of your notifier\nfunc (n *Example) Send(msg interface{}) error {\n\tmessage := msg.(string)\n\tfmt.Printf(\"i received this string: %v\\n\", message)\n\treturn nil\n}\n\n// REQUIRED\nfunc (n *Example) Select() *notifier.Notification {\n\treturn n.Notification\n}\n\n// REQUIRED\nfunc (n *Example) OnSave() error {\n\tmsg := fmt.Sprintf(\"received on save trigger\")\n\tn.AddQueue(msg)\n\treturn nil\n}\n\n// REQUIRED\nfunc (n *Example) Test() error {\n\tmsg := fmt.Sprintf(\"received a test trigger\\n\")\n\tn.AddQueue(msg)\n\treturn nil\n}\n\n// REQUIRED - BASIC EVENT\nfunc (n *Example) OnSuccess(s *services.Service) {\n\tmsg := fmt.Sprintf(\"received a count trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// REQUIRED - BASIC EVENT\nfunc (n *Example) OnFailure(s *services.Service, f *types.Failure) {\n\tmsg := fmt.Sprintf(\"received a failure trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnNewService(s *services.Service) {\n\tmsg := fmt.Sprintf(\"received a new service trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnUpdatedService(s *services.Service) {\n\tmsg := fmt.Sprintf(\"received a update service trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnDeletedService(s *services.Service) {\n\tmsg := fmt.Sprintf(\"received a delete service trigger for service: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnNewUser(s *types.User) {\n\tmsg := fmt.Sprintf(\"received a new user trigger for user: %v\\n\", s.Username)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnUpdatedUser(s *types.User) {\n\tmsg := fmt.Sprintf(\"received a updated user trigger for user: %v\\n\", s.Username)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnDeletedUser(s *types.User) {\n\tmsg := fmt.Sprintf(\"received a deleted user trigger for user: %v\\n\", s.Username)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnUpdatedCore(s *types.Core) {\n\tmsg := fmt.Sprintf(\"received a updated core trigger for core: %v\\n\", s.Name)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnNewNotifier(s *Notification) {\n\tmsg := fmt.Sprintf(\"received a new notifier trigger for notifier: %v\\n\", s.Method)\n\tn.AddQueue(msg)\n}\n\n// OPTIONAL\nfunc (n *Example) OnUpdatedNotifier(s *Notification) {\n\tmsg := fmt.Sprintf(\"received a update notifier trigger for notifier: %v\\n\", s.Method)\n\tn.AddQueue(msg)\n}\n```\n\n\n
Prometheus Exporter \nStatping includes a prometheus exporter so you can have even more monitoring power with your services. The prometheus exporter can be seen on `/metrics`, simply create another exporter in your prometheus config. Use your Statping API Secret for the Authorization Bearer header, the `/metrics` URL is dedicated for Prometheus and requires the correct API Secret has `Authorization` header.\n\n# Grafana Dashboard\nStatping has a [Grafana Dashboard](https://grafana.com/dashboards/6950) that you can quickly implement if you've added your Statping service to Prometheus. Import Dashboard ID: `6950` into your Grafana dashboard and watch the metrics come in!\n\n
\n\n## Basic Prometheus Exporter\nIf you have Statping and the Prometheus server in the same Docker network, you can use the yaml config below.\n```yaml\nscrape_configs:\n - job_name: 'statping'\n scrape_interval: 30s\n bearer_token: 'SECRET API KEY HERE'\n static_configs:\n - targets: ['statping:8080']\n```\n\n## Remote URL Prometheus Exporter\nThis exporter yaml below has `scheme: https`, which you can remove if you arn't using HTTPS.\n```yaml\nscrape_configs:\n - job_name: 'statping'\n scheme: https\n scrape_interval: 30s\n bearer_token: 'SECRET API KEY HERE'\n static_configs:\n - targets: ['status.mydomain.com']\n```\n\n### `/metrics` Output\n```\nstatping_total_failures 206\nstatping_total_services 4\nstatping_service_failures{id=\"1\" name=\"Google\"} 0\nstatping_service_latency{id=\"1\" name=\"Google\"} 12\nstatping_service_online{id=\"1\" name=\"Google\"} 1\nstatping_service_status_code{id=\"1\" name=\"Google\"} 200\nstatping_service_response_length{id=\"1\" name=\"Google\"} 10777\nstatping_service_failures{id=\"2\" name=\"Statping.com\"} 0\nstatping_service_latency{id=\"2\" name=\"Statping.com\"} 3\nstatping_service_online{id=\"2\" name=\"Statping.com\"} 1\nstatping_service_status_code{id=\"2\" name=\"Statping.com\"} 200\nstatping_service_response_length{id=\"2\" name=\"Statping.com\"} 2\n```\n\n
SSL \nYou can run Statping with a valid certificate by including 2 files in the root directory. Although, I personally recommend using NGINX or Apache to serve the SSL and then have the webserver direct traffic to the Statping instance. This guide will show you how to implement SSL onto your Statping server with multiple options.\n\n## SSL Certificate with Statping\nTo run the Statping HTTP server in SSL mode, you must include 2 files in the root directory of your Statping application. The 2 files you must include are:\n- `server.crt` SSL Certificate File\n- `server.key` SSL Certificate Key File\n\nThe filenames and extensions must match the exact naming above. If these 2 files are found, Statping will automatically start the HTTP server in SSL mode using your certificates. You can also generate your own SSL certificates, but you will receive a \"ERR_CERT_AUTHORITY_INVALID\" error. To generate your own, follow the commands below:\n\n```shell\nopenssl req -new -sha256 -key server.key -out server.csr\nopenssl x509 -req -sha256 -in server.csr -signkey server.key -out server.crt -days 3650\n```\nThis will generate a self signed certificate that you can use for your Statup instance. I recommend using a web server to do SSL termination for your server though.\n\n## Choose a Web Server or Environment\n\n**Choose the environment running the Statping instance.**\n- [Docker](#docker)\n- [NGINX](#nginx)\n- [Apache](#apache)\n\n## Docker\nDocker might be the easiest way to get up and running with a SSL certificate. Below is a `docker-compose.yml` file that will run NGINX, LetEncrypt, and Statping.\n\n1. Point your domain or subdomain to the IP address of the Docker server. This would be done on CloudFlare, Route53, or some other DNS provider.\n\n2. Replace the `docker-compose.yml` contents:\n- `MY.DOMAIN.COM` with the domain you want to use\n- `MY@EMAIL.COM` with your email address\n\n3. Run the docker container by running command `docker-compose up -d`. Give a little bit of time for LetEncrypt to automatically generate your SSL certificate.\n\n###### `docker-compose.yml`\n```yaml\nversion: '2.3'\nservices:\n nginx:\n container_name: nginx\n image: jwilder/nginx-proxy\n ports:\n - 0.0.0.0:80:80\n - 0.0.0.0:443:443\n labels:\n - \"com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy\"\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/tmp/docker.sock:ro\n - ./statping/nginx/certs:/etc/nginx/certs:ro\n - ./statping/nginx/vhost:/etc/nginx/vhost.d\n - ./statping/nginx/html:/usr/share/nginx/html:ro\n - ./statping/nginx/dhparam:/etc/nginx/dhparam\n environment:\n DEFAULT_HOST: MY.DOMAIN.COM\n\n letsencrypt:\n container_name: letsencrypt\n image: jrcs/letsencrypt-nginx-proxy-companion\n networks:\n - internet\n restart: always\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock:ro\n - ./statping/nginx/certs:/etc/nginx/certs\n - ./statping/nginx/vhost:/etc/nginx/vhost.d\n - ./statping/nginx/html:/usr/share/nginx/html\n - ./statping/nginx/dhparam:/etc/nginx/dhparam\n\n statping:\n container_name: statping\n image: hunterlong/statping:latest\n restart: always\n networks:\n - internet\n depends_on:\n - nginx\n volumes:\n - ./statping/app:/app\n environment:\n VIRTUAL_HOST: MY.DOMAIN.COM\n VIRTUAL_PORT: 8080\n LETSENCRYPT_HOST: MY.DOMAIN.COM\n LETSENCRYPT_EMAIL: MY@EMAIL.COM\n\nnetworks:\n internet:\n driver: bridge\n```\n\n## NGINX\nIf you already have a NGINX web server running, you just have to add a proxy pass and your SSL certs to the nginx config or as a vhost. By default Statping runs on port 8080, you can change this port by starting server with `statping -ip 127.0.0.1 -port 9595`.\n\n- Replace `/my/absolute/directory/for/cert/server.crt` with SSL certificate file.\n- Replace `/my/absolute/directory/for/key/server.key` with SSL key file.\n- Run `service nginx restart` and try out https on your domain.\n\n##### Tutorials\n- [NGINX Guide](https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-http/)\n- [How To Set Up Nginx Load Balancing with SSL Termination](https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-load-balancing-with-ssl-termination)\n\n###### `/etc/nginx/nginx.conf`\n```\n#user nobody;\nworker_processes 1;\nevents {\n worker_connections 1024;\n}\nhttp {\n include mime.types;\n default_type application/octet-stream;\n send_timeout 1800;\n sendfile on;\n keepalive_timeout 6500;\n server {\n listen 80;\n server_name localhost;\n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Client-Verify SUCCESS;\n proxy_set_header X-Client-DN $ssl_client_s_dn;\n proxy_set_header X-SSL-Subject $ssl_client_s_dn;\n proxy_set_header X-SSL-Issuer $ssl_client_i_dn;\n proxy_read_timeout 1800;\n proxy_connect_timeout 1800;\n }\n }\n # HTTPS server\n \n server {\n listen 443;\n server_name localhost;\n \n ssl on;\n ssl_certificate /my/absolute/directory/for/cert/server.crt;\n ssl_certificate_key /my/absolute/directory/for/key/server.key;\n ssl_session_timeout 5m;\n \n ssl_protocols SSLv2 SSLv3 TLSv1;\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\n ssl_prefer_server_ciphers on;\n \n location / {\n proxy_pass http://localhost:8080;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Client-Verify SUCCESS;\n proxy_set_header X-Client-DN $ssl_client_s_dn;\n proxy_set_header X-SSL-Subject $ssl_client_s_dn;\n proxy_set_header X-SSL-Issuer $ssl_client_i_dn;\n proxy_read_timeout 1800;\n proxy_connect_timeout 1800;\n }\n }\n}\n```\n\n## Apache\n\n
Config with .env File \nIt may be useful to load your environment using a `.env` file in the root directory of your Statping server. The .env file will be automatically loaded on startup and will overwrite all values you have in config.yml.\n\nIf you have the `DB_CONN` environment variable set Statping will bypass all values in config.yml and will require you to have the other DB_* variables in place. You can pass in these environment variables without requiring a .env file.\n\n## `.env` File\n```bash\nDB_CONN=postgres\nDB_HOST=0.0.0.0\nDB_PORT=5432\nDB_USER=root\nDB_PASS=password123\nDB_DATABASE=root\n\nNAME=Demo\nDESCRIPTION=This is an awesome page\nDOMAIN=https://domain.com\nADMIN_USER=admin\nADMIN_PASSWORD=admin\nADMIN_EMAIL=info@admin.com\nUSE_CDN=true\nPOSTGRES_SSLMODE=false # enable ssl_mode for postgres (To enable use require)\nDISABLE_LOGS=false # disable logs from appearing and writing to disk\n\nIS_DOCKER=false\nIS_AWS=false\nSASS=/usr/local/bin/sass\nCMD_FILE=/bin/bash\n```\nThis .env file will include additional variables in the future, subscribe to this repo to keep up-to-date with changes and updates. \n\n
Static Export \nIf you want to use Statping as a CLI application without running a server, you can export your status page to a static HTML.\nThis export tool is very useful for people who want to export their HTML and upload/commit it to Github Pages or an FTP server.\n```dash\nstatup export\n```\n###### Creates `index.html` in the current directory with CDN asset URL's. 💃 \n\n
Statping Plugins \nSince Statping is built in Go Language we can use the [Go Plugin](https://golang.org/pkg/plugin/) feature to create dynamic plugins that run on load. Statping has an event anytime anything happens, you can create your own plugins and do any type of function. To implement your own ideas into Statping, use the plugin using the [statup/plugin](https://github.com/statping-ng/statping-ng/blob/master/plugin/main.go) package.\n```\ngo get github.com/statping-ng/statping-ng/plugin\n```\n\n## Example Plugin\nStart off with the [Example Statping Plugin](https://github.com/statping/statping_plugin) that includes all the interfaces and some custom options for you to expand on. You can include any type of function in your own plugin!\n\n\n \n
\n\n## Building Plugins\nPlugins don't need a push request and they can be private! You'll need to compile your plugin to the Golang `.so` binary format. Once you've built your plugin, insert it into the `plugins` folder in your Statping directory and reboot the application. Clone the [Example Statping Plugin](https://github.com/statping/statping_plugin) repo and try to build it yourself!\n\n#### Build Requirements\n- You must have `main.go`\n- You must create the Plugin variable on `init()`\n\n```bash\ngit clone https://github.com/statping/statping_plugin\ncd statup-plugin\ngo build -buildmode=plugin -o example.so\n```\n###### Insert `example.so` into the `plugins` directory and reload Statping\n\n## Testing Statping Plugins\nStatping includes a couple tools to help you on your Plugin journey, you can use `statup test plugins` command to test all plugins in your `/plugins` folder. This test will attempt to parse your plugin details, and then it will send events for your plugin to be fired.\n```\nstatup test plugins\n```\n\n \n
\n\nYour plugin should be able to parse and receive events before distributing it. The test tools creates a temporary database (SQLite) that your plugin can interact with. Statping uses [upper.io/db.v3](https://upper.io/db.v3) for database interactions. The database is passed to your plugin `OnLoad(db sqlbuilder.Database)`, so you can use the `db` variable passed here.\n\n## Statping Plugin Interface\nPlease remember Golang plugin's are very new and Statping plugin package may change and 'could' brake your plugin. Checkout the [statup/plugin package](https://github.com/statping-ng/statping-ng/blob/master/plugin/main.go) to see the most current interfaces.\n```go\ntype PluginActions interface {\n\tGetInfo() Info\n\tGetForm() string\n\tSetInfo(map[string]interface{}) Info\n\tRoutes() []Routing\n\tOnSave(map[string]interface{})\n\tOnFailure(map[string]interface{})\n\tOnSuccess(map[string]interface{})\n\tOnSettingsSaved(map[string]interface{})\n\tOnNewUser(map[string]interface{})\n\tOnNewService(map[string]interface{})\n\tOnUpdatedService(map[string]interface{})\n\tOnDeletedService(map[string]interface{})\n\tOnInstall(map[string]interface{})\n\tOnUninstall(map[string]interface{})\n\tOnBeforeRequest(map[string]interface{})\n\tOnAfterRequest(map[string]interface{})\n\tOnShutdown()\n\tOnLoad(sqlbuilder.Database)\n}\n```\n\n## Event Parameters\nAll event interfaces for the Statping Plugin will return a `map[string]interface{}` type, this is because the plugin package will most likely update and change in the future, but using this type will allow your plugin to continue even after updates.\n\n## Example of an Event\nKnowing what happens during an event is important for your plugin. For example, lets have an event that echo something when a service has a Failure status being issued. Checkout some example below to see how this golang plugin action works. \n\n```go\nfunc (p pkg) OnSuccess(data map[string]interface{}) {\n fmt.Println(\"Statping Example Plugin received a successful service hit! \")\n fmt.Println(\"Name: \", data[\"Name\"])\n fmt.Println(\"Domain: \", data[\"Domain\"])\n fmt.Println(\"Method: \", data[\"Method\"])\n fmt.Println(\"Latency: \", data[\"Latency\"])\n}\n```\n###### OnSuccess is fired every time a service has check it be online\n\n```go\nfunc OnFailure(service map[string]interface{}) {\n fmt.Println(\"oh no! an event is failing right now! do something!\")\n fmt.Println(service)\n}\n```\n###### OnFailure is fired every time a service is failing\n\n```go\nfunc (p pkg) OnLoad(db sqlbuilder.Database) {\n fmt.Println(\"=============================================================\")\n fmt.Printf(\" Statping Example Plugin Loaded using %v database\\n\", db.Name())\n fmt.Println(\"=============================================================\")\n}\n```\n###### OnLoad is fired after plugin is loaded into the environment\n\n\n## Interacting with Database\nThe Example Statping Plugin includes a variable `Database` that will allow you to interact with the Statping database. Checkout [database.go](https://github.com/statping/statping_plugin/blob/master/database.go) to see a full example of Create, Read, Update and then Deleting a custom Communication entry into the database.\n```go\n// Insert a new communication into database\n// once inserted, return the Communication\nfunc (c *Communication) Create() *Communication {\n\tuuid, err := CommunicationTable().Insert(c)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tc.Id = uuid.(int64)\n\treturn c\n}\n```\n\n## Custom HTTP Routes\nPlugin's can include their own HTTP route to accept GET/POST requests. Route are loaded after Statping loads all of it's Routes. Checkout [routes.go](https://github.com/statping/statping_plugin/blob/master/routes.go) on the example plugin to see a full example of how to use it.\n```go\n// You must have a Routes() method in your plugin\nfunc (p *pkg) Routes() []plugin.Routing {\n\treturn []plugin.Routing{{\n\t\tURL: \"hello\",\n\t\tMethod: \"GET\",\n\t\tHandler: CustomInfoHandler,\n\t}}\n}\n\n// This is the HTTP handler for the '/hello' URL created above\nfunc CustomInfoHandler(w http.ResponseWriter, r *http.Request) {\n\tw.WriteHeader(http.StatusOK)\n\tfmt.Fprintln(w, \"Oh Wow!!! This is cool...\")\n}\n```\n\n\n## Plugin To-Do List\n- [ ] Ability to includes assets like jpg, json, etc\n\n
Statuper \nStatping includes a simple to use installation shell script that will help you install locally, Docker, and even onto a AWS EC2 instance.\n\n\n \n
\n\n## Installation\n```bash\ncurl -O https://assets.statup.io/statuper && chmod +x statuper\n```\n\n## Usage\n- `statuper`\n\n
Build and Test \nBuilding from the Go Language source code is pretty easy if you already have Go installed. Clone this repo and `cd` into it. \n\n### Git n' Go Get\n```bash\ngit clone https://github.com/statping/statping.git\ncd statup\ngo get -v\n```\n\n### Install go.rice\nStatping uses go.rice to compile HTML, JS, and CSS files into it's single binary output.\n```\ngo get github.com/GeertJohan/go.rice\ngo get github.com/GeertJohan/go.rice/rice\n```\n\n### Build Statping Binary\nStatping uses go.rice to compile HTML, JS, and CSS files into it's single binary output.\n```\nrice embed-go\ngo build -o statup .\n./statup version\n```\n\n### Test Coverage\nYou can also test Statio on your localhost, but it does require a MySQL, and Postgres server to be accessible since testing does create/drop tables for multiple databases. \n```\ngo test -v\n```\n\n
Contributing \nHave a feature you want to implement into Statping!? Awesome! Follow this guide to see how you can test, compile and build Statping for production use. I recommend you use `make` with this process, it will save you time and it will auto include many customized parameters to get everything working correctly.\n\n# Dependencies\nStatping has a couple of required dependencies when testing and compiling the binary. The [Makefile](https://github.com/statping-ng/statping-ng/blob/master/Makefile) will make these tasks a lot easier. Take a look at the Makefile to see what commands are ran. Run the command below to get setup right away.\n```bash\nmake dev-deps\n```\nList of requirements for compiling assets, building binary, and testing.\n- [Go Language](https://golang.org/) (currently `1.10.3`)\n- [Docker](https://docs.docker.com/)\n- [SASS](https://sass-lang.com/install)\n- [Cypress](https://www.cypress.io/) (only used for UI testing, `make cypress-install`)\n\n# Compiling Assets\nThis Golang project uses [rice](https://github.com/GeertJohan/go.rice) to compile static assets into a single file. The file `source/rice-box.go` is never committed to the Github repo, it is automatically created on build. Statping also requires `sass` to be installed on your local OS. To compile all the static assets run the command below:\n\n```bash\nmake compile\n```\nAfter this is complete, you'll notice the `source/rice-box.go` file has been generated. You can now continue to build, and test.\n\n# Testing\nStatping includes multiple ways to Test the application, you can run the `make` command, or the normal `go test` command. To see the full experience of your updates, you can even run Cypress tests which is in the `.dev/test` folder.\n\nStatping will run all tests in `cmd` folder on MySQL, Postgres, and SQLite databases. You can run `make databases` to automatically create MySQL and Postgres with Docker.\n\n###### Go Unit Testing:\n```bash\nmake test\n```\n\n###### Cypress UI Testing:\n```bash\nmake cypress-test\n```\n\n###### Test Everything:\n```bash\nmake test-all\n```\n\n# Build\nStatping will build on all operating systems except Windows 32-bit. I personally use [xgo](https://github.com/karalabe/xgo) to cross-compile on multiple systems using Docker. Follow the commands below to build on your local system.\n\n###### Build for local operating system:\n```bash\nmake build\n```\n\n# Compile for Production\nOnce you've tested and built locally, you can compile Statping for all available operating systems using the command below. This command will require you to have Docker.\n\n```bash\nmake build-all\n```\n\n# What Now\nEverything tested, compiled and worked out!? Awesome! 💃 You can now commit your changes, and submit a Pull Request with the features/bugs you added or removed.\n\n\n\n\n\n
PGP Signature \nYou can check if the Statping binary you downloaded is authentic by running a few commands.\n\n### Steps to Authenticate\n1. Download the Statping `tar.gz` file from [Latest Releases](https://github.com/statping-ng/statping-ng/releases/latest) and extract the `statping` binary and the `statup.asc` file.\n2. Run command: `gpg --verify statping.asc`\n3. You should see `Good signature from \"Hunter Long \" [ultimate]`.\n\n# Statping Public Key\n- [https://statping.com/statping.gpg](https://statping.com/statping.gpg)\n\nYou can also download the key with the command below:\n```\nwget https://statping.com/statping.gpg\n```\n\n###### `statping.gpg`\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBFwGUYIBEADNsDY4aUOx8EoZuTRFPtjuadJzFRyKtHhw/tLlAnoFACanZPIT\nNZoRYvRR5v6lMDXdxsteDbJEOhZ1WDiKIr4OyMahPsyyH6ULzSBKgePUswa0sDef\nUnXYzPFQCzqQyQQFbp9AYfDP7dW6dTL9I6qU2NqlJvjxJiiZTAq87SmsLqHiASnI\n+ottnQuu6vJQBJz2PFIuaS1c3js/+HBbth9GK5B9YN1BIIyZoFmWKVU9HnJf+aM3\nUs6OLjjwYwWzQH38ZV84IjVXyiP9PQVhlCXeHK7XdhPZvnSP1m5Wszj/jowwY6Mz\nLgLotfL540X7yOJ7hJTFYLFBOtJdJr/3Ov8SH4HXdPFPVG+UqxsmtmPqUQ9iAxAE\njRFfkAxBvH5Szf2WZdaLnlrrOcOKJIIjZgHqalquBTAhlh5ul0lUVSSPxetwIBlW\n60L41k94NJFGDt8xOJ+122mLcywmQ1CzhDfeIKlxl6JDiVHjoRqlQQrqIoNZMV85\nrzGfrmbuwv1MXGBJoiNy3330ujOBmhQ9dQVwKpxhBKdjnAgIGM9szbUYxIkGgM1O\nU4b1WF3AF/9JOpKJ0LewslpM3BFFYnemGsHXAv3TBPqKidNdwMAiBOtNykGoXF6i\n0D6jOW/IB1da0gUA+kr5JdAOwIG7JXKhur2MO7Ncid59DL2N8RePRWj+jwARAQAB\ntB9IdW50ZXIgTG9uZyA8aW5mb0BzdGF0cGluZy5jb20+iQJOBBMBCAA4FiEEt21h\n+qbbdZRm6D2ZZLnGquLVUngFAlwGUYICGwMFCwkIBwIGFQoJCAsCBBYCAwECHgEC\nF4AACgkQZLnGquLVUnizwA//c7vmwTMq/8LYlbo37WM2kDE9AKIrz6VSMq4RhGbC\nLikH0X0epa+if79n9BZrVU/Af3aKTn7vu2J4XrvzcdCXtcsR0YmCWML2Y6OSFmhX\nw3o6woiFcp+SUWdcM/kithRun+j9sKV4akdgkdBQUdh/RMVln+radz1c6G59iTdh\nS+Ip3ObO7Gn5VnrLwxix+W9Jhg8YhDgDGEDt8e1yvjuMRY+WhjHFlwEMoE0kvQL8\nQvQH2dGD3dExWAuIL7+0xC0ZGU0PR8vRrq1ukdIsWlDY+42vvhcyPZKFFDTM/QLF\nFcCNiPSGhiK/NQq67xnRMFdh0fnqbydWj2atMpacIrheEkOt8db2/UMyDOwlIxgy\nKOG8x+yNKiG9LyvW4axRLctN608/+TbvtFo5TVOFJYxJQp4b5uz7LgJAJw7PBvfC\nbqx64BH8WGzgyGcAl9unQEtpDuxXoKvP2kbsS7hjvhK0gJgW9llpV4sRJJGApTBc\nWtbcS9DBGs3k1aZdA72bxnayD32syVz7czl4+tkRsbQZ4VgJh1yrHIDsdWQXFnYu\nEQJfCgX5HvvC13MpDUth0NWCFtWQirY3EFbIgSuhB/D5iXA+Dt1Dq5c1u7wQlUVi\nLQCU++oMGrlU3gZrnov5lnBGCEjn0O9bKQm8zmLdEcENFxUZvfPjOIY64YprZxD9\nBv65Ag0EXAZRggEQAMmjHmnvH8SvNJhku/oI96dFKen3bg9xdaFUD1vAuNglCalH\nwgXcCZd0RdobYNG46cXTzTQadtHS4hi/UBJ+oy5ZUpIRglW12eTYtqM2G11VbcQi\nj6rLITP9NIP+G1xBICSYK4UwmH55BolMEQ/1ZX0a9rESM9stDNglheCCudbMGR/1\nZYnufdEsh0yPwyC/1upZeu8LPWK62pt9mE/gccx77QTeDi5OJcRf1fPbUTCm3vSS\nwPPV2AGANodIhostjDymt5vh0tGwc7oUZZLnVdErfuctv7yMgZdiCpYu0jFy1NYf\nJgOpZasrcK7/1ozGzsfAo/sSU4kIkMwuWGgqfx5kGRK2CgU4T0i7oI6DMpOX9ZS8\ns3+oCWu83X0ofvm5R2CbjiUj2gR6JOhBQbJpCeTkLe+SFcUpnyrr7lG8B8QZHm5N\nnBi05V/s63RE3g/6WpR/fWuh+uswe01uqlSx9deW7jT49BL/MdSxwjfwLBLz/hLM\n0ld385XAd9bqMjUtp0XhZX2YORx3f/aKY7PYA62baGibb5RdPRw6viEAWU20eb+8\nX9Pa7hGmwUeal5lka4SD/TGl7wdY+g4oYP+jtKinH/ZftWA5wHTe3jWT5bdWrT2d\ne+0qA0SBkmKIDLpktvtTa19w2nfwBIwJ6fN36ZjYpOn/stxR7aRtnhSqvzxbABEB\nAAGJAjYEGAEIACAWIQS3bWH6ptt1lGboPZlkucaq4tVSeAUCXAZRggIbDAAKCRBk\nucaq4tVSeGWmD/9Pg1x6s98zdZCQa2apmUnuoQAQA9Gf2RBBuglCDGsY67wbvdHZ\n9wdFRs2QEhl2O3oFmidxthBOBRl9z62nXliLwNn1Lcy/yDfaB8wH6gMm4jn2N/z9\nvQXnyIzg8m4PItZ1p5mnY3qH5lpGF8r9Gb7tzK10rqulM2XTDojZOevlEGI6LGw8\nFjccXtNquqGZwxzytmKF3T7UBmpmt2qock8N5iJn987m6WeYmbFNc0ii0guHfdtO\nzQcItz2ngCdyvfgQPwCAoAv72ysSGhz5KZgAXRrEdcqj6Jw3ivoEUKq1aUrYncXQ\n3zC3ED6AjWOGRzjvTZzj22IVacUZ0gqx0x/oldXLOhMB9u6nFXHKj1n9nc0XHMNi\nLp9EuvQgcNLjFZGE9sxh25u9V+OhItfT/aarYEu/Xq0IkUUcdz4GehXth1/Cq1wH\nlSUie4nCs7I7OWhqMNClqP7ywElDXsQ66MCgvf01Dh64YUVjJNnyyK0QiYlCx/JQ\nZ85hNLtVXZfYqC5BRZlVFp8I8Rs2Qos9YEgn2M22+Rj+RIeD74LZFB7Q4myRvTMB\n/P466dFI83KYhwvjBYOP3jPTrV7Ky8poEGifQp2mM294CFIPS7z0z7a8+yMzcsRP\nOluFxewsEO0QNDrfFb+0gnjYlnGqOFcZjUMXbDdY5oLSPtXohynuTK1qyQ==\n=Xn0G\n-----END PGP PUBLIC KEY BLOCK-----\n```\n\n
Testing \nIf you want to test your updates with the current golang testing units, you can follow the guide below to run a full test process. Each test for Statping will run in MySQL, Postgres, and SQlite to make sure all database types work correctly.\n\n## Create Docker Databases\nThe easiest way to run the tests on all 3 databases is by starting temporary databases servers with Docker. Docker is available for Linux, Mac and Windows. You can download/install it by going to the [Docker Installation](https://docs.docker.com/install/) site.\n\n```go\ndocker run -it -d \\\n -p 3306:3306 \\\n -env MYSQL_ROOT_PASSWORD=password123 \\\n -env MYSQL_DATABASE=root mysql\n```\n\n```go\ndocker run -it -d \\\n -p 5432:5432 \\\n -env POSTGRES_PASSWORD=password123 \\\n -env POSTGRES_USER=root \\\n -env POSTGRES_DB=root postgres\n```\n\nOnce you have MySQL and Postgres running, you can begin the testing. SQLite database will automatically create a `statup.db` file and will delete after testing.\n\n## Run Tests\nInsert the database environment variables to auto connect the the databases and run the normal test command: `go test -v`. You'll see a verbose output of each test. If all tests pass, make a push request! 💃\n```go\nDB_DATABASE=root \\\n DB_USER=root \\\n DB_PASS=password123 \\\n DB_HOST=localhost \\\n go test -v\n```\n\n
Deployment \nStatping is a pretty cool server for monitoring your services. The way we deploy might be a little cooler though. Statping is using the most bleeding edge technology to release updates and distribute binary files automatically.\n\n1. Source code commits get pushed to Github\n2. [Rice](https://github.com/GeertJohan/go.rice) will compile all the static assets into 1 file (rice-box.go in source)\n3. SASS will generate a compiled version of the CSS. \n4. Statping Help page is generated by cloning the Wiki repo using `go generate`.\n5. Travis-CI tests the Golang application.\n6. Travis-CI tests the Statping API using [Postman](https://github.com/statping-ng/statping-ng/blob/master/source/tmpl/postman.json).\n7. If all tests are successful, Travis-CI will compile the binaries using [xgo](https://github.com/karalabe/xgo).\n8. Binaries are code signed using the official [PGP key](https://github.com/statping-ng/statping-ng/wiki/PGP-Signature) and compressed.\n9. [Docker](https://cloud.docker.com/repository/docker/hunterlong/statping/builds) receives a trigger to build for the `latest` tag.\n10. Travis-CI uploads the [latest release](https://github.com/statping-ng/statping-ng/releases) as a tagged version on Github.\n11. Travis-CI updates the [homebrew-statping](https://github.com/hunterlong/homebrew-statping) repo with the latest version.\n\nAnd that's it! Statping is ready to be shipped and installed.\n\n")
diff --git a/types/checkins/checkins_test.go b/types/checkins/checkins_test.go
index 8ca98e6e..14f701ad 100644
--- a/types/checkins/checkins_test.go
+++ b/types/checkins/checkins_test.go
@@ -1,9 +1,9 @@
package checkins
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/types/checkins/database.go b/types/checkins/database.go
index 48554e01..e4464d85 100644
--- a/types/checkins/database.go
+++ b/types/checkins/database.go
@@ -1,9 +1,9 @@
package checkins
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/metrics"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/metrics"
+ "github.com/statping-ng/statping-ng/utils"
)
var db database.Database
diff --git a/types/checkins/failures.go b/types/checkins/failures.go
index 78d23970..1aded802 100644
--- a/types/checkins/failures.go
+++ b/types/checkins/failures.go
@@ -1,7 +1,7 @@
package checkins
import (
- "github.com/statping/statping/types/failures"
+ "github.com/statping-ng/statping-ng/types/failures"
"time"
)
diff --git a/types/checkins/methods.go b/types/checkins/methods.go
index 8e1054a7..8befde9a 100644
--- a/types/checkins/methods.go
+++ b/types/checkins/methods.go
@@ -2,7 +2,7 @@ package checkins
import (
"fmt"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
diff --git a/types/checkins/routine.go b/types/checkins/routine.go
index 89bd7c62..7f79c34b 100644
--- a/types/checkins/routine.go
+++ b/types/checkins/routine.go
@@ -2,8 +2,8 @@ package checkins
import (
"fmt"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
diff --git a/types/checkins/samples.go b/types/checkins/samples.go
index a239804e..a68fdba3 100644
--- a/types/checkins/samples.go
+++ b/types/checkins/samples.go
@@ -1,7 +1,7 @@
package checkins
import (
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
diff --git a/types/checkins/struct.go b/types/checkins/struct.go
index 44292598..b75e2964 100644
--- a/types/checkins/struct.go
+++ b/types/checkins/struct.go
@@ -1,7 +1,7 @@
package checkins
import (
- "github.com/statping/statping/types/failures"
+ "github.com/statping-ng/statping-ng/types/failures"
"time"
)
diff --git a/types/configs/config_test.go b/types/configs/config_test.go
index ff5da88f..79355661 100644
--- a/types/configs/config_test.go
+++ b/types/configs/config_test.go
@@ -1,7 +1,7 @@
package configs
import (
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/types/configs/configs_form.go b/types/configs/configs_form.go
index 0f78e980..f7856b63 100644
--- a/types/configs/configs_form.go
+++ b/types/configs/configs_form.go
@@ -2,7 +2,7 @@ package configs
import (
"github.com/pkg/errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"net/http"
"strconv"
)
diff --git a/types/configs/connection.go b/types/configs/connection.go
index 1067b068..295f7300 100644
--- a/types/configs/connection.go
+++ b/types/configs/connection.go
@@ -4,19 +4,19 @@ import (
"fmt"
"github.com/jinzhu/gorm"
"github.com/pkg/errors"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/checkins"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/groups"
- "github.com/statping/statping/types/hits"
- "github.com/statping/statping/types/incidents"
- "github.com/statping/statping/types/messages"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/types/users"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/checkins"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/groups"
+ "github.com/statping-ng/statping-ng/types/hits"
+ "github.com/statping-ng/statping-ng/types/incidents"
+ "github.com/statping-ng/statping-ng/types/messages"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/types/users"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
diff --git a/types/configs/database.go b/types/configs/database.go
index 4841f49a..6d5f4c38 100644
--- a/types/configs/database.go
+++ b/types/configs/database.go
@@ -3,18 +3,18 @@ package configs
import (
"fmt"
"github.com/pkg/errors"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/checkins"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/groups"
- "github.com/statping/statping/types/hits"
- "github.com/statping/statping/types/incidents"
- "github.com/statping/statping/types/messages"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/types/users"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/checkins"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/groups"
+ "github.com/statping-ng/statping-ng/types/hits"
+ "github.com/statping-ng/statping-ng/types/incidents"
+ "github.com/statping-ng/statping-ng/types/messages"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/types/users"
+ "github.com/statping-ng/statping-ng/utils"
"gopkg.in/yaml.v2"
"os"
)
diff --git a/types/configs/file.go b/types/configs/file.go
index 87ff21e6..11133435 100644
--- a/types/configs/file.go
+++ b/types/configs/file.go
@@ -2,7 +2,7 @@ package configs
import (
"github.com/pkg/errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"os"
"path/filepath"
"strings"
diff --git a/types/configs/latest_sql.go b/types/configs/latest_sql.go
index 7ae6f02b..eb1ec40b 100644
--- a/types/configs/latest_sql.go
+++ b/types/configs/latest_sql.go
@@ -2,7 +2,7 @@ package configs
import (
"fmt"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"os"
)
diff --git a/types/configs/load.go b/types/configs/load.go
index bc8db59f..54c9cc06 100644
--- a/types/configs/load.go
+++ b/types/configs/load.go
@@ -2,7 +2,7 @@ package configs
import (
"errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"gopkg.in/yaml.v2"
"os"
)
diff --git a/types/configs/methods.go b/types/configs/methods.go
index b0e549f3..a3c5d2f0 100644
--- a/types/configs/methods.go
+++ b/types/configs/methods.go
@@ -2,7 +2,7 @@ package configs
import (
"fmt"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"gopkg.in/yaml.v2"
)
diff --git a/types/configs/migration.go b/types/configs/migration.go
index 1a3704f4..d0c9506d 100644
--- a/types/configs/migration.go
+++ b/types/configs/migration.go
@@ -6,19 +6,19 @@ import (
_ "github.com/jinzhu/gorm/dialects/postgres"
_ "github.com/mattn/go-sqlite3"
"github.com/pkg/errors"
- "github.com/statping/statping/source"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/source"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/utils"
- "github.com/statping/statping/types/checkins"
- "github.com/statping/statping/types/core"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/groups"
- "github.com/statping/statping/types/hits"
- "github.com/statping/statping/types/incidents"
- "github.com/statping/statping/types/messages"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/types/users"
+ "github.com/statping-ng/statping-ng/types/checkins"
+ "github.com/statping-ng/statping-ng/types/core"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/groups"
+ "github.com/statping-ng/statping-ng/types/hits"
+ "github.com/statping-ng/statping-ng/types/incidents"
+ "github.com/statping-ng/statping-ng/types/messages"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/types/users"
)
func (d *DbConfig) ResetCore() error {
diff --git a/types/configs/struct.go b/types/configs/struct.go
index 2917b5e7..0c6a2389 100644
--- a/types/configs/struct.go
+++ b/types/configs/struct.go
@@ -1,6 +1,6 @@
package configs
-import "github.com/statping/statping/database"
+import "github.com/statping-ng/statping-ng/database"
const SqliteFilename = "statping.db"
diff --git a/types/core/database.go b/types/core/database.go
index b5fec30f..0857d191 100644
--- a/types/core/database.go
+++ b/types/core/database.go
@@ -2,10 +2,10 @@ package core
import (
"github.com/pkg/errors"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/metrics"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/metrics"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/utils"
)
var db database.Database
diff --git a/types/core/samples.go b/types/core/samples.go
index 48d80922..022a0b26 100644
--- a/types/core/samples.go
+++ b/types/core/samples.go
@@ -1,8 +1,8 @@
package core
import (
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/utils"
)
func Example() *Core {
diff --git a/types/core/struct.go b/types/core/struct.go
index fdb0cd7c..2940f3d3 100644
--- a/types/core/struct.go
+++ b/types/core/struct.go
@@ -1,8 +1,8 @@
package core
import (
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
diff --git a/types/doc.go b/types/doc.go
index e4178e2e..a8ebaf11 100644
--- a/types/doc.go
+++ b/types/doc.go
@@ -1,4 +1,4 @@
// Package types contains all of the structs for objects in Statping including services, hits, failures, Core, and others.
//
-// More info on: https://github.com/statping/statping
+// More info on: https://github.com/statping-ng/statping-ng
package types
diff --git a/types/failures/database.go b/types/failures/database.go
index 0a67dc3b..4a1d755b 100644
--- a/types/failures/database.go
+++ b/types/failures/database.go
@@ -1,8 +1,8 @@
package failures
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/metrics"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/metrics"
)
var db database.Database
diff --git a/types/failures/failures_test.go b/types/failures/failures_test.go
index 884bb6d4..ad084d5b 100644
--- a/types/failures/failures_test.go
+++ b/types/failures/failures_test.go
@@ -1,8 +1,8 @@
package failures
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/require"
"testing"
)
diff --git a/types/failures/interface.go b/types/failures/interface.go
index 44295f00..f1662563 100644
--- a/types/failures/interface.go
+++ b/types/failures/interface.go
@@ -2,7 +2,7 @@ package failures
import (
"fmt"
- "github.com/statping/statping/database"
+ "github.com/statping-ng/statping-ng/database"
"time"
)
diff --git a/types/failures/samples.go b/types/failures/samples.go
index 55e67c1d..dd43e906 100644
--- a/types/failures/samples.go
+++ b/types/failures/samples.go
@@ -2,8 +2,8 @@ package failures
import (
"fmt"
- "github.com/statping/statping/types"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types"
+ "github.com/statping-ng/statping-ng/utils"
gormbulk "github.com/t-tiger/gorm-bulk-insert/v2"
"time"
)
diff --git a/types/groups/database.go b/types/groups/database.go
index 6523e2b9..9c42c1d8 100644
--- a/types/groups/database.go
+++ b/types/groups/database.go
@@ -1,10 +1,10 @@
package groups
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/metrics"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/metrics"
+ "github.com/statping-ng/statping-ng/utils"
"sort"
)
diff --git a/types/groups/groups_test.go b/types/groups/groups_test.go
index 99030847..2aad7645 100644
--- a/types/groups/groups_test.go
+++ b/types/groups/groups_test.go
@@ -1,10 +1,10 @@
package groups
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/types/services"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/types/services"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/types/groups/samples.go b/types/groups/samples.go
index 257913a6..9457c158 100644
--- a/types/groups/samples.go
+++ b/types/groups/samples.go
@@ -1,7 +1,7 @@
package groups
import (
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/null"
)
func Samples() error {
diff --git a/types/groups/struct.go b/types/groups/struct.go
index c99febd0..c9eac145 100644
--- a/types/groups/struct.go
+++ b/types/groups/struct.go
@@ -1,7 +1,7 @@
package groups
import (
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/null"
"time"
)
diff --git a/types/hits/database.go b/types/hits/database.go
index 5c3ce19f..a74af92b 100644
--- a/types/hits/database.go
+++ b/types/hits/database.go
@@ -1,9 +1,9 @@
package hits
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/metrics"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/metrics"
+ "github.com/statping-ng/statping-ng/utils"
)
var log = utils.Log
diff --git a/types/hits/interface.go b/types/hits/interface.go
index 3604ca6b..9326c312 100644
--- a/types/hits/interface.go
+++ b/types/hits/interface.go
@@ -2,7 +2,7 @@ package hits
import (
"fmt"
- "github.com/statping/statping/database"
+ "github.com/statping-ng/statping-ng/database"
"time"
)
diff --git a/types/hits/samples.go b/types/hits/samples.go
index 2bbb4a97..d9393fe1 100644
--- a/types/hits/samples.go
+++ b/types/hits/samples.go
@@ -5,8 +5,8 @@ import (
_ "github.com/jinzhu/gorm/dialects/mysql"
_ "github.com/jinzhu/gorm/dialects/postgres"
_ "github.com/mattn/go-sqlite3"
- "github.com/statping/statping/types"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types"
+ "github.com/statping-ng/statping-ng/utils"
gormbulk "github.com/t-tiger/gorm-bulk-insert/v2"
"time"
)
diff --git a/types/incidents/database.go b/types/incidents/database.go
index 7260cb61..59025f25 100644
--- a/types/incidents/database.go
+++ b/types/incidents/database.go
@@ -1,10 +1,10 @@
package incidents
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/metrics"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/metrics"
+ "github.com/statping-ng/statping-ng/utils"
)
var (
diff --git a/types/incidents/incidents_test.go b/types/incidents/incidents_test.go
index 49245277..259cee63 100644
--- a/types/incidents/incidents_test.go
+++ b/types/incidents/incidents_test.go
@@ -1,8 +1,8 @@
package incidents
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/types/incidents/samples.go b/types/incidents/samples.go
index 7096eae7..1cc885c8 100644
--- a/types/incidents/samples.go
+++ b/types/incidents/samples.go
@@ -1,7 +1,7 @@
package incidents
import (
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
diff --git a/types/messages/database.go b/types/messages/database.go
index 4abf14bd..a74477ad 100644
--- a/types/messages/database.go
+++ b/types/messages/database.go
@@ -1,9 +1,9 @@
package messages
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/utils"
)
var (
diff --git a/types/messages/hooks.go b/types/messages/hooks.go
index cfc303fe..17a968c3 100644
--- a/types/messages/hooks.go
+++ b/types/messages/hooks.go
@@ -1,8 +1,8 @@
package messages
import (
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/metrics"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/metrics"
)
func (m *Message) Validate() error {
diff --git a/types/messages/messages_test.go b/types/messages/messages_test.go
index d1fbdea0..99ee0183 100644
--- a/types/messages/messages_test.go
+++ b/types/messages/messages_test.go
@@ -1,8 +1,8 @@
package messages
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/types/messages/struct.go b/types/messages/struct.go
index cadf3cf1..3afae31e 100644
--- a/types/messages/struct.go
+++ b/types/messages/struct.go
@@ -1,7 +1,7 @@
package messages
import (
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/null"
"time"
)
diff --git a/types/notifications/database.go b/types/notifications/database.go
index 37c5779a..347bd5d3 100644
--- a/types/notifications/database.go
+++ b/types/notifications/database.go
@@ -1,7 +1,7 @@
package notifications
import (
- "github.com/statping/statping/database"
+ "github.com/statping-ng/statping-ng/database"
)
var (
diff --git a/types/notifications/hooks.go b/types/notifications/hooks.go
index 756a7cf0..808d3774 100644
--- a/types/notifications/hooks.go
+++ b/types/notifications/hooks.go
@@ -1,7 +1,7 @@
package notifications
import (
- "github.com/statping/statping/types/metrics"
+ "github.com/statping-ng/statping-ng/types/metrics"
)
func (n *Notification) AfterFind() (err error) {
diff --git a/types/notifications/methods.go b/types/notifications/methods.go
index 805d6ee3..1c76f17f 100644
--- a/types/notifications/methods.go
+++ b/types/notifications/methods.go
@@ -2,7 +2,7 @@ package notifications
import (
"fmt"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"strings"
"time"
)
diff --git a/types/notifications/struct.go b/types/notifications/struct.go
index c273155a..b9f0c7f5 100644
--- a/types/notifications/struct.go
+++ b/types/notifications/struct.go
@@ -2,8 +2,8 @@ package notifications
import (
"github.com/sirupsen/logrus"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
diff --git a/types/notifier/interface.go b/types/notifier/interface.go
index 2f84d2d0..7f1603a7 100644
--- a/types/notifier/interface.go
+++ b/types/notifier/interface.go
@@ -1,8 +1,8 @@
package notifier
import (
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/services"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/services"
)
// Notifier interface is required to create a new Notifier
diff --git a/types/services/database.go b/types/services/database.go
index 8ae003ce..044842a9 100644
--- a/types/services/database.go
+++ b/types/services/database.go
@@ -2,10 +2,10 @@ package services
import (
"fmt"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/metrics"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/metrics"
+ "github.com/statping-ng/statping-ng/utils"
"sort"
)
diff --git a/types/services/failures.go b/types/services/failures.go
index 8bb38a55..13f670d1 100644
--- a/types/services/failures.go
+++ b/types/services/failures.go
@@ -2,7 +2,7 @@ package services
import (
"fmt"
- "github.com/statping/statping/types/failures"
+ "github.com/statping-ng/statping-ng/types/failures"
"strings"
"time"
)
diff --git a/types/services/hits.go b/types/services/hits.go
index 789027d7..1a2e3d2f 100644
--- a/types/services/hits.go
+++ b/types/services/hits.go
@@ -1,7 +1,7 @@
package services
import (
- "github.com/statping/statping/types/hits"
+ "github.com/statping-ng/statping-ng/types/hits"
"time"
)
diff --git a/types/services/methods.go b/types/services/methods.go
index 18a71e19..e0372659 100644
--- a/types/services/methods.go
+++ b/types/services/methods.go
@@ -6,11 +6,11 @@ import (
"crypto/x509"
"encoding/hex"
"fmt"
- "github.com/statping/statping/types"
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/hits"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/hits"
+ "github.com/statping-ng/statping-ng/utils"
"io/ioutil"
"sort"
"strconv"
diff --git a/types/services/notifications.go b/types/services/notifications.go
index 352df55e..c8a71374 100644
--- a/types/services/notifications.go
+++ b/types/services/notifications.go
@@ -1,9 +1,9 @@
package services
import (
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/utils"
)
func AddNotifier(n ServiceNotifier) {
@@ -23,9 +23,12 @@ func sendSuccess(s *Service) {
return
}
+ s.notifyAfterCount = 0
+
if s.prevOnline == s.Online {
return
}
+ s.prevOnline = true
for _, n := range allNotifiers {
notif := n.Select()
@@ -42,9 +45,6 @@ func sendSuccess(s *Service) {
notif.LastSent = utils.Now()
}
}
-
- s.prevOnline = true
- s.notifyAfterCount++
}
func sendFailure(s *Service, f *failures.Failure) {
@@ -63,6 +63,8 @@ func sendFailure(s *Service, f *failures.Failure) {
}
}
+ s.prevOnline = false
+
for _, n := range allNotifiers {
notif := n.Select()
if notif.CanSend() {
@@ -78,9 +80,6 @@ func sendFailure(s *Service, f *failures.Failure) {
notif.LastSent = utils.Now()
}
}
-
- s.prevOnline = false
- s.notifyAfterCount++
}
func logMessage(method string, msg string, error error, onSuccesss bool, serviceId int64) {
diff --git a/types/services/notifier.go b/types/services/notifier.go
index f2ac7d62..685ca6be 100644
--- a/types/services/notifier.go
+++ b/types/services/notifier.go
@@ -1,8 +1,8 @@
package services
import (
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
)
var (
diff --git a/types/services/routine.go b/types/services/routine.go
index 50468945..fe28c416 100644
--- a/types/services/routine.go
+++ b/types/services/routine.go
@@ -13,13 +13,13 @@ import (
"time"
"github.com/prometheus/client_golang/prometheus"
- "github.com/statping/statping/types/metrics"
+ "github.com/statping-ng/statping-ng/types/metrics"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/hits"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/hits"
+ "github.com/statping-ng/statping-ng/utils"
healthpb "google.golang.org/grpc/health/grpc_health_v1"
)
diff --git a/types/services/routine_test.go b/types/services/routine_test.go
index 92f1035c..0a4d7dfd 100644
--- a/types/services/routine_test.go
+++ b/types/services/routine_test.go
@@ -7,7 +7,7 @@ import (
"strings"
"testing"
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/null"
"google.golang.org/grpc"
"google.golang.org/grpc/health"
healthpb "google.golang.org/grpc/health/grpc_health_v1"
diff --git a/types/services/samples.go b/types/services/samples.go
index 1ed482b4..c20ad9c2 100644
--- a/types/services/samples.go
+++ b/types/services/samples.go
@@ -1,8 +1,8 @@
package services
import (
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
@@ -83,7 +83,7 @@ func Samples() error {
s2 := &Service{
Name: "Statping Github",
- Domain: "https://github.com/statping/statping",
+ Domain: "https://github.com/statping-ng/statping-ng",
ExpectedStatus: 200,
Interval: 30,
Type: "http",
@@ -159,7 +159,7 @@ func Samples() error {
s6 := &Service{
Name: "Private Service",
- Domain: "https://push.statping.com",
+ Domain: "https://example.org",
Method: "GET",
Interval: 30,
Type: "http",
diff --git a/types/services/services_test.go b/types/services/services_test.go
index 637e2088..c24c2265 100644
--- a/types/services/services_test.go
+++ b/types/services/services_test.go
@@ -4,15 +4,15 @@ import (
"context"
"crypto/tls"
"github.com/gorilla/mux"
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/checkins"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/hits"
- "github.com/statping/statping/types/incidents"
- "github.com/statping/statping/types/messages"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/checkins"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/hits"
+ "github.com/statping-ng/statping-ng/types/incidents"
+ "github.com/statping-ng/statping-ng/types/messages"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
@@ -595,7 +595,7 @@ services:
<<: *tcpservice
- name: Statping Github
- domain: https://github.com/statping/statping
+ domain: https://github.com/statping-ng/statping-ng
<<: *httpservice`
err := utils.SaveFile(utils.Directory+"/services.yml", []byte(file))
diff --git a/types/services/services_test_alerts_test.go b/types/services/services_test_alerts_test.go
index f1111f56..098add78 100644
--- a/types/services/services_test_alerts_test.go
+++ b/types/services/services_test_alerts_test.go
@@ -1,10 +1,10 @@
package services
import (
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/notifications"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/notifications"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/types/services/struct.go b/types/services/struct.go
index ca55aaba..d08a7308 100644
--- a/types/services/struct.go
+++ b/types/services/struct.go
@@ -3,11 +3,11 @@ package services
import (
"time"
- "github.com/statping/statping/types/checkins"
- "github.com/statping/statping/types/failures"
- "github.com/statping/statping/types/incidents"
- "github.com/statping/statping/types/messages"
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/checkins"
+ "github.com/statping-ng/statping-ng/types/failures"
+ "github.com/statping-ng/statping-ng/types/incidents"
+ "github.com/statping-ng/statping-ng/types/messages"
+ "github.com/statping-ng/statping-ng/types/null"
)
// Service is the main struct for Services
diff --git a/types/services/yaml.go b/types/services/yaml.go
index 1ae32c95..26f60ee4 100644
--- a/types/services/yaml.go
+++ b/types/services/yaml.go
@@ -2,7 +2,7 @@ package services
import (
"github.com/pkg/errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"gopkg.in/yaml.v2"
)
diff --git a/types/users/auth.go b/types/users/auth.go
index b6ce7c6d..80f3ef07 100644
--- a/types/users/auth.go
+++ b/types/users/auth.go
@@ -2,7 +2,7 @@ package users
import (
"fmt"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/utils"
"time"
)
diff --git a/types/users/database.go b/types/users/database.go
index 3092638c..ba239ced 100644
--- a/types/users/database.go
+++ b/types/users/database.go
@@ -1,9 +1,9 @@
package users
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/metrics"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/metrics"
+ "github.com/statping-ng/statping-ng/utils"
)
var (
diff --git a/types/users/hooks.go b/types/users/hooks.go
index 956d369b..8bba6802 100644
--- a/types/users/hooks.go
+++ b/types/users/hooks.go
@@ -1,8 +1,8 @@
package users
import (
- "github.com/statping/statping/types/errors"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/types/errors"
+ "github.com/statping-ng/statping-ng/utils"
)
func (u *User) Validate() error {
diff --git a/types/users/sample.go b/types/users/sample.go
index 1e6b455c..aa80c685 100644
--- a/types/users/sample.go
+++ b/types/users/sample.go
@@ -1,7 +1,7 @@
package users
import (
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/null"
)
func Samples() error {
diff --git a/types/users/struct.go b/types/users/struct.go
index 07138969..06476f08 100644
--- a/types/users/struct.go
+++ b/types/users/struct.go
@@ -1,7 +1,7 @@
package users
import (
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/null"
"time"
)
diff --git a/types/users/users_test.go b/types/users/users_test.go
index 6aa2cb20..7cba3b0e 100644
--- a/types/users/users_test.go
+++ b/types/users/users_test.go
@@ -1,9 +1,9 @@
package users
import (
- "github.com/statping/statping/database"
- "github.com/statping/statping/types/null"
- "github.com/statping/statping/utils"
+ "github.com/statping-ng/statping-ng/database"
+ "github.com/statping-ng/statping-ng/types/null"
+ "github.com/statping-ng/statping-ng/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
diff --git a/utils/doc.go b/utils/doc.go
index 9d53b065..0a7fa9e0 100644
--- a/utils/doc.go
+++ b/utils/doc.go
@@ -6,5 +6,5 @@
// You can overwrite the utils.Directory global variable by including
// STATPING_DIR environment variable to be an absolute path.
//
-// More info on: https://github.com/statping/statping
+// More info on: https://github.com/statping-ng /statping-ng
package utils
diff --git a/utils/log.go b/utils/log.go
index 159dcd53..e07d749b 100644
--- a/utils/log.go
+++ b/utils/log.go
@@ -5,7 +5,7 @@ import (
"github.com/fatih/structs"
"github.com/getsentry/sentry-go"
Logger "github.com/sirupsen/logrus"
- "github.com/statping/statping/types/null"
+ "github.com/statping-ng/statping-ng/types/null"
"gopkg.in/natefinch/lumberjack.v2"
"io"
"os"
diff --git a/utils/utils.go b/utils/utils.go
index cf417f23..406a24d9 100644
--- a/utils/utils.go
+++ b/utils/utils.go
@@ -9,15 +9,16 @@ import (
"io/ioutil"
"net"
"net/http"
- "net/url"
"os"
"os/exec"
+ "runtime"
"strconv"
"strings"
"sync"
"time"
- "github.com/statping/statping/types/metrics"
+ "github.com/go-ping/ping"
+ "github.com/statping-ng/statping-ng/types/metrics"
)
var (
@@ -79,7 +80,8 @@ func ToString(s interface{}) string {
}
// Command will run a terminal command with 'sh -c COMMAND' and return stdout and errOut as strings
-// in, out, err := Command("sass assets/scss assets/css/base.css")
+//
+// in, out, err := Command("sass assets/scss assets/css/base.css")
func Command(name string, args ...string) (string, string, error) {
testCmd := exec.Command(name, args...)
var stdout, stderr []byte
@@ -174,7 +176,7 @@ func HttpRequest(endpoint, method string, contentType interface{}, headers []str
return nil, nil, err
}
// set default headers so end user can overwrite them if needed
- req.Header.Set("User-Agent", "Statping")
+ req.Header.Set("User-Agent", "Statping-ng")
req.Header.Set("Statping-Version", Params.GetString("VERSION"))
req.Header.Set("Accept", "text/html")
@@ -215,17 +217,9 @@ func HttpRequest(endpoint, method string, contentType interface{}, headers []str
Proxy: http.ProxyFromEnvironment,
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
// redirect all connections to host specified in url
- addr = strings.Split(req.URL.Host, ":")[0] + addr[strings.LastIndex(addr, ":"):]
return dialer.DialContext(ctx, network, addr)
},
}
- if Params.GetString("HTTP_PROXY") != "" {
- proxyUrl, err := url.Parse(Params.GetString("HTTP_PROXY"))
- if err != nil {
- return nil, nil, err
- }
- transport.Proxy = http.ProxyURL(proxyUrl)
- }
if customTLS != nil {
transport.TLSClientConfig.RootCAs = customTLS.RootCAs
transport.TLSClientConfig.Certificates = customTLS.Certificates
@@ -257,3 +251,31 @@ func HttpRequest(endpoint, method string, contentType interface{}, headers []str
return contents, resp, err
}
+
+func Ping(address string, secondsTimeout int) (int64, error) {
+ ping, err := ping.NewPinger(address)
+
+ if err != nil {
+ return 0, err
+ }
+
+ ping.Count = 1
+ ping.Timeout = time.Second * time.Duration(secondsTimeout)
+
+ if runtime.GOOS == "windows" {
+ ping.SetPrivileged(true)
+ }
+
+ err = ping.Run()
+ if err != nil {
+ return 0, err
+ }
+
+ stats := ping.Statistics()
+
+ if stats.PacketsSent-stats.PacketsRecv != 0 {
+ return 0, errors.New("destination host unreachable")
+ }
+
+ return stats.MinRtt.Microseconds(), nil
+}
diff --git a/utils/utils_custom.go b/utils/utils_custom.go
index 90253d60..08fd9781 100644
--- a/utils/utils_custom.go
+++ b/utils/utils_custom.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package utils
@@ -22,42 +23,33 @@ func DirWritable(path string) (bool, error) {
return false, errors.New("path isn't a directory")
}
- if info.Mode().Perm()&(1<<(uint(7))) == 0 {
- return false, errors.New("write permission bit is not set on this file for user")
- }
-
var stat syscall.Stat_t
if err = syscall.Stat(path, &stat); err != nil {
return false, errors.New("unable to get stat")
}
- if uint32(os.Geteuid()) != stat.Uid {
- return false, errors.New("user doesn't have permission to write to this directory")
- }
- return true, nil
-}
-
-func Ping(address string, secondsTimeout int) (int64, error) {
- ping, err := exec.LookPath("ping")
- if err != nil {
- return 0, err
- }
- out, _, err := Command(ping, address, "-c", "1", "-W", strconv.Itoa(secondsTimeout))
- if err != nil {
- return 0, err
- }
- if strings.Contains(out, "Unknown host") {
- return 0, errors.New("unknown host")
- }
- if strings.Contains(out, "100.0% packet loss") {
- return 0, errors.New("destination host unreachable")
+ if uint32(os.Geteuid()) == stat.Uid {
+ if info.Mode().Perm()&(1<<7) != 0 {
+ // owner matches and has write permissions
+ return true, nil
+ } else {
+ return false, errors.New("owner doesn't have write permissions for this path")
+ }
}
- r := regexp.MustCompile(`time=(.*) ms`)
- strs := r.FindStringSubmatch(out)
- if len(strs) < 2 {
- return 0, errors.New("could not parse ping duration")
+ if uint32(os.Getegid()) == stat.Gid {
+ if info.Mode().Perm()&(1<<4) != 0 {
+ // group matches and has write permissions
+ return true, nil
+ } else {
+ return false, errors.New("group doesn't have write permissions for this path")
+ }
}
- f, _ := strconv.ParseFloat(strs[1], 64)
- return int64(f * 1000), nil
+
+ if info.Mode().Perm()&(1<<1) != 0 {
+ // all users have write permissions
+ return true, nil
+ }
+
+ return false, errors.New("user doesn't have write permissions for this path")
}
diff --git a/utils/utils_test.go b/utils/utils_test.go
index 2880d69a..e1436f13 100644
--- a/utils/utils_test.go
+++ b/utils/utils_test.go
@@ -2,13 +2,14 @@ package utils
import (
"fmt"
- "github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/require"
"net/http"
"net/http/httptest"
"os"
"testing"
"time"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func TestCreateLog(t *testing.T) {
@@ -34,7 +35,7 @@ func TestInitLogs(t *testing.T) {
}
func TestDir(t *testing.T) {
- assert.Contains(t, Directory, "statping/statping")
+ assert.Contains(t, Directory, "statping-ng/statping-ng")
}
func TestCommand(t *testing.T) {
@@ -215,3 +216,10 @@ func TestPerlin(t *testing.T) {
assert.NotZero(t, p.Noise1D(hi/500))
}
}
+
+func TestPing(t *testing.T) {
+ duration, error := Ping("localhost", 1)
+
+ assert.Nil(t, error)
+ assert.NotEqual(t, 0, duration)
+}
diff --git a/utils/utils_windows.go b/utils/utils_windows.go
index ac1a7ece..3082b113 100644
--- a/utils/utils_windows.go
+++ b/utils/utils_windows.go
@@ -3,10 +3,6 @@ package utils
import (
"errors"
"os"
- "os/exec"
- "regexp"
- "strconv"
- "strings"
)
func DirWritable(path string) (bool, error) {
@@ -25,24 +21,3 @@ func DirWritable(path string) (bool, error) {
return true, nil
}
-
-func Ping(address string, secondsTimeout int) (int64, error) {
- ping, err := exec.LookPath("ping")
- if err != nil {
- return 0, err
- }
- out, _, err := Command(ping, address, "-n", "1", "-w", strconv.Itoa(secondsTimeout*1000))
- if err != nil {
- return 0, err
- }
- if strings.Contains(out, "Destination Host Unreachable") {
- return 0, errors.New("destination host unreachable")
- }
- r := regexp.MustCompile(`Average = (.*)ms`)
- strs := r.FindStringSubmatch(out)
- if len(strs) < 2 {
- return 0, errors.New("could not parse ping duration")
- }
- f, _ := strconv.ParseFloat(strs[1], 64)
- return int64(f * 1000), nil
-}
diff --git a/version.txt b/version.txt
index 7f6b30d6..8f63f4f9 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-0.90.75
+0.91.0