Documentation
¶
Overview ¶
Package config provides configuration management operations for the star runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
op.ProviderBase
}
Provider provides configuration operations: get (merged config), show (config with sources), and sync (write tool-specific config files).
+devlore:access=immediate
func NewProvider ¶
func NewProvider(ctx *op.RuntimeEnvironment) *Provider
NewProvider creates a config provider bound to the given context. Declares interest in the "config" variable so the resolver populates it from the [application.Application]'s source maps at construction time.
func (*Provider) Get ¶
Get returns the merged configuration from the hierarchy as a Starlark struct with attribute access (e.g., cfg.lint.copyright.enabled).
Returns:
- any: the config as a Starlark value
- error: if config loading fails
+devlore:property
func (*Provider) Show ¶
func (p *Provider) Show() (ShowResult, error)
Show returns the config with source file information.
Returns:
- ShowResult: config value and list of source files
- error: if config loading fails
func (*Provider) Sync ¶
func (p *Provider) Sync() (SyncResult, error)
Sync writes tool-specific config files from star/config.yaml.
Returns:
- SyncResult: paths of generated files and count
- error: if config loading or sync fails
type ShowResult ¶
type ShowResult struct {
Config any `starlark:"config"`
Sources []SourceInfo `starlark:"sources"`
}
ShowResult holds config with source information.
type SourceInfo ¶
SourceInfo represents a config source file and whether it exists.
type SyncResult ¶
type SyncResult struct {
GolangciLint string `starlark:"golangci_lint"`
MarkdownLint string `starlark:"markdown_lint"`
FilesGenerated int `starlark:"files_generated"`
}
SyncResult holds the outcome of a config sync.