@@ -26,6 +26,9 @@ type Entity struct {
2626
2727 // Relations that this entity has with other entities.
2828 Relations []EntityRelation `json:"relations,omitempty"`
29+
30+ // The current status of the entity, as claimed by various sources.
31+ Status * EntityStatus `json:"status,omitempty"`
2932}
3033
3134// EntityMeta represents metadata fields common to all versions/kinds of entity.
@@ -108,6 +111,46 @@ type EntityRelationTarget struct {
108111 Namespace string `json:"namespace"`
109112}
110113
114+ // EntityStatus informs current status of the entity, as claimed by various sources.
115+ // https://github.com/backstage/backstage/blob/master/packages/catalog-model/src/schema/shared/common.schema.json
116+ type EntityStatus struct {
117+ // A specific status item on a well known format.
118+ Items []EntityStatusItem `json:"items,omitempty"`
119+ }
120+
121+ // EntityStatusItem contains a specific status item on a well known format.
122+ // https://github.com/backstage/backstage/blob/master/packages/catalog-model/src/schema/shared/common.schema.json
123+ type EntityStatusItem struct {
124+ // The item type
125+ Type string `json:"type"`
126+
127+ // The status level / severity of the status item.
128+ // Either ["info", "warning", "error"]
129+ Level string `json:"level"`
130+
131+ // A brief message describing the status, intended for human consumption.
132+ Message string `json:"message"`
133+
134+ // An optional serialized error object related to the status.
135+ Error * EntityStatusItemError `json:"error"`
136+ }
137+
138+ // EntityStatusItemError has aA serialized error object.
139+ // https://github.com/backstage/backstage/blob/master/packages/catalog-model/src/schema/shared/common.schema.json
140+ type EntityStatusItemError struct {
141+ // The type name of the error"
142+ Name string `json:"name"`
143+
144+ // The message of the error
145+ Message string `json:"message"`
146+
147+ // An error code associated with the error
148+ Code * string `json:"code"`
149+
150+ // An error stack trace
151+ Stack * string `json:"stack"`
152+ }
153+
111154// ListEntityOrder defines a condition that can be used to order entities.
112155type ListEntityOrder struct {
113156 // Direction is the direction to order by.
0 commit comments