|
package limit |
|
|
|
import "github.com/target/goalert/validation/validate" |
|
|
|
|
|
type ID string |
|
|
|
|
|
const ( |
|
|
|
NotificationRulesPerUser ID = "notification_rules_per_user" |
|
|
|
ContactMethodsPerUser ID = "contact_methods_per_user" |
|
|
|
EPStepsPerPolicy ID = "ep_steps_per_policy" |
|
|
|
EPActionsPerStep ID = "ep_actions_per_step" |
|
|
|
ParticipantsPerRotation ID = "participants_per_rotation" |
|
|
|
RulesPerSchedule ID = "rules_per_schedule" |
|
|
|
IntegrationKeysPerService ID = "integration_keys_per_service" |
|
|
|
UnackedAlertsPerService ID = "unacked_alerts_per_service" |
|
|
|
TargetsPerSchedule ID = "targets_per_schedule" |
|
|
|
HeartbeatMonitorsPerService ID = "heartbeat_monitors_per_service" |
|
|
|
UserOverridesPerSchedule ID = "user_overrides_per_schedule" |
|
|
|
CalendarSubscriptionsPerUser ID = "calendar_subscriptions_per_user" |
|
|
|
PendingSignalsPerService ID = "pending_signals_per_service" |
|
|
|
PendingSignalsPerDestPerService ID = "pending_signals_per_dest_per_service" |
|
) |
|
|
|
|
|
func (id ID) Valid() error { |
|
return validate.OneOf("LimitID", id, |
|
NotificationRulesPerUser, |
|
ContactMethodsPerUser, |
|
EPStepsPerPolicy, |
|
EPActionsPerStep, |
|
ParticipantsPerRotation, |
|
RulesPerSchedule, |
|
IntegrationKeysPerService, |
|
UnackedAlertsPerService, |
|
TargetsPerSchedule, |
|
HeartbeatMonitorsPerService, |
|
UserOverridesPerSchedule, |
|
CalendarSubscriptionsPerUser, |
|
PendingSignalsPerService, |
|
PendingSignalsPerDestPerService, |
|
) |
|
} |
|
|