Documentation
¶
Index ¶
- Constants
- func IsZero(v reflect.Value) bool
- type DiffReporter
- type ExaminationResult
- type Expectation
- type HttpHeader
- type HttpInvoker
- type HttpInvokerOptions
- type HttpRequest
- type HttpResponse
- type MeasureBody
- type MeasureHeader
- type MeasureHeaders
- type MeasureStatusCode
- type Scenario
- type SpecHandler
- type SpecHandlerOptions
Constants ¶
View Source
const DEFAULT_PDP string = `http://localhost:17779`
Variables ¶
This section is empty.
Functions ¶
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"`
Headers *MeasureHeaders `yaml:"headers"`
Body *MeasureBody `yaml:"body"`
}
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) (*HttpResponse, error)
type HttpInvokerOptions ¶
type HttpInvokerOptions interface {
GetPDP() string
}
type HttpRequest ¶
type HttpRequest struct {
Method string `yaml:"method"`
PDP string `yaml:"pdp"`
Path string `yaml:"path"`
Headers []HttpHeader `yaml:"headers"`
Body string `yaml:"body"`
}
type HttpResponse ¶
type MeasureBody ¶
type MeasureHeader ¶
type MeasureHeaders ¶
type MeasureHeaders struct {
HasTotal *int `yaml:"has-total"`
Items []MeasureHeader `yaml:"items"`
}
type MeasureStatusCode ¶
type MeasureStatusCode struct {
EqualTo *int `yaml:"equal-to"`
}
type Scenario ¶
type Scenario struct {
Title string `yaml:"title"`
Skipped bool `yaml:"skipped"`
OnError string `yaml:"on-error"`
Request *HttpRequest `yaml:"request"`
Expectation *Expectation `yaml:"expectation"`
}
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.