httpcache: Index | Files

package rule

import ""


Package Files

chained.go header.go rule.go satisfied.go

type Rule Uses

type Rule interface {
    Claim(*fasthttp.RequestCtx) bool
    Valid(*fasthttp.RequestCtx) bool

Rule a superset of validators

func Chained Uses

func Chained(rule Rule, next ...Rule) Rule

Chained returns a new rule which has more than one coming next ruleset

func Header(claim ruleset.HeaderPredicate, valid ruleset.HeaderPredicate) Rule

Header returns a new rule witch claims and execute the post validations trough headers

func HeaderClaim Uses

func HeaderClaim(claim ruleset.HeaderPredicate) Rule

HeaderClaim returns a header rule which cares only about claiming (pre-validation)

func HeaderValid Uses

func HeaderValid(valid ruleset.HeaderPredicate) Rule

HeaderValid returns a header rule which cares only about valid (post-validation)

func Satisfied Uses

func Satisfied() Rule

Satisfied returns a rule which allows anything, it's usualy the last rule on chained rules if no next rule is given, but it can be used outside of a chain too as a default allow-all rule.

Package rule imports 2 packages (graph). Updated 2017-04-12. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).