Documentation ¶
Index ¶
Constants ¶
View Source
const (
ErrUpdateEntityStatusCode = "meshkit-11243"
)
Variables ¶
This section is empty.
Functions ¶
func ErrUpdateEntityStatus ¶
func ErrUpdateEntityStatus(err error, entity string, status EntityStatus) error
Types ¶
type Entity ¶
type Entity interface { // Entity is referred as any type of schema managed by the registry // ComponentDefinitions and PolicyDefinitions are examples of entities Type() EntityType GetEntityDetail() string GenerateID() (uuid.UUID, error) GetID() uuid.UUID Create(db *database.Handler, hostID uuid.UUID) (entityID uuid.UUID, err error) }
type EntityStatus ¶
type EntityStatus string
const ( Ignored EntityStatus = "ignored" Enabled EntityStatus = "enabled" Duplicate EntityStatus = "duplicate" )
type EntityType ¶
type EntityType string
const ( ComponentDefinition EntityType = "component" PolicyDefinition EntityType = "policy" RelationshipDefinition EntityType = "relationship" Model EntityType = "model" Category EntityType = "category" )
type Filter ¶
type Filter interface { Create(map[string]interface{}) Get(db *database.Handler) (entities []Entity, count int64, unique int, err error) GetById(db *database.Handler) (entity Entity, err error) }
Each entity will have it's own Filter implementation via which it exposes the nobs and dials to fetch entities
Click to show internal directories.
Click to hide internal directories.