unifier

package
v0.0.0-...-bfb193a Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unify

func Unify(r tree.RawPolicy, additionalMacros []map[string]tree.Macro, defaultPositive, defaultNegative, defaultPolicy string) (tree.Policy, error)

Unify will unify all variables and calls in the given rule set with the macros in the same file. The macros in the same file will be evaluated linearly, so it is possible to use the same variable name multiple times. The additionalMacros provide access to variables defined in other files. The list of additional macros will be combined in such a way that the names in later maps override the names in the earlier maps. The default positive and negative actions can be overridden in the files by providing DEFAULT_POSITIVE and DEFAULT_NEGATIVE variables anywhere in the files. The default actions can only be defined once in a file, and will be in effect for all rules in that file, unless a specific rule overrides the default actions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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