You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
390B

  1. package rule
  2. import (
  3. "github.com/kataras/iris/v12/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. }