Documentation ¶
Index ¶
- func MakeExpiredTLSCert() tls.Certificate
- func MakeSelfSignedTLSCert() tls.Certificate
- func MakeTLSCertWithInvalidHost() tls.Certificate
- func MakeUnauthorizedTLSCert() tls.Certificate
- func NewWarningProducer(warnings []string) (warning_producer warningProducer)
- func RemoveWhiteSpaceFromBody(body string) string
- type JSONArrayRequest
- type JSONMapRequest
- type RequestMatcher
- type TestHandler
- type TestRequest
- type TestResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeExpiredTLSCert ¶
func MakeExpiredTLSCert() tls.Certificate
func MakeSelfSignedTLSCert ¶
func MakeSelfSignedTLSCert() tls.Certificate
func MakeTLSCertWithInvalidHost ¶
func MakeTLSCertWithInvalidHost() tls.Certificate
func MakeUnauthorizedTLSCert ¶
func MakeUnauthorizedTLSCert() tls.Certificate
func NewWarningProducer ¶
func NewWarningProducer(warnings []string) (warning_producer warningProducer)
Types ¶
type JSONArrayRequest ¶
type JSONArrayRequest []interface{}
func (*JSONArrayRequest) String ¶
func (json *JSONArrayRequest) String() string
type JSONMapRequest ¶
type JSONMapRequest map[string]interface{}
func (*JSONMapRequest) String ¶
func (json *JSONMapRequest) String() string
type RequestMatcher ¶
func RequestBodyMatcher ¶
func RequestBodyMatcher(expectedBodyString string) RequestMatcher
func RequestBodyMatcherWithContentType ¶
func RequestBodyMatcherWithContentType(expectedBody, expectedContentType string) RequestMatcher
type TestHandler ¶
type TestHandler struct { Requests []TestRequest CallCount int }
func NewServer ¶
func NewServer(requests []TestRequest) (*httptest.Server, *TestHandler)
func NewTLSServer ¶
func NewTLSServer(requests []TestRequest) (*httptest.Server, *TestHandler)
func (*TestHandler) AllRequestsCalled ¶
func (h *TestHandler) AllRequestsCalled() bool
func (*TestHandler) ServeHTTP ¶
func (h *TestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TestRequest ¶
type TestRequest struct { Method string Path string Header http.Header Matcher RequestMatcher Response TestResponse }
Click to show internal directories.
Click to hide internal directories.