Documentation
¶
Overview ¶
Package projects parses and validates deploy/config/projects.yaml: which repos exist, which brains they feed, and which GitHub identity owns them.
The Python ingest service validates the same file with the same rules (kb/src/ki_kb/projects.py). Both are tested against testdata/projects so they cannot drift apart.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalid = errors.New("invalid projects file")
ErrInvalid wraps every validation failure.
Functions ¶
func NormalizeRepo ¶
NormalizeRepo returns the canonical lower-case https URL for any GitHub remote form.
Types ¶
type Config ¶
type Config struct {
// SensitiveBrains holds names and families ("client-*").
SensitiveBrains []string
Identities map[string]Identity
Projects []Project
Workspaces []Workspace
}
Config is a parsed, validated projects file.
func (*Config) IsSensitive ¶
IsSensitive reports whether a brain may only be read when named explicitly.
type Identity ¶
type Identity struct {
Name string
GitHubUser string
Email string
Credential string
// Vault is false for employers or clients whose content must never be
// copied into the vault.
Vault bool
// Ingest is false for employers or clients whose repos must never be
// ingested into any brain. It has no default: every identity states it.
Ingest bool
}
Identity is one GitHub account.
type IngestRule ¶
IngestRule maps a repo path prefix to a brain.
type Project ¶
type Project struct {
Name string
Repo string
Branch string
Identity Identity
Brains []string
Ingest []IngestRule
Board string
// VaultFolders are extra folders under the vault's projects/ that belong to
// this project besides the one named after it.
VaultFolders []string
// Bulk projects are off-peak only: the kb worker holds their ingest back
// in peak windows and on a low provider balance, and syncs them last.
Bulk bool
}
Project is one entry in the projects file.