mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-24 17:04:42 +01:00
Add v3 to module path
Gatus wasn't intended to be used as a library, but I have a use case now.
This commit is contained in:
parent
d19f564e4e
commit
2d3fe9795f
@ -1,17 +1,17 @@
|
|||||||
package alerting
|
package alerting
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider"
|
"github.com/TwinProduction/gatus/v3/alerting/provider"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/discord"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/discord"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/mattermost"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/mattermost"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/messagebird"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/messagebird"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/pagerduty"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/slack"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/slack"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/teams"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/teams"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/telegram"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/telegram"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/twilio"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/twilio"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config is the configuration for alerting providers
|
// Config is the configuration for alerting providers
|
||||||
|
@ -9,9 +9,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/client"
|
"github.com/TwinProduction/gatus/v3/client"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/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
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Discord
|
// AlertProvider is the configuration necessary for sending an alert using Discord
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -4,10 +4,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/client"
|
"github.com/TwinProduction/gatus/v3/client"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Mattermost
|
// AlertProvider is the configuration necessary for sending an alert using Mattermost
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMessagebirdAlertProvider_IsValid(t *testing.T) {
|
func TestMessagebirdAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
package provider
|
package provider
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/discord"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/discord"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/mattermost"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/mattermost"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/messagebird"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/messagebird"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/pagerduty"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/slack"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/slack"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/teams"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/teams"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/telegram"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/telegram"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/twilio"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/twilio"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/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/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParseWithDefaultAlert(t *testing.T) {
|
func TestParseWithDefaultAlert(t *testing.T) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Slack
|
// AlertProvider is the configuration necessary for sending an alert using Slack
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Teams
|
// AlertProvider is the configuration necessary for sending an alert using Teams
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Telegram
|
// AlertProvider is the configuration necessary for sending an alert using Telegram
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAlertProvider_IsValid(t *testing.T) {
|
func TestAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlertProvider is the configuration necessary for sending an alert using Twilio
|
// AlertProvider is the configuration necessary for sending an alert using Twilio
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTwilioAlertProvider_IsValid(t *testing.T) {
|
func TestTwilioAlertProvider_IsValid(t *testing.T) {
|
||||||
|
@ -7,15 +7,15 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting"
|
"github.com/TwinProduction/gatus/v3/alerting"
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider"
|
"github.com/TwinProduction/gatus/v3/alerting/provider"
|
||||||
"github.com/TwinProduction/gatus/config/maintenance"
|
"github.com/TwinProduction/gatus/v3/config/maintenance"
|
||||||
"github.com/TwinProduction/gatus/config/ui"
|
"github.com/TwinProduction/gatus/v3/config/ui"
|
||||||
"github.com/TwinProduction/gatus/config/web"
|
"github.com/TwinProduction/gatus/v3/config/web"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/security"
|
"github.com/TwinProduction/gatus/v3/security"
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5,21 +5,21 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting"
|
"github.com/TwinProduction/gatus/v3/alerting"
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/discord"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/discord"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/mattermost"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/mattermost"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/messagebird"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/messagebird"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/pagerduty"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/slack"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/slack"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/teams"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/teams"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/telegram"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/telegram"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/twilio"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/twilio"
|
||||||
"github.com/TwinProduction/gatus/client"
|
"github.com/TwinProduction/gatus/v3/client"
|
||||||
"github.com/TwinProduction/gatus/config/ui"
|
"github.com/TwinProduction/gatus/v3/config/ui"
|
||||||
"github.com/TwinProduction/gatus/config/web"
|
"github.com/TwinProduction/gatus/v3/config/web"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLoadFileThatDoesNotExist(t *testing.T) {
|
func TestLoadFileThatDoesNotExist(t *testing.T) {
|
||||||
|
@ -8,10 +8,10 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/config/ui"
|
"github.com/TwinProduction/gatus/v3/config/ui"
|
||||||
"github.com/TwinProduction/gatus/config/web"
|
"github.com/TwinProduction/gatus/v3/config/web"
|
||||||
"github.com/TwinProduction/gatus/controller/handler"
|
"github.com/TwinProduction/gatus/v3/controller/handler"
|
||||||
"github.com/TwinProduction/gatus/security"
|
"github.com/TwinProduction/gatus/v3/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/config"
|
"github.com/TwinProduction/gatus/v3/config"
|
||||||
"github.com/TwinProduction/gatus/config/web"
|
"github.com/TwinProduction/gatus/v3/config/web"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHandle(t *testing.T) {
|
func TestHandle(t *testing.T) {
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -7,10 +7,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/config"
|
"github.com/TwinProduction/gatus/v3/config"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
"github.com/TwinProduction/gatus/watchdog"
|
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUptimeBadge(t *testing.T) {
|
func TestUptimeBadge(t *testing.T) {
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/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/TwinProduction/gatus/config"
|
"github.com/TwinProduction/gatus/v3/config"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
"github.com/TwinProduction/gatus/watchdog"
|
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestResponseTimeChart(t *testing.T) {
|
func TestResponseTimeChart(t *testing.T) {
|
||||||
|
@ -3,8 +3,8 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/config/ui"
|
"github.com/TwinProduction/gatus/v3/config/ui"
|
||||||
"github.com/TwinProduction/gatus/security"
|
"github.com/TwinProduction/gatus/v3/security"
|
||||||
"github.com/TwinProduction/health"
|
"github.com/TwinProduction/health"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
@ -10,9 +10,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
"github.com/TwinProduction/gocache"
|
"github.com/TwinProduction/gocache"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/config"
|
"github.com/TwinProduction/gatus/v3/config"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
"github.com/TwinProduction/gatus/watchdog"
|
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/config/ui"
|
"github.com/TwinProduction/gatus/v3/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/TwinProduction/gatus/config"
|
"github.com/TwinProduction/gatus/v3/config"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
"github.com/TwinProduction/gatus/watchdog"
|
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSinglePageApplication(t *testing.T) {
|
func TestSinglePageApplication(t *testing.T) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/jsonpath"
|
"github.com/TwinProduction/gatus/v3/jsonpath"
|
||||||
"github.com/TwinProduction/gatus/pattern"
|
"github.com/TwinProduction/gatus/v3/pattern"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -3,7 +3,7 @@ package core
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/pattern"
|
"github.com/TwinProduction/gatus/v3/pattern"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIntegrationQuery(t *testing.T) {
|
func TestIntegrationQuery(t *testing.T) {
|
||||||
|
@ -12,10 +12,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/client"
|
"github.com/TwinProduction/gatus/v3/client"
|
||||||
"github.com/TwinProduction/gatus/core/ui"
|
"github.com/TwinProduction/gatus/v3/core/ui"
|
||||||
"github.com/TwinProduction/gatus/util"
|
"github.com/TwinProduction/gatus/v3/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/client"
|
"github.com/TwinProduction/gatus/v3/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestService_IsEnabled(t *testing.T) {
|
func TestService_IsEnabled(t *testing.T) {
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module github.com/TwinProduction/gatus
|
module github.com/TwinProduction/gatus/v3
|
||||||
|
|
||||||
go 1.17
|
go 1.17
|
||||||
|
|
||||||
|
8
main.go
8
main.go
@ -7,10 +7,10 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/config"
|
"github.com/TwinProduction/gatus/v3/config"
|
||||||
"github.com/TwinProduction/gatus/controller"
|
"github.com/TwinProduction/gatus/v3/controller"
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
"github.com/TwinProduction/gatus/watchdog"
|
"github.com/TwinProduction/gatus/v3/watchdog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/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,9 +5,9 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/storage/store"
|
"github.com/TwinProduction/gatus/v3/storage/store"
|
||||||
"github.com/TwinProduction/gatus/storage/store/memory"
|
"github.com/TwinProduction/gatus/v3/storage/store/memory"
|
||||||
"github.com/TwinProduction/gatus/storage/store/sql"
|
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/storage/store/sql"
|
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGet(t *testing.T) {
|
func TestGet(t *testing.T) {
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
"github.com/TwinProduction/gatus/util"
|
"github.com/TwinProduction/gatus/v3/util"
|
||||||
"github.com/TwinProduction/gocache"
|
"github.com/TwinProduction/gocache"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3,7 +3,7 @@ package memory
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BenchmarkProcessUptimeAfterResult(b *testing.B) {
|
func BenchmarkProcessUptimeAfterResult(b *testing.B) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestProcessUptimeAfterResult(t *testing.T) {
|
func TestProcessUptimeAfterResult(t *testing.T) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package memory
|
package memory
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ShallowCopyServiceStatus returns a shallow copy of a ServiceStatus with only the results
|
// ShallowCopyServiceStatus returns a shallow copy of a ServiceStatus with only the results
|
||||||
|
@ -3,9 +3,9 @@ package memory
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BenchmarkShallowCopyServiceStatus(b *testing.B) {
|
func BenchmarkShallowCopyServiceStatus(b *testing.B) {
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAddResult(t *testing.T) {
|
func TestAddResult(t *testing.T) {
|
||||||
|
@ -8,10 +8,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
"github.com/TwinProduction/gatus/util"
|
"github.com/TwinProduction/gatus/v3/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/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3,10 +3,10 @@ package store
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
"github.com/TwinProduction/gatus/storage/store/memory"
|
"github.com/TwinProduction/gatus/v3/storage/store/memory"
|
||||||
"github.com/TwinProduction/gatus/storage/store/sql"
|
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Store is the interface that each stores should implement
|
// Store is the interface that each stores should implement
|
||||||
|
@ -4,10 +4,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
"github.com/TwinProduction/gatus/storage/store/memory"
|
"github.com/TwinProduction/gatus/v3/storage/store/memory"
|
||||||
"github.com/TwinProduction/gatus/storage/store/sql"
|
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BenchmarkStore_GetAllServiceStatuses(b *testing.B) {
|
func BenchmarkStore_GetAllServiceStatuses(b *testing.B) {
|
||||||
|
@ -4,11 +4,11 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common"
|
"github.com/TwinProduction/gatus/v3/storage/store/common"
|
||||||
"github.com/TwinProduction/gatus/storage/store/common/paging"
|
"github.com/TwinProduction/gatus/v3/storage/store/common/paging"
|
||||||
"github.com/TwinProduction/gatus/storage/store/memory"
|
"github.com/TwinProduction/gatus/v3/storage/store/memory"
|
||||||
"github.com/TwinProduction/gatus/storage/store/sql"
|
"github.com/TwinProduction/gatus/v3/storage/store/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -4,9 +4,9 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting"
|
"github.com/TwinProduction/gatus/v3/alerting"
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/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,12 +4,12 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting"
|
"github.com/TwinProduction/gatus/v3/alerting"
|
||||||
"github.com/TwinProduction/gatus/alerting/alert"
|
"github.com/TwinProduction/gatus/v3/alerting/alert"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/custom"
|
||||||
"github.com/TwinProduction/gatus/alerting/provider/pagerduty"
|
"github.com/TwinProduction/gatus/v3/alerting/provider/pagerduty"
|
||||||
"github.com/TwinProduction/gatus/config"
|
"github.com/TwinProduction/gatus/v3/config"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHandleAlerting(t *testing.T) {
|
func TestHandleAlerting(t *testing.T) {
|
||||||
|
@ -6,12 +6,12 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/TwinProduction/gatus/alerting"
|
"github.com/TwinProduction/gatus/v3/alerting"
|
||||||
"github.com/TwinProduction/gatus/config"
|
"github.com/TwinProduction/gatus/v3/config"
|
||||||
"github.com/TwinProduction/gatus/config/maintenance"
|
"github.com/TwinProduction/gatus/v3/config/maintenance"
|
||||||
"github.com/TwinProduction/gatus/core"
|
"github.com/TwinProduction/gatus/v3/core"
|
||||||
"github.com/TwinProduction/gatus/metric"
|
"github.com/TwinProduction/gatus/v3/metric"
|
||||||
"github.com/TwinProduction/gatus/storage"
|
"github.com/TwinProduction/gatus/v3/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user