Documentation
¶
Index ¶
- Constants
- func IsZero(v reflect.Value) bool
- func RefOfString(val string) *string
- type DiffReporter
- type ExaminationResult
- type Expectation
- type ExplanationWriter
- type GeneratedSnapshot
- type HttpHeader
- type HttpInvoker
- type HttpInvokerOptions
- type HttpRequest
- type HttpResponse
- type Interceptor
- type MeasureBody
- type MeasureHeader
- type MeasureHeaders
- type MeasureStatusCode
- type Scenario
- type SnapshotGenerator
- type SpecHandler
- type SpecHandlerOptions
Constants ¶
View Source
const DEFAULT_PDP string = `http://localhost:17779`
Variables ¶
This section is empty.
Functions ¶
func RefOfString ¶ added in v1.0.1
Types ¶
type DiffReporter ¶
type DiffReporter struct {
// contains filtered or unexported fields
}
func (*DiffReporter) GetDiffs ¶
func (r *DiffReporter) GetDiffs() []string
func (*DiffReporter) HasDiffs ¶
func (r *DiffReporter) HasDiffs() bool
func (*DiffReporter) PopStep ¶
func (r *DiffReporter) PopStep()
func (*DiffReporter) PushStep ¶
func (r *DiffReporter) PushStep(ps cmp.PathStep)
func (*DiffReporter) Report ¶
func (r *DiffReporter) Report(rs cmp.Result)
func (*DiffReporter) String ¶
func (r *DiffReporter) String() string
type ExaminationResult ¶
type ExaminationResult struct {
Errors map[string]error
Response *HttpResponse
}
type Expectation ¶
type Expectation struct {
StatusCode *MeasureStatusCode `yaml:"status-code,omitempty"`
Headers *MeasureHeaders `yaml:"headers,omitempty"`
Body *MeasureBody `yaml:"body,omitempty"`
}
type ExplanationWriter ¶ added in v1.0.1
type ExplanationWriter interface {
Interceptor
GetConsoleOut() io.Writer
GetConsoleErr() io.Writer
}
type GeneratedSnapshot ¶ added in v1.0.1
type GeneratedSnapshot struct {
Scenarios []Scenario `yaml:"testcase-snapshot"`
}
type HttpHeader ¶
type HttpInvoker ¶
type HttpInvoker struct {
// contains filtered or unexported fields
}
func NewHttpInvoker ¶
func NewHttpInvoker(opts HttpInvokerOptions) (*HttpInvoker, error)
func (*HttpInvoker) Do ¶
func (c *HttpInvoker) Do(req *HttpRequest, interceptors ...Interceptor) (*HttpResponse, error)
type HttpInvokerOptions ¶
type HttpInvokerOptions interface {
GetPDP() string
}
type HttpRequest ¶
type HttpResponse ¶
type Interceptor ¶ added in v1.0.1
type Interceptor interface {
}
type MeasureBody ¶
type MeasureBody struct {
HasFormat *string `yaml:"has-format,omitempty"`
TextEquals *string `yaml:"text-equal,omitempty"`
MatchWith *string `yaml:"match-with,omitempty"`
JSONEquals *string `yaml:"json-equal,omitempty"`
JSONCovers *string `yaml:"json-include,omitempty"`
YAMLEquals *string `yaml:"yaml-equal,omitempty"`
YAMLCovers *string `yaml:"yaml-include,omitempty"`
}
type MeasureHeader ¶
type MeasureHeaders ¶
type MeasureHeaders struct {
HasTotal *int `yaml:"has-total,omitempty"`
Items []MeasureHeader `yaml:"items,omitempty"`
}
type MeasureStatusCode ¶
type Scenario ¶
type Scenario struct {
Title string `yaml:"title"`
Skipped *bool `yaml:"skipped,omitempty"`
OnError string `yaml:"on-error,omitempty"`
Request *HttpRequest `yaml:"request"`
Expectation *Expectation `yaml:"expectation"`
}
type SnapshotGenerator ¶ added in v1.0.1
type SnapshotGenerator interface {
Interceptor
GetTargetWriter() io.Writer
}
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(scenario *Scenario) (*ExaminationResult, error)
type SpecHandlerOptions ¶
type SpecHandlerOptions interface {
}
Click to show internal directories.
Click to hide internal directories.