Documentation ¶
Index ¶
- func NewClient(host string, port int, verbose bool) *client
- type ClearRequest
- type Client
- type Delay
- type Expectation
- type ExpectationID
- type HTTPError
- type HTTPRequest
- type HTTPResponse
- type RetrieveRequest
- type RetrieveResponse
- type TimeToLive
- type TimeUnit
- type Times
- type VerificationTimes
- type Verify
- type VerifySequence
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClearRequest ¶
type ClearRequest struct {
ExpectationID ExpectationID `json:"expectationId"`
}
type Client ¶
type Client interface { Expectation(context.Context, Expectation) error Verify(context.Context, Verify) error VerifySequence(context.Context, VerifySequence) error Clear(context.Context, ClearRequest) error Reset(context.Context) error Retrieve(context.Context, RetrieveRequest) (RetrieveResponse, error) }
type Expectation ¶
type Expectation struct { ID string `json:"id"` Priority int `json:"priority"` HTTPRequest *HTTPRequest `json:"httpRequest,omitempty"` HTTPResponse *HTTPResponse `json:"httpResponse,omitempty"` Times *Times `json:"times,omitempty"` TimeToLive *TimeToLive `json:"timeToLive,omitempty"` HTTPError *HTTPError `json:"httpError,omitempty"` }
type ExpectationID ¶
type ExpectationID struct {
ID string `json:"id"`
}
type HTTPRequest ¶
type HTTPRequest struct { Method string `json:"method"` Path string `json:"path"` PathParameters map[string][]string `json:"pathParameters,omitempty"` QueryStringParameters map[string][]string `json:"queryStringParameters,omitempty"` Headers map[string]interface{} `json:"headers,omitempty"` Body interface{} `json:"body,omitempty"` }
type HTTPResponse ¶
type RetrieveRequest ¶
type RetrieveRequest HTTPRequest
type RetrieveResponse ¶
type RetrieveResponse []HTTPRequest
type TimeToLive ¶
type VerificationTimes ¶
type Verify ¶
type Verify struct { ExpectationID ExpectationID `json:"expectationId"` HTTPRequest *HTTPRequest `json:"httpRequest,omitempty"` Times *VerificationTimes `json:"times,omitempty"` }
type VerifySequence ¶
type VerifySequence struct { ExpectationIDs []ExpectationID `json:"expectationIds,omitempty"` HTTPRequests *HTTPRequest `json:"httpRequest,omitempty"` }
Click to show internal directories.
Click to hide internal directories.