conditions

package
v0.35.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CELRequestIdent      = "request"
	CELResourceAbbrev    = "R"
	CELResourceKindField = "kind"
	CELResourceField     = "resource"
	CELPrincipalAbbrev   = "P"
	CELPrincipalField    = "principal"
	CELRuntimeIdent      = "runtime"
	CELVariablesIdent    = "variables"
	CELVariablesAbbrev   = "V"
	CELGlobalsIdent      = "globals"
	CELGlobalsAbbrev     = "G"
	CELAttrField         = "attr"
)
View Source
const (
	IDFn = "id"
)

Variables

Functions

func CerbosCELLib

func CerbosCELLib() cel.EnvOption

CerbosCELLib returns the custom CEL functions provided by Cerbos.

func Eval added in v0.14.0

func Eval(env *cel.Env, ast *cel.Ast, vars any, nowFunc func() time.Time, opts ...cel.ProgramOption) (ref.Val, *cel.EvalDetails, error)

Eval returns the result of an evaluation of the ast and environment against the input vars, providing time-based functions with a static definition of the current time.

See https://pkg.go.dev/github.com/google/cel-go/cel#Program.Eval.

func ExpandAbbrev added in v0.18.0

func ExpandAbbrev(s string) string

func Fqn added in v0.12.0

func Fqn(s string) string

func ResourceAttributeNames added in v0.12.0

func ResourceAttributeNames(s string) []string

func ResourceFieldNames added in v0.33.0

func ResourceFieldNames(s string) []string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL