Documentation
¶
Index ¶
- type Evaluation
- type Scope
- func (s *Scope) AddData(values ...map[string]interface{}) *Scope
- func (s *Scope) AddDataValue(key string, value interface{}) *Scope
- func (s *Scope) AddTemplate(values map[string]interface{}) *Scope
- func (s *Scope) AddTemplateValue(key string, value interface{}) *Scope
- func (s *Scope) Values() map[string]interface{}
- type Variable
- func (variables *Variable) Evaluate(values map[string]interface{}) map[string]interface{}
- func (variables *Variable) EvaluateScope(scope *Scope) Evaluation
- func (variables *Variable) EvaluateWithInteractsh(values map[string]interface{}, interact *interactsh.Client) (map[string]interface{}, []string)
- func (variables *Variable) EvaluateWithInteractshScope(scope *Scope, interact render.URLSource) Evaluation
- func (variables *Variable) GetAll() map[string]interface{}
- func (variables Variable) JSONSchema() *jsonschema.Schema
- func (variables *Variable) UnmarshalJSON(data []byte) error
- func (variables *Variable) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evaluation ¶ added in v3.10.0
type Evaluation struct {
Values map[string]interface{}
TemplateValues map[string]interface{}
InteractURLs []string
}
Evaluation contains variable values and the subset produced from template variable text.
type Scope ¶ added in v3.10.0
type Scope struct {
// contains filtered or unexported fields
}
Scope contains values used while evaluating template variables.
Data values are terminal values from runtime, options, constants, payloads, or protocol context. Template values are produced from the template variables section and may be re-rendered when later data becomes available.
func NewScope ¶ added in v3.10.0
func NewScope() *Scope
NewScope creates an empty variable evaluation scope.
func (*Scope) AddDataValue ¶ added in v3.10.0
AddDataValue adds one terminal data value to the scope.
func (*Scope) AddTemplate ¶ added in v3.10.0
AddTemplate adds values produced from template variables.
func (*Scope) AddTemplateValue ¶ added in v3.10.0
AddTemplateValue adds one value produced from template variables.
type Variable ¶
type Variable struct {
// LazyEval is used to evaluate variables lazily if it using any expression
// or global variables.
LazyEval bool `yaml:"-" json:"-"`
utils.InsertionOrderedStringMap `yaml:"-" json:"-"`
}
Variable is a key-value pair of strings that can be used throughout template.
func (*Variable) EvaluateScope ¶ added in v3.10.0
func (variables *Variable) EvaluateScope(scope *Scope) Evaluation
EvaluateScope returns evaluated variables and records which returned values were produced from template variable text.
func (*Variable) EvaluateWithInteractsh ¶
func (variables *Variable) EvaluateWithInteractsh(values map[string]interface{}, interact *interactsh.Client) (map[string]interface{}, []string)
EvaluateWithInteractsh returns evaluation results of variables with interactsh
func (*Variable) EvaluateWithInteractshScope ¶ added in v3.10.0
func (variables *Variable) EvaluateWithInteractshScope(scope *Scope, interact render.URLSource) Evaluation
EvaluateWithInteractshScope returns evaluated variables, source-level Interactsh URLs, and the subset of values produced from template variable text.
func (Variable) JSONSchema ¶ added in v3.2.4
func (variables Variable) JSONSchema() *jsonschema.Schema