github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/formationconstraint/entity.go (about) 1 package formationconstraint 2 3 // Entity represents the formation constraint entity 4 type Entity struct { 5 ID string `db:"id"` 6 Name string `db:"name"` 7 ConstraintType string `db:"constraint_type"` 8 TargetOperation string `db:"target_operation"` 9 Operator string `db:"operator"` 10 ResourceType string `db:"resource_type"` 11 ResourceSubtype string `db:"resource_subtype"` 12 InputTemplate string `db:"input_template"` 13 ConstraintScope string `db:"constraint_scope"` 14 } 15 16 // EntityCollection is a collection of formation constraint entities. 17 type EntityCollection []Entity 18 19 // Len is implementation of a repo.Collection interface 20 func (s EntityCollection) Len() int { 21 return len(s) 22 }