Alerting: MuteTiming service return errutil + GetTiming by name (#79772)

* add get mute timing by name to MuteTimingService
* update get mute timing request handler to use the service method

* replace validation, uniqueness and used errors with errutils
* update mute timing methods return errutil responses
* use the term "time interval" in errors bevause mute timings are deprecated in Alertmanager and will be replaced by time intervals in the future.

* update create and update methods to return struct instead of pointer
This commit is contained in:
Yuri Tseretyan
2024-01-12 21:23:44 +02:00
committed by GitHub
parent 11662e18b3
commit 4479e7218d
12 changed files with 287 additions and 79 deletions
@@ -20,3 +20,10 @@ type ForbiddenError struct {
// in: body
Body errutil.PublicError `json:"body"`
}
// swagger:model
type GenericPublicError struct {
// The response message
// in: body
Body errutil.PublicError `json:"body"`
}