Documentation ¶
Index ¶
- Constants
- type And
- type Builder
- type Headers
- type Method
- type Or
- type Response
- func (r *Response) Delay(min, max int) *Response
- func (r *Response) Start() (*httptest.Server, error)
- func (r *Response) When(target, modifier, operator, value string) *When
- func (r *Response) WhenBodyEq(value string) *When
- func (r *Response) WhenHeaderEq(headerName, headerValue string) *When
- func (r *Response) WhenPathInBodyEq(field string, value string) *When
- func (r *Response) WhenQueryStringEq(queryStringName, queryStringValue string) *When
- func (r *Response) WhenRouteParamEq(routeParamName, routeParamValue string) *When
- type When
Constants ¶
View Source
const ( Header = "header" Body = "body" QueryString = "query_string" Cookie = "cookie" RouteParam = "route_param" RequestNumber = "request_number" )
View Source
const ( Equal = "equal" Regex = "regex" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type And ¶
type And struct {
// contains filtered or unexported fields
}
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
type Or ¶
type Or struct {
// contains filtered or unexported fields
}
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) WhenBodyEq ¶ added in v0.1.1
WhenBodyEq is a response rule. It can be used to match a request body with the given value.
func (*Response) WhenHeaderEq ¶ added in v0.1.1
WhenHeaderEq is a response rule. It can be used to match a request header with the given value.
func (*Response) WhenPathInBodyEq ¶ added in v0.1.1
WhenPathInBodyEq is a response rule. It can be used to match a child body with the given value.
func (*Response) WhenQueryStringEq ¶ added in v0.1.1
WhenQueryStringEq is a response rule. It can be used to match a request query string with the given value.
func (*Response) WhenRouteParamEq ¶ added in v0.1.1
WhenRouteParamEq is a response rule. It can be used to match a request route parameter with the given value.
Click to show internal directories.
Click to hide internal directories.