Documentation ¶
Overview ¶
Package status contains a modifier to rewrite the status code on a response.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModifier ¶
func NewModifier(statusCode int) martian.ResponseModifier
NewModifier constructs a statusModifier that overrides response status codes with the HTTP status code provided.
func NewVerifier ¶
func NewVerifier(statusCode int) verify.ResponseVerifier
NewVerifier returns a new status.Verifier for statusCode.
Types ¶
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier verifies the status codes of all responses.
func (*Verifier) ModifyResponse ¶
ModifyResponse verifies that the status code for all requests matches statusCode.
func (*Verifier) ResetResponseVerifications ¶
func (v *Verifier) ResetResponseVerifications()
ResetResponseVerifications clears all failed response verifications.
func (*Verifier) VerifyResponses ¶
VerifyResponses returns an error if verification for any request failed. If an error is returned it will be of type *martian.MultiError.
Click to show internal directories.
Click to hide internal directories.