infra.go 940 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package types
  2. // InfraStatus is the status that an infrastructure can take
  3. type InfraStatus string
  4. // The allowed statuses
  5. const (
  6. StatusCreating InfraStatus = "creating"
  7. StatusCreated InfraStatus = "created"
  8. StatusError InfraStatus = "error"
  9. StatusDestroying InfraStatus = "destroying"
  10. StatusDestroyed InfraStatus = "destroyed"
  11. )
  12. // InfraKind is the kind that infra can be
  13. type InfraKind string
  14. // The supported infra kinds
  15. const (
  16. InfraTest InfraKind = "test"
  17. InfraECR InfraKind = "ecr"
  18. InfraEKS InfraKind = "eks"
  19. InfraGCR InfraKind = "gcr"
  20. InfraGKE InfraKind = "gke"
  21. InfraDOCR InfraKind = "docr"
  22. InfraDOKS InfraKind = "doks"
  23. )
  24. type Infra struct {
  25. ID uint `json:"id"`
  26. // The project that this integration belongs to
  27. ProjectID uint `json:"project_id"`
  28. // The type of infra that was provisioned
  29. Kind InfraKind `json:"kind"`
  30. // Status is the status of the infra
  31. Status InfraStatus `json:"status"`
  32. }