Documentation ¶
Index ¶
- Constants
- func ParseDuration(s string) (time.Duration, error)
- type Condition
- type DataSource
- type Request
- type RowMap
- type SQLStatement
- type TemplateDataSource
- func (t *TemplateDataSource) DeleteDataSource(dataSourceName string)
- func (t *TemplateDataSource) GetAllDataSources() map[string]*DataSource
- func (t *TemplateDataSource) GetDataSource(name string) (*DataSource, bool)
- func (t *TemplateDataSource) SetDataSource(dataSourceName string, dataSource *DataSource)
- type TemplatingData
- type Templator
- func (templator *Templator) GetSupportedMethodMap() map[string]interface{}
- func (t *Templator) NewTemplatingData(requestDetails *models.RequestDetails, literals *models.Literals, ...) *TemplatingData
- func (*Templator) ParseTemplate(responseBody string) (*raymond.Template, error)
- func (t *Templator) RenderTemplate(tpl *raymond.Template, requestDetails *models.RequestDetails, ...) (string, error)
- func (*Templator) ResetTemplateHelpers()
Constants ¶
View Source
const REQUEST_BODY_HELPER = "requestBody"
Variables ¶
This section is empty.
Functions ¶
func ParseDuration ¶ added in v0.17.2
ParseDuration parses a duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
Types ¶
type DataSource ¶ added in v1.7.0
type DataSource struct { SourceType string Name string Data [][]string // contains filtered or unexported fields }
func NewCsvDataSource ¶ added in v1.7.0
func NewCsvDataSource(fileName, fileContent string) (*DataSource, error)
func (*DataSource) GetDataSourceView ¶ added in v1.7.0
func (dataSource *DataSource) GetDataSourceView() (v2.CSVDataSourceView, error)
type SQLStatement ¶ added in v1.10.3
type SQLStatement struct { Type string // "SELECT", "UPDATE", or "DELETE" Columns []string Conditions []Condition SetClauses map[string]string // For UPDATE queries DataSourceName string }
SQLStatement represents a simple SQL-like query
type TemplateDataSource ¶ added in v1.7.0
type TemplateDataSource struct {
// contains filtered or unexported fields
}
func NewTemplateDataSource ¶ added in v1.7.0
func NewTemplateDataSource() *TemplateDataSource
func (*TemplateDataSource) DeleteDataSource ¶ added in v1.7.0
func (t *TemplateDataSource) DeleteDataSource(dataSourceName string)
func (*TemplateDataSource) GetAllDataSources ¶ added in v1.7.0
func (t *TemplateDataSource) GetAllDataSources() map[string]*DataSource
func (*TemplateDataSource) GetDataSource ¶ added in v1.10.3
func (t *TemplateDataSource) GetDataSource(name string) (*DataSource, bool)
func (*TemplateDataSource) SetDataSource ¶ added in v1.7.0
func (t *TemplateDataSource) SetDataSource(dataSourceName string, dataSource *DataSource)
type TemplatingData ¶
type Templator ¶ added in v0.14.2
type Templator struct { SupportedMethodMap map[string]interface{} TemplateHelper templateHelpers }
func NewEnrichedTemplator ¶ added in v1.10.3
func NewTemplator ¶ added in v0.14.2
func NewTemplator() *Templator
func (*Templator) GetSupportedMethodMap ¶ added in v1.5.0
func (*Templator) NewTemplatingData ¶ added in v1.5.0
func (t *Templator) NewTemplatingData(requestDetails *models.RequestDetails, literals *models.Literals, vars *models.Variables, state map[string]string) *TemplatingData
func (*Templator) ParseTemplate ¶ added in v1.0.0
func (*Templator) RenderTemplate ¶ added in v1.0.0
func (*Templator) ResetTemplateHelpers ¶ added in v1.10.3
func (*Templator) ResetTemplateHelpers()
ResetTemplateHelpers re-register all the helpers, this is useful for testing when we initialize the templator on every test, and they need a fresh copy of the data source in templatingHelpers
Click to show internal directories.
Click to hide internal directories.