viper

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureEnvVars added in v0.4.2

func ConfigureEnvVars(vip *v.Viper, envPrefix string)

ConfigureEnvVars configures a Viper instance to read environment variables with the specified prefix (e.g., "kongctl" or "kongctl_default")

func InitializeDefaultViper

func InitializeDefaultViper(defaultValues map[string]any, path string) (*v.Viper, error)

InitializeDefaultViper initializes a viper instance with default values and a path to a file If the file does not exist, it will be created with the default values

func NewViper

func NewViper(path string) *v.Viper

func NewViperE

func NewViperE(path string) (*v.Viper, error)

func PersistViper

func PersistViper(v *v.Viper) error

func ProfileEnvPrefix added in v0.4.2

func ProfileEnvPrefix(profile string) string

ProfileEnvPrefix converts a profile name to its environment variable prefix. For example, "team-a" becomes "KONGCTL_TEAM_A".

Types

This section is empty.

Jump to

Keyboard shortcuts

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