Documentation ¶
Index ¶
- func PresentDeprecated(content []byte) bool
- func Traverse(val interface{}, name string, fields []string) (interface{}, error)
- type CredVarsTracker
- type EvaluateOpts
- type InvalidFieldError
- type InvalidInterpolationError
- type KVPair
- type KVPairs
- type MissingFieldError
- type MissingSourceError
- type MultiVars
- type NamedVariables
- type Reference
- type StaticVariables
- type Template
- type TemplateResolver
- type TrackedVarsIterator
- type TrackedVarsMap
- type Tracker
- type UndefinedVarsError
- type UnusedVarsError
- type Variables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PresentDeprecated ¶
Types ¶
type CredVarsTracker ¶
func (*CredVarsTracker) Get ¶
func (t *CredVarsTracker) Get(ref Reference) (interface{}, bool, error)
func (*CredVarsTracker) List ¶
func (t *CredVarsTracker) List() ([]Reference, error)
type EvaluateOpts ¶
type InvalidFieldError ¶
func (InvalidFieldError) Error ¶
func (err InvalidFieldError) Error() string
type InvalidInterpolationError ¶
type InvalidInterpolationError struct { Name string Value interface{} }
func (InvalidInterpolationError) Error ¶
func (err InvalidInterpolationError) Error() string
type KVPairs ¶
type KVPairs []KVPair
func (KVPairs) Expand ¶
func (f KVPairs) Expand() StaticVariables
type MissingFieldError ¶
func (MissingFieldError) Error ¶
func (err MissingFieldError) Error() string
type MissingSourceError ¶
func (MissingSourceError) Error ¶
func (err MissingSourceError) Error() string
type MultiVars ¶
type MultiVars struct {
// contains filtered or unexported fields
}
func NewMultiVars ¶
type NamedVariables ¶
func (NamedVariables) Get ¶
func (m NamedVariables) Get(ref Reference) (interface{}, bool, error)
Get checks var_source if presents, then forward var to underlying secret manager. A Reference with a var_source looks like "myvault:foo", where "myvault" is the var_source name, and "foo" is the real var name that should be forwarded to the underlying secret manager.
func (NamedVariables) List ¶
func (m NamedVariables) List() ([]Reference, error)
type Reference ¶
func ParseReference ¶
type StaticVariables ¶
type StaticVariables map[string]interface{}
func (StaticVariables) Flatten ¶
func (v StaticVariables) Flatten() KVPairs
func (StaticVariables) List ¶
func (v StaticVariables) List() ([]Reference, error)
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func NewTemplate ¶
func (Template) Evaluate ¶
func (t Template) Evaluate(vars Variables, opts EvaluateOpts) ([]byte, error)
func (Template) ExtraVarNames ¶
type TemplateResolver ¶
type TemplateResolver struct {
// contains filtered or unexported fields
}
func NewTemplateResolver ¶
func NewTemplateResolver(configPayload []byte, params []Variables) TemplateResolver
Creates a template resolver, given a configPayload and a slice of param sources. If more than one param source is specified, they will be tried for variable lookup in the provided order. See implementation of NewMultiVars for details.
func (TemplateResolver) Resolve ¶
func (resolver TemplateResolver) Resolve(expectAllKeys bool, allowEmptyInOldStyleTemplates bool) ([]byte, error)
func (TemplateResolver) ResolveDeprecated ¶
func (resolver TemplateResolver) ResolveDeprecated(allowEmpty bool) ([]byte, error)
type TrackedVarsIterator ¶
type TrackedVarsMap ¶
TrackedVarsMap is a TrackedVarsIterator which populates interpolated secrets into a map. If there are multiple secrets with the same name, it only keeps the first value.
func (TrackedVarsMap) YieldCred ¶
func (it TrackedVarsMap) YieldCred(k, v string)
type Tracker ¶
type Tracker struct { Enabled bool // contains filtered or unexported fields }
func NewTracker ¶
func (*Tracker) IterateInterpolatedCreds ¶
func (t *Tracker) IterateInterpolatedCreds(iter TrackedVarsIterator)
type UndefinedVarsError ¶
type UndefinedVarsError struct {
Vars []string
}
func (UndefinedVarsError) Error ¶
func (err UndefinedVarsError) Error() string
type UnusedVarsError ¶
type UnusedVarsError struct {
Vars []string
}
func (UnusedVarsError) Error ¶
func (err UnusedVarsError) Error() string