Documentation
¶
Index ¶
- type Repository
- func (r *Repository) CallSquadcast(url string, body []byte) error
- func (r *Repository) CallTelegram(url string, body []byte) error
- func (r *Repository) CreateAlert(ctx context.Context, alert models.Alert) error
- func (r *Repository) CreateSquadcastIncident(alert models.Alert) error
- func (r *Repository) CreateTelegramMessage(alert models.Alert) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository is an interface for alert repository
func NewAlertRepository ¶
func NewAlertRepository(c configs.Config, pool *ants.Pool, version string, monitoring monitoring.Monitor) *Repository
NewAlertRepository creates a new alert repository
func (*Repository) CallSquadcast ¶ added in v0.8.0
func (r *Repository) CallSquadcast(url string, body []byte) error
CallSquadcast will send a Squadcast http request
func (*Repository) CallTelegram ¶ added in v0.8.0
func (r *Repository) CallTelegram(url string, body []byte) error
CallTelegram will send a Telegram bot http request
func (*Repository) CreateAlert ¶
CreateAlert creates an alert
func (*Repository) CreateSquadcastIncident ¶
func (r *Repository) CreateSquadcastIncident(alert models.Alert) error
CreateSquadcastIncident creates an incident in squadcast
func (*Repository) CreateTelegramMessage ¶
func (r *Repository) CreateTelegramMessage(alert models.Alert) error
CreateTelegramMessage sends a telegram message
Click to show internal directories.
Click to hide internal directories.