Documentation
¶
Index ¶
- func MergeContexts(contexts ...map[string]interface{}) map[string]interface{}
- type Engine
- func (e *Engine) ExtractVariables(value interface{}) []string
- func (e *Engine) RenderGoTemplate(templateStr string, context map[string]interface{}) (interface{}, error)
- func (e *Engine) Replace(value interface{}, context map[string]interface{}) (interface{}, error)
- func (e *Engine) ValidateContext(value interface{}, context map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeContexts ¶
MergeContexts merges multiple contexts into a single context Later contexts override values from earlier contexts
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine handles arg templating for service operations
func (*Engine) ExtractVariables ¶
ExtractVariables extracts all template variable names from a value
func (*Engine) RenderGoTemplate ¶
func (e *Engine) RenderGoTemplate(templateStr string, context map[string]interface{}) (interface{}, error)
RenderGoTemplate renders a full Go template with Sprig template functions This is used for complex expressions like {{ eq .input.var "value" }}
func (*Engine) Replace ¶
Replace replaces all template variables in a value with actual values from the context
func (*Engine) ValidateContext ¶
ValidateContext ensures all required variables are present in the context
Click to show internal directories.
Click to hide internal directories.