Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyConditionIndex = errors.New("empty condition index") ErrNoMatchingConditions = errors.New("no matching conditions") ErrUnexpectedInput = errors.New("unexpected input") ErrUnexpectedResult = errors.New("unexpected result") )
View Source
var ( ErrAmbiguousDerivedRole = errors.New("ambiguous derived role") ErrCodeGenFailure = errors.New("code generation failure") ErrCompileError = errors.New("compile error") ErrImportNotFound = errors.New("import not found") ErrInvalidImport = errors.New("invalid import") ErrInvalidMatchExpr = errors.New("invalid match expression") ErrNoEvaluator = errors.New("no evaluator available") ErrUnknownDerivedRole = errors.New("unknown derived role") )
View Source
var ErrPolicyNotExecutable = errors.New("policy not executable")
Functions ¶
func BatchCompile ¶
func BatchCompile(queue <-chan *policy.CompilationUnit) error
Types ¶
type CELConditionEvaluator ¶
type CELConditionEvaluator struct {
// contains filtered or unexported fields
}
func (*CELConditionEvaluator) Eval ¶
func (ce *CELConditionEvaluator) Eval(input interface{}) (bool, error)
type ConditionEvaluator ¶
type ConditionIndex ¶
type ConditionIndex map[namer.ModuleID]ConditionMap
func NewConditionIndex ¶
func NewConditionIndex() ConditionIndex
func (ConditionIndex) Add ¶
func (ci ConditionIndex) Add(modName string, condMap ConditionMap)
func (ConditionIndex) AddConditionEvaluator ¶
func (ci ConditionIndex) AddConditionEvaluator(modName, key string, condEval ConditionEvaluator)
func (ConditionIndex) GetConditionEvaluator ¶
func (ci ConditionIndex) GetConditionEvaluator(modName, key string) (ConditionEvaluator, error)
type ConditionMap ¶
type ConditionMap map[string]ConditionEvaluator
func NewConditionMap ¶
func NewConditionMap(conds map[string]*codegen.CELCondition, globals map[string]string) (ConditionMap, error)
func NewConditionMapFromRepr ¶
func NewConditionMapFromRepr(conds map[string]*exprpb.CheckedExpr, globals map[string]string) (ConditionMap, error)
type EvalResult ¶
type Evaluator ¶
type Evaluator interface {
Eval(ctx context.Context, queryCache cache.InterQueryCache, input ast.Value) (*EvalResult, error)
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) GetEvaluator ¶
func (*Manager) OnStorageEvent ¶
func (*Manager) SubscriberID ¶
Click to show internal directories.
Click to hide internal directories.