configloader

package
v0.1.0-beta.20 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnhanceConfigError

func EnhanceConfigError(configFile string, format string, originalErr error) error

EnhanceConfigError takes a koanf parse error and attempts to provide a more helpful error message with context and suggestions. Currently only enhances YAML errors - JSON and TOML parsers already provide clear messages.

func ExtractTargets

func ExtractTargets(haloyConfig config.DeployConfig, format string) (map[string]config.TargetConfig, error)

func FindConfigFile

func FindConfigFile(path string) (string, error)

FindConfigFile finds a haloy config file based on the given path It supports: - Full path to a config file - Directory containing a haloy config file - Relative paths

func Load

func Load(
	ctx context.Context,
	configPath string,
	targets []string,
	allTargets bool,
) (haloyConfig config.DeployConfig, format string, err error)

func LoadRawDeployConfig

func LoadRawDeployConfig(configPath string) (config.DeployConfig, string, error)

func MergeToTarget

func MergeToTarget(haloyConfig config.DeployConfig, targetConfig config.TargetConfig, targetName, format string) (config.TargetConfig, error)

MergeToTarget merges the global DeployConfig into a specific TargetConfig. The configuration hierarchy is (from highest to lowest specificity): 1. Target Config (explicitly set in the 'targets' map) 2. Preset Defaults (applied if fields are empty) 3. Global DeployConfig (applied if fields are still empty)

func ResolveSecrets

func ResolveSecrets(ctx context.Context, haloyConfig config.DeployConfig) (config.DeployConfig, error)

func TargetsByServer

func TargetsByServer(targets map[string]config.TargetConfig) map[string][]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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