Documentation ¶
Index ¶
- func Marshallers() []string
- 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) Map() map[string]string
- func (e *Environ) Merge(m map[string]string)
- func (e *Environ) Populate(providers []string)
- func (e *Environ) SafeAppend(s []string)
- func (e *Environ) SafeMerge(m map[string]string)
- func (e *Environ) Set(k, v string)
- func (e *Environ) SetMarshaller(m string)
- func (e *Environ) Slice() []string
- func (e *Environ) String() string
- func (e *Environ) Write(w io.Writer) error
- type Provider
- type ProviderFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshallers ¶ added in v1.0.0
func Marshallers() []string
Marshallers returns a list of all valid serializers extensions
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 NewFromEnv ¶ added in v0.2.0
func NewFromEnv() *Environ
NewFromEnv 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) Populate ¶ added in v1.0.0
Populate adds secrets to the Environ from the given providers
func (*Environ) SafeAppend ¶ added in v0.2.0
SafeAppend takes a slice in the form of os.Environ() - '=' delimited - and appends it to Environ without overwriting keys.
func (*Environ) SafeMerge ¶
SafeMerge takes a map[string]string and adds it to this Environ without overwriting keys
func (*Environ) SetMarshaller ¶ added in v0.2.0
SetMarshaller sets the marshalling function for the Environ object.
func (*Environ) Slice ¶
Slice returns a sorted []string of key / value pairs from this Environ instance suitable for use in palce of os.Environ()
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