deployment_target.go 667 B

1234567891011121314151617181920212223242526
  1. package models
  2. import (
  3. "github.com/google/uuid"
  4. "gorm.io/gorm"
  5. )
  6. // DeploymentTarget represents a deployment target on a given cluster
  7. type DeploymentTarget struct {
  8. gorm.Model
  9. // ID is a UUID for the Revision
  10. ID uuid.UUID `gorm:"type:uuid;primaryKey" json:"id"`
  11. // ClusterID is the ID of the cluster that is being targeted.
  12. ClusterID int `json:"cluster_id"`
  13. // ProjectID is the ID of the project that the target belongs to.
  14. ProjectID int `json:"project_id"`
  15. // Selector is the identifier to target.
  16. Selector string `json:"selector"`
  17. // SelectorType is the kind of selector (i.e. NAMESPACE or LABEL).
  18. SelectorType string `json:"selector_type"`
  19. }