2020-09-25 01:54:15 +02:00
|
|
|
package provider
|
|
|
|
|
2020-09-26 20:23:43 +02:00
|
|
|
import (
|
|
|
|
"github.com/TwinProduction/gatus/alerting/provider/custom"
|
|
|
|
"github.com/TwinProduction/gatus/core"
|
|
|
|
)
|
|
|
|
|
2020-09-26 21:15:50 +02:00
|
|
|
// AlertProvider is the interface that each providers should implement
|
2020-09-25 01:54:15 +02:00
|
|
|
type AlertProvider interface {
|
2020-09-26 21:15:50 +02:00
|
|
|
// IsValid returns whether the provider's configuration is valid
|
2020-09-25 01:54:15 +02:00
|
|
|
IsValid() bool
|
2020-09-26 21:15:50 +02:00
|
|
|
|
|
|
|
// ToCustomAlertProvider converts the provider into a custom.AlertProvider
|
2020-09-26 20:23:43 +02:00
|
|
|
ToCustomAlertProvider(service *core.Service, alert *core.Alert, result *core.Result, resolved bool) *custom.AlertProvider
|
2020-09-25 01:54:15 +02:00
|
|
|
}
|