mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 23:40:35 +01:00
27 lines
556 B
Go
27 lines
556 B
Go
|
// Copyright 2017 Gerasimos Maropoulos, ΓΜ. All rights reserved.
|
||
|
// Use of this source code is governed by a BSD-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
package rule
|
||
|
|
||
|
import (
|
||
|
"github.com/kataras/iris/context"
|
||
|
)
|
||
|
|
||
|
type notSatisfiedRule struct{}
|
||
|
|
||
|
var _ Rule = ¬SatisfiedRule{}
|
||
|
|
||
|
// NotSatisfied returns a rule which allows nothing
|
||
|
func NotSatisfied() Rule {
|
||
|
return ¬SatisfiedRule{}
|
||
|
}
|
||
|
|
||
|
func (n *notSatisfiedRule) Claim(context.Context) bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
func (n *notSatisfiedRule) Valid(context.Context) bool {
|
||
|
return false
|
||
|
}
|