Documentation
¶
Index ¶
- type CheckRequestFunc
- func CheckRequestBodyValue(key string, value ...string) CheckRequestFunc
- func CheckRequestHeaderKeyValue(key string, value ...string) CheckRequestFunc
- func CheckRequestMethod(method string) CheckRequestFunc
- func CheckRequestURL(url string) CheckRequestFunc
- func ComposeCheckRequestFunc(checks ...CheckRequestFunc) CheckRequestFunc
- type JSONUnmarshalTestCase
- type JSONUnmarshalTestCases
- type QueryValuesTestCase
- type QueryValuesTestCases
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckRequestFunc ¶
CheckRequestFunc functions perform a check against an http.Request.
func CheckRequestBodyValue ¶
func CheckRequestBodyValue(key string, value ...string) CheckRequestFunc
CheckRequestBodyValue checks that a requests URL-encoded body has the given key and value.
func CheckRequestHeaderKeyValue ¶
func CheckRequestHeaderKeyValue(key string, value ...string) CheckRequestFunc
CheckRequestHeaderKeyValue checks that an http.Request's header has a given value for a given key.
func CheckRequestMethod ¶
func CheckRequestMethod(method string) CheckRequestFunc
CheckRequestMethod checks that a requests method matches the given method.
func CheckRequestURL ¶
func CheckRequestURL(url string) CheckRequestFunc
CheckRequestURL checks that a request's URL matches the given URL.
func ComposeCheckRequestFunc ¶
func ComposeCheckRequestFunc(checks ...CheckRequestFunc) CheckRequestFunc
ComposeCheckRequestFunc returns a new CheckRequestFunc from an arbitrary number of other CheckRequestFunc functions.
type JSONUnmarshalTestCase ¶
type JSONUnmarshalTestCase struct {
Name string
InputString string
Want interface{}
WantError bool
}
JSONUnmarshalTestCase defines a test case for json.Unmarshal.
func (JSONUnmarshalTestCase) Test ¶
func (test JSONUnmarshalTestCase) Test(t *testing.T)
Test runs the Test case.
type JSONUnmarshalTestCases ¶
type JSONUnmarshalTestCases []JSONUnmarshalTestCase
JSONUnmarshalTestCases is a collection of JSONUnmarshalTestCases tests.
func (JSONUnmarshalTestCases) Test ¶
func (tests JSONUnmarshalTestCases) Test(t *testing.T)
Test runs the Test defined for each item in the collection.
type QueryValuesTestCase ¶
QueryValuesTestCase defines a test case for query.Values.
func (QueryValuesTestCase) Test ¶
func (test QueryValuesTestCase) Test(t *testing.T)
Test runs the Test.
type QueryValuesTestCases ¶
type QueryValuesTestCases []QueryValuesTestCase
QueryValuesTestCases is a collection of queryValuesTestCase tests.
func (QueryValuesTestCases) Test ¶
func (tests QueryValuesTestCases) Test(t *testing.T)
Test runs the Test defined for each item in the collection.