Documentation ¶
Overview ¶
Package ruleset provides the basics rules which are being extended by rules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AuthorizationRule = func(header GetHeader) bool { return header("Authorization") == "" && header("Proxy-Authenticate") == "" } MustRevalidateRule = func(header GetHeader) bool { return header("Must-Revalidate") == "" } ZeroMaxAgeRule = func(header GetHeader) bool { return header("S-Maxage") != "0" && header("Max-Age") != "0" } NoCacheRule = func(header GetHeader) bool { return header("No-Cache") != "true" } )
The shared header-mostly rules for both nethttp and fasthttp
View Source
var EmptyHeaderPredicate = func(GetHeader) bool { return true }
EmptyHeaderPredicate returns always true
Functions ¶
This section is empty.
Types ¶
type GetHeader ¶
GetHeader is a type of func which receives a func of string which returns a string used to get headers values, both request's and response's.
type HeaderPredicate ¶
HeaderPredicate is a type of func which receives a func of string which returns a string and a boolean, used to get headers values, both request's and response's.
Click to show internal directories.
Click to hide internal directories.