mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
ppl: add data type, implement string and list matchers (#2228)
* ppl: add data type, implement string and list matchers * update policy converter
This commit is contained in:
parent
1cd95e808d
commit
96b9702ee3
21 changed files with 325 additions and 104 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
func Test(t *testing.T) {
|
||||
g := New(WithCriterion(func(g *Generator) Criterion {
|
||||
return NewCriterionFunc([]string{"accept"}, func(subPath string, data parser.Value) (rule *ast.Rule, additionalRules []*ast.Rule, err error) {
|
||||
return NewCriterionFunc(CriterionDataTypeUnused, []string{"accept"}, func(subPath string, data parser.Value) (rule *ast.Rule, additionalRules []*ast.Rule, err error) {
|
||||
rule = g.NewRule("accept")
|
||||
rule.Body = append(rule.Body, ast.MustParseExpr("1 == 1"))
|
||||
return rule, nil, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue