Documentation
¶
Overview ¶
Package projectconfig loads and validates Grafo's repository-level configuration without claiming sections owned by other consumers.
Index ¶
Constants ¶
const FileName = "grafo.yaml"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
Name string
Roots []ComponentRoot
Line int
Column int
}
Component declares one explicitly named deployable boundary.
type ComponentRoot ¶
ComponentRoot is a normalized repository-relative ownership root together with the source location that proves the declaration.
type Config ¶
type Config struct {
Components []Component
Adapters calleffect.Registry
HTTP HTTP
SQL SQL
Tests Tests
Index IndexScope
// IndexSeed is the repository's position on adopting a sibling worktree's
// index when this worktree has none. Nil means unset, so the caller's own
// default applies.
IndexSeed *bool
UnknownSections map[string][]yaml.Node
}
Config contains Grafo-owned top-level configuration. Unknown top-level sections are deliberately ignored so their owning consumers remain free to interpret them.
type HTTP ¶
type HTTP struct {
RequestAPIs []HTTPRequestAPI
}
HTTP is the shared, validated outbound-HTTP adapter configuration.
func (HTTP) SemanticKey ¶
SemanticKey returns a deterministic digest of only the HTTP-owned subtree.
type HTTPRequestAPI ¶
type HTTPRequestAPI struct {
Language string
Symbol string
MethodArgument int
URLArgument int
Line int
}
HTTPRequestAPI identifies one exact callable and its zero-based method and URL argument positions. URLArgument also represents route_argument, whose spelling is an equivalent configuration alias.
type IndexScope ¶
IndexScope is the repository-owned source membership policy. Empty Include means every otherwise eligible file; Exclude always wins.
func (IndexScope) Allows ¶
func (s IndexScope) Allows(candidate string) bool
Allows reports whether a candidate is inside the configured scope. The root control file is always retained so scope changes remain observable.
func (IndexScope) SemanticKey ¶
func (s IndexScope) SemanticKey() string
SemanticKey fingerprints normalized scope independently of YAML ordering.
type SQL ¶
SQL is the shared, validated SQL-router configuration.
func (SQL) SemanticKey ¶
SemanticKey returns a deterministic digest of only the SQL-owned subtree. Changes to components or unknown top-level sections therefore do not force unchanged SQL source files to be reparsed.
type Tests ¶
Tests is the fail-closed repository test-framework configuration. Invalid settings retain one diagnostic and no custom bases, allowing parsers to keep the verified built-in conventions without accepting an unvalidated name.
func (Tests) SemanticKey ¶
SemanticKey fingerprints only the test-owned subtree. Invalid input is part of the key so fixing grafo.yaml reparses otherwise unchanged scripts.