github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/certsubjectmapping/entity.go (about)

     1  package certsubjectmapping
     2  
     3  // Entity is a representation of a certificate subject mapping in the DB
     4  type Entity struct {
     5  	ID                 string  `db:"id"`
     6  	Subject            string  `db:"subject"`
     7  	ConsumerType       string  `db:"consumer_type"`
     8  	InternalConsumerID *string `db:"internal_consumer_id"`
     9  	TenantAccessLevels string  `db:"tenant_access_levels"`
    10  }
    11  
    12  // EntityCollection is a collection of certificate subject mapping entities.
    13  type EntityCollection []*Entity
    14  
    15  // Len returns the number of entities in the collection.
    16  func (s EntityCollection) Len() int {
    17  	return len(s)
    18  }