Documentation
¶
Overview ¶
Package repos provides functionality for managing multi-repo workspaces. It reads a repos.yaml registry file that defines repositories, their types, dependencies, and metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindRegistry ¶
FindRegistry searches for repos.yaml in common locations. It checks: current directory, parent directories, and home directory.
Types ¶
type Registry ¶
type Registry struct {
Version int `yaml:"version"`
Org string `yaml:"org"`
BasePath string `yaml:"base_path"`
Repos map[string]*Repo `yaml:"repos"`
Defaults RegistryDefaults `yaml:"defaults"`
}
Registry represents a collection of repositories defined in repos.yaml.
func LoadRegistry ¶
LoadRegistry reads and parses a repos.yaml file.
func ScanDirectory ¶
ScanDirectory creates a Registry by scanning a directory for git repos. This is used as a fallback when no repos.yaml is found.
func (*Registry) TopologicalOrder ¶
TopologicalOrder returns repos sorted by dependency order. Foundation repos come first, then modules, then products.
type RegistryDefaults ¶
type RegistryDefaults struct {
CI string `yaml:"ci"`
License string `yaml:"license"`
Branch string `yaml:"branch"`
}
RegistryDefaults contains default values applied to all repos.
type Repo ¶
type Repo struct {
Name string `yaml:"-"` // Set from map key
Type string `yaml:"type"`
DependsOn []string `yaml:"depends_on"`
Description string `yaml:"description"`
Docs bool `yaml:"docs"`
CI string `yaml:"ci"`
Domain string `yaml:"domain,omitempty"`
Clone *bool `yaml:"clone,omitempty"` // nil = true, false = skip cloning
// Computed fields
Path string `yaml:"-"` // Full path to repo directory
}
Repo represents a single repository in the registry.
type RepoType ¶
type RepoType string
RepoType indicates the role of a repository in the ecosystem.
const ( // RepoTypeFoundation indicates core foundation packages. RepoTypeFoundation RepoType = "foundation" // RepoTypeModule indicates reusable module packages. RepoTypeModule RepoType = "module" // RepoTypeProduct indicates end-user product applications. RepoTypeProduct RepoType = "product" // RepoTypeTemplate indicates starter templates. RepoTypeTemplate RepoType = "template" )
Repository type constants for ecosystem classification.