constants.py 482 B

12345678910111213141516171819
  1. from django.db import models
  2. from django.utils.translation import gettext_lazy as _
  3. class MonitorType(models.TextChoices):
  4. PING = "Ping"
  5. GET = "GET"
  6. POST = "POST"
  7. SSL = "SSL"
  8. HEARTBEAT = "Heartbeat"
  9. class MonitorCheckReason(models.IntegerChoices):
  10. UNKNOWN = 0, _("Unknown")
  11. TIMEOUT = 1, _("Timeout")
  12. STATUS = 2, _("Wrong status code")
  13. BODY = 3, _("Expected response not found")
  14. SSL = 4, _("SSL error")
  15. NETWORK = 5, _("Network error")