Documentation ¶
Index ¶
- type And
- type Check
- func Body(expected string) Check
- func BodyBytes(expected []byte) Check
- func Header(header http.Header) Check
- func Method(methodName string) Check
- func MethodDELETE() Check
- func MethodPATCH() Check
- func MethodPOST() Check
- func MethodPUT() Check
- func PathSuffix(expectedSuffix string) Check
- func QueryParam(key string, value ...string) Check
- func QueryParamsMissing(keys ...string) Check
- type Condition
- type Or
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type And ¶
type And []Condition
And is a composite Condition which evaluates to true if all conditions are met. Empty list returns false.
func (And) EvaluateCondition ¶
type Check ¶
type Check func(w http.ResponseWriter, r *http.Request) bool
Check is the most basic Condition. It is a function definition that allows custom implementation. There are some out of the box functions in this package that have this signature.
func MethodDELETE ¶
func MethodDELETE() Check
func MethodPATCH ¶
func MethodPATCH() Check
func MethodPOST ¶
func MethodPOST() Check
func PathSuffix ¶
PathSuffix returns a check expecting request URL path to match the template.
func QueryParam ¶
func QueryParamsMissing ¶
func (Check) EvaluateCondition ¶
Click to show internal directories.
Click to hide internal directories.