feat: add ontology material ingestion
This commit is contained in:
38
internal/ontology/catalog.go
Normal file
38
internal/ontology/catalog.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package ontology
|
||||
|
||||
import "tutor/internal/workflows"
|
||||
|
||||
var knownConcepts = []knownConcept{
|
||||
{
|
||||
Ref: workflows.ConceptRef{ID: "http-idempotency", Label: "HTTP idempotency", Track: "backend-developer"},
|
||||
Keywords: []string{"idempotent", "idempotency", "retry", "retries"},
|
||||
},
|
||||
{
|
||||
Ref: workflows.ConceptRef{ID: "database-indexes", Label: "Database indexes", Track: "backend-developer"},
|
||||
Keywords: []string{"index", "indexes", "database index", "query plan"},
|
||||
},
|
||||
{
|
||||
Ref: workflows.ConceptRef{ID: "cache-invalidation", Label: "Cache invalidation", Track: "backend-developer"},
|
||||
Keywords: []string{"cache", "invalidation", "ttl"},
|
||||
},
|
||||
{
|
||||
Ref: workflows.ConceptRef{ID: "transactions", Label: "Transactions", Track: "backend-developer"},
|
||||
Keywords: []string{"transaction", "transactions", "atomic", "rollback"},
|
||||
},
|
||||
}
|
||||
|
||||
var prerequisiteRules = []prerequisiteRule{
|
||||
{FromID: "http-idempotency", ToID: "transactions"},
|
||||
{FromID: "transactions", ToID: "cache-invalidation"},
|
||||
{FromID: "database-indexes", ToID: "cache-invalidation"},
|
||||
}
|
||||
|
||||
type knownConcept struct {
|
||||
Ref workflows.ConceptRef
|
||||
Keywords []string
|
||||
}
|
||||
|
||||
type prerequisiteRule struct {
|
||||
FromID string
|
||||
ToID string
|
||||
}
|
||||
Reference in New Issue
Block a user