Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadString ¶
LoadString loads configuration from a string with optional environment variable support. Parameters: - configString: The configuration string in YAML format - envPrefix: Optional environment variable prefix (default: "ENV") - configFn: Optional function to customize viper configuration before unmarshaling
func LoadStringWithConfig ¶
func LoadStringWithConfig[T any](configString string, configFn func(*viper.Viper), envPrefix ...string) (*T, error)
LoadStringWithConfig loads configuration from a string with optional environment variable support and allows custom configuration of viper. Parameters: - configString: The configuration string in YAML format - configFn: Optional function to customize viper configuration before unmarshaling - envPrefix: Optional environment variable prefix (default: "ENV")
func NestedEnvVars ¶
NestedEnvVars processes environment variables with a specific prefix and sets them in the viper configuration. This function is useful for handling nested configuration structures from environment variables. Parameters: - prefix: The prefix for environment variables to process - keyDepth: The depth at which entity names are found in the key parts - configPath: The base path in the configuration where values should be set - viperConfig: The viper configuration instance to modify
Types ¶
This section is empty.