func (aclRule *ACLRule) Matches(params *expression.Parameters, cache *expression.Cache) (bool, error) {
	if aclRule.Criteria == nil {
		return true, nil
	}
	return aclRule.Criteria.allows(params, cache)
}
Matches returns true if a rule matches
package lang
import (
	"sort"
	"github.com/Aptomi/aptomi/pkg/lang/expression"
	"github.com/Aptomi/aptomi/pkg/runtime"
)
const namespaceAll = "*"
type ACLRule struct {
	runtime.TypeKind `yaml:",inline"`
	Metadata         `validate:"required"`
	Weight int `validate:"min=0"`
	Criteria *Criteria `yaml:",omitempty" validate:"omitempty"`
	Actions *ACLRuleActions `validate:"required"`
}
var TypeACLRule = &runtime.TypeInfo{
	Kind:        "aclrule",
	Storable:    true,
	Versioned:   true,
	Constructor: func() runtime.Object { return &ACLRule{} },
}