Documentation
¶
Index ¶
- func AddLoadNotification(clients []string, name string, metric string, threshold float32, ratio float32, ...) (uint, error)
- func DeleteLoadNotification(id []uint) error
- func EditLoadNotification(notifications []*LoadNotificationEdit) error
- func GetAllLoadNotifications() ([]models.LoadNotification, error)
- func ReloadLoadNotificationSchedule() error
- type LoadNotificationEdit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddLoadNotification ¶
func DeleteLoadNotification ¶
func EditLoadNotification ¶
func EditLoadNotification(notifications []*LoadNotificationEdit) error
func GetAllLoadNotifications ¶
func GetAllLoadNotifications() ([]models.LoadNotification, error)
func ReloadLoadNotificationSchedule ¶
func ReloadLoadNotificationSchedule() error
Types ¶
type LoadNotificationEdit ¶ added in v1.7.20
type LoadNotificationEdit struct {
ID uint `json:"id"`
Name *string `json:"name"`
Clients *[]string `json:"clients"`
Metric *string `json:"metric"`
Threshold *float32 `json:"threshold"`
Ratio *float32 `json:"ratio"`
Interval *int `json:"interval"`
Mode *string `json:"mode"`
BaselineDays *int `json:"baseline_days"`
Multiplier *float32 `json:"multiplier"`
Tasks *[]string `json:"tasks"`
LastNotified *time.Time `json:"last_notified"`
}
LoadNotificationEdit distinguishes omitted fields from explicit values; validation still restricts zeroes and retains legacy defaults where needed.
Click to show internal directories.
Click to hide internal directories.