Documentation
¶
Overview ¶
Package config handles configuration file parsing and management.
Index ¶
- func ExpandPath(path string) string
- func GetDefaultSpecPath() string
- func GetDeployDir() string
- func GetSpecAliasPath() string
- type Loader
- func (l *Loader) DiscoverStackKits(dirs ...string) ([]*models.StackKit, error)
- func (l *Loader) FindStackKitDir(name string) (string, error)
- func (l *Loader) LoadDeploymentState(path string) (*models.DeploymentState, error)
- func (l *Loader) LoadLegacyStackSpec(path string) (*models.StackSpec, error)
- func (l *Loader) LoadStackKit(path string) (*models.StackKit, error)
- func (l *Loader) LoadStackSpec(path string) (*models.StackSpec, error)
- func (l *Loader) ReadStackSpecDocument(path string) (StackSpecDocument, error)
- func (l *Loader) ResolveStackSpecPathForRead(path string) (string, string, bool, error)
- func (l *Loader) SaveDeploymentState(state *models.DeploymentState, path string) error
- func (l *Loader) SaveLegacyStackSpecV06(spec *models.StackSpec, path string) error
- type StackSpecDocument
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandPath ¶
ExpandPath expands ~ and environment variables in a path
func GetDefaultSpecPath ¶
func GetDefaultSpecPath() string
GetDefaultSpecPath returns the default spec file path
func GetSpecAliasPath ¶
func GetSpecAliasPath() string
GetSpecAliasPath returns the accepted TechStack/user-intent alias path.
Types ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader handles loading configuration files
func (*Loader) DiscoverStackKits ¶
DiscoverStackKits scans directories for stackkit.yaml files and returns loaded StackKits. It scans the given directories in order and deduplicates by name.
func (*Loader) FindStackKitDir ¶
FindStackKitDir finds the stackkit directory for a given name
func (*Loader) LoadDeploymentState ¶
func (l *Loader) LoadDeploymentState(path string) (*models.DeploymentState, error)
LoadDeploymentState loads the deployment state file
func (*Loader) LoadLegacyStackSpec ¶
LoadLegacyStackSpec loads only a classified StackSpec v1 document. It rejects v2 before decoding through models.StackSpec and rejects unknown v1 fields so a later Save cannot silently erase operator intent.
func (*Loader) LoadStackKit ¶
LoadStackKit loads a stackkit.yaml file
func (*Loader) LoadStackSpec ¶
LoadStackSpec is the v0.6 compatibility name for the legacy-only loader. Deprecated: new code must call ReadStackSpecDocument and route by version. Legacy compatibility code should call LoadLegacyStackSpec explicitly.
stack-spec.yaml remains the canonical CLI file. If the caller asks for the canonical default and it is missing, kombination.yaml is accepted as a user-intent alias for TechStack/CLI interoperability.
func (*Loader) ReadStackSpecDocument ¶
func (l *Loader) ReadStackSpecDocument(path string) (StackSpecDocument, error)
ReadStackSpecDocument loads and strictly classifies a StackSpec without applying legacy defaults or discarding fields. New operational readers must start here and then route explicitly by Document.Version.
func (*Loader) ResolveStackSpecPathForRead ¶
ResolveStackSpecPathForRead resolves the spec path and reports whether the TechStack/user-intent alias was selected.
func (*Loader) SaveDeploymentState ¶
func (l *Loader) SaveDeploymentState(state *models.DeploymentState, path string) error
SaveDeploymentState saves the deployment state file
func (*Loader) SaveLegacyStackSpecV06 ¶
SaveLegacyStackSpecV06 persists the bounded models.StackSpec compatibility document. Callers must enforce the exact v0.6 build admission before using this serializer; canonical v2 bytes must never pass through this model.
type StackSpecDocument ¶
type StackSpecDocument struct {
Path string
DisplayPath string
AliasUsed bool
Document stackspecmigration.Document
}
StackSpecDocument is the lossless, version-classified StackSpec read boundary. Raw bytes remain owned by stackspecmigration.Document so callers cannot accidentally decode v2 through the partial legacy Go model.