Documentation
¶
Overview ¶
Package envprovider implements secrets.Provider for the "env" scheme: references of the form "secretref://env/<VAR>" are resolved from the process environment. This is the local/dev provider; cloud providers follow the same layout at adapters/secrets/<name>provider.
See docs/blueprint/12-configuration-and-deployment.md §5 and decision D-0013 in docs/implementation/decisions.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider resolves "secretref://env/<VAR>" from the process environment.
func NewWithLookup ¶
NewWithLookup returns a Provider using an injectable lookup function. The function must match os.LookupEnv semantics: returning (value, true) when the variable is set (even if empty) and ("", false) when absent.
func (*Provider) Resolve ¶
Resolve returns the environment-variable value named by ref.Path.
ref.Provider must be "env"; any other provider name is rejected so that a mis-routed reference fails fast rather than silently resolving nothing.
Missing and empty-string variables are both treated as errors: an absent variable is a deployment gap, and an empty secret is a deployment bug (a deliberately blank value must be modelled as an absent feature, not an empty secret reference).