Documentation
¶
Overview ¶
Package chain resolves Layer-1: the .cenvkit.envchain file list plus the "K=V" seed environment for the engine. Pure Go — imports no compose-go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct {
ProjectDir string // absolute project directory
OSEnv []string // os.Environ(); injected for testability
Hostname func() (string, error) // injected; production passes os.Hostname
Chain string // named chain to select (C4); "" or "default" = the [default]/header-less section
}
Input describes one Layer-1 resolution request. OSEnv and Hostname are injected for testability; production passes os.Environ() and os.Hostname.
type Result ¶
type Result struct {
Files []string // ordered absolute Layer-1 paths, existing only, deduped
Vars []string // merged "K=V" seed for the engine (OS env wins over file vars), sorted
ComposeEnv string // resolved CENVKIT_ENV ("dev" default)
ComposeEnvSource string // where ComposeEnv came from: "shell" | ".env" | "default" (for the --overview header)
Host string // resolved + sanitized host ([A-Za-z0-9._-])
}
Result is the resolved Layer-1 view.
type UnknownChainError ¶
type UnknownChainError struct {
Name string // the requested chain name
Available []string // sorted section names actually present
}
UnknownChainError reports a requested --chain <name> that the chain file does not define. It carries the available section names (sorted) so the CLI can list them and exit 2.
func (*UnknownChainError) Error ¶
func (e *UnknownChainError) Error() string
Click to show internal directories.
Click to hide internal directories.