not_satisfied.go 384 B

12345678910111213141516171819202122
  1. package rule
  2. import (
  3. "github.com/kataras/iris/context"
  4. )
  5. type notSatisfiedRule struct{}
  6. var _ Rule = &notSatisfiedRule{}
  7. // NotSatisfied returns a rule which allows nothing
  8. func NotSatisfied() Rule {
  9. return &notSatisfiedRule{}
  10. }
  11. func (n *notSatisfiedRule) Claim(context.Context) bool {
  12. return false
  13. }
  14. func (n *notSatisfiedRule) Valid(context.Context) bool {
  15. return false
  16. }