Documentation ¶
Index ¶
Constants ¶
View Source
const ( Or = "or" And = "and" Not = "not" Equals = "eq" NotEquals = "ne" GreaterThan = "gt" GreaterThanOrEqual = "ge" LessThan = "lt" LessThanOrEqual = "le" In = "in" List = "list" Struct = "struct" Add = "add" Sub = "sub" Mult = "mult" Div = "div" Mod = "mod" SetField = "set-field" GetField = "get-field" Index = "index" All = "all" Filter = "filter" Exists = "exists" ExistsOne = "exists_one" Map = "map" Lambda = "lambda" If = "if" )
Variables ¶
View Source
var ErrUnknownOperator = errors.New("unknown operator")
Functions ¶
func ResidualExpr ¶
Types ¶
type PolicyPlanResult ¶
type PolicyPlanResult struct { Scope string AllowFilter []*qpN DenyFilter []*qpN ValidationErrors []*schemav1.ValidationError }
func CombinePlans ¶
func CombinePlans(principalPolicyPlan, resourcePolicyPlan *PolicyPlanResult) *PolicyPlanResult
func (*PolicyPlanResult) Add ¶
func (p *PolicyPlanResult) Add(filter *qpN, effect effectv1.Effect)
func (*PolicyPlanResult) Empty ¶
func (p *PolicyPlanResult) Empty() bool
func (*PolicyPlanResult) ToPlanResourcesOutput ¶
func (p *PolicyPlanResult) ToPlanResourcesOutput(input *enginev1.PlanResourcesInput) (*enginev1.PlanResourcesOutput, error)
type PrincipalPolicyEvaluator ¶
type PrincipalPolicyEvaluator struct { Policy *runtimev1.RunnablePrincipalPolicySet Globals map[string]any NowFn func() time.Time }
func (*PrincipalPolicyEvaluator) EvaluateResourcesQueryPlan ¶
func (ppe *PrincipalPolicyEvaluator) EvaluateResourcesQueryPlan(ctx context.Context, input *enginev1.PlanResourcesInput) (*PolicyPlanResult, error)
type ResourcePolicyEvaluator ¶
type ResourcePolicyEvaluator struct { Policy *runtimev1.RunnableResourcePolicySet Globals map[string]any SchemaMgr schema.Manager NowFn func() time.Time }
func (*ResourcePolicyEvaluator) EvaluateResourcesQueryPlan ¶
func (rpe *ResourcePolicyEvaluator) EvaluateResourcesQueryPlan(ctx context.Context, input *enginev1.PlanResourcesInput) (*PolicyPlanResult, error)
Click to show internal directories.
Click to hide internal directories.