39 lines
1.2 KiB
Go
39 lines
1.2 KiB
Go
|
|
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
|
||
|
|
}
|