Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNonDerivable = errors.New("data is non derivable")
Functions ¶
func DeriveProperties ¶
Types ¶
type Builtin ¶
type Builtin interface { Func() *rego.Function Impl(rego.BuiltinContext, []*ast.Term) (*ast.Term, error) }
Builtin is represents a built-in function in the policy engine. It specifies the function signature and the function implementation.
type DataDeriver ¶
type DataDeriver interface { DeriveNamespace(map[string]any) (Namespace, error) DeriveProperties(Namespace, map[string]any) (map[string]any, error) }
DataDeriver is the interface that provides functions to derive a policy namespace and report properties from input data for a specific provider.
type Namespace ¶
type Namespace string
func DeriveNamespace ¶
func DeriveNamespace(deriver DataDeriver, data any) (Namespace, error)
type Provider ¶
type Provider interface { DataDeriver Builtins() []Builtin }
Provider is the interface that provides the functions required to work with a specific provider, namely a function to register built-in functions in the policy engine and functions to derive required information from input data. See DataDeriver.
Click to show internal directories.
Click to hide internal directories.