Documentation ¶
Index ¶
- func PresentDeprecated(content []byte) bool
- type CredVarsTracker
- type CredVarsTrackerIterator
- type EvaluateOpts
- type InvalidFieldError
- type InvalidInterpolationError
- type MapCredVarsTrackerIterator
- type MissingFieldError
- type MissingSourceError
- type MultiVars
- type NamedVariables
- type StaticVariables
- type Template
- type TemplateResolver
- type UndefinedVarsError
- type UnusedVarsError
- type VariableDefinition
- type VariableReference
- type Variables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PresentDeprecated ¶
Types ¶
type CredVarsTracker ¶
type CredVarsTracker interface { Variables IterateInterpolatedCreds(iter CredVarsTrackerIterator) Enabled() bool AddLocalVar(string, interface{}, bool) }
func NewCredVarsTracker ¶
func NewCredVarsTracker(credVars Variables, on bool) CredVarsTracker
type CredVarsTrackerIterator ¶
CredVarsTracker implements the interface Variables. It wraps a secret manager and tracks key-values fetched from the secret managers. It also provides a method to thread-safely iterate interpolated key-values.
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 MapCredVarsTrackerIterator ¶
type MapCredVarsTrackerIterator struct {
Data map[string]interface{}
}
func NewMapCredVarsTrackerIterator ¶
func NewMapCredVarsTrackerIterator() *MapCredVarsTrackerIterator
func (*MapCredVarsTrackerIterator) YieldCred ¶
func (it *MapCredVarsTrackerIterator) YieldCred(k, v string)
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 ¶
func (MultiVars) List ¶
func (m MultiVars) List() ([]VariableDefinition, error)
type NamedVariables ¶
func (NamedVariables) Get ¶
func (m NamedVariables) Get(varDef VariableDefinition) (interface{}, bool, error)
Get checks var_source if presents, then forward var to underlying secret manager. A `varDef.Name` 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() ([]VariableDefinition, error)
type StaticVariables ¶
type StaticVariables map[string]interface{}
func (StaticVariables) Get ¶
func (v StaticVariables) Get(varDef VariableDefinition) (interface{}, bool, error)
func (StaticVariables) List ¶
func (v StaticVariables) List() ([]VariableDefinition, 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 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
type VariableDefinition ¶
type VariableDefinition struct { Ref VariableReference Type string Options interface{} }
type VariableReference ¶
type Variables ¶
type Variables interface { Get(VariableDefinition) (interface{}, bool, error) List() ([]VariableDefinition, error) }