mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-25 01:13:40 +01:00
chore!: Update module from v3 to v4
This commit is contained in:
parent
d1ced94030
commit
ab2bee9c4b
@ -1,20 +1,20 @@
|
|||||||
package alerting
|
package alerting
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider"
|
"github.com/TwiN/gatus/v4/alerting/provider"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
"github.com/TwiN/gatus/v4/alerting/provider/custom"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/discord"
|
"github.com/TwiN/gatus/v4/alerting/provider/discord"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/email"
|
"github.com/TwiN/gatus/v4/alerting/provider/email"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/googlechat"
|
"github.com/TwiN/gatus/v4/alerting/provider/googlechat"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/mattermost"
|
"github.com/TwiN/gatus/v4/alerting/provider/mattermost"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/messagebird"
|
"github.com/TwiN/gatus/v4/alerting/provider/messagebird"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/opsgenie"
|
"github.com/TwiN/gatus/v4/alerting/provider/opsgenie"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
|
"github.com/TwiN/gatus/v4/alerting/provider/pagerduty"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/slack"
|
"github.com/TwiN/gatus/v4/alerting/provider/slack"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/teams"
|
"github.com/TwiN/gatus/v4/alerting/provider/teams"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/telegram"
|
"github.com/TwiN/gatus/v4/alerting/provider/telegram"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/twilio"
|
"github.com/TwiN/gatus/v4/alerting/provider/twilio"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config is the configuration for alerting providers
|
// Config is the configuration for alerting providers
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using a custom HTTP request
|
// AlertProvider is the configuration necessary for sending an alert using a custom HTTP request
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Discord
|
// AlertProvider is the configuration necessary for sending an alert using Discord
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
gomail "gopkg.in/mail.v2"
|
gomail "gopkg.in/mail.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ package email
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Google chat
|
// AlertProvider is the configuration necessary for sending an alert using Google chat
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Mattermost
|
// AlertProvider is the configuration necessary for sending an alert using Mattermost
|
||||||
@ -119,7 +119,6 @@ func (provider *AlertProvider) buildRequestBody(endpoint *core.Endpoint, alert *
|
|||||||
}`, message, message, description, color, endpoint.URL, results)
|
}`, message, message, description, color, endpoint.URL, results)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// getWebhookURLForGroup returns the appropriate Webhook URL integration to for a given group
|
// getWebhookURLForGroup returns the appropriate Webhook URL integration to for a given group
|
||||||
func (provider *AlertProvider) getWebhookURLForGroup(group string) string {
|
func (provider *AlertProvider) getWebhookURLForGroup(group string) string {
|
||||||
if provider.Overrides != nil {
|
if provider.Overrides != nil {
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMessagebirdAlertProvider_IsValid(t *testing.T) {
|
func TestMessagebirdAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -9,9 +9,9 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
package provider
|
package provider
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
"github.com/TwiN/gatus/v4/alerting/provider/custom"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/discord"
|
"github.com/TwiN/gatus/v4/alerting/provider/discord"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/email"
|
"github.com/TwiN/gatus/v4/alerting/provider/email"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/googlechat"
|
"github.com/TwiN/gatus/v4/alerting/provider/googlechat"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/mattermost"
|
"github.com/TwiN/gatus/v4/alerting/provider/mattermost"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/messagebird"
|
"github.com/TwiN/gatus/v4/alerting/provider/messagebird"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/opsgenie"
|
"github.com/TwiN/gatus/v4/alerting/provider/opsgenie"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
|
"github.com/TwiN/gatus/v4/alerting/provider/pagerduty"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/slack"
|
"github.com/TwiN/gatus/v4/alerting/provider/slack"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/teams"
|
"github.com/TwiN/gatus/v4/alerting/provider/teams"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/telegram"
|
"github.com/TwiN/gatus/v4/alerting/provider/telegram"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/twilio"
|
"github.com/TwiN/gatus/v4/alerting/provider/twilio"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the interface that each providers should implement
|
// AlertProvider is the interface that each providers should implement
|
||||||
|
@ -3,7 +3,7 @@ package provider
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParseWithDefaultAlert(t *testing.T) {
|
func TestParseWithDefaultAlert(t *testing.T) {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Slack
|
// AlertProvider is the configuration necessary for sending an alert using Slack
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Teams
|
// AlertProvider is the configuration necessary for sending an alert using Teams
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultAPIURL = "https://api.telegram.org"
|
const defaultAPIURL = "https://api.telegram.org"
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -8,9 +8,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Twilio
|
// AlertProvider is the configuration necessary for sending an alert using Twilio
|
||||||
|
@ -3,8 +3,8 @@ package twilio
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTwilioAlertProvider_IsValid(t *testing.T) {
|
func TestTwilioAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/test"
|
"github.com/TwiN/gatus/v4/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetHTTPClient(t *testing.T) {
|
func TestGetHTTPClient(t *testing.T) {
|
||||||
|
@ -6,15 +6,15 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting"
|
"github.com/TwiN/gatus/v4/alerting"
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider"
|
"github.com/TwiN/gatus/v4/alerting/provider"
|
||||||
"github.com/TwiN/gatus/v3/config/maintenance"
|
"github.com/TwiN/gatus/v4/config/maintenance"
|
||||||
"github.com/TwiN/gatus/v3/config/ui"
|
"github.com/TwiN/gatus/v4/config/ui"
|
||||||
"github.com/TwiN/gatus/v3/config/web"
|
"github.com/TwiN/gatus/v4/config/web"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/security"
|
"github.com/TwiN/gatus/v4/security"
|
||||||
"github.com/TwiN/gatus/v3/storage"
|
"github.com/TwiN/gatus/v4/storage"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5,22 +5,22 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting"
|
"github.com/TwiN/gatus/v4/alerting"
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
"github.com/TwiN/gatus/v4/alerting/provider/custom"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/discord"
|
"github.com/TwiN/gatus/v4/alerting/provider/discord"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/mattermost"
|
"github.com/TwiN/gatus/v4/alerting/provider/mattermost"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/messagebird"
|
"github.com/TwiN/gatus/v4/alerting/provider/messagebird"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
|
"github.com/TwiN/gatus/v4/alerting/provider/pagerduty"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/slack"
|
"github.com/TwiN/gatus/v4/alerting/provider/slack"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/teams"
|
"github.com/TwiN/gatus/v4/alerting/provider/teams"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/telegram"
|
"github.com/TwiN/gatus/v4/alerting/provider/telegram"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/twilio"
|
"github.com/TwiN/gatus/v4/alerting/provider/twilio"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/config/ui"
|
"github.com/TwiN/gatus/v4/config/ui"
|
||||||
"github.com/TwiN/gatus/v3/config/web"
|
"github.com/TwiN/gatus/v4/config/web"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage"
|
"github.com/TwiN/gatus/v4/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLoadFileThatDoesNotExist(t *testing.T) {
|
func TestLoadFileThatDoesNotExist(t *testing.T) {
|
||||||
|
@ -8,10 +8,10 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/config/ui"
|
"github.com/TwiN/gatus/v4/config/ui"
|
||||||
"github.com/TwiN/gatus/v3/config/web"
|
"github.com/TwiN/gatus/v4/config/web"
|
||||||
"github.com/TwiN/gatus/v3/controller/handler"
|
"github.com/TwiN/gatus/v4/controller/handler"
|
||||||
"github.com/TwiN/gatus/v3/security"
|
"github.com/TwiN/gatus/v4/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/config"
|
"github.com/TwiN/gatus/v4/config"
|
||||||
"github.com/TwiN/gatus/v3/config/web"
|
"github.com/TwiN/gatus/v4/config/web"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHandle(t *testing.T) {
|
func TestHandle(t *testing.T) {
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/storage/store"
|
"github.com/TwiN/gatus/v4/storage/store"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -7,10 +7,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/config"
|
"github.com/TwiN/gatus/v4/config"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store"
|
"github.com/TwiN/gatus/v4/storage/store"
|
||||||
"github.com/TwiN/gatus/v3/watchdog"
|
"github.com/TwiN/gatus/v4/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBadge(t *testing.T) {
|
func TestBadge(t *testing.T) {
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/storage/store"
|
"github.com/TwiN/gatus/v4/storage/store"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/wcharczuk/go-chart/v2"
|
"github.com/wcharczuk/go-chart/v2"
|
||||||
"github.com/wcharczuk/go-chart/v2/drawing"
|
"github.com/wcharczuk/go-chart/v2/drawing"
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/config"
|
"github.com/TwiN/gatus/v4/config"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store"
|
"github.com/TwiN/gatus/v4/storage/store"
|
||||||
"github.com/TwiN/gatus/v3/watchdog"
|
"github.com/TwiN/gatus/v4/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestResponseTimeChart(t *testing.T) {
|
func TestResponseTimeChart(t *testing.T) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/security"
|
"github.com/TwiN/gatus/v4/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ConfigHandler is a handler that returns information for the front end of the application.
|
// ConfigHandler is a handler that returns information for the front end of the application.
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/security"
|
"github.com/TwiN/gatus/v4/security"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/storage/store"
|
"github.com/TwiN/gatus/v4/storage/store"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
"github.com/TwiN/gocache/v2"
|
"github.com/TwiN/gocache/v2"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/config"
|
"github.com/TwiN/gatus/v4/config"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store"
|
"github.com/TwiN/gatus/v4/storage/store"
|
||||||
"github.com/TwiN/gatus/v3/watchdog"
|
"github.com/TwiN/gatus/v4/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/config/ui"
|
"github.com/TwiN/gatus/v4/config/ui"
|
||||||
"github.com/TwiN/gatus/v3/security"
|
"github.com/TwiN/gatus/v4/security"
|
||||||
"github.com/TwiN/health"
|
"github.com/TwiN/health"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/config/ui"
|
"github.com/TwiN/gatus/v4/config/ui"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SinglePageApplication(staticFolder string, ui *ui.Config) http.HandlerFunc {
|
func SinglePageApplication(staticFolder string, ui *ui.Config) http.HandlerFunc {
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/config"
|
"github.com/TwiN/gatus/v4/config"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store"
|
"github.com/TwiN/gatus/v4/storage/store"
|
||||||
"github.com/TwiN/gatus/v3/watchdog"
|
"github.com/TwiN/gatus/v4/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSinglePageApplication(t *testing.T) {
|
func TestSinglePageApplication(t *testing.T) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/jsonpath"
|
"github.com/TwiN/gatus/v4/jsonpath"
|
||||||
"github.com/TwiN/gatus/v3/pattern"
|
"github.com/TwiN/gatus/v4/pattern"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/pattern"
|
"github.com/TwiN/gatus/v4/pattern"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIntegrationQuery(t *testing.T) {
|
func TestIntegrationQuery(t *testing.T) {
|
||||||
|
@ -12,10 +12,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core/ui"
|
"github.com/TwiN/gatus/v4/core/ui"
|
||||||
"github.com/TwiN/gatus/v3/util"
|
"github.com/TwiN/gatus/v4/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type EndpointType string
|
type EndpointType string
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package core
|
package core
|
||||||
|
|
||||||
import "github.com/TwiN/gatus/v3/util"
|
import "github.com/TwiN/gatus/v4/util"
|
||||||
|
|
||||||
// EndpointStatus contains the evaluation Results of an Endpoint
|
// EndpointStatus contains the evaluation Results of an Endpoint
|
||||||
type EndpointStatus struct {
|
type EndpointStatus struct {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/client"
|
"github.com/TwiN/gatus/v4/client"
|
||||||
"github.com/TwiN/gatus/v3/core/ui"
|
"github.com/TwiN/gatus/v4/core/ui"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestEndpoint_IsEnabled(t *testing.T) {
|
func TestEndpoint_IsEnabled(t *testing.T) {
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module github.com/TwiN/gatus/v3
|
module github.com/TwiN/gatus/v4
|
||||||
|
|
||||||
go 1.18
|
go 1.18
|
||||||
|
|
||||||
|
8
main.go
8
main.go
@ -7,10 +7,10 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/config"
|
"github.com/TwiN/gatus/v4/config"
|
||||||
"github.com/TwiN/gatus/v3/controller"
|
"github.com/TwiN/gatus/v4/controller"
|
||||||
"github.com/TwiN/gatus/v3/storage/store"
|
"github.com/TwiN/gatus/v4/storage/store"
|
||||||
"github.com/TwiN/gatus/v3/watchdog"
|
"github.com/TwiN/gatus/v4/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -3,7 +3,7 @@ package metrics
|
|||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||||
)
|
)
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/testutil"
|
"github.com/prometheus/client_golang/prometheus/testutil"
|
||||||
)
|
)
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
"github.com/TwiN/gatus/v3/util"
|
"github.com/TwiN/gatus/v4/util"
|
||||||
"github.com/TwiN/gocache/v2"
|
"github.com/TwiN/gocache/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3,7 +3,7 @@ package memory
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BenchmarkProcessUptimeAfterResult(b *testing.B) {
|
func BenchmarkProcessUptimeAfterResult(b *testing.B) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestProcessUptimeAfterResult(t *testing.T) {
|
func TestProcessUptimeAfterResult(t *testing.T) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package memory
|
package memory
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ShallowCopyEndpointStatus returns a shallow copy of a EndpointStatus with only the results
|
// ShallowCopyEndpointStatus returns a shallow copy of a EndpointStatus with only the results
|
||||||
|
@ -3,9 +3,9 @@ package memory
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BenchmarkShallowCopyEndpointStatus(b *testing.B) {
|
func BenchmarkShallowCopyEndpointStatus(b *testing.B) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAddResult(t *testing.T) {
|
func TestAddResult(t *testing.T) {
|
||||||
|
@ -9,10 +9,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
"github.com/TwiN/gatus/v3/util"
|
"github.com/TwiN/gatus/v4/util"
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
_ "modernc.org/sqlite"
|
_ "modernc.org/sqlite"
|
||||||
)
|
)
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -5,11 +5,11 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage"
|
"github.com/TwiN/gatus/v4/storage"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/memory"
|
"github.com/TwiN/gatus/v4/storage/store/memory"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/sql"
|
"github.com/TwiN/gatus/v4/storage/store/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Store is the interface that each stores should implement
|
// Store is the interface that each stores should implement
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/memory"
|
"github.com/TwiN/gatus/v4/storage/store/memory"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/sql"
|
"github.com/TwiN/gatus/v4/storage/store/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BenchmarkStore_GetAllEndpointStatuses(b *testing.B) {
|
func BenchmarkStore_GetAllEndpointStatuses(b *testing.B) {
|
||||||
|
@ -4,12 +4,12 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/storage"
|
"github.com/TwiN/gatus/v4/storage"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common"
|
"github.com/TwiN/gatus/v4/storage/store/common"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/common/paging"
|
"github.com/TwiN/gatus/v4/storage/store/common/paging"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/memory"
|
"github.com/TwiN/gatus/v4/storage/store/memory"
|
||||||
"github.com/TwiN/gatus/v3/storage/store/sql"
|
"github.com/TwiN/gatus/v4/storage/store/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting"
|
"github.com/TwiN/gatus/v4/alerting"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandleAlerting takes care of alerts to resolve and alerts to trigger based on result success or failure
|
// HandleAlerting takes care of alerts to resolve and alerts to trigger based on result success or failure
|
||||||
|
@ -4,20 +4,20 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting"
|
"github.com/TwiN/gatus/v4/alerting"
|
||||||
"github.com/TwiN/gatus/v3/alerting/alert"
|
"github.com/TwiN/gatus/v4/alerting/alert"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/custom"
|
"github.com/TwiN/gatus/v4/alerting/provider/custom"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/discord"
|
"github.com/TwiN/gatus/v4/alerting/provider/discord"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/email"
|
"github.com/TwiN/gatus/v4/alerting/provider/email"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/mattermost"
|
"github.com/TwiN/gatus/v4/alerting/provider/mattermost"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/messagebird"
|
"github.com/TwiN/gatus/v4/alerting/provider/messagebird"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/pagerduty"
|
"github.com/TwiN/gatus/v4/alerting/provider/pagerduty"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/slack"
|
"github.com/TwiN/gatus/v4/alerting/provider/slack"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/teams"
|
"github.com/TwiN/gatus/v4/alerting/provider/teams"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/telegram"
|
"github.com/TwiN/gatus/v4/alerting/provider/telegram"
|
||||||
"github.com/TwiN/gatus/v3/alerting/provider/twilio"
|
"github.com/TwiN/gatus/v4/alerting/provider/twilio"
|
||||||
"github.com/TwiN/gatus/v3/config"
|
"github.com/TwiN/gatus/v4/config"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHandleAlerting(t *testing.T) {
|
func TestHandleAlerting(t *testing.T) {
|
||||||
|
@ -6,12 +6,12 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwiN/gatus/v3/alerting"
|
"github.com/TwiN/gatus/v4/alerting"
|
||||||
"github.com/TwiN/gatus/v3/config"
|
"github.com/TwiN/gatus/v4/config"
|
||||||
"github.com/TwiN/gatus/v3/config/maintenance"
|
"github.com/TwiN/gatus/v4/config/maintenance"
|
||||||
"github.com/TwiN/gatus/v3/core"
|
"github.com/TwiN/gatus/v4/core"
|
||||||
"github.com/TwiN/gatus/v3/metrics"
|
"github.com/TwiN/gatus/v4/metrics"
|
||||||
"github.com/TwiN/gatus/v3/storage/store"
|
"github.com/TwiN/gatus/v4/storage/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user