cluster.go 928 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package types
  2. type Cluster struct {
  3. ID uint `json:"id"`
  4. // The project that this integration belongs to
  5. ProjectID uint `json:"project_id"`
  6. // Name of the cluster
  7. Name string `json:"name"`
  8. // Server endpoint for the cluster
  9. Server string `json:"server"`
  10. // The integration service for this cluster
  11. Service ClusterService `json:"service"`
  12. // The infra id, if cluster was provisioned with Porter
  13. InfraID uint `json:"infra_id"`
  14. // (optional) The aws integration id, if available
  15. AWSIntegrationID uint `json:"aws_integration_id"`
  16. }
  17. type ClusterGetResponse struct {
  18. *Cluster
  19. // The NGINX Ingress IP to access the cluster
  20. IngressIP string `json:"ingress_ip"`
  21. // Error displayed in case couldn't get the IP
  22. IngressError error `json:"ingress_error"`
  23. }
  24. type ClusterService string
  25. const (
  26. EKS ClusterService = "eks"
  27. DOKS ClusterService = "doks"
  28. GKE ClusterService = "gke"
  29. Kube ClusterService = "kube"
  30. )