package
1.4.1
Repository: https://github.com/joefitzgerald/gomega.git
Documentation: pkg.go.dev

# Packages

Package protobuf is a generated protocol buffer package.

# Functions

CombineHandler takes variadic list of handlers and produces one handlerthat calls each handler in order.
NewServer returns a new `*ghttp.Server` that wraps an `httptest` server.
NewTLSServer returns a new `*ghttp.Server` that wraps an `httptest` TLS server.
NewUnstartedServer return a new, unstarted, `*ghttp.Server`.
RespondWith returns a handler that responds to a request with the specified status code and body Body may be a string or []byte Also, RespondWith can be given an optional http.Header.
RespondWithJSONEncoded returns a handler that responds to a request with the specified status code and a body containing the JSON-encoding of the passed in object Also, RespondWithJSONEncoded can be given an optional http.Header.
RespondWithJSONEncodedPtr behaves like RespondWithJSONEncoded but takes a pointer to a status code and object.
RespondWithProto returns a handler that responds to a request with the specified status code and a bodycontaining the protobuf serialization of the provided message.
RespondWithPtr returns a handler that responds to a request with the specified status code and body Unlike RespondWith, you pass RepondWithPtr a pointer to the status code and body allowing different tests to share the same setup but specify different status codes and bodies.
VerifyBasicAuth returns a handler that verifies the request contains a BasicAuth Authorization headermatching the passed in username and password.
VerifyBody returns a handler that verifies that the body of the request matches the passed in byte array.It does this using Equal().
VerifyContentType returns a handler that verifies that a request has a Content-Type header set to thespecified value.
VerifyForm returns a handler that verifies a request contains the specified form values.
VerifyFormKV returns a handler that verifies a request contains a form key with the specified values.
VerifyHeader returns a handler that verifies the request contains the passed in headers.The passed in header keys are first canonicalized via http.CanonicalHeaderKey.
VerifyHeaderKV returns a handler that verifies the request contains a header matching the passed in key and values(recall that a `http.Header` is a mapping from string (key) to []string (values))It is a convenience wrapper around `VerifyHeader` that allows you to avoid having to create an `http.Header` object.
VerifyJSON returns a handler that verifies that the body of the request is a valid JSON representationmatching the passed in JSON string.
VerifyJSONRepresenting is similar to VerifyJSON.
VerifyProtoRepresenting returns a handler that verifies that the body of the request is a valid protobufrepresentation of the passed message.
VerifyRequest returns a handler that verifies that a request uses the specified method to connect to the specified pathYou may also pass in an optional rawQuery string which is tested against the request's `req.URL.RawQuery` For path, you may pass in a string, in which case strict equality will be appliedAlternatively you can pass in a matcher (ContainSubstring("/foo") and MatchRegexp("/foo/[a-f0-9]+") for example).

# Structs

No description provided by the author