Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig[T Config](opts ...LoadConfigOption) (*T, error)
LoadConfig loads the config and resolves secrets using the specified options. No secret providers are registered by default; you must specify them via options. Example:
LoadConfig[MyConfigType](WithSecretProviders(providers.GcpProvider{}))
LoadConfig[MyConfigType](WithSecretProviders(providers.GcpProvider{}, providers.AwsProvider{}))
func SetupConfiguration ¶
Types ¶
type AppSettings ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
func (*CLI) GetVersionString ¶
type CleanUpHandler ¶
type CleanUpHandler func()
type ConfigMock ¶
type ConfigMock struct {
Foo string `json:"foo"`
}
func (ConfigMock) SetDefaults ¶
func (c ConfigMock) SetDefaults()
func (ConfigMock) Validate ¶
func (c ConfigMock) Validate() error
type DefaultConfigHandler ¶
type DefaultConfigHandler func()
type LoadConfigOption ¶ added in v0.22.0
type LoadConfigOption interface {
// contains filtered or unexported methods
}
LoadConfigOption is a type-safe option for LoadConfig. Is on purpose not put just a function, because we want to avoid side effects.
func WithSecretProviders ¶ added in v0.22.0
func WithSecretProviders(providers ...secrets.SecretProvider) LoadConfigOption
WithSecretProviders registers the given secret providers for secret resolution. Pass this option to LoadConfig to specify which providers to use.
Click to show internal directories.
Click to hide internal directories.