Documentation
¶
Index ¶
- Variables
- type DataType
- type Query
- type RestCache
- func (s *RestCache) Apply(req *client.HttpRequest) (r *client.HttpRequest, err error)
- func (s *RestCache) Evaluate(text string) string
- func (s *RestCache) EvaluateWithExplanation(text string) (string, []string)
- func (s *RestCache) Get(testId string) (*RestResult, error)
- func (s *RestCache) Query(query string) (string, error)
- func (s *RestCache) Store(testId string, res *client.HttpResponse) (*RestResult, error)
- type RestResult
Constants ¶
This section is empty.
Variables ¶
View Source
var SIEVE_TESTCASE_BODY_FIELD_REGEXP = regexp.MustCompile(fmt.Sprintf(SIEVE_TESTCASE_PATTERN_BOUND, `\s*case\[([^\]]*)\]\.Body\[([^\]]*)\]\s*(\:\-([^\}]*))?\s*`))
View Source
var SIEVE_TESTCASE_BODY_REGEXP = regexp.MustCompile(fmt.Sprintf(SIEVE_TESTCASE_PATTERN_BOUND, `\s*case\[([^\]]*)\]\.Body\s*(\:\-([^\}]*))?\s*`))
View Source
var SIEVE_TESTCASE_HEADER_REGEXP = regexp.MustCompile(fmt.Sprintf(SIEVE_TESTCASE_PATTERN_BOUND, `\s*case\[([^\]]*)\]\.Header\[([^\]]*)\]\s*(\:\-([^\}]*))?\s*`))
View Source
var SIEVE_TESTCASE_PATTERN_BOUND = `^(?i)\${{%s}}$`
View Source
var SIEVE_TESTCASE_STATUS_CODE_REGEXP = regexp.MustCompile(fmt.Sprintf(SIEVE_TESTCASE_PATTERN_BOUND, `\s*case\[([^\]]*)\]\.StatusCode\s*(\:\-([^\}]*))?\s*`))
View Source
var SIEVE_TESTCASE_STATUS_REGEXP = regexp.MustCompile(fmt.Sprintf(SIEVE_TESTCASE_PATTERN_BOUND, `\s*case\[([^\]]*)\]\.Status\s*(\:\-([^\}]*))?\s*`))
View Source
var SIEVE_TESTCASE_VAR_EXPRESSION = regexp.MustCompile(`(?i)\${{([^}]*)}}`)
Functions ¶
This section is empty.
Types ¶
type DataType ¶
type DataType int
const ( RESP_STATUS DataType RESP_STATUS_CODE RESP_HEADER RESP_BODY RESP_BODY_FIELD )
type RestCache ¶
type RestCache struct {
// contains filtered or unexported fields
}
func NewRestCache ¶
func (*RestCache) Apply ¶
func (s *RestCache) Apply(req *client.HttpRequest) (r *client.HttpRequest, err error)
func (*RestCache) EvaluateWithExplanation ¶
func (*RestCache) Store ¶
func (s *RestCache) Store(testId string, res *client.HttpResponse) (*RestResult, error)
type RestResult ¶
type RestResult struct {
Status string
StatusCode int
Header http.Header
ContentLength int64
Body []byte
BodyField map[string]interface{}
}
func NewRestResult ¶
func NewRestResult(lowRes *client.HttpResponse) (*RestResult, error)
Click to show internal directories.
Click to hide internal directories.