Documentation
¶
Index ¶
- type ComparisonOperators
- type ExaminationResult
- type Expectation
- type GeneratedSnapshot
- type MeasureBody
- type MeasureBodyField
- type MeasureHeader
- type MeasureHeaders
- type MeasureStatusCode
- type MeasureTotal
- type SectionCapture
- type SpecBuilder
- type SpecHandler
- type SpecHandlerOptions
- type TestCase
- type TestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComparisonOperators ¶ added in v1.0.6
type ComparisonOperators struct {
EqualTo interface{} `yaml:"equal-to,omitempty" json:"equal-to"`
NotEqualTo interface{} `yaml:"not-equal-to,omitempty" json:"not-equal-to"`
LT interface{} `yaml:"lt,omitempty" json:"lt"`
LTE interface{} `yaml:"lte,omitempty" json:"lte"`
GT interface{} `yaml:"gt,omitempty" json:"gt"`
GTE interface{} `yaml:"gte,omitempty" json:"gte"`
MemberOf []interface{} `yaml:"member-of,omitempty" json:"member-of"`
NotMemberOf []interface{} `yaml:"not-member-of,omitempty" json:"not-member-of"`
}
type ExaminationResult ¶
type Expectation ¶
type Expectation struct {
StatusCode *MeasureStatusCode `yaml:"status-code,omitempty" json:"status-code"`
Headers *MeasureHeaders `yaml:"headers,omitempty" json:"headers"`
Body *MeasureBody `yaml:"body,omitempty" json:"body"`
}
type GeneratedSnapshot ¶ added in v1.0.1
type GeneratedSnapshot struct {
TestCases []TestCase `yaml:"testcase-snapshot"`
}
type MeasureBody ¶
type MeasureBody struct {
HasFormat *string `yaml:"has-format,omitempty" json:"has-format"`
Includes *string `yaml:"includes,omitempty" json:"includes"`
IsEqualTo *string `yaml:"is-equal-to,omitempty" json:"is-equal-to"`
MatchWith *string `yaml:"match-with,omitempty" json:"match-with"`
Fields []MeasureBodyField `yaml:"fields,omitempty" json:"fields"`
}
type MeasureBodyField ¶ added in v1.0.6
type MeasureBodyField struct {
Path *string `yaml:"path,omitempty" json:"path"`
Is *ComparisonOperators `yaml:"is,omitempty" json:"is"`
}
type MeasureHeader ¶
type MeasureHeader struct {
Name *string `yaml:"name" json:"name"`
Is *ComparisonOperators `yaml:"is,omitempty" json:"is"`
}
type MeasureHeaders ¶
type MeasureHeaders struct {
Total *MeasureTotal `yaml:"total,omitempty" json:"total"`
Items []MeasureHeader `yaml:"items,omitempty" json:"items"`
}
type MeasureStatusCode ¶
type MeasureStatusCode struct {
Is *ComparisonOperators `yaml:"is,omitempty" json:"is"`
}
type MeasureTotal ¶ added in v1.0.6
type MeasureTotal struct {
Is *ComparisonOperators `yaml:"is,omitempty" json:"is"`
}
type SectionCapture ¶ added in v1.0.8
type SectionCapture struct {
StoreID string `yaml:"store-id,omitempty" json:"store-id"`
}
type SpecBuilder ¶ added in v1.0.8
func NewSpecBuilder ¶ added in v1.0.8
func NewSpecBuilder() (*SpecBuilder, error)
func (*SpecBuilder) GenerateTestCase ¶ added in v1.0.8
func (g *SpecBuilder) GenerateTestCase(w io.Writer, req *client.HttpRequest, res *client.HttpResponse) error
type SpecHandler ¶
type SpecHandler struct {
// contains filtered or unexported fields
}
func NewSpecHandler ¶
func NewSpecHandler(opts SpecHandlerOptions) (e *SpecHandler, err error)
func (*SpecHandler) Examine ¶
func (e *SpecHandler) Examine(testcase *TestCase, cache *sieve.RestCache) (*ExaminationResult, error)
type SpecHandlerOptions ¶
type SpecHandlerOptions interface {
}
type TestCase ¶ added in v1.0.3
type TestCase struct {
Title string `yaml:"title" json:"title"`
Version *string `yaml:"version,omitempty" json:"version"`
Request *client.HttpRequest `yaml:"request" json:"request"`
Capture *SectionCapture `yaml:"capture" json:"capture"`
Expectation *Expectation `yaml:"expectation" json:"expectation"`
Pending *bool `yaml:"pending,omitempty" json:"pending"`
Tags []string `yaml:"tags,omitempty" json:"tags"`
CreatedTime *string `yaml:"created-time,omitempty" json:"created-time"`
}
Click to show internal directories.
Click to hide internal directories.