Validate interface implementation on compile
@@ -2,6 +2,9 @@ package provider
import (
"github.com/TwinProduction/gatus/alerting/provider/custom"
+ "github.com/TwinProduction/gatus/alerting/provider/pagerduty"
+ "github.com/TwinProduction/gatus/alerting/provider/slack"
+ "github.com/TwinProduction/gatus/alerting/provider/twilio"
"github.com/TwinProduction/gatus/core"
)
@@ -13,3 +16,11 @@ type AlertProvider interface {
// ToCustomAlertProvider converts the provider into a custom.AlertProvider
ToCustomAlertProvider(service *core.Service, alert *core.Alert, result *core.Result, resolved bool) *custom.AlertProvider
}
+
+var (
+ // Validate interface implementation on compile
+ _ AlertProvider = (*custom.AlertProvider)(nil)
+ _ AlertProvider = (*twilio.AlertProvider)(nil)
+ _ AlertProvider = (*slack.AlertProvider)(nil)
+ _ AlertProvider = (*pagerduty.AlertProvider)(nil)
+)
