config

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Copyright © 2025 Stackaroo Contributors SPDX-License-Identifier: BSD-3-Clause

Copyright © 2025 Stackaroo Contributors SPDX-License-Identifier: BSD-3-Clause

Index

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

type ContextConfig struct {
	Name    string
	Account string
	Region  string
	Tags    map[string]string
}

ContextConfig represents resolved context-specific configuration

type MockConfigProvider added in v0.3.0

type MockConfigProvider struct {
	mock.Mock
}

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 (m *MockConfigProvider) LoadConfig(ctx context.Context, context string) (*Config, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL