Documentation
¶
Overview ¶
Package curation holds a catalog repo's data conventions, layered on catalogvalidate.ValidateGraph: the named Rules, the families.yaml family and product-line checks, and the featured.yaml index check. These are curation choices for a published catalog, not schema invariants, so the seed and the control plane never run them.
Rule names are stable kebab-case ids, used by --skip and in reports; don't rename one.
Index ¶
- Variables
- func CheckFamilies(docs []manifest.Document, lines map[string]map[string]bool) []catalogvalidate.Issue
- func CheckFeatured(docs []manifest.Document, want Featured) []catalogvalidate.Issue
- func CheckProductLines(docs []manifest.Document, lines map[string]map[string]bool) []catalogvalidate.Issue
- func WriteFeatured(path string, m Featured) error
- type Featured
- type FeaturedProvider
Constants ¶
This section is empty.
Variables ¶
var Rules = []catalogvalidate.Rule{
hostHasTierPolicy,
hostOwnedLimits,
pricingTargetMustBindToHost,
providerIconSet,
}
Rules is the curation rule set run through catalogvalidate.RunRules.
Functions ¶
func CheckFamilies ¶
func CheckFamilies(docs []manifest.Document, lines map[string]map[string]bool) []catalogvalidate.Issue
CheckFamilies reports every model whose spec.family is missing or not a family in lines (families.File.LineNames). A family is the base model lineage, so a versioned or product-line value fails here instead of splitting a lineage into many families.
func CheckFeatured ¶
func CheckFeatured(docs []manifest.Document, want Featured) []catalogvalidate.Issue
CheckFeatured reports drift between want (the checked-in index) and the featured labels in docs, in both directions.
func CheckProductLines ¶
func CheckProductLines(docs []manifest.Document, lines map[string]map[string]bool) []catalogvalidate.Issue
CheckProductLines reports every model whose spec.productLine is set but not a line of its family. Empty is always allowed; an unknown family is left to CheckFamilies.
func WriteFeatured ¶
Types ¶
type Featured ¶
type Featured struct {
Description string `yaml:"description,omitempty"`
Providers []FeaturedProvider `yaml:"providers"`
}
Featured is featured.yaml: an index of the models labeled metadata.labels.featured="true", grouped by owner provider. The labels stay the source of truth (the seed and UI read them); the index is generated from them and checked for drift.
func GenerateFeatured ¶
GenerateFeatured builds the index from docs, sorted on both levels so the file is stable.