Documentation
¶
Overview ¶
Package data contins data substitution routines.
Package data contains the data substitution module
Index ¶
- type Context
- func (d *Context) AddReplacement(name string, value string) error
- func (d *Context) ExtractJSON(path string, r io.Reader) (string, error)
- func (d *Context) ExtractRegex(rs string, r io.Reader) (string, error)
- func (d *Context) ExtractXML(path string, r io.Reader) (string, error)
- func (d *Context) Len() int
- func (d *Context) Lookup(n string) string
- func (d *Context) Replace(s string) string
- type Data
- type Replacement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context defines a sequence
func (*Context) AddReplacement ¶
AddReplacement creates a new regex replacement.
func (*Context) ExtractJSON ¶
ExtractJSON extracts a value using a gjson path.
func (*Context) ExtractRegex ¶
ExtractRegex extracts a value using a regular expression.
func (*Context) ExtractXML ¶
ExtractXML saves a datum from the specified XPath.
type Data ¶
type Data interface {
AddReplacement(string, string) error
Replace(string) string
Lookup(string) string
Len() int
ExtractJSON(string, io.Reader) (string, error)
ExtractXML(string, io.Reader) (string, error)
ExtractRegex(string, io.Reader) (string, error)
}
Data defines interfaces for executing scenarios
type Replacement ¶
type Replacement struct {
// contains filtered or unexported fields
}
Replacement defines a compiled regex and its associated replacement string
Click to show internal directories.
Click to hide internal directories.