curation

package
v0.30.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

View Source
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

func WriteFeatured(path string, m Featured) error

Types

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

func GenerateFeatured(docs []manifest.Document) Featured

GenerateFeatured builds the index from docs, sorted on both levels so the file is stable.

func LoadFeatured

func LoadFeatured(path string) (m Featured, ok bool, err error)

LoadFeatured reads path; ok is false when the file doesn't exist, which skips the drift check.

type FeaturedProvider

type FeaturedProvider struct {
	Provider string   `yaml:"provider"`
	Models   []string `yaml:"models"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL