Documentation ¶
Index ¶
- func RegisterProvider(name string, fn ProviderFactory)
- type Environ
- func (e *Environ) Delete(key string) (v string)
- func (e *Environ) Len() (l int)
- func (e *Environ) Load(k string) (v string, ok bool)
- func (e *Environ) Merge(m map[string]string)
- func (e *Environ) SafeMerge(m map[string]string)
- func (e *Environ) Set(k, v string)
- func (e *Environ) Slice() []string
- func (e *Environ) String() string
- type Provider
- type ProviderFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProvider ¶
func RegisterProvider(name string, fn ProviderFactory)
RegisterProvider adds the named Provider's factory function to the map of known Providers
Types ¶
type Environ ¶
Environ is a concurrency safe-ish map[string]string for holding environment variables
func NewEnvironFromEnv ¶
func NewEnvironFromEnv() *Environ
NewEnvironFromEnv returns a new Environ instance populated from os.Environ
func (*Environ) Merge ¶
Merge takes a map[string]string and adds it to this Environ, overwriting any conflicting keys.
func (*Environ) SafeMerge ¶
SafeMerge takes a map[string]string and adds it to this Environ without overwriting keys
type Provider ¶
Provider is a secrets provider able to inject variables into the environment
func GetProvider ¶
GetProvider returns a new instance of the named Provider or an unregistered provider error
type ProviderFactory ¶
ProviderFactory is a func that returns a new Provider