github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/bundleinstanceauth/entity.go (about) 1 package bundleinstanceauth 2 3 import ( 4 "database/sql" 5 "time" 6 ) 7 8 // Entity missing godoc 9 type Entity struct { 10 ID string `db:"id"` 11 BundleID string `db:"bundle_id"` 12 OwnerID string `db:"owner_id"` 13 RuntimeID sql.NullString `db:"runtime_id"` 14 RuntimeContextID sql.NullString `db:"runtime_context_id"` 15 Context sql.NullString `db:"context"` 16 InputParams sql.NullString `db:"input_params"` 17 AuthValue sql.NullString `db:"auth_value"` 18 StatusCondition string `db:"status_condition"` 19 StatusTimestamp time.Time `db:"status_timestamp"` 20 StatusMessage string `db:"status_message"` 21 StatusReason string `db:"status_reason"` 22 } 23 24 // Collection missing godoc 25 type Collection []Entity 26 27 // Len missing godoc 28 func (c Collection) Len() int { 29 return len(c) 30 } 31 32 // DecorateWithTenantID decorates the entity with the given tenant ID. 33 func (e *Entity) DecorateWithTenantID(tenant string) interface{} { 34 return struct { 35 *Entity 36 TenantID string `db:"tenant_id"` 37 }{ 38 Entity: e, 39 TenantID: tenant, 40 } 41 }