Documentation ¶
Index ¶
- Constants
- func KeyNamespaceMutator(ns string) func(key string) string
- type AppDev
- func (c *AppDev) Components(component string) ConfigSource
- func (c *AppDev) GetBool(key string) bool
- func (c *AppDev) GetDuration(key string) time.Duration
- func (c *AppDev) GetString(key string) string
- func (c *AppDev) IsSet(key string) bool
- func (c *AppDev) Set(key string, value any) error
- func (c *AppDev) WriteConfig() error
- type ConfigSource
Constants ¶
View Source
const (
// DefaultDevConfigFile is the name of the default dev configuration file.
DefaultDevConfigFile = "dev-config.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func KeyNamespaceMutator ¶
KeyNamespaceMutator returns a mutator that prefixes a namespace to the key with a `.` delimiter.
Types ¶
type AppDev ¶
type AppDev struct {
// contains filtered or unexported fields
}
func (*AppDev) Components ¶
func (c *AppDev) Components(component string) ConfigSource
func (*AppDev) WriteConfig ¶
type ConfigSource ¶
type ConfigSource interface { IsSet(key string) bool GetString(key string) string GetBool(key string) bool GetDuration(key string) time.Duration }
ConfigSource is a config source.
func DoctlConfigSource ¶
func DoctlConfigSource(config doctl.Config, ns string) ConfigSource
DoctlConfigSource converts a doctl.Config into a ConfigSource with an optional default namespace.
func Multi ¶
func Multi(sources ...ConfigSource) ConfigSource
Multi returns a config source that wraps multiple config sources. Each source is evaluated in order and the first match is returned.
func MutatingConfigSource ¶
func MutatingConfigSource(cs ConfigSource, mutateKey func(key string) string, excludeMethods []string) ConfigSource
Click to show internal directories.
Click to hide internal directories.