Documentation
¶
Overview ¶
Copyright © 2025 Stackaroo Contributors SPDX-License-Identifier: BSD-3-Clause
Copyright © 2025 Stackaroo Contributors SPDX-License-Identifier: BSD-3-Clause
Index ¶
- type Config
- type ConfigProvider
- type ContextConfig
- type MockConfigProvider
- func (m *MockConfigProvider) GetStack(stackName, context string) (*StackConfig, error)
- func (m *MockConfigProvider) ListContexts() ([]string, error)
- func (m *MockConfigProvider) ListStacks(context string) ([]string, error)
- func (m *MockConfigProvider) LoadConfig(ctx context.Context, context string) (*Config, error)
- func (m *MockConfigProvider) Validate() error
- type ParameterValue
- type StackConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Project string
Region string
Tags map[string]string
Context *ContextConfig // Resolved context
Stacks []*StackConfig // Resolved stacks
}
Config represents the resolved configuration for a specific context Based on ADR 0010 (File provider configuration structure)
type ConfigProvider ¶
type ConfigProvider interface {
// LoadConfig loads configuration for a specific context
LoadConfig(ctx context.Context, context string) (*Config, error)
// ListContexts returns all available contexts in the configuration
ListContexts() ([]string, error)
// GetStack returns stack configuration for a specific stack and context
GetStack(stackName, context string) (*StackConfig, error)
// ListStacks returns all available stack names for a specific context
ListStacks(context string) ([]string, error)
// Validate checks the configuration for consistency and errors
Validate() error
}
ConfigProvider defines the interface for loading and managing configuration Based on ADR 0008 (Configuration abstraction) and ADR 0009 (Context abstraction)
type ContextConfig ¶
ContextConfig represents resolved context-specific configuration
type MockConfigProvider ¶ added in v0.3.0
MockConfigProvider implements ConfigProvider for testing
func (*MockConfigProvider) GetStack ¶ added in v0.3.0
func (m *MockConfigProvider) GetStack(stackName, context string) (*StackConfig, error)
func (*MockConfigProvider) ListContexts ¶ added in v0.3.0
func (m *MockConfigProvider) ListContexts() ([]string, error)
func (*MockConfigProvider) ListStacks ¶ added in v0.3.0
func (m *MockConfigProvider) ListStacks(context string) ([]string, error)
func (*MockConfigProvider) LoadConfig ¶ added in v0.3.0
func (*MockConfigProvider) Validate ¶ added in v0.3.0
func (m *MockConfigProvider) Validate() error
type ParameterValue ¶ added in v0.6.0
type ParameterValue struct {
ResolutionType string // "literal", "stack-output", "list"
ResolutionConfig map[string]string // Resolution-specific configuration
// For list parameters
ListItems []*ParameterValue // List of parameter values to resolve
}
ParameterValue represents a parameter with unified resolution model
type StackConfig ¶
type StackConfig struct {
Name string
Template string // URI to template (file://, s3://, git://, etc.)
Parameters map[string]*ParameterValue
Tags map[string]string
Dependencies []string
Capabilities []string
}
StackConfig represents resolved stack configuration with context overrides applied