engine

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 ExaminationResult struct {
	Duration time.Duration
	Errors   map[string]error
	Response *client.HttpResponse
	Status   string
}

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

type SpecBuilder struct {
	ExcludedHeaders []string
	Version         string
}

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"`
}

type TestSuite added in v1.0.3

type TestSuite struct {
	TestCases []*TestCase `yaml:"testcases" json:"testcases"`
	Pending   *bool       `yaml:"pending,omitempty" json:"pending"`
	// contains filtered or unexported fields
}

func (*TestSuite) GetResultCache added in v1.0.8

func (r *TestSuite) GetResultCache() *sieve.RestCache

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL